A power marketing intelligent terminal open port scanning optimization method and device

CN122802478APending Publication Date: 2026-09-22STATE GRID CORPORATION OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510333444.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

但上述两个方法存在扫描效率低和随机性不足的问题

Benefits of technology

[0078]本发明提供的一种电力营销智能终端开放端口扫描优化方法及装置,包括:生成采集的电力营销智能终端的所有IP地址的置换序列;利用置换序列为多个扫描代理分配扫描任务,其中,扫描任务包括多个IP地址;确定扫描代理扫描其对应的扫描任务中的IP地址时的网络负载情况;根据网络负载情况调整扫描代理的扫描频率。本发明提供的技术方案,不仅实现了智能终端开放端口的高效、动态扫描,优化了智能终端流量和网络资源的调度,提高了扫描效率;还实现了大规模网络中的任务分配和高效管理,具备良好的扩展性,能够适应各种复杂网络环境下的开放端口扫描需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802478A_ABST
    Figure CN122802478A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of network security, and particularly relates to a power marketing intelligent terminal open port scanning optimization method and device, which comprises: generating a permutation sequence of all IP addresses of a collected power marketing intelligent terminal; using the permutation sequence to allocate scanning tasks to a plurality of scanning agents, wherein the scanning tasks comprise a plurality of IP addresses; determining a network load condition when the scanning agents scan the IP addresses in the corresponding scanning tasks; and adjusting the scanning frequency of the scanning agents according to the network load condition. The technical scheme provided by the application not only realizes efficient and dynamic scanning of the open ports of the intelligent terminal, optimizes the scheduling of intelligent terminal traffic and network resources, and improves the scanning efficiency, but also realizes task allocation and efficient management in a large-scale network, has good expansibility, and can adapt to open port scanning requirements in various complex network environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network security technology, specifically relating to a method and apparatus for optimizing open port scanning of smart terminals for power marketing. Background Technology

[0002] With the widespread application of smart Internet of Things (IoT) devices in various fields, smart IoT terminals for power marketing (such as smart meters and smart home devices) are gradually becoming an important part of the smart grid. These marketing-specific smart IoT terminals exchange data and communicate with the outside world through open ports; therefore, the security of these open ports is directly related to the security of the entire power smart IoT system. To ensure system security, these open ports need to be scanned and inspected regularly. Traditional open port scanning techniques mainly rely on full-range scanning and fixed-sequence scanning. These methods are inefficient in large-scale network environments and are prone to network congestion and detection.

[0003] Currently, port scanning techniques include full connection scanning, half-open scanning, UDP scanning, and FIN scanning, among which the following two papers are relatively representative. One is Jafarian and Das, who proposed a new cooperative scanning technique; the other is Verma et al., who proposed a network-wide internet scanning method for security management. However, both of these methods suffer from low scanning efficiency and insufficient randomness. Summary of the Invention

[0004] To overcome the problems existing in the above-mentioned related technologies, the present invention provides a method and apparatus for optimizing open port scanning of smart terminals for power marketing.

[0005] According to a first aspect of the present invention, a method for optimizing open port scanning of a smart terminal for electricity marketing is provided, comprising:

[0006] Generate a permutation sequence for all IP addresses of the collected smart terminals for electricity marketing;

[0007] The permutation sequence is used to assign scanning tasks to multiple scanning agents, wherein the scanning tasks include multiple IP addresses;

[0008] Determine the network load when the scanning agent scans the IP addresses in its corresponding scanning task;

[0009] The scanning frequency of the scanning agent is adjusted according to the network load.

[0010] Preferably, the generation of the permutation sequence of all IP addresses of the smart terminal for electricity marketing includes:

[0011] Randomly select a prime number that is greater than all possible ranges containing each of the IP addresses;

[0012] Calculate all primitive roots of the prime number to obtain the set of primitive roots;

[0013] A primitive root is randomly selected from all the primitive root sets, and the permutation sequence is generated using the randomly selected primitive root, wherein the permutation sequence includes multiple elements.

[0014] Preferably, the step of assigning scanning tasks to multiple scanning agents using the permutation sequence includes:

[0015] Let n a The number of scanning agents;

[0016] Divide the permutation sequence into n a Divide the data into equal parts, and assign one part to each scanning agent. Then, the number of IP addresses that each scanning agent is responsible for is p / n. a Where p is a prime number;

[0017] Using the number of IP addresses handled by each scanning agent, the start index and end index of each scanning agent are calculated;

[0018] The starting index and the ending index are used to construct the index range of the scanning agent;

[0019] All IP addresses within the index range are the IP addresses that the scanning agent is responsible for, and all IP addresses that the scanning agent is responsible for are the scanning tasks.

[0020] Preferably, the method further includes:

[0021] When the scanning agent starts scanning the IP addresses in the scanning task, it randomly selects an IP address from the scanning task as the first IP address that the scanning agent is responsible for scanning;

[0022] Using the original root permutation iterative formula, the next responsible IP address of the scanning agent is calculated.

[0023] Preferably, determining the network load when the scanning agent scans the IP addresses in its corresponding scanning task includes:

[0024] Calculate the arrival rate of uplink data packets and the arrival rate of downlink data packets for the smart terminal;

[0025] The probability of a non-empty queue of the smart terminal is calculated using the arrival rate of the uplink data packets of the smart terminal.

[0026] Calculate the transmission time of the smart terminal;

[0027] The non-empty queue probability of the access point corresponding to the smart terminal is calculated by using the arrival rate of the downlink data packets of the smart terminal and the transmission time of the smart terminal.

[0028] The network load is assessed using the non-empty queue probability of the access point.

[0029] Preferably, the step of assessing the network load using the non-empty queue probability of the access point includes:

[0030] When the probability of a non-empty queue at the access point is greater than a threshold parameter, the network load condition is considered a high network load condition.

[0031] When the probability of a non-empty queue at the access point is less than or equal to a threshold parameter, the network load condition is considered a low network load condition.

[0032] Preferably, adjusting the scanning frequency of the scanning agent according to the network load includes:

