CN111506693B - Co-location method, device, electronic equipment and storage medium - Google Patents

Co-location method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111506693B
CN111506693B CN202010317574.7A CN202010317574A CN111506693B CN 111506693 B CN111506693 B CN 111506693B CN 202010317574 A CN202010317574 A CN 202010317574A CN 111506693 B CN111506693 B CN 111506693B
Authority
CN
China
Prior art keywords
iteration
search
particle
information
particles
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010317574.7A
Other languages
Chinese (zh)
Other versions
CN111506693A (en
Inventor
邓中亮
刘琼宇
王翰华
郑心雨
付潇
王凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202010317574.7A priority Critical patent/CN111506693B/en
Publication of CN111506693A publication Critical patent/CN111506693A/en
Application granted granted Critical
Publication of CN111506693B publication Critical patent/CN111506693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Remote Sensing (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a co-location method, a co-location device, electronic equipment and a storage medium, wherein the method comprises the following steps: node information of at least two anchor nodes is obtained, initial information of a plurality of search particles and initial global optimal positions of all the search particles are obtained through initialization, iteration is conducted on the basis of the initial information of each search particle, the initial global optimal positions of all the search particles and the node information of at least two anchor points, and in the iteration process, iteration coefficients, such as inertia weight and learning factors, of the search particles are dynamically adjusted. When the preset output condition is met, determining the position of the node to be positioned; when the preset output condition is not met, iteration is continued, so that after multiple iterations, the position of the node to be positioned can be determined based on the global optimal position of all the search particles in multiple iterations or the classification result of each search particle in multiple iterations when the preset output condition is met; thus, the node to be positioned can be positioned.

Description

Co-location method, device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a co-positioning method, apparatus, electronic device, and storage medium.
Background
High-precision location services have become an important component of modern life. The high-precision position service is generally provided by a global navigation satellite system, and the global navigation satellite system has higher positioning precision in an outdoor open environment, but the system has low positioning precision or even can not be positioned in cities, canyons and indoor environments due to shielding or interference of obstacles.
In order to solve the positioning problem in complex environments such as cities, canyons, indoors and the like, the prior art proposes non-cooperative positioning schemes. In the non-cooperative positioning scheme, a node to be positioned needs to establish communication connection with at least 3 base stations, and the node to be positioned must be capable of accurately measuring distances reaching the at least 3 base stations respectively, and then determining the position of the node based on the distances between the node and the at least 3 base stations by using a positioning algorithm such as trilateration, triangulation or maximum likelihood estimation. However, the precondition for the non-co-location scheme to be able to accurately locate is that the node to be located needs to establish a connection with at least 3 base stations and to be able to accurately measure the distance to the at least 3 base stations. However, when positioning is performed in an actual environment, if the foregoing preconditions cannot be satisfied, the node to be positioned cannot be accurately positioned by using the non-cooperative positioning method.
Disclosure of Invention
The embodiment of the invention aims to provide a co-location method, a co-location device, electronic equipment and a storage medium, so as to achieve the purpose of locating a node to be located. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a co-location method, where the method includes:
acquiring node information of at least two anchor nodes in communication connection with a node to be positioned, wherein the node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor nodes;
determining initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of at least two anchor nodes, wherein the initial information comprises: initial position information, initial speed information, and an initial optimal position;
obtaining particle information of the kth iteration of each search particle based on the initial information of each search particle, the initial global optimal positions of all search particles and node information of at least two anchor pointsThe global optimal position of the kth iteration of all the search particles and the iteration coefficient of the kth iteration of each search particle, wherein the particle information comprises: position information, speed information and historical optimal position of each search particle, wherein k is more than or equal to 0 and less than or equal to k max ,k max Presetting the maximum iteration times;
determining the position information and the speed information of the k+1th iteration of each search particle based on the particle information of the k iteration of each search particle, the global optimal position of the k iteration of all search particles and the iteration coefficient of the k iteration of each search particle;
classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle at the (k+1) th iteration to obtain a classification result of each search particle at the (k+1) th iteration;
determining the global optimal position of all search particles in the k+1th iteration based on the position information of all search particles in the k+1th iteration;
judging whether the k+1st iteration meets a preset output condition, wherein the preset output condition is that k+1 is equal to a preset maximum iteration number, or the global optimal position of all the search particles in the k+1st iteration is smaller than a preset global optimal position threshold;
if yes, determining the position of the node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of the k+1th iteration of each search particle;
If not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle to obtain the iteration coefficient of the k+1th iteration of each search particle;
and a step of taking the iteration coefficient of each search particle k+1th iteration as the iteration coefficient of the k-th iteration, taking the particle information of each search particle k+1th iteration as the particle information of the k-th iteration, taking the global optimal position of all search particles at the time of k+1th iteration as the global optimal position of all search particles at the time of k-th iteration, and executing the step of determining the position information and the speed information of each search particle k+1th iteration based on the particle information of each search particle k-th iteration, the global optimal position of all search particles at the time of k-th iteration and the iteration coefficient of each search particle k-th iteration.
Optionally, determining the position information and the speed information of the k+1th iteration of each search particle based on the particle information of the k iteration of each search particle, the global optimal position of the k iteration of all search particles, and the iteration coefficient of the k iteration of each search particle includes:
for the nth search particle, based on the position information x of the kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) Iteration coefficient omega of kth iteration of nth search particle n,k 、c n1,k 、c n2,k By the following formula:
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k))
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1.ltoreq.n, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, 1.ltoreq.τ.ltoreq.n, ω n,k Inertial weight for the kth iteration of the nth search particle, c n1,k A first learning factor, c, for the nth search particle kth iteration n2,k A second learning factor for the kth iteration of the nth search particle; lambda (lambda) 1 And lambda (lambda) 2 Respectively [0,1 ]]Random numbers uniformly distributed on the base;
velocity information v based on the (k+1) th iteration of the nth search particle n Position information x of (k+1) and nth search particle kth iteration n (k) By the following formula:
x n (k+1)=x n (k)+v n (k+1)
determination of nth search grainPosition information x of sub-k+1th iteration n (k+1)。
Optionally, classifying each search particle based on the position information of each search particle at the kth+1th iteration, the node information of at least two anchor nodes, and the global optimal position of all search particles at the kth iteration to obtain a classification result of each search particle at the kth+1th iteration, including:
For the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of at least two anchor nodes by the following formula:
determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of at least two anchor nodes,x is the distance between the jth anchor node of the at least two anchor nodes and the node to be positioned j Position information for the jth anchor node;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is smaller than a first preset classification threshold value, classifying the nth search particle as a short-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is larger than a second preset classification threshold value, classifying the nth search particle as a long-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) And classifying the nth search particle as a medium distance search particle when the difference value is between a first preset classification threshold and a second preset classification threshold, wherein the first preset classification threshold is smaller than the second preset classification threshold.
Optionally, an iteration coefficient adjustment strategy corresponding to the classification result in the k+1th iteration of each search particle is adopted to obtain the iteration coefficient of the k+1th iteration of each search particle, including:
for the nth search particle, when the nth search particle is a short-distance search particle, increasing a second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
When the nth search particle is a long-distance search particle, the first learning factor c of the kth iteration is increased according to a preset second adjusting step length n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1
When the nth search particle is a medium distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )·(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertial weight ω of the (k+1) th iteration of the nth search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein ω is max Is inertial weight omega n,k+1 Maximum value of the range of values ω min Is inertial weight omega n,k+1 Is the minimum value of the range of values.
Optionally, determining the location of the node to be located based on the classification result at the k+1th iteration of each search particle includes:
acquiring objective function values of all short-distance search particles in a plurality of search particles when iterating k+1;
Based on the objective function value of each close-range search particle, the following formula is adopted:
determining a weight value for each closely-searched particle, where pi l Weights for the first close-range search particle, f (x l (k+1)) is the objective function value of the first short-range search particle at the kth+1th iteration, and L is the total number of all the short-range search particles;
when the k+1st iteration is obtained, the position information of all the short-distance search particles adopts the following formula:
determining location information of a node to be locatedWherein x is l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
In a second aspect, embodiments of the present invention further provide a co-location apparatus, the apparatus comprising:
the anchor node information acquisition module is used for acquiring node information of at least two anchor nodes in communication connection with the node to be positioned, wherein the node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor node;
the initialization module is used for determining initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of at least two anchor nodes, wherein the initial information comprises: initial position information, initial speed information, and an initial optimal position;
The iteration module is used for obtaining the particle information of the kth iteration of each search particle, the global optimal position of the kth iteration of all search particles and the iteration coefficient of the kth iteration of each search particle based on the initial information of each search particle, the initial global optimal positions of all search particles and the node information of at least two anchor points, wherein the particle information comprises: position ofInformation, speed information, historical optimal position of each search particle, k is more than or equal to 0 and less than or equal to k max ,k max Presetting the maximum iteration times;
the position and speed information determining module is used for determining the position information and the speed information of the kth iteration of each search particle based on the particle information of the kth iteration of each search particle, the global optimal position of the kth iteration of all search particles and the iteration coefficient of the kth iteration of each search particle;
the classification module is used for classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particles at the (k+1) th iteration to obtain a classification result of each search particle at the (k+1) th iteration;
the global optimal position determining module is used for determining the global optimal position of all the search particles in the k+1th iteration based on the position information of the k+1th iteration of all the search particles;
The judging module is used for judging whether the k+1th iteration meets a preset output condition, wherein the preset output condition is that k+1 is equal to a preset maximum iteration number, or the global optimal position of all the search particles in the k+1th iteration is smaller than a preset global optimal position threshold; if yes, triggering a positioning module, and if no, triggering an iteration coefficient adjustment module;
the positioning module is used for determining the position of the node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of the k+1th iteration of each search particle;
the iteration coefficient adjustment module is used for obtaining the iteration coefficient of the k+1th iteration of each search particle by adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle; and the iteration coefficient of the k+1th iteration of each search particle is correspondingly used as the iteration coefficient of the k iteration, the particle information of the k+1th iteration of each search particle is correspondingly used as the particle information of the k iteration, the global optimal position of all search particles in the k+1th iteration is used as the global optimal position of all search particles in the k iteration, and the position and speed information determining module is triggered.
Optionally, the location and speed information determining module is specifically configured to:
for the nth search particle, based on the position information x of the kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) Iteration coefficient omega of kth iteration of nth search particle n,k 、c n1,k 、c n2,k By the following formula:
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k))
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1.ltoreq.n, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, 1.ltoreq.τ.ltoreq.n, ω n,k Inertial weight for the kth iteration of the nth search particle, c n1,k A first learning factor, c, for the nth search particle kth iteration n2,k A second learning factor for the kth iteration of the nth search particle; lambda (lambda) 1 And lambda (lambda) 2 Respectively [0,1 ]]Random numbers uniformly distributed on the base;
velocity information v based on the (k+1) th iteration of the nth search particle n Position information x of (k+1) and nth search particle kth iteration n (k) By the following formula:
x n (k+1)=x n (k)+v n (k+1)
determining position information x of (k+1) th iteration of nth search particle n (k+1)。
Optionally, the classification module is specifically configured to:
For the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of at least two anchor nodes by the following formula:
determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of at least two anchor nodes,x is the distance between the jth anchor node of the at least two anchor nodes and the node to be positioned j Position information for the jth anchor node;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is smaller than a first preset classification threshold value, classifying the nth search particle as a short-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is larger than a second preset classification threshold value, classifying the nth search particle as a long-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) And classifying the nth search particle as a medium distance search particle when the difference value is between a first preset classification threshold and a second preset classification threshold, wherein the first preset classification threshold is smaller than the second preset classification threshold.
Optionally, the iteration coefficient adjustment module is specifically configured to:
for the nth search particle, when the nth search particle is a short-distance search particle, increasing a second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
When the nth search particle is a long-distance search particle, the first learning factor c of the kth iteration is increased according to a preset second adjusting step length n1,k Obtaining the nth search grainFirst learning factor c of sub-k+1th iteration n1,k+1
When the nth search particle is a medium distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )·(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertial weight ω of the (k+1) th iteration of the nth search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein ω is max Is inertial weight omega n,k+1 Maximum value of the range of values ω min Is inertial weight omega n,k+1 Is the minimum value of the range of values.
Optionally, the positioning module is specifically configured to:
acquiring objective function values of all short-distance search particles in a plurality of search particles when iterating k+1;
based on the objective function value of each close-range search particle, the following formula is adopted:
determining a weight value for each closely-searched particle, where pi l Weights for the first close-range search particle, f (x l (k+1)) is the objective function value of the first short-range search particle at the kth+1th iteration, and L is the total number of all the short-range search particles;
when the k+1st iteration is obtained, the position information of all the short-distance search particles adopts the following formula:
determining location information of a node to be locatedWherein x is l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the co-location method in any embodiment when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the co-location method according to any one of the foregoing embodiments.
Embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of a co-location method as described in any of the embodiments above.
The embodiment of the invention has the beneficial effects that:
according to the collaborative positioning method, the device, the electronic equipment and the storage medium, when the node to be positioned is positioned, node information of at least two anchor nodes which are in communication connection with the node to be positioned can be firstly obtained, initial information of a plurality of search particles and initial global optimal positions of all search particles are obtained through initialization, k iterations are carried out based on the initial information of each search particle, the initial global optimal positions of all search particles and the node information of at least two anchor points, particle information of each search particle k iteration, global optimal positions of all search particles k iteration and iteration coefficients of each search particle k iteration are obtained, and position information and speed information of each search particle k+1 iteration are determined based on the particle information of each search particle k iteration, the global optimal positions of all search particles k iteration and the iteration coefficients of each search particle k iteration; classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle at the (k+1) th iteration to obtain a classification result of each search particle at the (k+1) th iteration; determining the global optimal position of the k+1th iteration of all the search particles based on the position information of the k+1th iteration of all the search particles, and determining the historical optimal position of the k+1th iteration of each search particle based on the position information of the k+1th iteration before each search particle; judging whether the k+1th iteration meets a preset output condition, if so, determining the position of the node to be positioned based on the global optimal position of all search particles at the k+1th iteration or the classification result of each search particle at the k+1th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k+1th iteration to obtain the iteration coefficient of each search particle in the k+1th iteration; and the step of taking the iteration coefficient of each search particle k+1th iteration as the iteration coefficient of the k-th iteration, taking the particle information of each search particle k+1th iteration as the particle information of the k-th iteration, taking the global optimal position of all search particles at the time of k+1th iteration as the global optimal position of all search particles at the time of k-th iteration, and executing the step of determining the position information and the speed information of each search particle k+1th iteration based on the particle information of each search particle k-th iteration, the global optimal position of all search particles at the time of k-th iteration and the iteration coefficient of each search particle k-th iteration. Thus, after multiple iterations, when the preset output condition is met, the position of the node to be positioned can be determined based on the global optimal position of all the search particles in multiple iterations or the classification result of each search particle in multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each search particle is classified based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of the (k) th iteration of all the search particles, so that the classification result of each search particle at the (k+1) th iteration is obtained; then, based on adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle, obtaining the iteration coefficient of the k+1th iteration of each search particle; therefore, the method can avoid the situation that local extremum is involved in iteration, so that the finally obtained position information of the node to be positioned is globally optimal, and the positioning precision can be improved. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a first implementation of a co-location method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a second implementation of a co-location method according to an embodiment of the present invention;
FIG. 3 is a schematic structural view of a co-locating device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In recent years, the task of performing positioning correlation by using a heuristic optimization algorithm is increasingly emphasized. The implementation of the heuristic optimization algorithm is not limited by the structure of the objective function, and the derivative of the objective function is not required to be calculated, so that the heuristic optimization algorithm has great superiority. The particle swarm optimization algorithm is a popular heuristic optimization algorithm. However, the objective function of the existing particle swarm optimization algorithm is a non-convex function, and when the objective function is solved, a local extremum is easily trapped, so that the positioning accuracy is reduced.
In order to solve the problems in the prior art, the embodiment of the invention provides a co-location method, a device, electronic equipment and a storage medium, so as to achieve the positioning of a node to be located and improve the positioning accuracy.
Next, a description will be given first of a co-location method according to an embodiment of the present invention, as shown in fig. 1, which is a flowchart of a first implementation of a co-location method according to an embodiment of the present invention, where the method may include:
s101, acquiring node information of at least two anchor nodes in communication connection with a node to be positioned, wherein the node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor nodes;
S102, determining initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of at least two anchor nodes, wherein the initial information comprises: initial position information, initial speed information, and an initial optimal position;
s103, obtaining particle information of the kth iteration of each search particle, the global optimal position of the kth iteration of all search particles and iteration coefficients of the kth iteration of each search particle based on initial information of each search particle, initial global optimal positions of all search particles and node information of at least two anchor points, wherein the particle information comprises: position information, speed information and historical optimal position of each search particle, wherein k is more than or equal to 0 and less than or equal to k max ,k max Presetting the maximum iteration times;
s104, determining the position information and the speed information of the k+1th iteration of each search particle based on the particle information of the k iteration of each search particle, the global optimal position of the k iteration of all search particles and the iteration coefficient of the k iteration of each search particle;
s105, classifying each search particle based on the position information of each search particle at the k+1th iteration, the node information of at least two anchor nodes and the global optimal position of all search particles at the k-th iteration to obtain a classification result of each search particle at the k+1th iteration;
S106, determining the global optimal position of the k+1th iteration of all the search particles based on the position information of the k+1th iteration of all the search particles, and determining the historical optimal position of the k+1th iteration of each search particle based on the position information of the k+1th iteration before each search particle;
s107, judging whether the k+1st iteration meets a preset output condition, wherein the preset output condition is that k+1 is equal to a preset maximum iteration number, or the global optimal position of all the search particles in the k+1st iteration is smaller than a preset global optimal position threshold; if yes, go to step S108; otherwise, step S109 is executed;
s108, determining the position of a node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of the k+1th iteration of each search particle;
s109, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k+1th iteration to obtain the iteration coefficient of each search particle in the k+1th iteration;
s110, the iteration coefficient of the k+1th iteration of each search particle is correspondingly used as the iteration coefficient of the k iteration, the particle information of the k+1th iteration of each search particle is correspondingly used as the particle information of the k iteration, the global optimal position of all search particles in the k+1th iteration is used as the global optimal position of all search particles in the k iteration, and step S104 is executed.
When the node to be positioned is positioned, node information of at least two anchor nodes which are in communication connection with the node to be positioned can be firstly obtained, initial information of a plurality of search particles and initial global optimal positions of all search particles are obtained through initialization, k iterations are then carried out on the basis of the initial information of each search particle, the initial global optimal positions of all search particles and the node information of at least two anchor points, particle information of k-th iterations of each search particle, global optimal positions of k-th iterations of all search particles and iteration coefficients of k-th iterations of each search particle are obtained, and position information and speed information of k+1-th iterations of each search particle are determined on the basis of the particle information of k-th iterations of each search particle, the global optimal positions of k-th iterations of all search particles and the iteration coefficients of k-th iterations of each search particle; classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle at the (k+1) th iteration to obtain a classification result of each search particle at the (k+1) th iteration; determining the global optimal position of the k+1th iteration of all the search particles based on the position information of the k+1th iteration of all the search particles, and determining the historical optimal position of the k+1th iteration of each search particle based on the position information of the k+1th iteration before each search particle; judging whether the k+1th iteration meets a preset output condition, if so, determining the position of the node to be positioned based on the global optimal position of all search particles at the k+1th iteration or the classification result of each search particle at the k+1th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k+1th iteration to obtain the iteration coefficient of each search particle in the k+1th iteration; and the step of taking the iteration coefficient of each search particle k+1th iteration as the iteration coefficient of the k-th iteration, taking the particle information of each search particle k+1th iteration as the particle information of the k-th iteration, taking the global optimal position of all search particles at the time of k+1th iteration as the global optimal position of all search particles at the time of k-th iteration, and executing the step of determining the position information and the speed information of each search particle k+1th iteration based on the particle information of each search particle k-th iteration, the global optimal position of all search particles at the time of k-th iteration and the iteration coefficient of each search particle k-th iteration. Thus, after multiple iterations, when the preset output condition is met, the position of the node to be positioned can be determined based on the global optimal position of all the search particles in multiple iterations or the classification result of each search particle in multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each search particle is classified based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of the (k) th iteration of all the search particles, so that the classification result of each search particle at the (k+1) th iteration is obtained; then, based on adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle, obtaining the iteration coefficient of the k+1th iteration of each search particle; therefore, the method can avoid the situation that local extremum is involved in iteration, so that the finally obtained position information of the node to be positioned is globally optimal, and the positioning precision can be improved.
On the basis of a co-location method shown in fig. 1, the embodiment of the present invention further provides a possible implementation manner, as shown in fig. 2, which is a flowchart of a second implementation manner of a co-location method of the embodiment of the present invention, where the method may include:
s201, node information of at least two anchor nodes in communication connection with the node to be positioned is acquired.
The node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor node.
In some examples, when a node to be positioned needs to be positioned, communication can be established with at least two anchor nodes around the node to be positioned, wherein the anchor nodes can comprise a base station and a mobile terminal which has known the position of the node, and the mobile terminal which has known the position of the node can be a mobile terminal positioned by adopting a cooperative positioning method according to the embodiment of the invention or a mobile terminal positioned by adopting other positioning methods. The node to be located may be a mobile terminal to be located. The mobile terminal can be an electronic device such as a handheld phone, a notebook computer, a tablet computer and the like.
In still other examples, the distance between the node to be located and the anchor node may be determined based on a transmission time of a signal between the node to be located and the anchor node after the node to be located establishes communication with the anchor node around itself, and the distance between the node to be located and the anchor node may also be determined by a signal strength between the node to be located and the anchor node.
In other examples, the location information of the anchor node communicatively coupled to the node to be located may also be obtained through communication, as the anchor node knows its own location information.
S202, determining initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of at least two anchor nodes, wherein the initial information comprises: initial position information, initial speed information, and an initial optimal position;
after obtaining the node information of the anchor node, in order to locate the node to be located by using the co-location method according to the embodiment of the present invention, the node to be located may be initialized first, so as to obtain initial information of a plurality of search particles.
In some examples, the initial location information of the plurality of search particles may be randomly generated in a uniform distribution in an area containing the location information of the at least two anchor nodes at the time of initialization. Wherein the number of the plurality of search particles may be preset.
In still other examples, at the time of initialization, an average value of the position information of the at least two anchor nodes may also be calculated first, and then initial position information of the plurality of search particles may be randomly generated in a vicinity of the average value according to an even distribution.
In other examples, the initial velocity of each search particle may be 0 when initializing. The initial optimal position of each search particle may be a respective initial position.
In still other examples, after generating the initial position information of the plurality of search particles, initial global optimal positions of all search particles may be determined among the initial positions of the plurality of search particles.
The position information of each search particle may be a D-dimensional position vector, and the speed information of each search particle may be a D-dimensional speed vector, so that the optimal position of each search particle may be a D-dimensional position vector, and the global optimal position of all search particles may be a D-dimensional position vector, where D represents the dimension of the vector.
Among the initial positions of the plurality of search particles, when determining the initial global optimal positions of all the search particles, the following formula may be first used:
to determine an objective function value of initial position information of each search particle, and then, among initial positions of the plurality of search particles, to select initial position information of a search particle having a smallest objective function value as an initial global optimal position. For example, assuming that there are 10 search particles, among the 10 search particles, the initial position of the 5 th search particle may be regarded as the initial global optimum position of all the search particles, if the objective function value corresponding to the initial position information of the 5 th search particle is the smallest.
S203, obtaining particle information of the kth iteration of each search particle, the global optimal position of the kth iteration of all search particles and iteration coefficients of the kth iteration of each search particle based on initial information of each search particle, initial global optimal positions of all search particles and node information of at least two anchor points, wherein the particle information comprises: position information, speed information and historical optimal position of each search particle, wherein k is more than or equal to 1 and less than or equal to k max ,k max Presetting the maximum iteration times;
after initial information of each search particle and initial global optimal positions of all search particles are determined, the maximum iteration times set by a user can be obtained first, then iteration calculation is carried out based on the initial information of each search particle, the initial global optimal positions of all search particles and node information of at least two anchor points, and after k iterations are carried out, particle information of k iterations of each search particle, global optimal positions of k iterations of all search particles and iteration coefficients of k iterations of each search particle can be obtained.
In some examples, the historical optimal location for the kth iteration of each search particle is determined based on location information for the k previous iterations of the search particle; for example, assuming k is 10, the historical optimal position for the kth iteration of the search particle may then be the optimal position in the 10 pieces of position information for the first 10 iterations of the search particle. The optimal position may be a position at which the objective function value corresponding to the search particle is minimized.
In some examples, during the first k iterations, the same or similar steps as steps S204 to S211 may be used for the iterations, which will not be described here.
S204, aiming at the nth search particle, based on the position information x of the kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) Iteration coefficient omega of kth iteration of nth search particle n,k 、c n1,k 、c n2,k By formula (1):
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k)) (1)
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1.ltoreq.n, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, 1.ltoreq.τ.ltoreq.n, ω n,k Inertial weight for the kth iteration of the nth search particle, c n1,k A first learning factor, c, for the nth search particle kth iteration n2,k A second learning factor for the kth iteration of the nth search particle; lambda (lambda) 1 And lambda (lambda) 2 The values of the two groups are respectively [0 ],1]random numbers uniformly distributed on the base;
in some examples, when k=0, then x n (k) Initial position information for nth search particle, v n (k) Initial velocity information for the nth search particle, gbest τ (k) For the initial global optimal position of all search particles, pbest n (k) The initial optimal position of the particle is searched for n.
In still other examples, ω n,k The value range of (5) is [0.4,0.9 ]];c n1,k And c n2,k The value range of (2) is [1,3 ]]。
S205, based on the n-th search particle k+1st iteration velocity information v n Position information x of (k+1) and nth search particle kth iteration n (k) By formula (2):
x n (k+1)=x n (k)+v n (k+1) (2)
determining position information x of (k+1) th iteration of nth search particle n (k+1)。
After obtaining the k+1th iteration speed information of the nth search particle, determining the k+1th iteration position information of the nth search particle according to a formula (2) based on the k+1th iteration speed information and the k iteration position information.
S206, classifying each search particle based on the position information of each search particle at the k+1th iteration, the node information of at least two anchor nodes and the global optimal position of all search particles at the k-th iteration to obtain a classification result of each search particle at the k+1th iteration;
s207, determining the global optimal position of all search particles in the k+1th iteration based on the position information of all search particles in the k+1th iteration;
s208, judging whether the k+1st iteration meets a preset output condition, wherein the preset output condition is that k+1 is equal to a preset maximum iteration number, or the global optimal position of all the search particles in the k+1st iteration is smaller than a preset global optimal position threshold; if yes, go to step S209; otherwise, executing step S210;
S209, determining the position of a node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of the k+1th iteration of each search particle;
s210, adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle to obtain the iteration coefficient of the k+1th iteration of each search particle;
s211, using the iteration coefficient of each search particle k+1th iteration as the iteration coefficient of the k-th iteration, using the particle information of each search particle k+1th iteration as the particle information of the k-th iteration, using the global optimal position of all search particles at the k+1th iteration as the global optimal position of all search particles at the k-th iteration, and executing step S204.
After determining the position information and the speed information of each search particle at the k+1th iteration, in order to avoid the finally determined positioning result from falling into a locally optimal solution, in the embodiment of the invention, each search particle may be classified based on the position information of each search particle at the k+1th iteration, node information of at least two anchor nodes and the globally optimal position of all search particles at the k+1th iteration to obtain a classification result of each search particle at the k+1th iteration; and then, according to the classification result of each search particle, adjusting the iteration coefficient to be adopted in the k+1th iteration, namely adopting an iteration coefficient adjustment strategy corresponding to the classification result in the k+1th iteration of each search particle to obtain the iteration coefficient of the k+1th iteration of each search particle. After the iteration coefficient is adjusted, the iteration is continued, that is, step S211 and step S204 are performed.
In some examples, when classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes, and the global optimal position of all search particle at the (k+1) th iteration, the classification result of each search particle at the (k+1) th iteration may be obtained by:
step A1, for the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of at least two anchor nodes by the following formula:
determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of at least two anchor nodes,x is the distance between the jth anchor node of the at least two anchor nodes and the node to be positioned j For the position information of the jth anchor node, ||x n (k+1)-x j The I is the position information x of the nth search particle at the (k+1) th iteration n Position information x of (k+1) and jth anchor node j Euclidean distance between them.
Step A2, at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is smaller than a first preset classification threshold value, classifying the nth search particle as a short-distance search particle;
Step A3, at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is larger than a second preset classification threshold value, classifying the nth search particle as a long-distance search particle;
step A4, at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) And classifying the nth search particle as a medium distance search particle when the difference value is between a first preset classification threshold and a second preset classification threshold, wherein the first preset classification threshold is smaller than the second preset classification threshold.
In some examples, in classifying each search particle, the calculated position information x at the (k+1) th iteration of each search particle may be first based on n (k+1), node information of at least two anchor nodes, to calculate a k+1th iteration per search particleObjective function value of the position information at that time. And comparing the objective function value of the position information of each search particle in the k+1th iteration with the global optimal position of the k iteration of all the search particles, thereby determining the classification result of each search particle, namely determining which particle each search particle belongs to.
For example, the objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of (c) is smaller than the first preset classification threshold value, the nth search particle may be classified as a short-distance search particle.
When the objective function value f (x n (k+1)) and gbest τ (k) When the difference value of the (b) is larger than the second preset classification threshold value, the nth search particle can be classified into a long-distance search particle;
when the objective function value f (x n (k+1)) and gbest τ (k) When the difference value between the first preset classification threshold value and the second preset classification threshold value, the nth search particle may be classified as a middle distance search particle.
In this way, a classification result for each search particle can be obtained. And then an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle can be adopted to obtain the iteration coefficient of the k+1th iteration of each search particle.
In still other examples, when the iteration coefficient adjustment strategy corresponding to the classification result at the k+1th iteration of each search particle is adopted, the following steps may be adopted to perform adjustment when the iteration coefficient at the k+1th iteration of each search particle is obtained:
Step B1, for the nth search particle, when the nth search particle is a short-distance search particle, increasing a second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
Step B2, when the nth search particle is a long-distance search particle, increasing the kth iteration according to a preset second adjustment step lengthFirst learning factor c n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1
And B3, when the nth search particle is a medium-distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )·(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertial weight ω of the (k+1) th iteration of the nth search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein ω is max Is inertial weight omega n,k+1 Maximum value of the range of values ω min Is inertial weight omega n,k+1 Is the minimum value of the range of values.
In some examples, the objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), and the global optimum position gbest of the kth iteration of all search particles τ (k) If the difference of the search results is smaller than the first preset classification threshold, the local optimizing capability of the search particles should be enhanced, so that the second learning factor c of the kth iteration can be increased according to the preset first adjustment step n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1 The method comprises the steps of carrying out a first treatment on the surface of the Wherein the first adjustment step may be an adjustment value set empirically in advance.
When the objective function value f (x n (k+1)) and gbest τ (k) If the difference value of the search results is larger than the second preset classification threshold value, the global optimizing capability of the search particles should be enhanced, so that the first learning factor c of the kth iteration can be increased according to the preset second adjustment step length n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1 The method comprises the steps of carrying out a first treatment on the surface of the The second adjustment step may be an adjustment value that is empirically set in advance.
When the objective function value f (x n (k+1)) and gbest τ (k) When the difference value between the first preset classification threshold value and the second preset classification threshold value, the local optimizing capability and the global optimizing capability of the search particles should be dynamically adjusted, so the following formula can be adopted:
ω n,k+1 =ω max -(ω maxmin )·(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertial weight ω of the (k+1) th iteration of the nth search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1
In still other examples, after classifying each search particle, the iteration coefficient of a class of search particles may be adjusted by classification in addition to adjusting the iteration coefficient of each search particle one by one.
That is, the same adjustment step length is used to adjust the iteration coefficient of the search particles of the class, the search particles of the class are classified as the search particles of the short distance, and the same adjustment step length is used to adjust the iteration coefficient of the search particles of the class. This is also possible.
According to the embodiment of the invention, when the objective function is solved, the local searching capability and the global searching capability of each searching particle can be dynamically adjusted, so that the objective function is prevented from falling into a local optimal solution, the finally determined position of the node to be positioned is a global optimal position, and the positioning precision of the node to be positioned is improved.
In some examples, before adjusting the iteration coefficient of each search particle, it may also be determined whether the (k+1) th iteration satisfies the preset output condition, and if not, the iteration is continued through step S210 and step S211. If so, the location of the node to be located may be determined,
in some examples, the location of the node to be located may be determined based on the global optimal location at the k+1th iteration of all search particles or the classification result at the k+1th iteration of each search particle.
In still other examples, when determining the position of the node to be located based on the global optimal position at the k+1th iteration of all the search particles or the classification result at the k+1th iteration of each search particle, the position of the node to be located may be determined based on the global optimal position at the k+1th iteration of all the search particles, or the position of the node to be located may be determined based on the classification result at the k+1th iteration of each search particle.
When determining the position of the node to be located based on the global optimal position at the k+1th iteration of all the search particles, the global optimal position at the k+1th iteration of all the search particles may be taken as the position of the node to be located.
In still other examples, when the anchor node includes a mobile terminal, the location of the mobile terminal has uncertainty, and thus, the uncertainty may cause a certain error between the location of the node to be located determined by using the co-location method according to the embodiment of the present invention and the actual location of the node to be located. To reduce this error, in embodiments of the present invention, the location of the node to be located may be determined based on the classification result at the k+1st iteration of each search particle.
When determining the position of the node to be located based on the classification result at the k+1th iteration of each search particle, a weighted average of the positions of all the short-distance search particles may be taken as the position of the node to be located. For example, the following steps may be taken to determine the location of the node to be located:
step C1, acquiring objective function values of all short-distance search particles in a plurality of search particles during k+1 iteration;
step C2, based on the objective function value of each close-range search particle, adopting the following formula:
determination ofA weight value for each close-range search particle, where pi l Weights for the first close-range search particle, f (x l (k+1)) is the objective function value of the first short-range search particle at the kth+1th iteration, and L is the total number of all the short-range search particles;
and C3, acquiring the position information of all the short-distance search particles in the k+1th iteration, wherein the following formula is adopted:
determining location information of a node to be locatedWherein x is l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
Because the differences between the positions of all the short-distance search particles and the node to be positioned are smaller, and the short-distance search particles are distributed near the node to be positioned, the weighted average value of the positions of all the short-distance search particles is used as the position of the node to be positioned, the positioning error of the node to be positioned can be reduced, and the positioning accuracy is improved.
Corresponding to the above-mentioned method embodiment, the embodiment of the present invention further provides a co-location device, as shown in fig. 3, which is a schematic structural diagram of a co-location device according to the embodiment of the present invention, where the device may include:
an anchor node information obtaining module 310, configured to obtain node information of at least two anchor nodes communicatively connected to the node to be located, where the node information includes a distance between each anchor node and the node to be located and location information of the anchor node;
an initialization module 320, configured to determine initial information of a plurality of search particles and initial global optimal positions of all search particles based on node information of at least two anchor nodes, where the initial information includes: initial position information, initial speed information, and an initial optimal position;
the iteration module 330 is configured to obtain, based on initial information of each search particle, initial global optimal positions of all search particles, and node information of at least two anchor points, particle information of a kth iteration of each search particle, global optimal positions of all search particles and iteration coefficients of the kth iteration of each search particle, where the particle information includes: position information, speed information and historical optimal position of each search particle, wherein k is more than or equal to 0 and less than or equal to k max ,k max Presetting the maximum iteration times;
a position and velocity information determining module 340, configured to determine position information and velocity information of a kth iteration of each search particle based on particle information of a kth iteration of each search particle, global optimal positions of all the kth iterations of the search particles, and iteration coefficients of the kth iteration of each search particle;
the classification module 350 is configured to classify each search particle based on the position information of each search particle at the kth+1th iteration, the node information of at least two anchor nodes, and the global optimal position of all search particles at the kth iteration, to obtain a classification result of each search particle at the kth+1th iteration;
a global optimal position determining module 360, configured to determine a global optimal position of all search particles at the kth+1th iteration based on the position information of all search particles at the kth+1th iteration;
the judging module 370 is configured to judge whether the k+1st iteration satisfies a preset output condition, where the preset output condition is that k+1 is equal to a preset maximum iteration number, or a global optimal position of all search particles at the k+1st iteration is smaller than a preset global optimal position threshold; if yes, triggering a positioning module, and if no, triggering an iteration coefficient adjustment module 390;
The positioning module 380 is configured to determine a position of a node to be positioned based on a global optimal position at the k+1th iteration of all the search particles or a classification result at the k+1th iteration of each search particle;
an iteration coefficient adjustment module 390, configured to obtain an iteration coefficient of the kth+1th iteration of each search particle by adopting an iteration coefficient adjustment policy corresponding to the classification result of the kth+1th iteration of each search particle; and the iteration coefficient of the k+1th iteration of each search particle is used as the iteration coefficient of the k iteration, the particle information of the k+1th iteration of each search particle is used as the particle information of the k iteration, the global optimal position of all search particles in the k+1th iteration is used as the global optimal position of all search particles in the k iteration, and the position and speed information determining module 340 is triggered.
When the node to be positioned is positioned, node information of at least two anchor nodes which are in communication connection with the node to be positioned can be firstly obtained, initial information of a plurality of search particles and initial global optimal positions of all search particles are obtained through initialization, k iterations are then carried out on the basis of the initial information of each search particle, the initial global optimal positions of all search particles and the node information of at least two anchor points, particle information of k-th iterations of each search particle, global optimal positions of k-th iterations of all search particles and iteration coefficients of k-th iterations of each search particle are obtained, and position information and speed information of k+1-th iterations of each search particle are determined on the basis of the particle information of k-th iterations of each search particle, the global optimal positions of k-th iterations of all search particles and the iteration coefficients of k-th iterations of each search particle; classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle at the (k+1) th iteration to obtain a classification result of each search particle at the (k+1) th iteration; determining the global optimal position of the k+1th iteration of all the search particles based on the position information of the k+1th iteration of all the search particles, and determining the historical optimal position of the k+1th iteration of each search particle based on the position information of the k+1th iteration before each search particle; judging whether the k+1th iteration meets a preset output condition, if so, determining the position of the node to be positioned based on the global optimal position of all search particles at the k+1th iteration or the classification result of each search particle at the k+1th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k+1th iteration to obtain the iteration coefficient of each search particle in the k+1th iteration; and the step of taking the iteration coefficient of each search particle k+1th iteration as the iteration coefficient of the k-th iteration, taking the particle information of each search particle k+1th iteration as the particle information of the k-th iteration, taking the global optimal position of all search particles at the time of k+1th iteration as the global optimal position of all search particles at the time of k-th iteration, and executing the step of determining the position information and the speed information of each search particle k+1th iteration based on the particle information of each search particle k-th iteration, the global optimal position of all search particles at the time of k-th iteration and the iteration coefficient of each search particle k-th iteration. Thus, after multiple iterations, when the preset output condition is met, the position of the node to be positioned can be determined based on the global optimal position of all the search particles in multiple iterations or the classification result of each search particle in multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each search particle is classified based on the position information of each search particle at the (k+1) th iteration, the node information of at least two anchor nodes and the global optimal position of the (k) th iteration of all the search particles, so that the classification result of each search particle at the (k+1) th iteration is obtained; then, based on adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle, obtaining the iteration coefficient of the k+1th iteration of each search particle; therefore, the method can avoid the situation that local extremum is involved in iteration, so that the finally obtained position information of the node to be positioned is globally optimal, and the positioning precision can be improved.
Optionally, the location and speed information determining module 340 is specifically configured to:
for the nth search particle, based on the position information x of the kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) Nth search grainIteration coefficient omega of sub-kth iteration n,k 、c n1,k 、c n2,k By the following formula:
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k))
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1.ltoreq.n, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, 1.ltoreq.τ.ltoreq.n, ω n,k Inertial weight for the kth iteration of the nth search particle, c n1,k A first learning factor, c, for the nth search particle kth iteration n2,k A second learning factor for the kth iteration of the nth search particle; lambda (lambda) 1 And lambda (lambda) 2 Respectively [0,1 ]]Random numbers uniformly distributed on the base;
velocity information v based on the (k+1) th iteration of the nth search particle n Position information x of (k+1) and nth search particle kth iteration n (k) By the following formula:
x n (k+1)=x n (k)+v n (k+1)
determining position information x of (k+1) th iteration of nth search particle n (k+1)。
Optionally, the classification module 350 is specifically configured to:
For the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of at least two anchor nodes by the following formula:
determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of at least two anchor nodes,x is the distance between the jth anchor node of the at least two anchor nodes and the node to be positioned j Position information for the jth anchor node;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is smaller than a first preset classification threshold value, classifying the nth search particle as a short-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the search particles is larger than a second preset classification threshold value, classifying the nth search particle as a long-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) And classifying the nth search particle as a medium distance search particle when the difference value is between a first preset classification threshold and a second preset classification threshold, wherein the first preset classification threshold is smaller than the second preset classification threshold.
Optionally, the iteration coefficient adjustment module 390 is specifically configured to:
for the nth search particle, when the nth search particle is a short-distance search particle, increasing a second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
When the nth search particle is a long-distance search particle, the first learning factor c of the kth iteration is increased according to a preset second adjusting step length n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1
When the nth search particle is a medium distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )·(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertial weight ω of the (k+1) th iteration of the nth search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein ω is max Is inertial weight omega n,k+1 Maximum value of the range of values ω min Is inertial weight omega n,k+1 Is the minimum value of the range of values.
Optionally, the positioning module 380 is specifically configured to:
acquiring objective function values of all short-distance search particles in a plurality of search particles when iterating k+1;
based on the objective function value of each close-range search particle, the following formula is adopted:
determining a weight value for each closely-searched particle, where pi l Weights for the first close-range search particle, f (x l (k+1)) is the objective function value of the first short-range search particle at the kth+1th iteration, and L is the total number of all the short-range search particles;
when the k+1st iteration is obtained, the position information of all the short-distance search particles adopts the following formula:
determining location information of a node to be locatedWherein x is l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
The embodiment of the invention also provides an electronic device, as shown in fig. 4, which comprises a processor 401, a communication interface 402, a memory 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404,
a memory 403 for storing a computer program;
the processor 401 is configured to implement the steps of the co-location method according to any of the foregoing embodiments when executing the program stored in the memory 403.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor, implements the steps of the co-location method according to any of the embodiments above.
In yet another embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the co-location method of any of the embodiments described above is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus, electronic device, storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and references to the parts of the description of the method embodiments are only needed.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (4)

1. A co-location method, the method comprising:
acquiring node information of at least two anchor nodes in communication connection with a node to be positioned, wherein the node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor node;
determining initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of the at least two anchor nodes, wherein the initial information comprises: initial position information, initial speed information, and an initial optimal position;
obtaining particle information of a kth iteration of each search particle, a global optimal position of a kth iteration of all search particles and an iteration coefficient of a kth iteration of each search particle based on initial information of each search particle, initial global optimal positions of all search particles and node information of the at least two anchor points, wherein the particle information comprises: position information, speed information, each search grain The historical optimal position of the son is not less than 0 and not more than k max The k is max Presetting the maximum iteration times;
determining the position information and the speed information of the (k+1) th iteration of each search particle based on the particle information of the (k) th iteration of each search particle, the global optimal positions of all the (k) th iterations of the search particle and the iteration coefficient of the (k) th iteration of each search particle;
classifying each search particle based on the position information of each search particle at the k+1th iteration, the node information of the at least two anchor nodes and the global optimal position of the k-th iteration of all the search particles to obtain a classification result of each search particle at the k+1th iteration;
determining the global optimal position of all search particles at the k+1th iteration based on the position information of all search particles at the k+1th iteration;
judging whether the k+1st iteration meets a preset output condition, wherein the preset output condition is that the k+1 is equal to the preset maximum iteration number or the global optimal position of the k+1st iteration of all the search particles is smaller than a preset global optimal position threshold;
if yes, determining the position of the node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of each k+1th iteration of the search particles;
If not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k+1th iteration to obtain the iteration coefficient of each search particle in the k+1th iteration;
the step of taking the iteration coefficient of each k+1th iteration of the search particles as the iteration coefficient of the k-th iteration, taking the particle information of each k+1th iteration of the search particles as the particle information of the k-th iteration, taking the global optimal position of all the search particles at the time of the k+1th iteration as the global optimal position of all the search particles at the time of the k-th iteration, and executing the steps of determining the position information and the speed information of each k+1th iteration of the search particles based on the particle information of each k-th iteration of the search particles, the global optimal position of all the search particles at the time of the k-th iteration and the iteration coefficient of each k-th iteration of the search particles;
the determining the position information and the speed information of the kth iteration of each search particle based on the particle information of the kth iteration of each search particle, the global optimal position of the kth iteration of all search particles and the iteration coefficient of the kth iteration of each search particle comprises the following steps:
For an nth search particle, based on position information x of a kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) The iteration coefficient omega of the kth iteration of the nth search particle n,k 、c n1,k 、c n2,k By the following formula:
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k))
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1-N, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, τ is 1-N, and ω is the ω n,k Inertial weight for the kth iteration of the nth search particle, the c n1,k A first learning factor for the kth iteration of the nth search particle, the c n2,k A second learning factor for a kth iteration of the nth search particle; the lambda is 1 And said lambda 2 Respectively [0,1 ]]Random numbers uniformly distributed on the base;
velocity information v based on the (k+1) th iteration of the nth search particle n (k+1) and position information x of kth iteration of the nth search particle n (k) By the following formula:
x n (k+1)=x n (k)+v n (k+1)
determining position information x of the (k+1) th iteration of the nth search particle n (k+1);
The step of classifying each search particle based on the position information of each search particle at the k+1th iteration, the node information of the at least two anchor nodes, and the global optimal position of the k-th iteration of all the search particles to obtain a classification result of each search particle at the k+1th iteration, includes:
for the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of the at least two anchor nodes by the following formula:
determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of the at least two anchor nodes, theThe x is the distance between the j-th anchor node of the at least two anchor nodes and the node to be positioned j Position information for the jth anchor node;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the n-th search particle is smaller than a first preset classification threshold value, classifying the n-th search particle as a short-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the n-th search particle is larger than a second preset classification threshold value, classifying the n-th search particle as a long-distance search particle;
at the objective function value f (x n (k+1)) and the kth iteration of the all search particlesGlobal optimum position gbest of (a) τ (k) Classifying the nth search particle as a medium distance search particle when between the first preset classification threshold and the second preset classification threshold, wherein the first preset classification threshold is less than the second preset classification threshold;
the step of obtaining the iteration coefficient of each k+1th iteration of the search particle by adopting an iteration coefficient adjustment strategy corresponding to the classification result of each k+1th iteration of the search particle comprises the following steps:
for the nth search particle, when the nth search particle is a short-distance search particle, increasing the second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
When the nth search particle is a long-distance search particle, increasing the first learning factor c of the kth iteration according to a preset second adjustment step length n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1
When the nth search particle is a medium distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )g(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertia weight omega of the (k+1) th iteration of the (n) th search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein said omega max For the inertial weight omega n,k+1 Maximum value of the range of values of ω min For the inertial weight omega n,k+1 A minimum value of the range of values;
determining the position of the node to be located based on the classification result at the k+1th iteration of each search particle comprises:
acquiring objective function values of all short-distance search particles in the plurality of search particles when the k+1 iteration is performed;
based on the objective function value of each of the short-distance search particles, the following formula is adopted:
determining a weight value for each of the closely searched particles, wherein pi is the same as pi l For the weight of the first close-range search particle, the f (x l (k+1)) is the objective function value of the first closely searched particle at the kth+1th iteration, and L is the total number of all the closely searched particles;
and when the k+1th iteration is acquired, the position information of all the short-distance search particles adopts the following formula:
determining location information of the node to be located Wherein said x l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
2. A co-location device, the device comprising:
the anchor node information acquisition module is used for acquiring node information of at least two anchor nodes in communication connection with a node to be positioned, wherein the node information comprises the distance between each anchor node and the node to be positioned and the position information of the anchor node;
an initialization module, configured to determine initial information of a plurality of search particles and initial global optimal positions of all the search particles based on node information of the at least two anchor nodes, where the initial information includes: initial position information, initial speed information, and an initial optimal position;
the iteration module is configured to obtain, based on initial information of each search particle, initial global optimal positions of all search particles, and node information of the at least two anchor points, particle information of a kth iteration of each search particle, global optimal positions of all search particles and iteration coefficients of a kth iteration of each search particle, where the particle information includes: position information, speed information, historical optimal position of each searching particle, wherein k is more than or equal to 0 and less than or equal to k max The k is max Presetting the maximum iteration times;
the position and speed information determining module is used for determining the position information and the speed information of the (k+1) th iteration of each search particle based on the particle information of the (k) th iteration of each search particle, the global optimal position of the (k) th iteration of all search particles and the iteration coefficient of the (k) th iteration of each search particle;
the classification module is used for classifying each search particle based on the position information of each search particle at the (k+1) th iteration, the node information of the at least two anchor nodes and the global optimal position of the (k) th iteration of all the search particles to obtain a classification result of each search particle at the (k+1) th iteration;
the global optimal position determining module is used for determining the global optimal position of all search particles at the k+1th iteration based on the position information of the k+1th iteration of all search particles;
the judging module is used for judging whether the k+1th iteration meets a preset output condition, wherein the preset output condition is that the k+1 is equal to a preset maximum iteration number or the global optimal position of the k+1th iteration of all the search particles is smaller than a preset global optimal position threshold; if yes, triggering a positioning module, and if no, triggering an iteration coefficient adjustment module;
The positioning module is used for determining the position of the node to be positioned based on the global optimal position of the k+1th iteration of all the search particles or the classification result of each k+1th iteration of the search particles;
the iteration coefficient adjustment module is used for obtaining the iteration coefficient of the k+1th iteration of each search particle by adopting an iteration coefficient adjustment strategy corresponding to the classification result of the k+1th iteration of each search particle; the iteration coefficient of the k+1th iteration of each search particle is correspondingly used as the iteration coefficient of the k iteration, the particle information of the k+1th iteration of each search particle is correspondingly used as the particle information of the k iteration, the global optimal position of the k+1th iteration of all search particles is used as the global optimal position of the k iteration of all search particles, and the position and speed information determining module is triggered;
the position and speed information determining module is specifically configured to:
for an nth search particle, based on position information x of a kth iteration of the nth search particle n (k) Velocity information v for the kth iteration n (k) Historical optimum position pbest n (k) Global optimum position gbest of kth iteration of all search particles τ (k) The iteration coefficient omega of the kth iteration of the nth search particle n,k 、c n1,k 、c n2,k By the following formula:
v n (k+1)=ω n,k ·v n (k)+c n1,k λ 1 ·(pbest n (k)-x n (k))+c n2,k λ 2 ·(gbest τ (k)-x n (k))
determining velocity information v for the (k+1) th iteration of the nth search particle n (k+1); wherein N is 1-N, N is the total number of the plurality of search particles, τ is the number of the τ -th search particle in the plurality of search particles, τ is 1-N, and ω is the ω n,k Inertial weight for the kth iteration of the nth search particle, the c n1,k A first learning factor for the kth iteration of the nth search particle, the c n2,k The second of the kth iteration of searching for particles for the nthA learning factor; the lambda is 1 And said lambda 2 Respectively [0,1 ]]Random numbers uniformly distributed on the base;
velocity information v based on the (k+1) th iteration of the nth search particle n (k+1) and position information x of kth iteration of the nth search particle n (k) By the following formula:
x n (k+1)=x n (k)+v n (k+1)
determining position information x of the (k+1) th iteration of the nth search particle n (k+1);
The classification module is specifically configured to:
for the nth search particle, based on the position information x at the (k+1) th iteration of the nth search particle n (k+1), node information of the at least two anchor nodes by the following formula:
Determining an objective function value f (x) of the position information at the (k+1) th iteration of the nth search particle n (k+1)), wherein M is the total number of the at least two anchor nodes, theThe x is the distance between the j-th anchor node of the at least two anchor nodes and the node to be positioned j Position information for the jth anchor node;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the n-th search particle is smaller than a first preset classification threshold value, classifying the n-th search particle as a short-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) When the difference value of the n-th search particle is larger than a second preset classification threshold value, classifying the n-th search particle as a long-distance search particle;
at the objective function value f (x n (k+1)) and the global optimum position gbest of the kth iteration of all search particles τ (k) Classifying the nth search particle as a medium distance search particle when between the first preset classification threshold and the second preset classification threshold, wherein the first preset classification threshold is less than the second preset classification threshold;
The iteration coefficient adjustment module is specifically configured to:
for the nth search particle, when the nth search particle is a short-distance search particle, increasing the second learning factor c of the kth iteration according to a preset first adjustment step length n2,k Obtaining a second learning factor c of the (k+1) th iteration of the nth search particle n2,k+1
When the nth search particle is a long-distance search particle, increasing the first learning factor c of the kth iteration according to a preset second adjustment step length n1,k Obtaining a first learning factor c of the (k+1) th iteration of the nth search particle n1,k+1
When the nth search particle is a medium distance search particle, the following formula is adopted:
ω n,k+1 =ω max -(ω maxmin )g(k+1)/k max
c n1,k+1 =3cos(π·(k+1)/(2·k max ))
c n2,k+1 =3sin(π·(k+1)/(2·k max ))
determining the inertia weight omega of the (k+1) th iteration of the (n) th search particle n,k+1 First learning factor c n1,k+1 A second learning factor c n2,k+1 Wherein said omega max Is inertial weight omega n,k+1 Maximum value of the range of values of ω min Is inertial weight omega n,k+1 A minimum value of the range of values;
the positioning module is specifically configured to:
acquiring objective function values of all short-distance search particles in the plurality of search particles when the k+1 iteration is performed;
based on the objective function value of each of the short-distance search particles, the following formula is adopted:
Determining a weight value for each of the closely searched particles, wherein pi is the same as pi l For the weight of the first close-range search particle, the f (x l (k+1)) is the objective function value of the first closely searched particle at the kth+1th iteration, and L is the total number of all the closely searched particles;
and when the k+1th iteration is acquired, the position information of all the short-distance search particles adopts the following formula:
determining location information of the node to be locatedWherein said x l (k+1) is the position information at the k+1th iteration of the first close-range search particle.
3. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 1 when executing a program stored on a memory.
4. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of claim 1.
CN202010317574.7A 2020-04-21 2020-04-21 Co-location method, device, electronic equipment and storage medium Active CN111506693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010317574.7A CN111506693B (en) 2020-04-21 2020-04-21 Co-location method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010317574.7A CN111506693B (en) 2020-04-21 2020-04-21 Co-location method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111506693A CN111506693A (en) 2020-08-07
CN111506693B true CN111506693B (en) 2023-11-28

