Full-network information collection system, method, device and equipment for wireless ad hoc network
By designing a full-network information collection system for wireless ad hoc networks, using coroutine tasks and thread-safe queues, the problems of incomplete access to the entire network and high resource occupation in the wireless ad hoc network are solved, and efficient and complete full-network information collection and integration are achieved.
Patent Information
- Application Number
- CN202311557517.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2043-11-21
AI Technical Summary
In wireless ad hoc networks, due to limited bandwidth resources and computing resources, the entire network information cannot be obtained in real time, which makes the needs of upper-level applications unable to meet, and at the same time, the entire network information cannot be integrated between different ad hoc networks in real time.
Design a network-wide information collection system for wireless ad hoc networks. The host computer sends the network-wide topology request at a preset time, uses the network-wide topology request thread and interface request thread to nest multiple coroutine tasks, gradually obtain the network-wide access device list of the network-wide access device and make the network-wide information request, and update the network-wide access device information.
It improves the number of times the network-wide information is obtained in a circular manner, enhances the integrity of the network-wide information, reduces thread overhead and resource occupation of computer equipment, realizes concurrent multiple network requests, obtains complete network-wide information, and integrates the information of multiple off-site and different network ad hoc networks into a unified network-wide information.
Smart Images

Figure CN117460016B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technologies, and in particular, to a system, method, device, and equipment for collecting network-wide information for a wireless ad hoc network. Background Art
[0002] A wireless ad hoc network is a distributed network composed of multiple wireless ad hoc network radios (hereinafter referred to as "radios"), which has characteristics such as no center, dynamic topology change, self-organization ability, and multi-hop routing. By means of a certain radio in the ad hoc network, one can access the ad hoc network and access all network devices and resources in the network. In the ad hoc network application scenario, application software (such as network management software, emergency command systems, audio and video dispatching systems, etc.) runs on a computer device. The computer device connects to a certain radio in the ad hoc network to connect the application software to the ad hoc network. Each application software needs to collect the network status and other necessary information (hereinafter referred to as "network-wide information") of all radios and other bound network devices (such as cameras, human health monitors, unmanned aerial vehicles, etc.) in the network in real time to provide data support for each application scenario.
[0003] Inside the radio, a network-wide information interface is provided, which collects some basic information of the radios accessing the network in the ad hoc network, such as power, background noise, frequency, bandwidth, etc. The radio automatically collects the basic information of each radio inside. After the upper-layer application software accesses the ad hoc network, it periodically calls the network-wide information interface of a certain radio to obtain the network-wide information.
[0004] Due to the limited bandwidth resources of the ad hoc network, the radio can only synchronize a small amount of key radio information, and the computing resources inside the radio are limited and unable to obtain data of other network devices, resulting in the network-wide information provided by the radio being unable to meet the requirements of the upper-layer applications. For multiple ad hoc networks in different locations and with different networks, the different ad hoc networks are independent of each other and unable to obtain a set of integrated network-wide information in real time. Some radios do not provide a network-wide information interface, but only provide multiple request interfaces for obtaining single information, and the application software needs to call the request interfaces one by one, resulting in the inability to obtain a set of real-time synchronized and integrated network-wide information.
[0005] Based on the need to solve the above problems, the traditional method is that the application software needs to multi-threadedly call multiple network interfaces concurrently to all devices in the ad hoc network, and splice the obtained data information into network-wide information one by one. This approach occupies too much thread resources of the computer device running the application software. Due to the different response times of different network interfaces, the synchronization of the network-wide information cannot be guaranteed. Due to too many concurrent network requests and limited radio performance, network congestion is likely to occur, the request success rate is low, and the application software cannot respond to the changes in the ad hoc network state in a timely manner. Summary of the Invention
[0006] Based on this, it is necessary to provide a whole-network information collection system, method, device, and equipment for wireless ad hoc networks to address the above technical problems.
[0007] A whole-network information collection method for wireless ad hoc networks, the method comprising:
[0008] The system includes several geographically separated and heterogeneous ad hoc networks and a host computer. Each geographically separated and heterogeneous ad hoc network includes multiple network access devices. The network access devices include radios and non-radio network devices. One accessible radio in each geographically separated and heterogeneous ad hoc network is connected to the host computer;
[0009] The host computer sends a whole-network topology request to the accessible radio through a whole-network topology request thread at a preset whole-network topology request sending time; the whole-network topology request thread nests multiple whole-network topology request coroutine tasks;
[0010] The host computer parses the callback result of the whole-network topology request to obtain a list of network access devices for the corresponding geographically separated and heterogeneous ad hoc network, and sends a whole-network information request to the interfaces to be called in the corresponding list of network access devices through the interface request thread corresponding to the geographically separated and heterogeneous ad hoc network, and updates the information of the corresponding network access devices according to the callback result of the whole-network information request; the interface request thread nests multiple whole-network information request coroutine tasks.
[0011] In one embodiment, it further includes: assembling the interfaces to be called of each network access device in the list of network access devices to obtain corresponding whole-network information request coroutine tasks; each whole-network information request coroutine task sends a whole-network information request to the corresponding interface to be called through the corresponding interface request thread.
[0012] In one embodiment, it further includes: a model adder / remover for creating or deleting network access device models in memory according to the list of network access devices; the network access device model includes identification information of the network access device and network access device attributes; the identification information is the IP address of the network access device.
[0013] In one embodiment, it further includes: deleting the model corresponding to the offline network access device from the memory model according to the current list of network access devices and the memory model, and adding the model corresponding to the newly accessed network access device to the memory model.
[0014] In one embodiment, it further includes: storing the callback result of the whole-network information request of each interface request thread corresponding to the geographically separated and heterogeneous ad hoc network in a thread-safe queue; the whole-network information request result includes the asynchronous callback result of each whole-network information request coroutine task; using a model assembly and modification thread to obtain the asynchronous callback result from the queue, and updating the corresponding network access device model according to the asynchronous callback result.
[0015] In one embodiment, it further includes: obtaining the attribute data of the corresponding networked device according to the asynchronous callback result of the coroutine task requested according to the whole network information; marking the asynchronous callback result according to the networked device attributes corresponding to the attribute data and the IP address of the networked device, and storing the marked asynchronous callback results into a thread-safe queue one by one.
[0016] In one embodiment, it further includes: obtaining a preset first threshold and a second threshold; determining whether the current off-site and off-network self-organizing network is networked according to whether the callback response time of the coroutine task requested according to the current whole network topology is within the first threshold; determining whether to update the networked device model corresponding to the coroutine task of the current whole network information request according to whether the callback response time of the coroutine task requested according to the current whole network information is within the second threshold.
[0017] A method for collecting whole network information for a wireless self-organizing network implemented in the whole network information collection system for a wireless self-organizing network, the method includes:
[0018] The host computer sends a whole network topology request to the accessible radio through the whole network topology request thread at a preset whole network topology request sending time; the whole network topology request thread nests multiple whole network topology request coroutine tasks;
[0019] The host computer parses the callback result of the whole network topology request to obtain a list of networked devices corresponding to the off-site and off-network self-organizing network, sends a whole network information request to the interfaces to be called in the corresponding networked device list through the interface request thread corresponding to the off-site and off-network self-organizing network, and updates the information of the corresponding networked devices according to the callback result of the whole network information request; the interface request thread nests multiple whole network information request coroutine tasks.
[0020] A device for collecting whole network information for a wireless self-organizing network, the device includes:
[0021] A whole network topology request module, configured to enable the host computer to send a whole network topology request to the accessible radio through the whole network topology request thread at a preset whole network topology request sending time; the whole network topology request thread nests multiple whole network topology request coroutine tasks;
[0022] A whole network information collection module, configured to enable the host computer to parse the callback result of the whole network topology request to obtain a list of networked devices corresponding to the off-site and off-network self-organizing network, send a whole network information request to the interfaces to be called in the corresponding networked device list through the interface request thread corresponding to the off-site and off-network self-organizing network, and update the information of the corresponding networked devices according to the callback result of the whole network information request; the interface request thread nests multiple whole network information request coroutine tasks.
[0023] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:
[0024] The host computer sends a network-wide topology request to the accessible radio station through a network-wide topology request thread at a preset network-wide topology request sending time. The network-wide topology request thread nests multiple network-wide topology request coroutine tasks.
[0025] The host computer parses the callback result of the network-wide topology request to obtain a list of network access devices for the corresponding off-site and off-network self-organizing network. Through the interface request thread corresponding to the off-site and off-network self-organizing network, a network-wide information request is made to the interfaces to be called in the corresponding network access device list, and the information of the corresponding network access devices is updated according to the callback result of the network-wide information request. The interface request thread nests multiple network-wide information request coroutine tasks.
[0026] The above-mentioned network-wide information collection system, method, device and equipment for wireless self-organizing network can improve the number of times of cyclically obtaining network-wide information by sending a network-wide topology request to the accessible radio station through a network-wide topology request thread at a preset network-wide topology request sending time, thereby improving the integrity of the collected network-wide information. The network-wide topology request thread nests multiple network-wide topology request coroutine tasks. The host computer parses the callback result of the network-wide topology request to obtain a list of network access devices for the corresponding off-site and off-network self-organizing network. Through the interface request thread corresponding to the off-site and off-network self-organizing network, a network-wide information request is made to the interfaces to be called in the corresponding network access device list, and the information of the corresponding network access devices is updated according to the callback result of the network-wide information request. The interface request thread nests multiple network-wide information request coroutine tasks, which can greatly reduce the thread overhead, reduce the resource occupation and performance consumption of the computer device, and at the same time can make multiple network requests concurrently to obtain complete network-wide information. In the embodiment of the present invention, the network-wide information in multiple off-site and off-network self-organizing networks can be collected simultaneously and integrated into a unified network-wide information. Description of the Drawings
[0027] Figure 1 It is a schematic structural diagram of a network-wide information collection system for wireless self-organizing network in an embodiment;
[0028] Figure 2 It is a schematic architecture diagram of a network-wide information collection system applied to a host computer in an embodiment;
[0029] Figure 3 It is a schematic flowchart of network-wide data collection in an embodiment;
[0030] Figure 4 It is a schematic flowchart of a network-wide information collection method for wireless self-organizing network in an embodiment;
[0031] Figure 5It is a structural block diagram of a network-wide information collection device for a wireless ad hoc network in an embodiment;
[0032] Figure 6 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
[0034] In one embodiment, as Figure 1 shown, a network-wide information collection method for a wireless ad hoc network is provided. The system includes:
[0035] A number of geographically and network-differentiated ad hoc networks and a host computer. Each geographically and network-differentiated ad hoc network includes a plurality of network access devices. The network access devices include radios and non-radio network devices. One accessible radio in each geographically and network-differentiated ad hoc network is connected to the host computer;
[0036] The host computer sends a network-wide topology request to the accessible radio through a network-wide topology request thread at a preset network-wide topology request sending time; the network-wide topology request thread nests a plurality of network-wide topology request coroutine tasks;
[0037] The host computer parses the callback network-wide topology request result to obtain a list of network access devices corresponding to the geographically and network-differentiated ad hoc network, and sends a network-wide information request to the interfaces to be called in the corresponding network access device list through the interface request thread corresponding to the geographically and network-differentiated ad hoc network, and updates the information of the corresponding network access device according to the callback network-wide information request result; the interface request thread nests a plurality of network-wide information request coroutine tasks.
[0038] In Figure 1 , the application software runs on a computer device, that is, the host computer. The host computer is connected to a certain radio in the ad hoc network, so that the application software can be connected to the ad hoc network.
[0039] In the above-mentioned method for collecting network-wide information for wireless ad hoc networks, by using the network-wide topology request thread to send a network-wide topology request to accessible radio stations at the preset network-wide topology request sending time, the number of times of cyclically obtaining network-wide information can be increased, thereby improving the integrity of the collected network-wide information. The network-wide topology request thread nests multiple network-wide topology request coroutine tasks, and the host computer parses the callback network-wide topology request result to obtain the list of network access devices for the corresponding self-organizing network with different locations and different networks. Through the interface request thread corresponding to the self-organizing network with different locations and different networks, a network-wide information request is made to the interfaces to be called in the corresponding network access device list, and the information of the corresponding network access device is updated according to the callback network-wide information request result. The interface request thread nests multiple network-wide information request coroutine tasks, which can greatly reduce the thread overhead, reduce the resource occupancy and performance consumption of computer devices, and at the same time can make multiple network requests concurrently to obtain complete network-wide information. In the embodiment of the present invention, the network-wide information in multiple self-organizing networks with different locations and different networks can be collected simultaneously and integrated into a unified network-wide information.
[0040] As Figure 2 shown, an architecture schematic diagram of a network-wide information collection system applied to a host computer is provided. In the architecture diagram, two self-organizing networks with different locations and different networks are taken as examples. In the self-organizing network, there are both radio stations and non-radio network devices, and each radio station or device has multiple network request interfaces (abbreviation: "interface") belonging to itself for specific information acquisition. Self-organizing network A and self-organizing network B are two independent self-organizing networks with different locations and different networks. Through the VPN technology, a computer is simultaneously connected to self-organizing network A and self-organizing network B, and the access entrances are radio station A0 in self-organizing network A and radio station B0 in self-organizing network B respectively. The radio stations in self-organizing network A and self-organizing network B can be radio stations of different manufacturers. At the same time, in addition to radio stations, the network access devices in the self-organizing network can also include other application devices with network connection capabilities, such as: unmanned aerial vehicles, cameras, and human health monitors. Radio stations A0 and B0 are currently known accessible radio stations, and all network requests will be sent through A0 and B0.
[0041] First, through the network-wide topology request thread, obtain the list of network access devices in the two self-organizing networks and create radio station and device models in the memory. Then, according to the network access device list, assemble the interfaces that each radio station or device needs to be called into several coroutine tasks, and then concurrently request the coroutine tasks in the request thread. Store the results of the asynchronous callbacks of each coroutine task request into a thread-safe queue, and another thread responsible for model assembly and modification continuously extracts the device information data obtained by each interface from the queue, and updates (or adds) each piece of data to the corresponding memory model respectively. At the same time, periodically assemble the model into JSON format data at a certain time interval for use by other modules of the application software. The entire process of obtaining network-wide information is a periodic cyclic process.
[0042] The present invention needs to first obtain the list of network access devices in the ad hoc network. It can be obtained through the network topology interface provided by the radio. The radio with a simple network-wide information interface can also obtain the list of network access devices through the network-wide information, or it can be configured manually or by other means. When the host computer parses the network-wide topology request to obtain the list of network access devices, a network-wide topology request thread is started, and two network requests are concurrently made using coroutines, namely, the network-wide topology request for radio A0 in ad hoc network A and the network-wide topology request for radio B0 in ad hoc network B. The host computer parses the list of network access devices in network A and the list of network access devices in network B from the return results of the two requests.
[0043] In one embodiment, the host computer includes a model adder / remover for creating or deleting network access device models in memory according to the list of network access devices; the network access device model includes the identification information of the network access device and the attributes of the network access device; the identification information is the IP address of the network access device. In this embodiment, through the network-wide topology request thread, the lists of network access devices in the two ad hoc networks are obtained, and the radio and device models are created in memory. According to the obtained list of network access devices, the model adder / remover is used to create radio or device models in memory. Each model is uniquely identified by the IP address, and the specific attributes in the model are set according to the requirements of the application software. For example, if the application software is network management software, then attributes such as the frequency, bandwidth, background noise, and power of the radio need to be set in the model.
[0044] In one embodiment, creating or deleting network access device models in memory according to the list of network access devices includes: deleting the models corresponding to the offline network access devices from the memory model according to the current list of network access devices and the memory model, and adding the models corresponding to the newly networked network access devices to the memory model. In this embodiment, after multiple cycle loops, the model adder / remover needs to delete the models of the offline radios or devices from the memory according to the current list of networked devices, and add the models of the newly networked radios or devices to the memory.
[0045] In one embodiment, the network-wide information request to the interfaces to be called in the corresponding list of networked devices through the interface request threads corresponding to the ad hoc network across different regions and networks includes: assembling the interfaces to be called of each networked device in the networked device list to obtain corresponding network-wide information request coroutine tasks; each network-wide information request coroutine task makes a network-wide information request to the corresponding interface to be called through the corresponding interface request thread. In this embodiment, according to the networked device list, the interfaces to be retrieved for each radio or device are assembled into several coroutine tasks, and then the coroutine tasks are concurrently requested in the request thread. The results after the asynchronous callback of each coroutine task request are stored in a thread-safe queue. According to the obtained list of ad hoc network radio stations and devices and the requirements of the application software for the specific content of the network-wide information, the information acquisition interfaces to be called for each radio station and device are assembled into several coroutine tasks. Applying the scheme of nesting coroutines in threads to the network-wide information interface call of the ad hoc network greatly reduces the thread overhead, reduces the resource occupancy and performance consumption of computer devices, and at the same time can make multiple network requests concurrently to obtain complete network-wide information.
[0046] Specifically, in Figure 2 , since the callback response times of the network-wide topology request coroutine tasks are not uniform, it is necessary to successively start the interface request threads of each radio station and device in Network A and Network B, and place the network-wide information request coroutine tasks belonging to Network A and Network B into the corresponding request threads for concurrent execution. Here, using the task execution structure of nesting coroutines in a thread can initiate multiple network requests concurrently in a single thread, making full use of the feature that the callback responses of each network request are asynchronous. During the IO waiting interval, it can ensure that when the task with the longest response waiting time is callback processed, that is, all tasks are processed. It fully achieves the effect of using multiple threads for parallel requests, and at the same time greatly saves the thread overhead and reduces the dependence on the performance of the host computer.
[0047] In one embodiment, updating the information of the corresponding networked devices according to the callback results of the network-wide information requests includes: storing the callback results of the network-wide information requests of each interface request thread corresponding to the ad hoc network across different regions and networks in a thread-safe queue; the network-wide information request results include the asynchronous callback results of each network-wide information request coroutine task; using the model assembly and modification thread to obtain the asynchronous callback results from the queue, and updating the corresponding networked device models according to the asynchronous callback results.
[0048] In one embodiment, storing the whole-network information request results corresponding to the callback of each off-site and different-network self-organizing network corresponding interface request thread into a thread-safe queue includes: obtaining the attribute data of the corresponding network access device according to the asynchronous callback result of the whole-network information request coroutine task; marking the asynchronous callback result according to the network access device attributes corresponding to the attribute data and the IP address of the network access device, and storing the marked asynchronous callback results into the thread-safe queue one by one. Specifically, each whole-network information request coroutine task will asynchronously callback the response, extract the model attribute data required by the application program from each response result data, uniquely mark each piece of data with the model attribute and the radio (or device) IP, and push them into a thread-safe queue one by one. Using a thread-safe queue and a memory model, after establishing the network access device model framework in advance, the model is updated fragmented by each attribute using the queue, and the network requests that cannot respond are discarded in time, so as to solve the problem of asynchronous assembly of the whole-network information caused by different response times of different network interfaces.
[0049] In one embodiment, updating the corresponding network access device model according to the asynchronous callback result includes: continuously taking out the device information data obtained by each interface from the queue using a thread for model assembly and modification, and updating (or adding) each piece of data to the corresponding memory model respectively. At the same time, at a certain time interval, the model is periodically assembled into JSON format data for use by other modules of the application software. Specifically, start a thread for model assembly and modification, continuously take out data from the thread-safe queue. Since the data has been screened before entering the queue, each piece of data taken out from the queue can be directly updated to a certain attribute of a certain model in the memory. If the corresponding attribute is not found in the corresponding model, a new model attribute will be added using this piece of data. While the thread for model assembly and modification continuously takes data from the queue, it will monitor a whole-network information assembly sending time T3. After reaching the T3 time, all the model attributes in the memory will be extracted and assembled into JSON dictionary data for use by other modules of the application software.
[0050] In this embodiment, a queue and a memory model are introduced to decouple the network interface request operation of the whole-network information from the whole-network information assembly operation, and coroutine concurrency is added, so that the system of the present invention can collect data from multiple data request interfaces of different radios and network devices simultaneously.
[0051] In one embodiment, the host computer is further configured to: obtain a preset first threshold and a second threshold; determine whether the current off-site and different-network self-organizing network is networked according to whether the callback response time of the current whole-network topology request coroutine task is within the first threshold; determine whether to update the network access device model corresponding to the current whole-network information request coroutine task according to whether the callback response time of the current whole-network information request coroutine task is within the second threshold.
[0052] In this embodiment, if Figure 3 The flowchart of the whole network data collection is shown in FIG. 1 , where T0 represents the cycle time of the whole network information acquisition, T1 represents the maximum callback response waiting time of the whole network topology request coroutine task, i.e., the first threshold, T2 represents the maximum callback response waiting time of the whole network request coroutine task, i.e., the second threshold, and T3 represents the whole network information assembly and sending time. Figure 2 As shown in , since the host computer has initiated two network requests for obtaining the whole network topology to ad hoc networks A and B respectively, the callback response times of these two requests are not simultaneous. The maximum callback response waiting time T1 of the whole network topology acquisition interface can be set to ensure that the response time of different ad hoc networks will not differ too much. If an ad hoc network fails to obtain the callback information after T1, it is considered that the ad hoc network is not in the network state in this round of whole network information acquisition and will not be displayed in the whole network information. Next, a maximum coroutine task callback response time T2 is set for the response time of each whole network information request coroutine task to control the maximum callback waiting time of a coroutine task and ensure that the request thread will not be occupied for a long time. For requests that have not been responded to after T2, the information corresponding to the request will not be updated to the memory model, and the information corresponding to the request in the model will still be the information at the time of the last whole network information request. In this way, a complete whole network information request can be completed within a controllable time, and the integrity of the final whole network information can be guaranteed.
[0053] exist Figure 3 In the example, the interval of each cycle is controlled by setting the cycle time T0. By adding the cycle cycle waiting time T0, the number of times of cyclic acquisition of the whole network information can be increased to compensate for the problem that the whole network information is incomplete due to the limited performance of the radio station, the high request failure rate caused by multiple concurrent requests, the long time of acquiring the whole network information, and the addition of the maximum callback response waiting time T1 and T2 of the network request can ensure that the entire whole network information acquisition process will not be stuck for a long time. By adding the whole network information assembly and sending time T3, the whole network information is periodically assembled from the model. For the upper layer application, the latest whole network information can be refreshed within a fixed time interval, which is not affected by the failure of the network request, and the timeliness and integrity of the whole network information are guaranteed. The method of the present invention uses the network interface request of the multi-coroutine concurrent radio device, and then uses the VPN technology to enable the computer to connect to multiple self-organizing networks in different places and networks, and can simultaneously collect the whole network information in multiple self-organizing networks in different places and networks, and merge them into a unified whole network information.
[0054] In one embodiment, Figure 4 As shown, a method for collecting network-wide information for a wireless ad hoc network is provided, comprising the following steps:
[0055] Step 402: The host computer sends a network-wide topology request to the accessible radio stations through the network-wide topology request thread at the preset network-wide topology request sending time.
[0056] The network-wide topology request thread nests multiple network-wide topology request coroutine tasks.
[0057] Step 404: The host computer parses the callback result of the network-wide topology request to obtain the list of networked devices of the corresponding off-site and off-network ad hoc network, sends a network-wide information request to the interfaces to be called in the corresponding networked device list through the interface request thread corresponding to the off-site and off-network ad hoc network, and updates the information of the corresponding networked devices according to the callback result of the network-wide information request.
[0058] The interface request thread nests multiple network-wide information request coroutine tasks.
[0059] It should be understood that although Figure 3 and Figure 4 the steps in the flowcharts of Figure 3 and Figure 4 are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover,
[0060] In one embodiment, as Figure 5 shown, a network-wide information collection device for a wireless ad hoc network is provided, including: a network-wide topology request module 502 and a network-wide information collection module 504, where:
[0061] The network-wide topology request module 502 is used for the host computer to send a network-wide topology request to the accessible radio stations through the network-wide topology request thread at the preset network-wide topology request sending time; the network-wide topology request thread nests multiple network-wide topology request coroutine tasks.
[0062] The network-wide information collection module 504 is used for the host computer to parse the callback result of the network-wide topology request to obtain the list of networked devices of the corresponding off-site and off-network ad hoc network, send a network-wide information request to the interfaces to be called in the corresponding networked device list through the interface request thread corresponding to the off-site and off-network ad hoc network, and update the information of the corresponding networked devices according to the callback result of the network-wide information request; the interface request thread nests multiple network-wide information request coroutine tasks.
[0063] For the specific limitations of the full-network information collection device for wireless ad hoc networks, reference can be made to the limitations of the full-network information collection method for wireless ad hoc networks in the foregoing text, which will not be elaborated here. Each module in the above full-network information collection device for wireless ad hoc networks can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0064] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 6 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a full-network information collection method for wireless ad hoc networks. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0065] Those skilled in the art can understand that Figure 6 the structure shown in
[0066] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0067] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0068] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0069] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. A network-wide information collection system for wireless ad hoc networks, characterized in that The system includes several off-site and different-network self-organizing networks and a host computer. Each off-site and different-network self-organizing network includes multiple network access devices. The network access devices include radios and non-radio network devices. One accessible radio in each off-site and different-network self-organizing network is connected to the host computer; The host computer sends a full-network topology request to the accessible radio through a full-network topology request thread at a preset full-network topology request sending time; the full-network topology request thread nests multiple full-network topology request coroutine tasks; The host computer parses the callback result of the full-network topology request to obtain a list of network access devices for the corresponding off-site and different-network self-organizing network, and sends a full-network information request to the interfaces to be called in the corresponding network access device list through the interface request thread corresponding to the off-site and different-network self-organizing network, and updates the information of the corresponding network access devices according to the callback result of the full-network information request; the interface request thread nests multiple full-network information request coroutine tasks; Sending a full-network information request to the interfaces to be called in the corresponding network access device list through the interface request thread corresponding to the off-site and different-network self-organizing network includes: Assembling the interfaces to be called of each network access device in the network access device list to obtain corresponding full-network information request coroutine tasks; Each full-network information request coroutine task sends a full-network information request to the corresponding interface to be called through the corresponding interface request thread; Updating the information of the corresponding network access devices according to the callback result of the full-network information request includes: Storing the callback result of the full-network information request of the interface request thread corresponding to each off-site and different-network self-organizing network into a thread-safe queue; the callback result of the full-network information request includes the asynchronous callback result of each full-network information request coroutine task; Using a model assembly and modification thread to obtain the asynchronous callback result from the queue, and updating the corresponding network access device model according to the asynchronous callback result; The host computer is also used for: Obtaining a preset first threshold and a second threshold; Judging whether the current off-site and different-network self-organizing network is networked according to whether the callback response time of the current full-network topology request coroutine task is within the first threshold; Judging whether to update the network access device model corresponding to the current full-network information request coroutine task according to whether the callback response time of the current full-network information request coroutine task is within the second threshold.
2. The system according to claim 1, wherein The host computer includes a model adder and deleter, which is used to create or delete a network access device model in memory according to the network access device list; the network access device model includes the identification information and attributes of the network access device; the identification information is the IP address of the network access device.
3. The system according to claim 2, characterized in that, Creating or deleting a network access device model in memory according to the network access device list includes: According to the current network access device list and the memory model, deleting the model corresponding to the offline network access device from the memory model, and adding the model corresponding to the newly networked network access device to the memory model.
4. The system according to claim 1, characterized in that, Storing the callback result of the full-network information request of the interface request thread corresponding to each off-site and different-network self-organizing network into a thread-safe queue includes: Obtaining the attribute data of the corresponding network access device according to the asynchronous callback result of the full-network information request coroutine task; Mark the asynchronous callback result according to the access device attributes corresponding to the attribute data and the IP address of the access device, and store the marked asynchronous callback results into a thread-safe queue one by one.
5. A method for collecting network-wide information for a wireless ad hoc network implemented in the network-wide information collection system for a wireless ad hoc network according to any one of claims 1-4, characterized in that, The method includes: The host computer sends a full-network topology request to the accessible radio via a full-network topology request thread at a preset full-network topology request sending time; the full-network topology request thread nests multiple full-network topology request coroutine tasks; The host computer parses the callback result of the full-network topology request to obtain a list of access devices for the corresponding off-site and off-network self-organizing network, and sends a full-network information request to the interfaces to be called in the corresponding access device list via the interface request thread corresponding to the off-site and off-network self-organizing network, and updates the information of the corresponding access devices according to the callback result of the full-network information request; the interface request thread nests multiple full-network information request coroutine tasks; Sending a full-network information request to the interfaces to be called in the corresponding access device list via the interface request thread corresponding to the off-site and off-network self-organizing network includes: Assemble the interfaces to be called for each access device in the access device list to obtain corresponding full-network information request coroutine tasks; Each full-network information request coroutine task sends a full-network information request to the corresponding interface to be called via the corresponding interface request thread; Updating the information of the corresponding access devices according to the callback result of the full-network information request includes: Store the callback results of the full-network information requests for each interface request thread corresponding to the off-site and off-network self-organizing network into a thread-safe queue; the full-network information request results include the asynchronous callback results of each full-network information request coroutine task; Use the model assembly and modification thread to obtain the asynchronous callback result from the queue, and update the corresponding access device model according to the asynchronous callback result; The host computer is further configured to: Obtain a preset first threshold and a second threshold; Judge whether the current off-site and off-network self-organizing network is connected to the network according to whether the callback response time of the current full-network topology request coroutine task is within the first threshold; Judge whether to update the access device model corresponding to the current full-network information request coroutine task according to whether the callback response time of the current full-network information request coroutine task is within the second threshold.
6. A full-network information collection device for wireless ad hoc networks, characterized in that The device includes: A full-network topology request module, configured to send a full-network topology request from the host computer to the accessible radio via a full-network topology request thread at a preset full-network topology request sending time; the full-network topology request thread nests multiple full-network topology request coroutine tasks; A full-network information collection module, configured to parse the callback result of the full-network topology request by the host computer to obtain a list of access devices for the corresponding off-site and off-network self-organizing network, send a full-network information request to the interfaces to be called in the corresponding access device list via the interface request thread corresponding to the off-site and off-network self-organizing network, and update the information of the corresponding access devices according to the callback result of the full-network information request, where each off-site and off-network self-organizing network includes multiple access devices, the access devices include radios and non-radio network devices, and one accessible radio in each off-site and off-network self-organizing network is connected to the host computer; the interface request thread nests multiple full-network information request coroutine tasks; The whole-network information collection module is further configured to assemble the to-be-called interfaces of each network-connected device in the network-connected device list to obtain corresponding whole-network information request coroutine tasks; each whole-network information request coroutine task makes a whole-network information request to the corresponding to-be-called interface through a corresponding interface request thread; The whole-network information collection module is further configured to store the whole-network information request results called back by the corresponding interface request threads of each off-site and off-network ad-hoc network into a thread-safe queue; the whole-network information request results include the asynchronous callback results of each whole-network information request coroutine task; use the model assembly and modification thread to obtain the asynchronous callback results from the queue, and update the corresponding network-connected device model according to the asynchronous callback results; The host computer is further configured to obtain a preset first threshold and a second threshold; determine whether the current off-site and off-network ad-hoc network is network-connected according to whether the callback response time of the current whole-network topology request coroutine task is within the first threshold; determine whether to update the network-connected device model corresponding to the current whole-network information request coroutine task according to whether the callback response time of the current whole-network information request coroutine task is within the second threshold; Each off-site and off-network ad-hoc network includes multiple network-connected devices, the network-connected devices include radios and non-radio network devices, and an accessible radio in each off-site and off-network ad-hoc network is connected to the host computer.
7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method described in claim 5.
Citation Information
Patent Citations
Network equipment information acquisition method and device
CN108123820A
Mesh routing topology networking method and mesh routing topology networking system
CN112532529A