[0033] According to preset rules, the priority of the scanning task corresponding to the scanning agent is determined, and the priority includes: high priority, medium priority and low priority;

[0034] The initial scanning frequency of the scanning task is calculated using the preset weight of the priority corresponding to the scanning task.

[0035] When the network load is high, the adjusted scanning frequency of the scanning agent is calculated using the initial scanning frequency.

[0036] When the network load is low, the initial scanning frequency is the adjusted scanning frequency of the scanning agent.

[0037] Preferably, the calculation formula for each element in the permutation sequence includes:

[0038] Permutation(i) = g i modp

[0039] In the above formula, i∈[1,p-1], p is a prime number, Permutation(i) is the i-th element in the permutation sequence, and g i Let be the i-th primitive root in the randomly selected primitive root set, and mod is the modulo operation.

[0040] Preferably, the formula for calculating the starting index includes:

[0041]

[0042] The formula for calculating the ending index includes:

[0043]

[0044] In the above formula, j∈[1,M], and M is the total number of scanning agents; start j The starting index is end. j This is the end of the index.

[0045] Preferably, the calculation formula of the original root permutation iteration formula includes:

[0046]

[0047] In the above formula, a is the IP address that the scanning agent is currently responsible for scanning, b is the IP address that the scanning agent will be responsible for next, g is a randomly selected primitive root, g is the modulo inverse of g, mod is modulo, and p is a prime number.

[0048] Preferably, the formulas for calculating the arrival rate of uplink data packets and the arrival rate of downlink data packets of the smart terminal include:

[0049]

[0050] In the above formula, i′∈[1,N], where N is the total number of smart terminals; λ ULi′ Let λ be the arrival rate of the uplink data packets of the smart terminal i′. DLi′ P represents the arrival rate of downlink data packets for smart terminal i′. A and P B Let λ be the steady-state probability of the smart terminal in different states. ULPUi′ Let λ be the uplink data packet arrival rate of the smart terminal i′ in the periodic update state. DLPUi′ Let λ be the downlink data packet arrival rate of the smart terminal i′ in the periodic update state. ULBi′ Let λ be the uplink data packet arrival rate of the intelligent terminal i′ in event-driven state. DLBi′ Let i′ be the downlink data packet arrival rate of the smart terminal in event-driven state.

[0051] Preferably, the formula for calculating the probability of a non-empty queue in the smart terminal includes:

[0052]

[0053] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q Dnempi′ For the smart terminal i′ during its transmission time Y i′ The probability that at least one data packet is in the queue is λ. ULi′ Y represents the arrival rate of uplink data packets from smart terminal i′. i′ Let λ be the transmission time of the smart terminal i′.ACKsani′ is the ACK response arrival rate from smart terminal i′.

[0054] Preferably, the formula for calculating the transmission time of the smart terminal includes:

[0055] Y i′ =T boi′ ·N bo +T tri′ +(1-P succi′ )·T sleepi′

[0056] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Y i′ T represents the transmission time of the smart terminal i′. boi′ Let N be the average length of the backoff micro-timeslot of the intelligent terminal i′. bo T represents the number of backoff micro-slots for the intelligent terminal i′. tri′ T represents the actual transmission time of the smart terminal i′. sleepi′ For the sleep time of smart terminal i′, P succi′ Let i' be the probability of successful transmission from the smart terminal.

[0057] Among them, the actual transmission time T of the smart terminal i′ tri′ The calculation formulas include:

[0058] T tri′ =P succi′ ·T succ +(1-P succi′ )·T col

[0059] In the above formula, T col T represents the transmission time when a collision occurs at the smart terminal i′. succ The time when the smart terminal i′ successfully transmits data.

[0060] Preferably, the formula for calculating the non-empty queue probability of the access point includes:

[0061]

[0062] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q APnemp Let λ be the probability of a non-empty queue at the access point. DLi′ Let λ be the arrival rate of downlink data packets for smart terminal i′. scani′ For the arrival rate of data packets scanned by the smart terminal i′, Y AP Service time for the access point.

[0063] Preferably, the formula for calculating the initial scan frequency includes:

[0064] f init,i′ =f0×w i′

[0065] The formula for calculating the adjusted scan frequency of the scanning agent using the initial scan frequency includes:

[0066]

[0067] In the above formula, f init,i′ Let f0 be the initial scanning frequency of the smart terminal i′, and w be the basic scanning frequency. i′ f is the weight of task priority. i′ (t) represents the adjusted scanning frequency of the scanning agent, α and β are the adjustment coefficients of the scanning frequency, θ is the threshold parameter, and w H w is the weight for high-priority scanning tasks. M w represents the weight of medium-priority scanning tasks. L The weights for low-priority scan tasks are w, where w is the weight for low-priority scan tasks. H >w M >w L .

[0068] According to a second aspect of the present invention, an open port scanning optimization device for a smart terminal for electricity marketing is provided, comprising:

[0069] The generation unit is used to generate a permutation sequence of all IP addresses of the collected smart terminals for electricity marketing.

[0070] An allocation unit is configured to allocate scanning tasks to multiple scanning agents using the permutation sequence, wherein the scanning tasks include multiple IP addresses;

[0071] The determining unit is used to determine the network load when the scanning agent scans the IP address in its corresponding scanning task;

[0072] An adjustment unit is used to adjust the scanning frequency of the scanning agent according to the network load.

[0073] According to a third aspect of the present invention, an electronic device is provided, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;

[0074] The memory is used to store one or more programs;

[0075] When the one or more programs are executed by the at least one processor, the open port scanning optimization method for the power marketing smart terminal is implemented.

[0076] According to a fourth aspect of the present invention, a readable storage medium is provided having an executable program stored thereon, wherein when the executable program is executed, the described power marketing smart terminal open port scanning optimization method is implemented.

[0077] The technical solution provided by this invention has the following beneficial effects:

[0078] This invention provides a method and apparatus for optimizing open port scanning of smart terminals for power marketing. The method includes: generating a permutation sequence of all IP addresses collected from the smart terminals; allocating scanning tasks to multiple scanning agents using the permutation sequence, wherein each scanning task includes multiple IP addresses; determining the network load when a scanning agent scans the IP addresses in its corresponding scanning task; and adjusting the scanning frequency of the scanning agents based on the network load. The technical solution provided by this invention not only achieves efficient and dynamic scanning of open ports on smart terminals, optimizing the scheduling of smart terminal traffic and network resources, and improving scanning efficiency, but also realizes task allocation and efficient management in large-scale networks, possessing good scalability and adapting to the open port scanning needs of various complex network environments. Attached Figure Description

[0079] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. 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 effort.

[0080] Figure 1 This is a flowchart of an open port scanning optimization method for a smart terminal for power marketing provided by an embodiment of the present invention;

[0081] Figure 2 This is a flowchart of an open port scanning optimization method for a smart terminal for power marketing provided by an embodiment of the present invention;

[0082] Figure 3 This is a structural block diagram of an open port scanning optimization device for a smart terminal for power marketing provided in an embodiment of the present invention;

[0083] Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0084] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the following embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0085] Example 1

[0086] This invention provides an optimization method for open port scanning of smart terminals for power marketing, such as... Figure 1 As shown, it includes the following steps:

[0087] Step 11: Generate a permutation sequence for all IP addresses of the collected smart terminals for electricity marketing;

[0088] Step 12: Assign scanning tasks to multiple scanning agents using a permutation sequence, wherein each scanning task includes multiple IP addresses;

[0089] Step 13: Determine the network load when the scanning agent scans the IP addresses in its corresponding scanning task;

[0090] Step 14: Adjust the scanning frequency of the scanning agent according to the network load.

[0091] Further, step 11 includes:

[0092] Step 111: Randomly select a prime number that is greater than all possible ranges containing each IP address;

[0093] Step 112: Calculate all primitive roots of prime numbers to obtain the set of primitive roots;

[0094] Step 113: Randomly select a primitive root from all primitive root sets, and generate a permutation sequence using the randomly selected primitive root, wherein the permutation sequence includes multiple elements.

[0095] Specifically, the calculation formula for each element in the permutation sequence includes:

[0096] Permutation(i) = g i modp

[0097] In the above formula, i∈[1,p-1], p is a prime number, Permutation(i) is the i-th element in the permutation sequence, g is the i-th primitive root in the randomly selected set of primitive roots, and g i Let g be the power of i, and mod is the modulo operation.

[0098] It should be noted that a primitive root is a concept in number theory, defined as follows: for a positive integer n′ and an integer g′, if g′ is a primitive root of n′, then g′ satisfies the following two conditions: first, g′ and n′ are coprime; second, the order of g is φ(n′); φ(n′) is Euler's totient function, representing the number of positive integers less than n′ that are coprime to n′. Assuming n′ = 7 and φ(7) = 6, we need to find a number g′ such that g′ = 7. 1 g 2 g 3 g 4 g 5 and g 6 mod 7 can generate all 6 numbers that are relatively prime to 7; if g = 3, then after substituting into the calculation, we get all the numbers that are relatively prime to 7 as (1, 2, 3, 4, 5, 6), so 3 is a primitive root of 7. If g = 2, it obviously won't work.

[0099] A prime number p always has φ(p-1) primitive roots, and different primitive roots will generate different permutation sequences. By randomly selecting a primitive root, it can be ensured that the permutation sequence generated each time is different, thereby increasing the randomness of the scanning process. This is the significance of constructing a set of primitive roots. The selection of primitive roots is random, and even if an attacker knows the prime number p, they cannot easily deduce the primitive root g used, and therefore cannot predict the generated permutation sequence.

[0100] Further, step 12 includes:

[0101] Step 121: Let n a The number of scanning agents;

[0102] Step 122: Divide the permutation sequence into n a Divide the data into equal parts, and assign one part to each scanning agent. Then, the number of IP addresses that each scanning agent is responsible for is p / n. a Where p is a prime number;

[0103] Step 123: Calculate the start and end indices of each scanning agent using the number of IP addresses it is responsible for;

[0104] Specifically, the formula for calculating the starting index includes:

[0105]

[0106] The formula for calculating the ending index includes:

[0107]

[0108] In the above formula, j∈[1,M], and M is the total number of scanning agents; start jThe starting index is end. j This is the end of the index;

[0109] It should be noted that the present invention does not limit the number of scanning agents, which can be set by those skilled in the art based on experimental data, expert experience or engineering needs;

[0110] Step 124: Construct the index range for the scan agent using the start index and the end index;

[0111] Step 125: All IP addresses within the index range are the IP addresses that the scanning agent is responsible for, and all IP addresses that the scanning agent is responsible for are the scanning tasks.

[0112] Furthermore, the method also includes:

[0113] When the scanning agent starts scanning the IP addresses in the scanning task, it randomly selects an IP address from the scanning task as the first IP address that the scanning agent is responsible for scanning.

[0114] Using the original root permutation iterative formula, the next responsible IP address of the scanning agent can be calculated;

[0115] Specifically, the calculation formula for the original root permutation iteration formula includes:

[0116]

[0117] In the above formula, a is the IP address that the scanning agent is currently responsible for scanning, b is the IP address that the scanning agent will be responsible for next, g is a randomly selected primitive root, g is the modulo inverse of g, mod is modulo, and p is a prime number.

[0118] Further, step 13 includes:

[0119] Step 131: Calculate the arrival rate of uplink data packets and the arrival rate of downlink data packets for the smart terminal;

[0120] Specifically, the formulas for calculating the arrival rate of uplink data packets and the arrival rate of downlink data packets for smart terminals include:

[0121]