Family

ID=71871135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010317574.7A Active CN111506693B (en) 2020-04-21 2020-04-21 Co-location method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111506693B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104200264A (en) * 2014-09-25 2014-12-10 国家电网公司 Two-stage particle swarm optimization algorithm including independent global search
WO2018176952A1 (en) * 2017-03-29 2018-10-04 京信通信***(中国)有限公司 Indoor positioning method and server
CN110930182A (en) * 2019-11-08 2020-03-27 中国农业大学 Improved particle swarm optimization algorithm-based client classification method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104200264A (en) * 2014-09-25 2014-12-10 国家电网公司 Two-stage particle swarm optimization algorithm including independent global search
WO2018176952A1 (en) * 2017-03-29 2018-10-04 京信通信***(中国)有限公司 Indoor positioning method and server
CN110930182A (en) * 2019-11-08 2020-03-27 中国农业大学 Improved particle swarm optimization algorithm-based client classification method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
江凤 ; 吴飞 ; 王昌志 ; .基于CHAN与粒子群算法的协同定位研究.电子科技.2017,(第08期),全文. *
邓中亮等.室内定位关键技术综述.《导航定位与授时》.2018,第5卷(第3期),全文. *

Also Published As

Publication number Publication date
CN111506693A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN106912105B (en) Three-dimensional positioning method based on PSO _ BP neural network
Jourdan et al. Optimal sensor placement for agent localization
EP1793643A2 (en) Wireless positioning approach using time delay estimates of multipath components
CN107071732B (en) RSSI (received Signal Strength indicator) -based MLE-PSO (Multi-layer programmable Gate array) indoor positioning method
JP2006276020A (en) Computer execution method of building location model
CN107484123B (en) WiFi indoor positioning method based on integrated HWKNN
TWI544822B (en) Signal strength distribution establishing method and wireless positioning system
JP2016161570A (en) Method of obtaining location of device and device
CN111246383A (en) Indoor positioning algorithm optimization based on Bluetooth
CN112987724B (en) Path optimization method, path optimization device, robot and storage medium
CN108549049B (en) Ray tracing assisted Bayes fingerprint positioning method and device
CN114325577A (en) Non-line-of-sight positioning error correction method and device
KR101865120B1 (en) Wireless positioning method based on test node and apparatus thereof
JP5583170B2 (en) Scatterer position estimation apparatus, scatterer position estimation method, and program
CN111506693B (en) Co-location method, device, electronic equipment and storage medium
CN108490465B (en) Ground same-frequency multi-motion radiation source tracking method and system based on time-frequency difference and direction finding
Rahmadini et al. Optimization of Fingerprint indoor localization system for multiple object tracking based on iterated weighting constant-KNN method
Rosić et al. Passive Target Localization Problem Based on Improved Hybrid Adaptive Differential Evolution and Nelder‐Mead Algorithm
CN107197519B (en) Underwater target positioning method based on improved least square support vector machine
CN109541541B (en) Indoor triangulation positioning precision correction method and device
CN108834053B (en) Positioning method, device and equipment
CN107708203A (en) A kind of localization method and device based on geographical fingerprint
CN112437485B (en) Positioning method and device of fingerprint space interpolation method based on neural network
CN108490389B (en) Positioning method and device based on multipath reflection, electronic equipment and storage medium
US20130130732A1 (en) Signal source deployment system, method, and non-transitory tangible machine-readable medium thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant