A data polling method based on ant colony algorithm and related device

Adaptively planning the data polling path of smoke sensing equipment through ant colony algorithm, the problem of low data reliability caused by polling methods in the prior art is solved, and the sensitivity and environmental adaptability of fire monitoring are improved.

CN114666251BActive Publication Date: 2024-12-03ZHEJIANG HUAXIAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210135478.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-14
Publication Date
2024-12-03
Estimated Expiration
2042-02-14

AI Technical Summary

Technical Problem

In the existing smoke sensor equipment data upload platform, the polling method leads to a reduction in data reliability, especially in a multi-equipment environment, which is difficult to plan a reasonable polling sequence, affecting fire sensitivity.

Method used

Using the data polling method based on the ant colony algorithm, the optimal polling path is adaptively planned to ensure full coverage and environmental adaptability by determining the heuristic activity value and pheromone content between devices.

Benefits of technology

It improves the reliability and environmental adaptability of data polling, avoids excessive concerns of a certain area in sequential polling, and enhances the sensitivity of fire monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114666251B_ABST
    Figure CN114666251B_ABST
Patent Text Reader

Abstract

The present invention provides a data polling method based on ant colony algorithm and related devices, the data polling method includes: determining the first heuristic activity value and the first pheromone content corresponding to the path between the first current device and the devices in the first candidate device set; the first candidate device set includes the devices around the first current device, and the first current device is the device currently traversed by the first ant; based on the first heuristic activity value and the first pheromone content, determining the first device to be traversed corresponding to the first ant from the first candidate device set; based on the first current device and the first device to be traversed, obtaining the polling path of the first ant, and performing data polling based on the polling path of the first ant. The method can adaptively plan the optimal full coverage polling path in different environments, improving the adaptability of the algorithm to the environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a data polling method based on ant colony algorithm and related devices. Background Art

[0002] Smoke sensors, as key equipment in fire protection IoT technology, have important application advantages in homes, offices, education, finance and public places. Collecting data through them and uploading them to the cloud platform in real time with the help of gateways is an important direction for the intelligent and visualized development of the fire protection industry. The current situation of fire prevention and control requires a large number of smoke sensors for front-end data collection. The current application technology for uploading the data collected by smoke sensors to the platform is mostly focused on simple sequential polling. When polling, there is usually too much attention paid to the data in a certain area at a certain moment, which leads to a reduction in the reliability of the collected data, which greatly affects the sensitivity of the platform to fire. This poses an important technical challenge to the improvement of the polling method.

[0003] Since the time cost of a gateway polling cycle is fixed, but there will inevitably be a large number of detection intersections when a group of smoke sensors are detecting, it is necessary to plan a reasonable polling sequence in any environment to improve the reliability of the data collected in a polling cycle. Therefore, it is of great scientific research value and practical significance to carry out research on adaptive polling methods for multi-smoke sensor data that can adapt to different environments. Summary of the invention

[0004] The present invention provides a data polling method based on an ant colony algorithm and a related device. The method can adaptively plan an optimal full-coverage polling path in different environments, thereby improving the adaptability of the algorithm to the environment.

[0005] To solve the above technical problems, the first technical solution provided by the present invention is: to provide a data polling method based on an ant colony algorithm, including: determining a first heuristic activity value and a first pheromone content corresponding to a path between a first current device and devices in a first candidate device set; the first candidate device set includes devices around the first current device, and the first current device is a device currently traversed by a first ant; based on the first heuristic activity value and the first pheromone content, determining a first device to be traversed corresponding to the first ant from the first candidate device set; obtaining a polling path of the first ant based on the first current device and the first device to be traversed, and performing data polling based on the polling path of the first ant.