[0122] In the above formula, i′∈[1,N], where N is the total number of smart terminals; λ ULi′ Let λ be the arrival rate of the uplink data packets of the smart terminal i′. DLi′ P represents the arrival rate of downlink data packets for smart terminal i′. A and P B Let λ be the steady-state probability of the smart terminal in different states. ULPUi′ Let λ be the uplink data packet arrival rate of the smart terminal i′ in the periodic update state.DLPUi′ Let λ be the downlink data packet arrival rate of the smart terminal i′ in the periodic update state. ULBi′ Let λ be the uplink data packet arrival rate of the intelligent terminal i′ in event-driven state. DLBi′ The downlink data packet arrival rate of the smart terminal i′ in event-driven state;

[0123] Step 132: Calculate the probability of a non-empty queue of the smart terminal using the arrival rate of uplink data packets from the smart terminal;

[0124] Specifically, the formula for calculating the probability of a non-empty queue on a smart terminal includes:

[0125]

[0126] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q Dnempi′ For the smart terminal i′ during its transmission time Y i′ The probability that at least one data packet is in the queue is λ. ULi′ Y represents the arrival rate of uplink data packets from smart terminal i′. i′ Let λ be the transmission time of the smart terminal i′. ACKsani′ The ACK response arrival rate from smart terminal i′;

[0127] Step 133: Calculate the transmission time of the smart terminal;

[0128] Specifically, the formula for calculating the transmission time of a smart terminal includes:

[0129] Y i′ =T boi′ ·N bo +T tri′ +(1-P succi′ )·T sleepi′

[0130] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Y i′ T represents the transmission time of the smart terminal i′. boi′ Let N be the average length of the backoff micro-timeslot of the intelligent terminal i′. bo T represents the number of backoff micro-slots for the intelligent terminal i′. tri′ T represents the actual transmission time of the smart terminal i′. sleepi′ For the sleep time of smart terminal i′, P succi′ Let i' be the probability of successful transmission from the smart terminal.

[0131] Among them, the actual transmission time T of the smart terminal i′ tri′ The calculation formulas include:

[0132] Ttri′ =P succi′ ·T succ +(1-P succi′ )·T col

[0133] In the above formula, T col T represents the transmission time when a collision occurs at the smart terminal i′. succ The time when the smart terminal i′ successfully transmits data;

[0134] Step 134: Calculate the non-empty queue probability of the access point corresponding to the smart terminal by using the arrival rate of downlink data packets of the smart terminal and the transmission time of the smart terminal.

[0135] Specifically, the formula for calculating the probability of a non-empty queue at an access point includes:

[0136]

[0137] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q APnemp Let λ be the probability of a non-empty queue at the access point. DLi′ Let λ be the arrival rate of downlink data packets for smart terminal i′. scani′ For the arrival rate of data packets scanned by the smart terminal i′, Y AP Service time for the access point;

[0138] Step 135: Assess network load using the non-empty queue probability of the access point.

[0139] As is understandable, an access point is a key node in a network, responsible for connecting and managing smart terminal devices. Its relationship with smart terminals is one of "connection-forwarding-management," with the access point facilitating data exchange between smart terminals and other parts of the network.

[0140] Further, step 135 includes:

[0141] Step 1351: When the probability of a non-empty queue at an access point is greater than the threshold parameter, the network load condition is a high network load condition;

[0142] Step 1352: When the probability of a non-empty queue at an access point is less than or equal to the threshold parameter, the network load condition is considered a low network load condition.

[0143] It should be noted that the present invention does not limit the "threshold parameter" and it can be set by those skilled in the art based on experimental data, expert experience or engineering needs.

[0144] Further, step 14 includes:

[0145] Step 141: Determine the priority of the scanning task corresponding to the scanning agent according to the preset rules. The priorities include: high priority, medium priority and low priority.

[0146] Step 142: Calculate the initial scanning frequency of the scanning task using the preset weights of the priority corresponding to the scanning task;

[0147] Step 143: When the network load is high, calculate the adjusted scanning frequency of the scanning agent using the initial scanning frequency;

[0148] It should be noted that the present invention does not limit the "preset weight of priority", which can be set by those skilled in the art based on experimental data, expert experience or engineering needs;

[0149] Specifically, the formula for calculating the initial scan frequency includes:

[0150] f init,i′ =f0×w i′

[0151] The formula for calculating the adjusted scan frequency of the scan agent using the initial scan frequency includes:

[0152]

[0153] In the above formula, f init,i′ Let f0 be the initial scanning frequency of the smart terminal i′, and w be the basic scanning frequency. i′ f is the weight of task priority. i′ (t) represents the adjusted scan frequency of the scanning agent, α and β are the adjustment coefficients of the scan frequency, θ is the threshold parameter, and w H w is the weight for high-priority scanning tasks. M w represents the weight of medium-priority scanning tasks. L The weights for low-priority scan tasks are w, where w is the weight for low-priority scan tasks. H >w M >w L ;

[0154] Step 144: When the network load is low, the initial scan frequency is the adjusted scan frequency of the scan agent.

[0155] The present invention provides an optimization method for open port scanning of a smart terminal for power marketing, which has the following advantages:

[0156] (1) Optimization method for scanning objects: First, the scanning task is assigned to multiple scanning agents. Each agent is responsible for scanning a portion of IP addresses. Based on the permutation characteristics of the original root g and prime number p, it is ensured that the IP addresses scanned by each agent do not overlap.

[0157] (2) Evaluate the network load based on the non-empty queue probability of the access point and the transmission time of each smart terminal, determine the current network congestion level, and provide real-time load information for dynamically adjusting task priorities;

[0158] (3) Set high, medium and low priorities for scanning tasks, and set the initial scanning frequency based on the priority weight. Then, dynamically adjust the scanning frequency of different priority tasks according to the network load. When the load is high, increase the scanning frequency of high priority tasks and decrease the scanning frequency of low priority tasks to ensure the efficiency of key scanning tasks.

[0159] To further illustrate the above-mentioned method for optimizing open port scanning in a smart terminal for electricity marketing, this invention also provides a specific example, such as... Figure 2 As shown, it includes the following steps:

[0160] Step 21: Randomly select a prime number that is greater than the range of all possible IP addresses containing smart terminals, calculate the set of all primitive roots of the prime number, and randomly select one primitive root from it. Use the randomly selected primitive root to generate a permutation sequence.

[0161] Step 22: Distribute the scanning task to multiple scanning agents. Each agent is responsible for scanning a portion of the IP addresses. Based on the permutation characteristics of the original root g and prime number p, ensure that the IP addresses scanned by each agent do not overlap. Each agent quickly calculates its next sampling address using the original root permutation iterative formula, reducing modulo operation overhead and improving scanning efficiency.

[0162] Step 23: Perform traffic modeling on the smart terminals, calculate the uplink and downlink data packet arrival rates for each smart terminal to capture the communication characteristics of the smart terminals, and evaluate the load of the smart terminals during transmission by calculating the probability of non-empty queues, so as to provide a basis for subsequent priority management.

[0163] Step 24: Assess network load based on the non-empty queue probability of the access point and the transmission time of each smart terminal, determine the current network congestion level, and provide real-time load information for dynamically adjusting task priorities;

[0164] Step 25: Set high, medium, and low priorities for scanning tasks, and set the initial scanning frequency based on the priority weights so that high-priority tasks can get higher processing priority when the network is under high load.

[0165] Step 26: Dynamically adjust the scanning frequency of different priority tasks according to the network load. When the load is high, increase the scanning frequency of high priority tasks and decrease the scanning frequency of low priority tasks to improve scanning efficiency.

[0166] Further, step 21 includes:

[0167] Let p be a large prime number and g be multiple sets of primitive roots. list Choose a primitive root g (where g ∈ g) list Generate a permutation sequence, where each element is: Permutation(i) = g i mod p, where i = 1, 2, ..., p-1.

[0168] Further, step 22 includes:

[0169] Step 221: Let n a To determine the number of scanning agents, the permutation sequence is divided into n parts. a Divide the IP addresses into equal parts, each part is assigned to a scanning agent, and each agent is responsible for a number of IP addresses, p / n. a For the j-th agent, its starting index is End index is Each agent scans the corresponding IP addresses based on its assigned index range;

[0170] Step 222: The iterative formula for the original root permutation is:

[0171]

[0172] In the above formula, a is the address of the current sample, b is the address of the next sample, and g is the modulo inverse of g.

[0173] Further, step 23 includes:

[0174] Step 231: Calculate the arrival rate λ of uplink (UL) and downlink (DL) data packets for each smart terminal i′. ULi′ and λ DLi′ The formula is as follows:

[0175]

[0176] In the above formula, P A and P B λ represents the steady-state probability of a smart terminal in different states. ULPUi′ and λ DLPUi′ λ represents the uplink and downlink data packet arrival rates of the intelligent terminal i′ in a periodically updated state. ULBi′ and λ DLBi′ These are the uplink and downlink data packet arrival rates of the intelligent terminal i′ in event-driven mode.

[0177] Step 232: Calculate the probability of a non-empty queue, where each smart terminal has a transmission time Y. i′ The probability Q that at least one data packet is in the queue Dnempi′ :

[0178]

[0179] In the above formula, λ ACKsani′ Let λ be the ACK response arrival rate from smart terminal i′. ULi′ The arrival rate of uplink (UL) data packets for smart terminal i′.

[0180] Further, step 24 includes:

[0181] Step 241: Calculate the non-empty queue probability of the access point corresponding to the smart terminal. Evaluate the load of the access point using the following formula, i.e., the non-empty queue probability Q of the access point (AP). APnemp :

[0182]

[0183] In the above formula, λ scani′ For the arrival rate of data packets scanned by the smart terminal i′, Y AP Service time for the access point;

[0184] Step 242: Calculate the transmission time Y of smart terminal i′ i′ This includes retreat time, transmission time, and sleep time, which can be calculated using the following formula:

[0185] Y i′ =T boi′ ·N bo +T tri′ +(1-P succi′ )·T sleepi′

[0186] In the above formula, T boi′ Let N be the average length of the backoff micro-timeslot of the intelligent terminal i′. bo T represents the number of backoff micro-slots for the intelligent terminal i′. tri′ T represents the actual transmission time of the smart terminal i′. sleepi′ For the sleep time of smart terminal i′, P succi′ Let i' be the probability of successful transmission from the smart terminal.

[0187] Among them, the actual transmission time T of the smart terminal i′ tri′ The calculation formulas include:

[0188] T tri′ =P succi′ ·T succ +(1-P succi′ )·T col

[0189] In the above formula, T colT represents the transmission time when a collision occurs at the smart terminal i′. succ The time when the smart terminal i′ successfully transmits data.

[0190] Further, step 25 includes:

[0191] Define task priorities and categorize scanning tasks into high, medium, and low priorities based on their importance, assigning each priority level a weight w. H w M and w L (satisfies w) H >w M >w L ), set the initial scan frequency f for each task init,i′ =f0×w i′ Where f0 is the basic scan frequency, w i′ The weight is the priority of the task.

[0192] Further, step 26 includes:

[0193] Real-time monitoring of network load and adjustment of scanning frequency, based on the non-empty queue probability Q of the access point calculated in step 24. APnemp Transmission time Y of smart terminals i′ Determine network load;

[0194] High load conditions (Q) APnemp >θ): Maintain the scanning frequency f of high-priority tasks. i′ (t), and reduce the frequency of low-priority tasks, at which point f i′ The formula for calculating (t) includes:

[0195]

[0196] Low load conditions (Q) APnemp ≤θ): Each task restores its initial scan frequency, at which point f i′ The formula for calculating (t) includes:

[0197] f i′ (t)=f init,i′

[0198] Where α and β are adjustment coefficients for the scanning frequency, and θ is the threshold parameter.

[0199] This invention provides an optimized method for scanning open ports of smart terminals in power marketing. This method achieves efficient and dynamic scanning of open ports on smart terminals, optimizes the scheduling of smart terminal traffic and network resources, and dynamically adjusts the scanning frequency of tasks with different priorities based on network load, thereby improving scanning efficiency. Furthermore, by introducing a permutation sequence generation method based on large prime numbers and original roots, this invention effectively improves scanning efficiency and randomness, avoiding the duplicate sampling problem that may occur in traditional scanning. In addition, this invention employs distributed agent task allocation, enabling efficient task allocation and management in large-scale networks, possessing good scalability, and adapting to the open port scanning needs of various complex network environments.

