Power distribution network equipment searching method and device, electronic equipment and storage medium
By calculating the intermediate variables of the reference address range and the values of each address point in the distribution network equipment search method, the target address is solved, and the problem of low equipment search efficiency in large-scale address spaces in the prior art is solved, and fast and efficient equipment positioning is achieved.
Patent Information
- Application Number
- CN202411492948.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-25
AI Technical Summary
In large-scale address spaces, the search method for existing distribution network equipment is relatively low, especially the search process based on the midpoint method is slow.
By obtaining the reference address range of the device to be searched, the intermediate variable is calculated, and the values of each address point in the reference address range are calculated based on the intermediate variable, and the target address of the device to be searched is finally determined based on these values.
Quickly search out the addresses of the devices to be searched in a large-scale address space, improving search efficiency.
Smart Images

Figure CN119697109A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a distribution network equipment search method, device, electronic device and storage medium. Background Art
[0002] Smart distribution network is a key component of power system automation and intelligence, which involves a large number of equipment and devices. Smart distribution network requires intelligent perception and network management of equipment, including equipment identification, positioning, tracking and monitoring. Equipment needs to have IP address or MAC address to support communication and data exchange of smart distribution network.
[0003] In the related art, when searching for distribution network equipment, the midpoint method is used to search for equipment, specifically, the search range is divided into two halves to gradually narrow the search interval. Although this method is simple and intuitive, it is less efficient in large-scale address spaces. Summary of the invention
[0004] The embodiments of the present application provide a distribution network equipment search system, method, electronic device and storage medium, which can improve the detection efficiency of distribution network faults based on three-phase imbalance.
[0005] In a first aspect, an embodiment of the present application provides a method for searching for distribution network equipment, comprising:
[0006] Get the reference address range of the device to be searched;
[0007] Calculating the intermediate variable corresponding to the device to be searched according to the reference address range;
[0008] Calculating the value of each address point in the reference address range according to the intermediate variable;
[0009] Based on the reference address range and the value of each address point, the target address of the device to be searched is determined.
[0010] Optionally, in some embodiments of the present application, calculating the intermediate variable corresponding to the device to be searched according to the reference address range includes:
[0011] Determine endpoints of the reference address range to obtain a first endpoint and a second endpoint;
[0012] Get the preset conversion formula;
[0013] An intermediate variable corresponding to the device to be searched is calculated according to the preset conversion formula, the first endpoint and the second endpoint.
[0014] Optionally, in some embodiments of the present application, calculating the intermediate variable corresponding to the device to be searched according to the preset conversion formula, the first endpoint and the second endpoint includes:
[0015] Calculate the difference between the first endpoint and the second endpoint to obtain a device identifier corresponding to the device to be searched;
[0016] Based on the preset conversion formula and the device identification, an intermediate variable corresponding to the device to be searched is calculated.
[0017] Optionally, in some embodiments of the present application, calculating the value of each address point in the reference address range according to the intermediate variable includes:
[0018] Performing format conversion on the intermediate variable to obtain a converted intermediate variable;
[0019] Based on the preset value range and the converted intermediate variable, the value of each address point in the reference address range is calculated.
[0020] Optionally, in some embodiments of the present application, determining the target address of the device to be searched based on the reference address range and the value of each address point includes:
[0021] Determine the proportion of each address point in the reference address range;
[0022] Based on the proportion of each address point in the reference address range and the value of each address point, the target address of the device to be searched is determined.
[0023] Optionally, in some embodiments of the present application, determining the target address of the device to be searched based on the proportion of each address point in the reference address range and the value of each address point includes:
[0024] Calculating a ratio between sub-ranges within the reference address range based on the proportion of each address point in the reference address range and a value of each address point;
[0025] The target address of the device to be searched is determined according to the ratio between the sub-ranges within the reference address range and a preset formula.
[0026] Optionally, in some embodiments of the present application, determining the target address of the device to be searched according to the ratio between the sub-ranges within the reference address range and a preset formula includes:
[0027] According to a preset formula, a candidate range corresponding to the target address of the device to be searched is calculated;
[0028] verifying the candidate range based on a ratio between sub-ranges within the reference address range;
[0029] When the verification passes, the target address of the device to be searched is determined based on the candidate range.
[0030] In a second aspect, an embodiment of the present application provides a distribution network device search device, comprising:
[0031] An acquisition module is used to obtain a reference address range of a device to be searched;
[0032] A first calculation module, used for calculating the intermediate variable corresponding to the device to be searched according to the reference address range;
[0033] A second calculation module, used for calculating the value of each address point in the reference address range according to the intermediate variable;
[0034] The determination module is used to determine the target address of the device to be searched based on the reference address range and the value of each address point.
[0035] Correspondingly, the present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of any of the above methods when executing the program.
[0036] The present application also provides a storage medium, wherein the storage medium stores a computer program, and the computer program implements any of the above methods when the computer program is executed by a processor.
[0037] The present application provides a method, device, electronic device and storage medium for searching for distribution network equipment. After obtaining the reference address range of the equipment to be searched, the intermediate variables corresponding to the equipment to be searched are calculated according to the reference address range, and then the values of each address point in the reference address range are calculated according to the intermediate variables. Finally, based on the reference address range and the values of each address point, the target address of the equipment to be searched is determined. In the scheme for searching distribution network equipment provided by the present application, the values of each address point in the reference address range can be determined according to the reference address range of the equipment to be searched, and then the target address of the equipment to be searched can be determined based on the reference address range and the values of each address point. Thus, the address of the equipment to be searched can be quickly searched in a large-scale address space, that is, the search efficiency is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 It is a flowchart of a distribution network equipment search method provided in an embodiment of the present application;
[0040] Figure 2 is a schematic diagram of the address range provided in the embodiment of the present application;
[0041] Figure 3 is another flow chart of the method for searching for distribution network equipment provided in an embodiment of the present application;
[0042] Figure 4 It is a structural schematic diagram of a distribution network equipment search device provided in an embodiment of the present application;
[0043] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of systems and methods consistent with the examples detailed in the attached claims, or with some aspects of the present application.
[0045] It should be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present application may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context of the specific embodiment.
[0046] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0047] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present application, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0048] Embodiments of the present application provide a distribution network equipment search method, device, electronic device, and storage medium.
[0049] Among them, the distribution network equipment search device can be deployed in a terminal, and the terminal can be a smart phone, a tablet, an intelligent audio and video interactive device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a wearable intelligent device, a medical device, etc. As mentioned above, the terminal 102 is often configured with a display device, and the display device can also be a display, a display screen, a touch screen, etc. The touch screen can also be a touch screen, a touch panel, etc., but is not limited to this. The terminal can communicate with the server in a wired or wireless manner. The server can include an independently running server or a distributed server, or a server cluster composed of multiple servers. The terminal can include a mobile phone, a tablet computer or a personal computer (PC, Personal Computer).
[0050] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.
[0051] The present application provides a distribution network equipment search method, including: obtaining a reference address range of a device to be searched; calculating an intermediate variable corresponding to the device to be searched based on the reference address range; calculating a value of each address point in the reference address range based on the intermediate variable; and determining a target address of the device to be searched based on the reference address range and the value of each address point.
[0052] See also Figure 1 , Figure 1 : is a flow chart of the distribution network equipment search method provided by the present application, and the distribution network equipment search method specifically includes the following process:
[0053] 101. Obtain a reference address range of a device to be searched.
[0054] Distribution network refers to the power network in the power system that transmits electric energy from substations or power stations to end users (such as households, commercial and industrial users). The distribution network is an important part of the power system. It is responsible for the final distribution and supply of electric energy. The reference distribution network refers to the distribution network used as a benchmark or reference standard.
[0055] In the smart distribution grid, each device has a unique address, such as a MAC address, IPv4 address, or IPv6 address. The starting point of the search method is to determine an address range of the device to be searched, which can be a series of consecutive addresses. The device to be searched refers to a specific device that needs to be located or identified, and its address (such as a MAC address, IPv4 address, or IPv6 address) has not yet been determined or needs to be verified. The reference address range refers to the starting and ending addresses used to determine the search space. This range provides a clear search space for subsequent device searches, and the exact address of the device to be searched will be found within this range.
[0056] 102. Calculate the intermediate variable corresponding to the device to be searched according to the reference address range.
[0057] First, determine the two endpoints of the reference address range, namely the minimum address and the maximum address. Then, calculate the difference between the two endpoints, which will help determine the size of the search space. Apply a preset conversion formula to process the endpoint data. This formula can be based on the Fibonacci sequence or other mathematical principles to optimize the search process. Optionally, in some embodiments, the conversion formula and the endpoint data can be used to calculate intermediate variables. The intermediate variables are usually one or more numerical values that represent reference points used to iteratively approach the target address during the search process.
[0058] Optionally, in some embodiments of the present application, the step of “calculating the intermediate variable corresponding to the device to be searched according to the reference address range” may specifically include:
[0059] Determine endpoints of the reference address range to obtain a first endpoint and a second endpoint;
[0060] Get the preset conversion formula;
[0061] According to the preset conversion formula, the first endpoint and the second endpoint, an intermediate variable corresponding to the device to be searched is calculated.
[0062] First, it is necessary to determine the two endpoints of the reference address range, namely the first endpoint (starting address) and the second endpoint (ending address). These two endpoints define the boundaries of the search space. Next, obtain a preset conversion formula, which is used to convert the endpoint information into an intermediate variable. The conversion formula may be based on a specific mathematical principle or algorithmic logic, such as the Fibonacci search method, which uses the characteristics of the Fibonacci sequence to optimize the search process. Then, use the values of the first endpoint and the second endpoint to calculate the difference between the two. This difference is the size of the search space and is crucial for determining the intermediate variable. Substitute the difference and endpoint information into the preset conversion formula. The value of the intermediate variable is obtained by calculating the conversion formula. This intermediate variable is a key reference point in the search algorithm and is used to guide the search process. Intermediate variables are usually used to determine the midpoint of the search space or specific split points, which help narrow the search range and speed up the search process.
[0063] Optionally, in some embodiments of the present application, the step of “calculating an intermediate variable corresponding to the device to be searched according to a preset conversion formula, the first endpoint, and the second endpoint” may specifically include:
[0064] Calculate the difference between the first endpoint and the second endpoint to obtain a device identifier corresponding to the device to be searched;
[0065] Based on the preset conversion formula and device identification, the intermediate variable corresponding to the device to be searched is calculated.
[0066] First, calculate the difference between the first endpoint (minimum address) and the second endpoint (maximum address) of the reference address range. This difference represents the width of the search space. The calculated result of the difference can be used as part of the device identification or as the basis for further calculations. The device identification is a unique identifier of the device to be searched in the network and is related to the address range. Next, use a preset conversion formula, which can be based on a specific algorithm or mathematical principle, to convert the device identification into an intermediate variable. Combine the device identification and the conversion formula to calculate the intermediate variable corresponding to the device to be searched. This intermediate variable is a key parameter in the search algorithm and is used to guide the search process.
[0067] Specifically, search for a specific address A in the smart distribution network λ , assuming A λ In the range of A1 to A2, C xy It is the decimal number converted from the binary number of the device / equipment / address in the smart distribution network. x With A y , the difference between x and y is a natural number from 1 to 6.
[0068] C xy =(A x -Ay )
[0069] Define the intermediate variable B' of the decimal number xy yes
[0070]
[0071] B′ xy The decimal number is defined, and its corresponding binary intermediate variable is B xy .
[0072] B xy =(B′ xy )
[0073] Among them, x∈{1,2,3,4,5,6}, y∈{1,2,3,4,5,6}.
[0074] 103. Based on the intermediate variables, calculate the value of each address point in the reference address range.
[0075] The intermediate variable is calculated based on the endpoints of the reference address range and represents a specific position or scale in the search space. Using the intermediate variable, a value can be assigned to each potential address point in the reference address range. This value can be calculated based on a variety of methods, such as linear interpolation, proportional assignment, or other mathematical formulas. If the intermediate variable represents a proportional position in the search space, the value of each address point can be estimated by linear interpolation.
[0076] Optionally, in some embodiments of the present application, the step of “calculating the value of each address point in the reference address range according to the intermediate variable” may specifically include:
[0077] Perform format conversion on the intermediate variables to obtain converted intermediate variables;
[0078] Based on the preset value range and the converted intermediate variable, the value of each address point in the reference address range is calculated.
[0079] It should be noted that since network addresses (such as IP addresses) are often processed in binary form, it may be necessary to convert the decimal intermediate variable to binary format to keep it consistent with the address format. Performing a lossless conversion, converting a decimal value to binary representation is a lossless conversion, which can be achieved by arithmetic right shift and modulo operation. For a decimal number D, repeat the following steps until D is 0:
[0080] Compute the remainder when D is divided by 2 (this will be the lowest bit in the binary representation).
[0081] Update D to be the result of dividing D by 2 (discarding the remainder).
[0082] For example, for the intermediate variable, first perform a conversion from decimal to binary. This can be done by continuously dividing by 2 and recording the remainder until the intermediate variable is 0. The purpose of the conversion format is to match the binary characteristics of the network address, making calculations and comparisons more intuitive and accurate. A preset value range is determined based on the maximum and minimum possible values of the reference address range. Using the converted binary intermediate variable, the value of each address point in the reference address range is calculated based on the preset value range. Binary bit operations can be used to determine the value of each address point. For example, the value of the address point can be determined by comparing the binary bits of the intermediate variable with the binary bits of the address point. Based on the calculated values, the reference address range is divided into multiple sub-intervals, each of which corresponds to a group of address points with similar values. The value of each address point varies according to its proximity to the intermediate variable, and the address point with a higher value may be closer to the target address.
[0083] Specifically, B xy The decimal number is defined, and its corresponding binary intermediate variable is B xy .
[0084] B xy =(B′ xy )
[0085] Among them, x∈{1, 2, 3, 4, 5, 6}, y∈{1, 2, 3, 4, 5, 6}.
[0086] The binary numbers of the specific address points A3, A4, A5 and A6 in the address segment A1 to A2 are expressed as follows:
[0087] A3=A1+B 21
[0088] A4=A3+B 23
[0089] A5=A1+B 31
[0090] A6=A1+B 51
[0091] Within the address range of A1 to A2, the specific address points of A3, A4, A5 and A6 are represented by the coordinate axis, such as Figure 2 shown.
[0092] 104. Determine the target address of the device to be searched based on the reference address range and the value of each address point.
[0093] First, determine the starting and ending points of the search, which constitute the address range of the device to be searched. Each address point is assigned a value within the reference address range based on its characteristics or attributes. These values are calculated based on intermediate variables, and then the values of each address point are analyzed to determine which address points are more likely to be the target address of the device to be searched. Calculate the proportion of each address point within the reference address range, and perform preliminary screening based on the value and proportion of the address point to narrow the possible target address range. If the search method adopts an iterative strategy, the search interval will be adjusted according to the results of the current iteration to gradually approach the target address. Use optimization algorithms, such as Fibonacci search or other search algorithms, to optimize the search process based on the values of the address points. After multiple iterations and analysis, one or more of the most likely address points are finally determined as the target address of the device to be searched.
[0094] Optionally, in some embodiments of the present application, the step of “determining the target address of the device to be searched based on the reference address range and the value of each address point” may specifically include:
[0095] Determine the proportion of each address point in the reference address range;
[0096] Based on the proportion of each address point in the reference address range and the value of each address point, the target address of the device to be searched is determined.
[0097] First, determine the total length of the reference address range, and compare the position of each address point with this total length to calculate the proportion of each address point in the reference address range. Then, analyze which address points are more likely to be the target address of the device to be searched based on the value and proportion of the address points. Next, perform preliminary screening based on the value and proportion of the address points to narrow the possible target address range. At the same time, adopt an iterative strategy to adjust the search interval according to the results of the current iteration and gradually approach the target address. Apply optimization algorithms, such as Fibonacci search or other search algorithms, to optimize the search process based on the value and proportion of the address points. After multiple iterations and analysis, determine one or more most likely address points as the target address of the device to be searched.
[0098] Optionally, in some embodiments of the present application, the step of “determining the target address of the device to be searched based on the proportion of each address point in the reference address range and the value of each address point” may specifically include:
[0099] Calculate the ratio between each sub-range within the reference address range based on the proportion of each address point within the reference address range and the value of each address point;
[0100] The target address of the device to be searched is determined according to the ratio between the sub-ranges in the reference address range and a preset formula.
[0101] The reference address range is divided into several sub-ranges. Based on the proportion and value of the address points in each sub-range, the ratio between these sub-ranges is calculated. According to the ratio between these sub-ranges, which address points are more likely to be the target addresses of the devices to be searched. Then, a preliminary screening is performed based on the values and proportions of the address points to narrow the possible target address range. At the same time, an iterative strategy is adopted to adjust the search interval according to the results of the current iteration and gradually approach the target address. Apply optimization algorithms, such as Fibonacci search or other search algorithms, to optimize the search process according to the values and proportions of the address points. After multiple iterations and analysis, one or more most likely address points are determined as the target addresses of the devices to be searched.
[0102] Specifically, within the address range of A1 to A2, a specific address A1 to A2 is searched. The specific algorithm for address search is as follows: Figure 3 shown.
[0103] According to the numerical relationship By C 21 , C 31 , the middle C 41 , C 51 and C 61 , check the address range A1~A2 in A3, A4, A5 A6, and get C xy Smart distribution network equipment / device / convert binary number A x and A y The decimal numbers x and y of the unit address difference after the operation are natural numbers from 1 to 6.
[0104] By checking the above process, verify the correctness of A3, A4, A5 A6. If there is an error, recalculate A3, A4, A5 A6 and recheck.
[0105] The search algorithm and verification process are used as a subroutine. After the subroutine is called, it quickly searches for a small range of addresses through repeated iterations, such as A1 to A6, A6 to A5, A5 to A3, A3 to A4 or A4 to A2, and finally obtains the binary number A. λ In binary form, it corresponds to the specific MAC address, IPv4 address or IPv6 address of the device / equipment / unit to be queried in the smart distribution network.
[0106] Optionally, in some embodiments of the present application, the step of “determining the target address of the device to be searched according to the ratio between the sub-ranges within the reference address range and a preset formula” may specifically include:
[0107] According to a preset formula, the candidate range corresponding to the target address of the device to be searched is calculated;
[0108] Verifying the candidate range based on the ratio between the sub-ranges within the reference address range;
[0109] When the verification passes, the target address of the device to be searched is determined based on the candidate range.
[0110] The above is the distribution network equipment search process provided in the embodiment of the present application.
[0111] In summary, after obtaining the reference address range of the device to be searched, the embodiment of the present application calculates the intermediate variables corresponding to the device to be searched according to the reference address range, and then calculates the values of each address point in the reference address range according to the intermediate variables. Finally, based on the reference address range and the values of each address point, the target address of the device to be searched is determined. In the distribution network equipment search scheme provided by the present application, the values of each address point in the reference address range can be determined according to the reference address range of the device to be searched, and then, based on the reference address range and the values of each address point, the target address of the device to be searched is determined. Thus, the address of the device to be searched can be quickly searched in a large-scale address space, that is, the search efficiency is high.
[0112] In order to better implement the distribution network equipment search method of the embodiment of the present application, the embodiment of the present application also provides a distribution network equipment search device. The meanings of the terms are the same as those in the above distribution network equipment search system, and the specific implementation details can refer to the description in the system embodiment.
[0113] See also Figure 4 , Figure 4 A schematic diagram of the structure of a distribution network device search device provided in an embodiment of the present application, wherein the distribution network device search device may specifically include an acquisition module 201, a first calculation module 202, a second calculation module 203 and a determination module 204, which may be specifically as follows:
[0114] An acquisition module 201 is used to acquire a reference address range of a device to be searched;
[0115] A first calculation module 202, used to calculate the intermediate variable corresponding to the device to be searched according to the reference address range;
[0116] A second calculation module 203, used to calculate the value of each address point in the reference address range according to the intermediate variable;
[0117] The determination module 204 is used to determine the target address of the device to be searched based on the reference address range and the value of each address point.
[0118] The embodiment of the present application provides a distribution network equipment search device, after the acquisition module 201 acquires the reference address range of the device to be searched, the first calculation module 202 calculates the intermediate variables corresponding to the device to be searched according to the reference address range, then the second calculation module 203 calculates the value of each address point in the reference address range according to the intermediate variables, and finally, the determination module 204 determines the target address of the device to be searched based on the reference address range and the value of each address point. In the distribution network equipment search scheme provided in the present application, the value of each address point in the reference address range can be determined according to the reference address range of the device to be searched, and then the target address of the device to be searched can be determined based on the reference address range and the value of each address point, thereby, the address of the device to be searched can be quickly searched in a large-scale address space, that is, the search efficiency is high.
[0119] In addition, the present application also provides an electronic device, such as Figure 5 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0120] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0121] The processor 301 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 301.
[0122] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and a power distribution network equipment search method by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0123] The electronic device also includes a power supply 303 for supplying power to each component. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 303 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0124] The electronic device may further include an input unit 304, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0125] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 301 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 will run the application programs stored in the memory 302, thereby realizing various functions, as follows:
[0126] Obtain a reference address range of the device to be searched; calculate an intermediate variable corresponding to the device to be searched based on the reference address range; calculate the value of each address point in the reference address range based on the intermediate variable; determine the target address of the device to be searched based on the reference address range and the value of each address point.
[0127] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0128] After obtaining the reference address range of the device to be searched, the embodiment of the present application calculates the intermediate variables corresponding to the device to be searched according to the reference address range, then calculates the values of each address point in the reference address range according to the intermediate variables, and finally determines the target address of the device to be searched based on the reference address range and the values of each address point. In the scheme for searching the distribution network equipment provided by the present application, the values of each address point in the reference address range can be determined according to the reference address range of the device to be searched, and then the target address of the device to be searched can be determined based on the reference address range and the values of each address point, thereby quickly searching for the address of the device to be searched in a large-scale address space, that is, the search efficiency is high.
[0129] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0130] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the distribution network device search methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0131] Obtain a reference address range of the device to be searched; calculate an intermediate variable corresponding to the device to be searched based on the reference address range; calculate the value of each address point in the reference address range based on the intermediate variable; determine the target address of the device to be searched based on the reference address range and the value of each address point.
[0132] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0133] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0134] Since the instructions stored in the storage medium can execute the steps in any distribution network equipment search method provided in the embodiments of the present application, the beneficial effects that can be achieved by any distribution network equipment search method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0135] The above is a detailed introduction to a distribution network equipment search method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for searching for distribution network equipment, characterized in that: include: Get the reference address range of the device to be searched; Calculating the intermediate variable corresponding to the device to be searched according to the reference address range; Calculating the value of each address point in the reference address range according to the intermediate variable; Based on the reference address range and the value of each address point, the target address of the device to be searched is determined.
2. The method for searching for distribution network equipment according to claim 1, characterized in that: The calculating, according to the reference address range, an intermediate variable corresponding to the device to be searched includes: Determine endpoints of the reference address range to obtain a first endpoint and a second endpoint; Get the preset conversion formula; An intermediate variable corresponding to the device to be searched is calculated according to the preset conversion formula, the first endpoint and the second endpoint.
3. The method for searching for distribution network equipment according to claim 2, characterized in that: The calculating, according to the preset conversion formula, the first endpoint and the second endpoint, the intermediate variable corresponding to the device to be searched includes: Calculate the difference between the first endpoint and the second endpoint to obtain a device identifier corresponding to the device to be searched; Based on the preset conversion formula and the device identification, an intermediate variable corresponding to the device to be searched is calculated.
4. The method for searching for distribution network equipment according to claim 1, characterized in that: Calculating the value of each address point in the reference address range according to the intermediate variable includes: Performing format conversion on the intermediate variable to obtain a converted intermediate variable; Based on the preset value range and the converted intermediate variable, the value of each address point in the reference address range is calculated.
5. The method for searching for distribution network equipment according to claim 1, characterized in that: The step of determining the target address of the device to be searched based on the reference address range and the value of each address point includes: Determine the proportion of each address point in the reference address range; Based on the proportion of each address point in the reference address range and the value of each address point, the target address of the device to be searched is determined.
6. The method for searching for distribution network equipment according to claim 5, characterized in that: The determining the target address of the device to be searched based on the proportion of each address point in the reference address range and the value of each address point includes: Calculating a ratio between sub-ranges within the reference address range based on the proportion of each address point in the reference address range and a value of each address point; The target address of the device to be searched is determined according to the ratio between the sub-ranges within the reference address range and a preset formula.
7. The method for searching for distribution network equipment according to claim 6, characterized in that: The determining the target address of the device to be searched according to the ratio between the sub-ranges within the reference address range and a preset formula includes: According to a preset formula, a candidate range corresponding to the target address of the device to be searched is calculated; verifying the candidate range based on a ratio between sub-ranges within the reference address range; When the verification passes, the target address of the device to be searched is determined based on the candidate range.
8. A distribution network equipment search device, characterized in that: include: An acquisition module is used to obtain a reference address range of a device to be searched; A first calculation module, used for calculating the intermediate variable corresponding to the device to be searched according to the reference address range; A second calculation module, used for calculating the value of each address point in the reference address range according to the intermediate variable; The determination module is used to determine the target address of the device to be searched based on the reference address range and the value of each address point.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program according to the steps of the distribution network equipment search method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the distribution network equipment searching method according to any one of claims 1 to 7.