[0006] Among them, after the step of obtaining the polling path of the first ant based on the first current device and the first device to be traversed, it includes: obtaining the pheromone increment of each subpath in the polling path of the first ant; the subpath is the path between adjacent devices in the polling path; using the pheromone increment of each subpath to update the corresponding first pheromone content to obtain the second pheromone content; determining the polling path of the second ant based on the second pheromone content, the starting polling device of the second ant is the same as that of the first ant; the step of performing data polling based on the polling path of the first ant includes: performing data polling based on the polling path of the second ant.

[0007] Among them, the step of determining the polling path of the second ant based on the second pheromone content includes: determining the second heuristic activity value corresponding to the path between the second current device and the devices in the second candidate set; the second candidate set includes the devices around the second current device, and the second current device is the device currently traversed by the second ant; based on the second heuristic activity value and the second pheromone content, determining the second device to be traversed corresponding to the second ant from the second candidate set; and obtaining the polling path of the second ant based on the second current device and the second device to be traversed.

[0008] Among them, the step of determining the first heuristic activity value includes: determining the first path weight of the path between the first current device and the device in the first candidate device set; determining the first heuristic activity value based on the first path weight, the activity value of the first current device, the external inhibition parameter of the first current device, the external excitation parameter of the first current device, the activity value change attenuation rate of the first current device, and the upper and lower limits of the activity value of the first current device; the step of determining the second heuristic activity value includes: determining the second path weight of the path between the second current device and the device in the second candidate device set; determining the second heuristic activity value based on the second path weight, the activity value of the second current device, the external inhibition parameter of the second current device, the external excitation parameter of the second current device, the activity value change attenuation rate of the second current device, and the upper and lower limits of the activity value of the second current device.

[0009] The step of determining a first path weight of a path between a first current device and a device in a first candidate device set includes: determining a first signal value between the first current device and a device in a first candidate device set; in response to the first signal value being at (0, r], determining a first path weight based on the first signal value, a first active propagation speed parameter, and a weight of the first signal value; r is a distance between the first current device and a device in a first candidate device set; in response to the first signal value being at (r, 2r], determining a first path weight based on the first signal value and a first active propagation speed parameter; in response to the first signal value being at (2r, ∞), the first path weight is 0; the step of determining a second path weight of a path between a second current device and a device in a second candidate device set comprises: determining a second signal value between the second current device and a device in a second candidate device set; in response to the second signal value being at (0, R], determining a second path weight based on the second signal value, a second active propagation speed parameter and a weight of the second signal value; R is a distance between the second current device and a device in a second candidate device set; in response to the second signal value being at (R, 2R], determining a second path weight based on the second signal value and a second active propagation speed parameter; in response to the second signal value being at (2R, ∞), the second path weight is 0.

[0010] Among them, the step of determining the first device to be traversed corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content includes: calculating the first state transition probability of each device in the first candidate device set based on the first heuristic activity value and the second pheromone content; determining the first device to be traversed from the first candidate device set based on the first state transition probability; the step of determining the second device to be traversed corresponding to the second ant from the second candidate set based on the second heuristic activity value and the second pheromone content includes: calculating the second state transition probability of each device in the second candidate device set based on the second heuristic activity value and the second pheromone content; determining the second device to be traversed from the second candidate device set based on the second state transition probability.

[0011] Among them, before the step of obtaining the polling path of the first ant based on the first current device and the first device to be traversed, it also includes: determining whether all devices in the environment have been traversed; in response, obtaining the polling path of the first ant based on the first current device and the first device to be traversed.

[0012] In order to solve the above technical problems, the second technical solution provided by the present invention is: to provide a data polling device based on the ant colony algorithm, including: a parameter determination module, used to determine the first heuristic activity value and the first pheromone content corresponding to the path between the first current device and the devices in the first candidate device set; the first candidate device set includes the devices around the first current device, and the second current device is the device currently traversed by the first ant; the device selection module is used to determine the first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content; the path generation module is used to obtain the polling path of the first ant based on the first current device and the first to-be-traversed device, and perform data polling based on the polling path of the first ant.