[0200] Example 2

[0201] This invention also provides an open port scanning optimization device for smart terminals in power marketing, such as... Figure 3 As shown, it includes:

[0202] The generation unit is used to generate a permutation sequence of all IP addresses of the collected smart terminals for electricity marketing.

[0203] An allocation unit is configured to allocate scanning tasks to multiple scanning agents using the permutation sequence, wherein the scanning tasks include multiple IP addresses;

[0204] The determining unit is used to determine the network load when the scanning agent scans the IP address in its corresponding scanning task;

[0205] The adjustment unit is used to adjust the scanning frequency of the scanning agent according to the network load.

[0206] Furthermore, the generation unit includes:

[0207] The first setting module is used to randomly set a prime number that is greater than all possible ranges containing each IP address;

[0208] The first calculation module is used to calculate all the primitive roots of prime numbers and obtain the set of primitive roots.

[0209] The selection module is used to randomly select a primitive root from all primitive root sets and generate a permutation sequence using the randomly selected primitive root, wherein the permutation sequence includes multiple elements.

[0210] Furthermore, the allocation unit includes:

[0211] The second setting module is used to set n. a The number of scanning agents;

[0212] The allocation module is used to divide the permutation sequence into n parts. aDivide the data into equal parts, and assign one part to each scanning agent. Then, the number of IP addresses that each scanning agent is responsible for is p / n. a Where p is a prime number;

[0213] The second calculation module is used to calculate the start index and end index of each scanning agent by using the number of IP addresses that each scanning agent is responsible for.

[0214] The constructing module is used to construct the index range of the scan agent using the start index and the end index;

[0215] The first module determines which IP addresses within the index range are the IP addresses the scanning agent is responsible for, and which in turn determines which IP addresses the scanning agent is responsible for the scanning task.

[0216] Furthermore, the device also includes: a computing unit, used for:

[0217] When the scanning agent starts scanning the IP addresses in the scanning task, it randomly selects an IP address from the scanning task as the first IP address that the scanning agent is responsible for scanning.

[0218] Using the original root permutation iterative formula, the next IP address to be handled by the scanning agent is calculated.

[0219] Further, the defined units include:

[0220] The third calculation module is used to calculate the arrival rate of uplink data packets and the arrival rate of downlink data packets of the smart terminal.

[0221] The fourth calculation module is used to calculate the probability of a non-empty queue of the smart terminal by utilizing the arrival rate of uplink data packets of the smart terminal.

[0222] The fifth calculation module is used to calculate the transmission time of the smart terminal;

[0223] The sixth calculation module is used to calculate the non-empty queue probability of the access point corresponding to the smart terminal by using the arrival rate of downlink data packets of the smart terminal and the transmission time of the smart terminal.

[0224] The evaluation module is used to assess network load using the probability of non-empty queues at access points.

[0225] Furthermore, the evaluation module is specifically used for:

[0226] When the probability of a non-empty queue at an access point is greater than a threshold parameter, the network load condition is considered a high network load condition.

[0227] When the probability of a non-empty queue at an access point is less than or equal to a threshold parameter, the network load is considered to be low.

[0228] Furthermore, the adjustment unit includes:

[0229] The second determining module is used to determine the priority of the scanning task corresponding to the scanning agent according to preset rules. The priorities include: high priority, medium priority and low priority.

[0230] The seventh calculation module is used to calculate the initial scanning frequency of a scanning task by using the preset weights of the priorities corresponding to the scanning tasks.

[0231] The first adjustment module is used to calculate the adjusted scanning frequency of the scanning agent using the initial scanning frequency when the network load is high.

[0232] The second adjustment module is used to set the initial scanning frequency to the adjusted scanning frequency of the scanning agent when the network load is low.

[0233] Furthermore, the calculation formula for each element in the permutation sequence includes:

[0234] Permutation(i) = g i modp

[0235] In the above formula, i∈[1,p-1], p is a prime number, Permutation(i) is the i-th element in the permutation sequence, and g i Let be the i-th primitive root in the randomly selected primitive root set, and mod is the modulo operation.

[0236] Furthermore, the formula for calculating the starting index includes:

[0237]

[0238] The formula for calculating the ending index includes:

[0239]

[0240] In the above formula, j∈[1,M], and M is the total number of scanning agents; start j The starting index is end. j This is the end of the index.

[0241] Furthermore, the calculation formula for the original root permutation iteration formula includes:

[0242]

[0243] In the above formula, 'a' represents the IP address currently being scanned by the scanning agent, 'b' represents the IP address to be scanned by the scanning agent next, and 'g' represents the randomly selected original root. Let g be the modulo inverse of g, mod is the modulo operation, and p is a prime number.

[0244] Furthermore, the formulas for calculating the arrival rate of uplink data packets and the arrival rate of downlink data packets for smart terminals include:

[0245]

[0246] In the above formula, i′∈[1,N], where N is the total number of smart terminals; λ ULi′ Let λ be the arrival rate of the uplink data packets of the smart terminal i′. DLi′ P represents the arrival rate of downlink data packets for smart terminal i′. A and P B Let λ be the steady-state probability of the smart terminal in different states. ULPUi′ Let λ be the uplink data packet arrival rate of the smart terminal i′ in the periodic update state. DLPUi′ Let λ be the downlink data packet arrival rate of the smart terminal i′ in the periodic update state. ULBi′ Let λ be the uplink data packet arrival rate of the intelligent terminal i′ in event-driven state. DLBi′ Let i′ be the downlink data packet arrival rate of the smart terminal in event-driven state.

[0247] Furthermore, the formula for calculating the probability of a non-empty queue on a smart terminal includes:

[0248]