[0013] To solve the above technical problems, the third technical solution provided by the present invention is: to provide an electronic device, comprising a processor and a memory coupled to each other, wherein the memory is used to store program instructions for implementing any of the above methods; and the processor is used to execute the program instructions stored in the memory.

[0014] In order to solve the above technical problems, the fourth technical solution provided by the present invention is: providing a computer-readable storage medium storing a program file, and the program file can be executed to implement any of the above methods.

[0015] The beneficial effects of the present invention are different from the prior art. The method of the present invention determines the first device to be traversed corresponding to the first ant from the first candidate device set through the first heuristic activity value and the first pheromone content corresponding to the path between the first current device and the devices in the first candidate device set; obtains the polling path of the first ant based on the first current device and the first device to be traversed, and performs data polling based on the polling path of the first ant. The method implements the determination of the device to be traversed from the environment, and can adaptively plan the optimal full-coverage polling path in different environments, thereby improving the adaptability of the algorithm to the environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which:

[0017] Figure 1 It is a flowchart of a first embodiment of a data polling method based on an ant colony algorithm of the present invention;

[0018] Figure 2 A distribution diagram of a first current device and a first candidate device set of the present invention;

[0019] Figure 3 for Figure 1 A schematic flow chart of an embodiment of step S12;

[0020] Figure 4 A schematic diagram of a flow chart of a second embodiment of a data polling method based on an ant colony algorithm according to the present invention;

[0021] Figure 5 A schematic diagram of the structure of an embodiment of a data polling device based on an ant colony algorithm of the present invention;

[0022] Figure 6 is a schematic structural diagram of an embodiment of an electronic device of the present invention;

[0023] Figure 7 A schematic structural diagram of a computer-readable storage medium of the present invention. Specific implementation methods

[0024] The terms "first", "second", "third" in this application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first", "second", "third" can expressly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the embodiments of this application, all directional indications (such as up, down, left, right, front, back...) are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the steps or units listed, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0025] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0027] See also Figure 1 , is a flow chart of a first embodiment of a data polling method based on an ant colony algorithm of the present invention, which specifically includes:

[0028] Step S11: determining a first heuristic activity value and a first pheromone content corresponding to a path between a first current device and a device in a first candidate device set.

[0029] Specifically, a polling start device point is set, and the first ant starts sampling from the polling start device point. When the device samples a certain device point, the device point is defined as the first current device. The first ant needs to find the device point that needs to be polled next time from the devices around the first current device, that is, the first device point to be traversed. Specifically, the devices around the first current device constitute the first candidate device set.

[0030] Further, determine the first heuristic activity value and the first pheromone content corresponding to the path between the first current device and the devices in the first candidate device set. Figure 2 , assuming that the first current device is A, and the first candidate device set includes devices B, C, D, E, F, G, H, I, and J; then it is necessary to determine the first heuristic activity value X on the path from the first current device A to device B ab and the first pheromone content τ ab , determine the first heuristic activity value X on the path from the first current device A to device C ac and the first pheromone content τ ac , ..., determine the first heuristic activity value X on the path from the first current device A to device J aJ and the first pheromone content τ aJ .

[0031] In one embodiment, the step of determining a first heuristic activity value includes: determining a first path weight of a path between a first current device and a device in a first candidate device set; determining the first heuristic activity value based on the first path weight, the activity value of the first current device, an external inhibition parameter of the first current device, an external excitation parameter of the first current device, an activity value change attenuation rate of the first current device, and an upper limit value and a lower limit value of the activity value of the first current device.

[0032] Specifically, the path from the first current device A to the device B is taken as an example for description. Determine the first path weight W of the path from the device A to the device B AB Based on the first path weight W AB , the activity value of the first current device A, the external inhibition parameter of the first current device, the external excitation parameter of the first current device, the activity value change attenuation rate a of the first current device, the upper limit value b and the lower limit value d of the activity value of the first current device determine the first heuristic activity value X ab .

[0033] In a specific embodiment, the activity value of the first current device i can be calculated by the following formula. In actual calculation, the activity value of the first current device i is the first heuristic activity value of the path from the first current device i to the device j:

[0034]

[0035] Where a represents the attenuation rate of the activity value change of device i, device i is the first current device, b represents the upper limit of the activity value of device i, and d represents the lower limit of the activity value of device i. Where a, b, and d are all non-negative constants. K represents the total number of devices in the first candidate device set, x i represents the activity value of device i, [I i ] - represents the external suppression parameter of device i, represents the external excitation parameter of device i, and t represents time. ij represents the first path weight of the path between device i and device j. Specifically, [I i ] + =max(0,I i ), [I i ] - =max(0, -I i ), I i The value of depends on the state of device i. Specifically, for the devices that have been traversed, I i = 0, for untraversed devices, I i =E.

[0036] In one embodiment, the first path weight W of the path between device i and device j is ijDetermined by the first signal value between device i (first current device) and device j in the first candidate device set. Specifically, the first signal value between device i and device j is collected using the Bluetooth mesh function of the device. In response to the first signal value being at (0, r], the first path weight is determined based on the first signal value, the first active propagation speed parameter and the weight of the first signal value; r is the distance between the first current device and the device in the first candidate device set; in response to the first signal value being at (r, 2r], the first path weight is determined based on the first signal value and the first active propagation speed parameter; in response to the first signal value being at (2r, ∞), the first path weight is 0.

[0037] In a specific embodiment, the first path weight W ij The calculation method is as follows:

[0038]

[0039] Where u is the first active propagation speed parameter, which is usually a non-negative constant. By changing the value of u, the propagation speed of sparks between devices can be changed; d ij represents the first signal value between device i and device j, λ represents the weight of the first signal value, and r represents the distance between device i and device j.

[0040] By determining the first heuristic activity value in the above manner, in a specific embodiment, if the first ant is a first-time ant, the value of the first pheromone content can be assumed to be a random value.

[0041] Step S12: determining a first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content.

[0042] After the first heuristic activity value and the first pheromone content are determined in step S11, the first to-be-traversed device corresponding to the first ant is determined from the first candidate device set based on the first heuristic activity value and the first pheromone content.

[0043] Please combine the specific Figure 3 , step S12 further includes:

[0044] Step S31: Calculate the first state transition probability of each device in the first candidate device set based on the first heuristic activity value and the second pheromone content.

[0045] In one embodiment, the first state transition probability of each device can be calculated by the following formula (2):

[0046]

[0047] Among them, allowedk Indicates the first candidate device set. It should be noted that the devices in the first candidate device set are devices with active values, that is, allowed k Indicates that ant k can then select a set of devices with activity values; τ ij (k) represents the first pheromone content on the path from device i to device j during the k-th pathfinding; x ij (t) represents the first heuristic activity value on the path from device i to device j at time t, and α and β represent weight coefficients. From the above formula (2), it can be seen that the influencing factor of the state transition probability is jointly determined by the heuristic activity value from the current device to the surrounding devices and the pheromone content. It should be noted that the heuristic activity value will change adaptively with the sampling of ants.

[0048] Step S32: determining a first device to be traversed from a first candidate device set based on the first state transition probability;

[0049] After determining the first state transition probabilities of all devices around the first current device, a first device to be traversed is further determined from a first candidate device set (all devices around the first current device) based on the first state transition probabilities.

[0050] It can be understood that, in one embodiment, the device with the highest state transition probability is determined as the first device to be traversed. Figure 2 As shown, assuming that device C is the first device to be traversed, the first ant samples from device A to device C to obtain a subpath, and then takes device C as the first current device and repeats the above steps until all devices are traversed.