[0249] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q Dnempi′ For the smart terminal i′ during its transmission time Y i′ The probability that at least one data packet is in the queue is λ. ULi′ Y represents the arrival rate of uplink data packets from smart terminal i′. i′ Let λ be the transmission time of the smart terminal i′. ACKsani′ is the ACK response arrival rate from smart terminal i′.

[0250] Furthermore, the formula for calculating the transmission time of the smart terminal includes:

[0251] Y i′ =T boi′ ·N bo +T tri′ +(1-P succi′ )·T sleepi′

[0252] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Y i′ T represents the transmission time of the smart terminal i′. boi′ Let N be the average length of the backoff micro-timeslot of the intelligent terminal i′. boT represents the number of backoff micro-slots for the intelligent terminal i′. tri′ T represents the actual transmission time of the smart terminal i′. sleepi′ For the sleep time of smart terminal i′, P succi′ Let i' be the probability of successful transmission from the smart terminal.

[0253] Among them, the actual transmission time T of the smart terminal i′ tri′ The calculation formulas include:

[0254] T tri′ =P succi′ ·T succ +(1-P succi′ )·T col

[0255] In the above formula, T col T represents the transmission time when a collision occurs at the smart terminal i′. succ The time when the smart terminal i′ successfully transmits data.

[0256] Furthermore, the formula for calculating the probability of a non-empty queue at an access point includes:

[0257]

[0258] In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q APnemp Let λ be the probability of a non-empty queue at the access point. DLi′ Let λ be the arrival rate of downlink data packets for smart terminal i′. scani′ For the arrival rate of data packets scanned by the smart terminal i′, Y AP Service time for the access point.

[0259] Furthermore, the formula for calculating the initial scan frequency includes:

[0260] f init,i′ =f0×w i′

[0261] The formula for calculating the adjusted scan frequency of the scan agent using the initial scan frequency includes:

[0262]

[0263] In the above formula, f init,i′ Let f0 be the initial scanning frequency of the smart terminal i′, and w be the basic scanning frequency. i′ f is the weight of task priority. i′ (t) represents the adjusted scan frequency of the scanning agent, α and β are the adjustment coefficients of the scan frequency, θ is the threshold parameter, and w H w is the weight for high-priority scanning tasks. Mw represents the weight of medium-priority scanning tasks. L The weights for low-priority scan tasks are w, where w is the weight for low-priority scan tasks. H >w M >w L .

[0264] It is understood that the device embodiments provided above correspond to the method embodiments described above, and the specific details can be referred to each other, which will not be repeated here.

[0265] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0266] Example 3

[0267] like Figure 4 As shown, the present invention also provides an electronic device, which may be a computer device, a microcontroller device, a smart mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, processor, and transceiver component are connected via a bus; the memory can be used to store executable programs, and an exemplary executable program may include instructions; the processor is used to execute the instructions stored in the memory. The memory can also be used to store data, which can be accessed and / or modified when instructions are executed.

[0268] The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, and is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to realize the corresponding method flow or corresponding function, so as to realize the steps of the power marketing smart terminal open port scanning optimization method in the above embodiments.

[0269] Example 4

[0270] Based on the same inventive concept, this invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory). This readable storage medium is a memory device within an electronic device used to store programs and data. It is understood that the storage medium here can include both built-in storage media within the electronic device and extended storage media supported by the electronic device. The storage medium provides storage space, which stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more executable programs (including program code). It should be noted that the storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. Loading and executing one or more instructions stored in the storage medium by the processor can implement the steps of the power marketing smart terminal open port scanning optimization method described in the above embodiments.

[0271] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0272] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0273] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0274] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0275] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for optimizing open port scanning in a smart terminal for electricity marketing, characterized in that, include: Generate a permutation sequence for all IP addresses of the collected smart terminals for electricity marketing; The permutation sequence is used to assign scanning tasks to multiple scanning agents, wherein the scanning tasks include multiple IP addresses; Determine the network load when the scanning agent scans the IP addresses in its corresponding scanning task; The scanning frequency of the scanning agent is adjusted according to the network load.

2. The method according to claim 1, characterized in that, The generation and collection of permutation sequences for all IP addresses of the smart electricity marketing terminal includes: Randomly select a prime number that is greater than all possible ranges containing each of the IP addresses; Calculate all primitive roots of the prime number to obtain the set of primitive roots; A primitive root is randomly selected from all the primitive root sets, and the permutation sequence is generated using the randomly selected primitive root, wherein the permutation sequence includes multiple elements.

3. The method according to claim 1, characterized in that, The method of allocating scanning tasks to multiple scanning agents using the permutation sequence includes: Let n a The number of scanning agents; Divide the permutation sequence into n a Divide the data into equal parts, and assign one part to each scanning agent. Then, the number of IP addresses that each scanning agent is responsible for is p / n. a Where p is a prime number; Using the number of IP addresses handled by each scanning agent, the start index and end index of each scanning agent are calculated; The starting index and the ending index are used to construct the index range of the scanning agent; All IP addresses within the index range are the IP addresses that the scanning agent is responsible for, and all IP addresses that the scanning agent is responsible for are the scanning tasks.

4. The method according to claim 1, characterized in that, Also includes: When the scanning agent starts scanning the IP addresses in the scanning task, it randomly selects an IP address from the scanning task as the first IP address that the scanning agent is responsible for scanning; Using the original root permutation iterative formula, the next responsible IP address of the scanning agent is calculated.

5. The method according to claim 1, characterized in that, Determining the network load when the scanning agent scans the IP addresses in its corresponding scanning task includes: Calculate the arrival rate of uplink data packets and the arrival rate of downlink data packets for the smart terminal; The probability of a non-empty queue of the smart terminal is calculated using the arrival rate of the uplink data packets of the smart terminal. Calculate the transmission time of the smart terminal; The non-empty queue probability of the access point corresponding to the smart terminal is calculated by using the arrival rate of the downlink data packets of the smart terminal and the transmission time of the smart terminal. The network load is assessed using the non-empty queue probability of the access point.