[0051] Specifically, every time ant k samples and walks a step, it needs to determine whether it has completed the full traversal of all devices. If there are still devices with activity values ​​in the device table of activity values, it is directly determined that the full traversal plan has not been completed, and the ant continues to sample and search for the next device point. If there is no device with activity values ​​in the device table of device activity values, it is necessary to query all device tables to determine whether the device has truly completed the full traversal plan. When it is detected that all devices have been found, it continues to the next step. That is, after determining the first device to be traversed, it is determined whether all devices in the environment have been traversed. In response, the polling path of the first ant is obtained based on the first current device and the first device to be traversed.

[0052] Step S13: obtaining a polling path of a first ant based on the first current device and the first device to be traversed, and performing data polling based on the polling path of the first ant.

[0053] Specifically, a polling path of a first ant is obtained based on the first current device and the first device to be traversed, and data polling is performed based on the polling path of the first ant.

[0054] The data polling method shown in this embodiment proposes to convert the signal value between devices detected by the Bluetooth Mesh module into the weight of path planning, and to affect the probability of the device to be sampled by setting corresponding constraints, thereby improving the dispersion during sampling, avoiding excessive attention to the data of a certain area at a certain moment in sequential polling, and improving the reliability of the polling results. This application proposes to introduce a bio-inspired neural network algorithm to change the calculation method of the heuristic factor content value of the ant colony algorithm, and realize the algorithm to adaptively plan an optimal full coverage polling path in different environments through the dynamic change of the heuristic activity value, thereby improving the adaptability of the algorithm to the environment, and realizing the search of the current device to be sampled through the device activity value table. The maintenance of the device activity value table is lower than the cost of the taboo table, which enhances the robustness of the algorithm.

[0055] In one embodiment, in order to obtain a more accurate data polling path, multiple ants are generally used to perform path polling. After the first ant obtains the polling path through polling, the pheromone content of the obtained polling path is used to update the pheromone content on the path corresponding to the device involved in the polling path, and then the updated pheromone content is used to determine the polling path of the second ant, and so on, until the last ant obtains the polling path, which is the final polling path with the highest accuracy and the best robustness.

[0056] For details, please combine Figure 4 , Figure 4 FIG. 1 is a flow chart of a second embodiment of the data polling method based on the ant colony algorithm of the present invention, wherein step S41 and step S42 are the same as the above step S41 and step S42. Figure 1 In the embodiment shown, step S11 and step S12 are the same, except that, after step S42, the embodiment further includes:

[0057] Step S43: obtaining the polling path of the first ant based on the first current device and the first device to be traversed.

[0058] Step S44: obtaining the pheromone increment of each sub-path in the polling path of the first ant; a sub-path is a path between adjacent devices in the polling path.

[0059] Specifically, the pheromone increment of each sub-path in the polling path of the first ant is determined. It should be noted that the sub-path is a path between adjacent devices in the polling path, such as Figure 2 As shown in FIG. 1 , the sub-path is the path between device A and device C.

[0060] Step S45: using the pheromone increment of each subpath to update the corresponding first pheromone content to obtain the second pheromone content.

[0061] Specifically, the pheromone increment of each sub-path is used to update the corresponding first pheromone content to obtain the second pheromone content. In a specific embodiment, the first pheromone content is the pheromone content on the path from device A to device C, then the pheromone increment on the path from device A to device C is obtained from the polling path of the first ant, and the pheromone increment on the path from device A to device C is used to update the first pheromone content on the path from device A to device C, to obtain the second pheromone content on the path from device A to device C. The first pheromone content of each sub-path on the polling path of the first ant is updated using the above method.

[0062] In one embodiment, the pheromone content is updated as follows:

[0063]

[0064] Among them, ρ represents the pheromone residual factor, the value range is [0,1], Δτ ij It represents the pheromone increment in the environment after ant k completes this polling on the path from device i to device j, and m represents the number of ants.

[0065] Step S46: determining the polling path of the second ant based on the second pheromone content, the second ant and the first ant start polling at the same device.

[0066] After the second pheromone content is obtained in the above manner, the polling path of the second ant is determined based on the second pheromone content.

[0067] It should be noted that the second ant and the first ant have the same starting polling device, that is, the second ant is selected from the m ants to start sampling from the starting polling device to obtain the polling path of the second ant.

[0068] Specifically, determine the second heuristic activity value corresponding to the path between the second current device and the devices in the second candidate set; the second candidate set includes the devices around the second current device, and the second current device is the device currently traversed by the second ant. Determine the second device to be traversed corresponding to the second ant from the second candidate set based on the second heuristic activity value and the second pheromone content. Obtain the polling path of the second ant based on the second current device and the second device to be traversed.

[0069] In one embodiment, the step of determining a second heuristic activity value includes: determining a second path weight of a path between a second current device and a device in a second candidate device set; determining the second heuristic activity value based on the second path weight, the activity value of the second current device, an external inhibition parameter of the second current device, an external excitation parameter of the second current device, an activity value change attenuation rate of the second current device, and an upper limit value and a lower limit value of the activity value of the second current device.

[0070] Specifically, the activity value of the second current device i can be calculated by the following formula. In actual calculation, the activity value of the second current device i is the second heuristic activity value of the path from the second current device i to the device j:

[0071]

[0072] Where a represents the attenuation rate of the activity value change of device i, device i is the second current device, b represents the upper limit of the activity value of device i, and d represents the lower limit of the activity value of device i. Where a, b, and d are all non-negative constants. K represents the total number of devices in the second candidate device set, x i represents the activity value of device i, [I i ] - represents the external suppression parameter of device i,

[0073] represents the external excitation parameter of device i, and t represents time. ij represents the second path weight of the path between device i and device j. Specifically, [I i ] + =max(0,I i ), [I i ] - =max(0, -I i ), I i The value of depends on the state of device i. Specifically, for the devices that have been traversed, I i = 0, for untraversed devices, I i =E.

[0074] In one embodiment, the second path weight W of the path between device i and device j is ij Determined by the second signal value between device i (the second current device) and device j in the second candidate device set. Specifically, the second signal value between device i and device j is collected using the Bluetooth mesh function of the device. In response to the second signal value being at (0, R], the second path weight is determined based on the second signal value, the second active propagation speed parameter, and the weight of the second signal value; R is the distance between the second current device and the device in the second candidate device set; in response to the second signal value being at (R, 2R], the second path weight is determined based on the second signal value and the second active propagation speed parameter; in response to the second signal value being at (2R, ∞), the second path weight is 0.

[0075] In a specific embodiment, the second path weight W ij The calculation method is as follows:

[0076]

[0077] Where u is the second active propagation speed parameter, which is usually a non-negative constant. By changing the value of u, the propagation speed of sparks between devices can be changed; d ij represents the second signal value between device i and device j, λ represents the weight of the second signal value, and R represents the distance between device i and device j.

[0078] After determining the second heuristic activity value and the second pheromone content, the second state transition probability of each device in the second candidate device set is further calculated by formula (2); the second device to be traversed is determined from the second candidate device set based on the second state transition probability. The polling path of the second ant is obtained based on the second current device and the second device to be traversed.

[0079] In one embodiment, if the second ant is the last ant, the polling path of the second ant is the final data polling path. If the second ant is not the last ant, the polling path of the second ant is used to further update the pheromone content, and the above steps are repeated. The third ant is used to perform sampling again to obtain the polling path of the third ant, until the last ant is traversed and the final polling path is obtained.

[0080] Step S47: performing data polling based on the polling path of the second ant.

[0081] Specifically, assuming that the polling path of the second ant is the final data polling path, the polling path of the second ant is saved, and when data polling is performed, the saved data polling path is used for polling.

[0082] The data polling method of the present application can be applied to firefighting Internet technology. By polling multiple ants, the pheromone content is changed, and convergence is gradually performed, and finally the most accurate polling path is obtained.