6. The method according to claim 5, characterized in that, The method of assessing the network load using the non-empty queue probability of the access point includes: When the probability of a non-empty queue at the access point is greater than a threshold parameter, the network load condition is considered a high network load condition. When the probability of a non-empty queue at the access point is less than or equal to a threshold parameter, the network load condition is considered a low network load condition.

7. The method according to claim 1, characterized in that, Adjusting the scanning frequency of the scanning agent according to the network load includes: According to preset rules, the priority of the scanning task corresponding to the scanning agent is determined, and the priority includes: high priority, medium priority and low priority; The initial scanning frequency of the scanning task is calculated using the preset weight of the priority corresponding to the scanning task. When the network load is high, the adjusted scanning frequency of the scanning agent is calculated using the initial scanning frequency. When the network load is low, the initial scanning frequency is the adjusted scanning frequency of the scanning agent.

8. The method according to claim 2, characterized in that, The calculation formula for each element in the permutation sequence includes: Permutation(i)=g i modp In the above formula, i∈[1,p-1], p is a prime number, Permutation(i) is the i-th element in the permutation sequence, and g i Let be the i-th primitive root in the randomly selected primitive root set, and mod is the modulo operation.

9. The method according to claim 3, characterized in that, The formula for calculating the starting index includes: The formula for calculating the ending index includes: In the above formula, j∈[1,M], and M is the total number of scanning agents; start j The starting index is end. j This is the end of the index.

10. The method according to claim 4, characterized in that, The calculation formula of the original root permutation iteration formula includes: In the above formula, 'a' represents the IP address currently being scanned by the scanning agent, 'b' represents the IP address to be scanned by the scanning agent next, and 'g' represents the randomly selected original root. Let g be the modulo inverse of g, mod is the modulo operation, and p is a prime number.

11. The method according to claim 5, characterized in that, The formulas for calculating the arrival rate of uplink data packets and the arrival rate of downlink data packets of the smart terminal include: In the above formula, i′∈[1,N], where N is the total number of smart terminals; λ ULi′ Let λ be the arrival rate of the uplink data packets of the smart terminal i′. DLi′ P represents the arrival rate of downlink data packets for smart terminal i′. A and P B Let λ be the steady-state probability of the smart terminal in different states. ULPUi′ Let λ be the uplink data packet arrival rate of the smart terminal i′ in the periodic update state. DLPUi′ Let λ be the downlink data packet arrival rate of the smart terminal i′ in the periodic update state. ULBi′ Let λ be the uplink data packet arrival rate of the intelligent terminal i′ in event-driven state. DLBi′ Let i′ be the downlink data packet arrival rate of the smart terminal in event-driven state.

12. The method according to claim 5, characterized in that, The formula for calculating the probability of a non-empty queue in the smart terminal includes: In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q Dnempi′ For the intelligent terminal i′ during its transmission time Y i′ The probability that at least one data packet is in the queue is λ. ULi′ Y represents the arrival rate of uplink data packets from smart terminal i′. i′ Let λ be the transmission time of the smart terminal i′. ACKsani′ is the ACK response arrival rate from smart terminal i′.

13. The method according to claim 5, characterized in that, The formula for calculating the transmission time of the smart terminal includes: Y i′ =T boi′ ·N bo +T tri′ +(1-P succi′ )·T sleepi′ In the above formula, i′∈[1,N], where N is the total number of smart terminals; Y i′ T represents the transmission time of the smart terminal i′. boi′ Let N be the average length of the backoff micro-timeslot of the intelligent terminal i′. bo T represents the number of backoff micro-slots for the intelligent terminal i′. tri′ T represents the actual transmission time of the smart terminal i′. sleepi′ For the sleep time of smart terminal i′, P succi′ Let i' be the probability of successful transmission from the smart terminal. Among them, the actual transmission time T of the smart terminal i′ tri′ The calculation formulas include: T tri′ =P succi′ ·T succ +(1-P succi′ )·T col In the above formula, T col T represents the transmission time when a collision occurs at the smart terminal i′. succ The time when the smart terminal i′ successfully transmits data.

14. The method according to claim 5, characterized in that, The formula for calculating the probability of a non-empty queue at the access point includes: In the above formula, i′∈[1,N], where N is the total number of smart terminals; Q APnemp Let λ be the probability of a non-empty queue at the access point. DLi′ Let λ be the arrival rate of downlink data packets for smart terminal i′. scani′ For the arrival rate of data packets scanned by the smart terminal i′, Y AP Service time for the access point.

15. The method according to claim 7, characterized in that, The formula for calculating the initial scan frequency includes: f init,i′ =f0×w i′ The formula for calculating the adjusted scan frequency of the scanning agent using the initial scan frequency includes: In the above formula, f init,i′ Let f0 be the initial scanning frequency of the smart terminal i′, and w be the basic scanning frequency. i′ f is the weight of task priority. i′ (t) represents the adjusted scanning frequency of the scanning agent, α and β are the adjustment coefficients of the scanning frequency, θ is the threshold parameter, and w H For the weight of high-priority scanning tasks, w M w represents the weight of medium-priority scan tasks. L The weights for low-priority scan tasks are w, where w is the weight for low-priority scan tasks. H >w M >w L .

16. A power marketing smart terminal open port scanning optimization device, characterized in that, include: The generation unit is used to generate a permutation sequence of all IP addresses of the collected smart terminals for electricity marketing. An allocation unit is configured to allocate scanning tasks to multiple scanning agents using the permutation sequence, wherein the scanning tasks include multiple IP addresses; The determining unit is used to determine the network load when the scanning agent scans the IP address in its corresponding scanning task; An adjustment unit is used to adjust the scanning frequency of the scanning agent according to the network load.

17. An electronic device, characterized in that, include: At least one processor and memory; The memory and processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the power marketing smart terminal open port scanning optimization method as described in any one of claims 1 to 15 is implemented.

18. A readable storage medium, characterized in that, It contains an executable program, which, when executed, implements the power marketing smart terminal open port scanning optimization method as described in any one of claims 1 to 15.