[0083] See also Figure 5 , is a structural diagram of an embodiment of a data polling device based on an ant colony algorithm of the present invention, which specifically includes: a parameter determination module 51, a device selection module 52 and a path generation module 53.

[0084] The parameter determination module 51 is used to determine the first heuristic activity value and the first pheromone content corresponding to the path between the first current device and the devices in the first candidate device set; the first candidate device set includes the devices around the first current device, and the second current device is the device currently traversed by the first ant.

[0085] The device selection module 52 is used to determine the first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content;

[0086] The path generation module 53 is used to obtain a polling path of the first ant based on the first current device and the first device to be traversed, and perform data polling based on the polling path of the first ant.

[0087] See also Figure 6 , is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. The electronic device includes a memory 82 and a processor 81 connected to each other.

[0088] The memory 82 is used to store program instructions for implementing any one of the above methods.

[0089] The processor 81 is used to execute program instructions stored in the memory 82 .

[0090] The processor 81 may also be referred to as a CPU (Central Processing Unit). The processor 81 may be an integrated circuit chip having signal processing capabilities. The processor 81 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0091] The memory 82 can be a memory stick, a TF card, etc., which can store all the information in the electronic device, including the input raw data, computer programs, intermediate operation results and final operation results are all stored in the memory. It stores and retrieves information according to the location specified by the controller. Only with the memory can the electronic device have a memory function and ensure normal operation. The memory of the electronic device can be divided into main memory (internal memory) and auxiliary memory (external memory) according to its use. There is also a classification method of dividing it into external memory and internal memory. External memory is usually a magnetic medium or an optical disk, etc., which can store information for a long time. Memory refers to the storage component on the motherboard, which is used to store the data and programs currently being executed, but it is only used to temporarily store programs and data. If the power is turned off or the power is cut off, the data will be lost.

[0092] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented by other methods. For example, the device implementation method described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0093] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0094] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0095] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a system server, or a network device, etc.) or a processor to execute all or part of the steps of each implementation method of the present application.

[0096] See also Figure 7 , which is a schematic diagram of the structure of the computer-readable storage medium of the present invention. The storage medium of the present application stores a program file 91 that can implement all the above methods, wherein the program file 91 can be stored in the above storage medium in the form of a software product, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of each implementation method of the present application. The aforementioned storage device includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes, or terminal devices such as computers, servers, mobile phones, tablets, etc.

[0097] The above is only an implementation method of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A data polling method based on ant colony algorithm, characterized in that: include: Determine a first heuristic activity value and a first pheromone content corresponding to a path between a first current device and devices in a first candidate device set; the first candidate device set includes devices around the first current device, and the first current device is a device currently traversed by the first ant; Determine a first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content; Obtaining a polling path of the first ant based on the first current device and the first to-be-traversed device, and performing data polling based on the polling path of the first ant; The step of determining the first heuristic activity value includes: Determine a first path weight of a path between the first current device and a device in the first candidate device set; The first heuristic activity value is determined based on the first path weight, the activity value of the first current device, the external inhibition parameter of the first current device, the external excitation excitation parameter of the first current device, the activity value change attenuation rate of the first current device, and the upper and lower limits of the activity value of the first current device.

2. The data polling method according to claim 1, characterized in that: After the step of obtaining the polling path of the first ant based on the first current device and the first to-be-traversed device, the method further includes: Obtaining the pheromone increment of each sub-path in the polling path of the first ant; the sub-path is a path between adjacent devices in the polling path; Using the pheromone increment of each subpath to update the corresponding first pheromone content, to obtain a second pheromone content; determining a polling path of a second ant based on the second pheromone content, the second ant and the first ant having the same starting polling device; The step of performing data polling based on the polling path of the first ant includes: Data polling is performed based on the polling path of the second ant.

3. The data polling method according to claim 2, characterized in that: The step of determining the polling path of the second ant based on the second pheromone content includes: Determine a second heuristic activity value corresponding to a path between a second current device and devices in a second candidate device set; the second candidate device set includes devices around the second current device, and the second current device is a device currently traversed by the second ant; Determine a second to-be-traversed device corresponding to the second ant from the second candidate device set based on the second heuristic activity value and the second pheromone content; A polling path of the second ant is obtained based on the second current device and the second device to be traversed.

4. The data polling method according to claim 3, characterized in that: The step of determining the second heuristic activity value comprises: Determine a second path weight of a path between a second current device and a device in the second candidate device set; The second heuristic activity value is determined based on the second path weight, the activity value of the second current device, the external inhibition parameter of the second current device, the external excitation parameter of the second current device, the activity value change attenuation rate of the second current device, and the upper and lower limits of the activity value of the second current device.

5. The data polling method according to claim 4, characterized in that: The step of determining a first path weight of a path between the first current device and a device in the first candidate device set includes: Determine a first signal value between the first current device and a device in the first candidate device set; In response to the first signal value being at (0, r], determining the first path weight based on the first signal value, the first active propagation speed parameter, and the weight of the first signal value; r is the distance between the first current device and the device in the first candidate device set; In response to the first signal value being at (r, 2r], determining the first path weight based on the first signal value and a first active propagation speed parameter; In response to the first signal value being at (2r, ∞), the first path weight is 0; The step of determining a second path weight of a path between a second current device and a device in the second candidate device set includes: Determine a second signal value between the second current device and a device in the second candidate device set; In response to the second signal value being in (0, R], determining the second path weight based on the second signal value, the second active propagation speed parameter and the weight of the second signal value; R is the distance between the second current device and the devices in the second candidate device set; In response to the second signal value being in (R, 2R], determining the second path weight based on the second signal value and a second active propagation speed parameter; In response to the second signal value being at (2R,∞), the second path weight is 0.

6. The data polling method according to claim 3, characterized in that: The step of determining the first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content includes: Calculate a first state transition probability of each device in the first candidate device set based on the first heuristic activity value and the second pheromone content; Determine the first to-be-traversed device from the first candidate device set based on the first state transition probability; The step of determining the second to-be-traversed device corresponding to the second ant from the second candidate device set based on the second heuristic activity value and the second pheromone content includes: Calculate a second state transition probability of each device in the second candidate device set based on the second heuristic activity value and the second pheromone content; The second to-traverse device is determined from the second candidate device set based on the second state transition probability.

7. The data polling method according to claim 1, characterized in that: Before the step of obtaining the polling path of the first ant based on the first current device and the first to-be-traversed device, the step further includes: Determine whether all devices in the environment have been traversed; In response, a polling path of the first ant is obtained based on the first current device and the first device to be traversed.

8. A data polling device based on ant colony algorithm, characterized in that: include: A parameter determination module, used to determine a first heuristic activity value and a first pheromone content corresponding to a path between a first current device and a device in a first candidate device set; the first candidate device set includes devices around the first current device, and the first current device is a device currently traversed by a first ant; wherein the step of determining the first heuristic activity value comprises: determining a first path weight of a path between the first current device and a device in the first candidate device set; determining the first heuristic activity value based on the first path weight, the activity value of the first current device, the external inhibition parameter of the first current device, the external excitation parameter of the first current device, the activity value change attenuation rate of the first current device, and the upper limit and lower limit of the activity value of the first current device; A device selection module, configured to determine a first to-be-traversed device corresponding to the first ant from the first candidate device set based on the first heuristic activity value and the first pheromone content; A path generation module is used to obtain a polling path of the first ant based on the first current device and the first device to be traversed, and perform data polling based on the polling path of the first ant.

9. An electronic device, characterized in that: It includes a processor and a memory coupled to each other, wherein: The memory is used to store program instructions for implementing the method according to any one of claims 1 to 7; The processor is configured to execute the program instructions stored in the memory.

10. A computer-readable storage medium, characterized in that: A program file is stored, and the program file can be executed to implement the method according to any one of claims 1 to 7.