CN111506693A - Cooperative positioning method and device, electronic equipment and storage medium - Google Patents

Cooperative positioning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111506693A
CN111506693A CN202010317574.7A CN202010317574A CN111506693A CN 111506693 A CN111506693 A CN 111506693A CN 202010317574 A CN202010317574 A CN 202010317574A CN 111506693 A CN111506693 A CN 111506693A
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.)
Granted
Application number
CN202010317574.7A
Other languages
Chinese (zh)
Other versions
CN111506693B (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

Images

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 cooperative positioning method, a cooperative positioning device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring node information of at least two anchor nodes, initializing to obtain initial information of a plurality of search particles and initial global optimal positions of all the search particles, iterating based on 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 dynamically adjusting iteration coefficients of the search particles in the iterating process, such as inertial weight and learning factor. When the preset output condition is met, determining the position of a node to be positioned; when the preset output condition is not met, iteration is continued, so that 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 during multiple iterations or the classification result of each search particle during multiple iterations; therefore, the node to be positioned can be positioned.

Description

Cooperative positioning method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of positioning technologies, and in particular, to a method and an apparatus for cooperative positioning, an electronic device, and a storage medium.
Background
High-precision location services have become an important component of modern life. The high-precision position service is usually provided by a global navigation satellite system, which has high positioning precision in outdoor open environment, but in urban, canyon and indoor environment, the system has low positioning precision or even cannot position due to the shielding or interference of obstacles.
In order to solve the problem of positioning in complex environments such as cities, canyons and indoor environments, the prior art provides a non-cooperative positioning scheme. 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 respectively reaching the at least 3 base stations, and then determine its position based on the distances between itself and the at least 3 base stations by using positioning algorithms such as trilateration, triangulation, or maximum likelihood estimation. However, the precondition that the non-cooperative positioning scheme can accurately position is that the node to be positioned needs to establish connection with at least 3 base stations and can accurately measure the distances to the at least 3 base stations. However, when positioning is performed in an actual environment, if the above-mentioned precondition cannot be satisfied, the non-cooperative positioning method cannot be used to accurately position the node to be positioned.
Disclosure of Invention
The embodiment of the invention aims to provide a cooperative positioning method, a cooperative positioning device, electronic equipment and a storage medium, so as to position a node to be positioned. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a cooperative positioning 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;
based on 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, obtaining the particle information of the kth iteration of each search particle, the global optimal positions 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, historical optimum position of each search particle, k is more than or equal to 0 and less than or equal to kmax,kmaxIs a preset maximum iteration number;
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 kth iteration of each search particle, the global optimal positions of all the kth iterations of the search particles and the iteration coefficient of the kth iteration of each search particle;
classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
determining global optimal positions of all the search particles in the k +1 th iteration based on the position information of the k +1 th iteration of all the search particles;
judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that k +1 is equal to a preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th iteration is less than a preset global optimal position threshold;
if so, determining the position of the node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration;
if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k +1 th iteration to obtain the iteration coefficient of the k +1 th iteration of each search particle;
and (3) correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of all the search particles during the (k +1) th iteration as the global optimal position of all the search particle kth iterations, and 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 kth iteration of each search particle, the global optimal positions of all the search particles during the kth iteration and the iteration coefficient of the kth iteration of each search particle.
Optionally, determining the position information and the velocity information of the (k +1) th iteration of each search particle based on the particle information of the kth iteration of each search particle, the global optimal positions of all the kth iterations of the search particles, and the iteration coefficient of the kth 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 particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) Global optimum position gbest of kth iteration of all search particlesτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy the following formula:
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k))
determining velocity information v of the (k +1) th iteration of the nth search particlen(k+1);Wherein N is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kInertial weight for kth iteration of nth search particle, cn1,kFirst learning factor for kth iteration of nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; lambda [ alpha ]1And λ2Are each [0, 1]Random numbers uniformly distributed thereon;
velocity information v based on the (k +1) th iteration of the nth search particlen(k +1) and location information x of kth iteration of nth search particlen(k) By the following formula:
xn(k+1)=xn(k)+vn(k+1)
determining position information x of k +1 iteration of nth search particlen(k+1)。
Optionally, 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, where the classification result includes:
for the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1), node information of at least two anchor nodes, by the following formula:
Figure BDA0002460026320000031
determining an objective function value f (x) of position information of an nth search particle at a (k +1) th iterationn(k +1)), where M is a total number of at least two anchor nodes,
Figure BDA0002460026320000032
is the distance, x, between the jth anchor node of the at least two anchor nodes and the node to be positionedjLocation information for the jth anchor node;
at the value of the objective function f (x)n(k +1)) and the kth iteration of all search particlesGlobal optimum position of generation gbestτ(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 into a short-distance search particle;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) Classifying the nth search particle as a remote search particle when the difference value is greater than a second preset classification threshold value;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference value is between the first preset classification threshold value and the second preset classification threshold value, classifying the nth search particle into a middle-distance search particle, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
Optionally, obtaining an iteration coefficient of the (k +1) th iteration of each search particle by using an iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle includes:
aiming at 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 adjusting step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,k+1
When the nth search particle is a long-distance search particle, increasing a first learning factor c of the kth iteration according to a preset second adjusting step lengthn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1
When the nth search particle is a middle-distance search particle, the following formula is adopted:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1The first stepA learning factor cn1,k+1And a second learning factor cn2,k+1Wherein, ω ismaxIs the inertial weight omegan,k+1Maximum value of the range of values of, ωminIs the inertial weight omegan,k+1Is the minimum value of the range of values of (a).
Optionally, determining the position of the node to be located based on the classification result of the (k +1) th iteration of each search particle includes:
acquiring objective function values of all close-range searching particles in a plurality of searching particles when k +1 is iterated;
based on the objective function value of each close-range search particle, the following formula is adopted:
Figure BDA0002460026320000041
determining a weight value for each close-search particle, wherelWeight for the ith short-range search particle, f (x)l(k +1)) is the objective function value of the ith close-range particle at the (k +1) th iteration, L is the total number of all close-range particles;
when the (k +1) th iteration is performed, the position information of all the close-range searching particles is obtained by adopting the following formula:
Figure BDA0002460026320000051
determining location information of a node to be located
Figure BDA0002460026320000052
Wherein x isl(k +1) is the position information of the kth +1 th iteration of the ith short-range search particle.
In a second aspect, an embodiment of the present invention further provides a cooperative positioning apparatus, where the apparatus includes:
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 nodes;
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 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 particle information of a kth iteration of each search particle, global optimal positions of all kth iterations of the search particles, and an iteration coefficient 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, where the particle information includes: position information, speed information, historical optimum position of each search particle, k is more than or equal to 0 and less than or equal to kmax,kmaxIs a preset maximum iteration number;
the position and speed information determining module is used for determining the position information and the speed information of the kth +1 th iteration of each search particle based on the particle information of the kth iteration of each search particle, the global optimal positions of all the kth iterations of the 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 in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
the global optimal position determining module is used for determining global optimal positions of all the search particles in the k +1 th iteration based on the position information of the k +1 th iteration of all the search particles;
the judging module is used for judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that k +1 is equal to a preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th iteration is smaller than a preset global optimal position threshold; if yes, triggering the positioning module, and if not, triggering the iteration coefficient adjusting module;
the positioning module is used for determining the position of a node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration;
the iteration coefficient adjusting module is used for obtaining the iteration coefficient of the (k +1) th iteration of each search particle by adopting an iteration coefficient adjusting strategy corresponding to the classification result of each search particle in the (k +1) th iteration; and correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of all the search particles during the (k +1) th iteration as the global optimal position of all the search particles during the kth iteration, and triggering a position and speed information determination module.
Optionally, the position 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 particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) Global optimum position gbest of kth iteration of all search particlesτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy the following formula:
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k))
determining velocity information v of the (k +1) th iteration of the nth search particlen(k + 1); wherein N is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kInertial weight for kth iteration of nth search particle, cn1,kFirst learning factor for kth iteration of nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; lambda [ alpha ]1And λ2Are each [0, 1]Random numbers uniformly distributed thereon;
velocity information v based on the (k +1) th iteration of the nth search particlen(k +1) and location information x of kth iteration of nth search particlen(k) By the following formula:
xn(k+1)=xn(k)+vn(k+1)
determining position information x of k +1 iteration of nth search particlen(k+1)。
Optionally, the classification module is specifically configured to:
for the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1), node information of at least two anchor nodes, by the following formula:
Figure BDA0002460026320000071
determining an objective function value f (x) of position information of an nth search particle at a (k +1) th iterationn(k +1)), where M is a total number of at least two anchor nodes,
Figure BDA0002460026320000072
is the distance, x, between the jth anchor node of the at least two anchor nodes and the node to be positionedjLocation information for the jth anchor node;
at the value of the objective function f (x)n(k +1)) and 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 into a short-distance search particle;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) Classifying the nth search particle as a remote search particle when the difference value is greater than a second preset classification threshold value;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference between the first preset classification threshold and the second preset classification threshold, classifying the nth search particle as the intermediate distanceAnd searching the particles, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
Optionally, the iteration coefficient adjusting module is specifically configured to:
aiming at 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 adjusting step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,k+1
When the nth search particle is a long-distance search particle, increasing a first learning factor c of the kth iteration according to a preset second adjusting step lengthn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1
When the nth search particle is a middle-distance search particle, the following formula is adopted:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1A first learning factor cn1,k+1And a second learning factor cn2,k+1Wherein, ω ismaxIs the inertial weight omegan,k+1Maximum value of the range of values of, ωminIs the inertial weight omegan,k+1Is the minimum value of the range of values of (a).
Optionally, the positioning module is specifically configured to:
acquiring objective function values of all close-range searching particles in a plurality of searching particles when k +1 is iterated;
based on the objective function value of each close-range search particle, the following formula is adopted:
Figure BDA0002460026320000081
determining each proximityDistance search for weight value of particle, whereinlWeight for the ith short-range search particle, f (x)l(k +1)) is the objective function value of the ith close-range particle at the (k +1) th iteration, L is the total number of all close-range particles;
when the (k +1) th iteration is performed, the position information of all the close-range searching particles is obtained by adopting the following formula:
Figure BDA0002460026320000082
determining location information of a node to be located
Figure BDA0002460026320000083
Wherein x isl(k +1) is the position information of the kth +1 th iteration of the ith short-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 mutual communication through the communication bus;
a memory for storing a computer program;
the processor is configured to implement the steps of the co-location method according to any of the above embodiments 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 in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps of the co-location method according to any of the above embodiments.
Embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of a co-location method according to any of the above embodiments.
The embodiment of the invention has the following beneficial effects:
in the co-location method, the co-location device, the electronic device, and the storage medium provided in the embodiments of the present invention, when a node to be located is located, node information of at least two anchor nodes communicatively connected to the node to be located may be obtained first, and initial information of a plurality of search particles and initial global optimal positions of all search particles are obtained through initialization, then 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, k iterations are performed to obtain particle information of each search particle kth iteration, global optimal positions of all search particle kth iterations, and an iteration coefficient of each search particle kth iteration, based on the particle information of each search particle kth iteration, the global optimal positions of all search particle kth iterations, and an iteration coefficient of each search particle kth iteration, determining the position information and the speed information of the (k +1) th iteration of each search particle; classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration; determining global optimal positions of all the search particles during the (k +1) th iteration based on the position information of the (k +1) th iteration of all the search particles, and determining historical optimal positions of the (k +1) th iteration of each search particle based on the position information of the (k +1) th iteration of each search particle; judging whether the (k +1) th iteration meets a preset output condition, if so, determining the position of a node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k +1 th iteration to obtain the iteration coefficient of the k +1 th iteration of each search particle; and correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of all the search particles during the (k +1) th iteration as the global optimal position of all the search particle kth iterations, and executing the step of 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 kth iteration of each search particle, the global optimal positions of all the search particles during the kth iteration and the iteration coefficient of the kth iteration of each search particle. In this way, 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 during multiple iterations or the classification result of each search particle during multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each searching particle is classified based on the position information of each searching particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all searching particles in the k +1 th iteration to obtain the classification result of each searching particle in the k +1 th iteration; then, obtaining an iteration coefficient of the (k +1) th iteration of each search particle based on an iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle; therefore, the situation that a local extreme value is trapped during iteration can be avoided, the finally obtained position information of the node to be positioned is globally optimal, and the positioning precision can be improved. Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a first implementation manner of a co-location method according to an embodiment of the present invention;
fig. 2 is a flowchart of a second implementation manner of a cooperative positioning method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a co-location apparatus 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 technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In recent years, the positioning related work by using a heuristic optimization algorithm is more and more 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 does not need to be calculated, so that the heuristic optimization algorithm has great advantages. The particle swarm optimization algorithm is a popular heuristic optimization algorithm. However, an objective function of the existing particle swarm optimization algorithm is a non-convex function, and when the objective function is solved, the objective function is easy to fall into a local extreme value, so that the positioning accuracy is reduced.
In order to solve the problems in the prior art, embodiments of the present invention provide a co-location method, apparatus, electronic device, and storage medium, so as to locate a node to be located and improve the location accuracy.
In the following, a co-location method according to an embodiment of the present invention is first described, as shown in fig. 1, which is a flowchart of a first implementation manner 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;
S10and 3, obtaining particle information of the kth iteration of each search particle, global optimal positions of the kth iteration of all search particles and an 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 node information of at least two anchor points, wherein the particle information comprises: position information, speed information, historical optimum position of each search particle, k is more than or equal to 0 and less than or equal to kmax,kmaxIs a preset maximum iteration number;
s104, 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 kth iteration of each search particle, the global optimal positions of all the kth iterations of the search particles and the iteration coefficient of the kth iteration of each search particle;
s105, classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
s106, determining global optimal positions of all the search particles during the (k +1) th iteration based on the position information of the (k +1) th iteration of all the search particles, and determining historical optimal positions of the (k +1) th iteration of each search particle based on the position information of the (k +1) th iteration of each search particle;
s107, judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that k +1 is equal to a preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th iteration is smaller than a preset global optimal position threshold; if yes, go to step S108; otherwise, executing step S109;
s108, determining the position of the node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration;
s109, obtaining an iteration coefficient of the (k +1) th iteration of each search particle by adopting an iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle;
s110, the iteration coefficient of the (k +1) th iteration of each searched particle is correspondingly used as the iteration coefficient of the kth iteration, the particle information of the (k +1) th iteration of each searched particle is correspondingly used as the particle information of the kth iteration, the global optimal positions of all the searched particles in the (k +1) th iteration are used as the global optimal positions of all the searched particles in the kth iteration, and the step S104 is executed.
In the co-location method provided by the embodiment of the present invention, when a node to be located is located, node information of at least two anchor nodes in communication connection with the node to be located may be obtained, and initial information of a plurality of search particles and initial global optimal positions of all search particles are obtained through initialization, then k iterations are performed 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, and particle information of each search particle for the kth iteration, the global optimal positions of all search particles for the kth iteration, and an iteration coefficient of each search particle for the kth iteration are obtained, based on the particle information of each search particle for the kth iteration, the global optimal positions of all search particles for the kth iteration, and an iteration coefficient of each search particle for the kth iteration, determining the position information and the speed information of the (k +1) th iteration of each search particle; classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration; determining global optimal positions of all the search particles during the (k +1) th iteration based on the position information of the (k +1) th iteration of all the search particles, and determining historical optimal positions of the (k +1) th iteration of each search particle based on the position information of the (k +1) th iteration of each search particle; judging whether the (k +1) th iteration meets a preset output condition, if so, determining the position of a node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k +1 th iteration to obtain the iteration coefficient of the k +1 th iteration of each search particle; and correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of all the search particles during the (k +1) th iteration as the global optimal position of all the search particle kth iterations, and executing the step of 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 kth iteration of each search particle, the global optimal positions of all the search particles during the kth iteration and the iteration coefficient of the kth iteration of each search particle. In this way, 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 during multiple iterations or the classification result of each search particle during multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each searching particle is classified based on the position information of each searching particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all searching particles in the k +1 th iteration to obtain the classification result of each searching particle in the k +1 th iteration; then, obtaining an iteration coefficient of the (k +1) th iteration of each search particle based on an iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle; therefore, the situation that a local extreme value is trapped during iteration can be avoided, 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 the cooperative positioning method shown in fig. 1, an 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 the cooperative positioning method according to the embodiment of the present invention, where the method may include:
s201, acquiring node information of at least two anchor nodes in communication connection with a node to be positioned.
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 located needs to be located, communication may be first established with at least two anchor nodes around the anchor node, where the anchor node may include a base station and a mobile terminal whose location is already known, and the mobile terminal whose location is already known may be a mobile terminal located by using a co-location method according to an embodiment of the present invention, or may be a mobile terminal located by using another location method. The node to be positioned may be a mobile terminal to be positioned. 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, after establishing communication with anchor nodes around the node to be positioned, the node to be positioned may determine the distance between the node to be positioned and the anchor node based on the transmission time of signals between the node to be positioned and the anchor node, and may also determine the distance between the node to be positioned and the anchor node by the signal strength between the node to be positioned and the anchor node.
In other examples, since the anchor node knows its own location information, the location information of the anchor node communicatively connected to the node to be located may also be obtained through communication.
S202, based on node information of at least two anchor nodes, determining initial information of a plurality of search particles and initial global optimal positions of all the search particles, wherein the initial information comprises: initial position information, initial speed information and an initial optimal position;
after the node information of the anchor node is obtained, in order to locate the node to be located by using the cooperative locating method according to the embodiment of the present invention, initialization may be performed 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 a region containing location information of the at least two anchor nodes upon initialization. Wherein the number of the plurality of search particles may be preset.
In still other examples, when performing initialization, an average value of the position information of the at least two anchor nodes may be calculated, and then the initial position information of the plurality of search particles may be randomly generated according to a uniform distribution in a vicinity of the average value.
In other examples, the initial velocity of each search particle described above may be 0 when performing initialization. The initial optimal positions of the respective search particles may be respective initial positions.
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 velocity information of each search particle may also be a D-dimensional velocity vector, so that the optimal position of each search particle may also be a D-dimensional position vector, and the global optimal positions of all search particles are also a D-dimensional position vector, where D represents the dimension of the vector.
When determining the initial global optimal positions of all the search particles in the initial positions of the plurality of search particles, the following formula may be used:
Figure BDA0002460026320000141
an objective function value of initial position information of each search particle is determined, and then initial position information of a search particle having a smallest objective function value among the initial positions of the plurality of search particles is selected as an initial global optimum position. For example, assuming that there are 10 search particles, and the value of the objective function corresponding to the initial position information of the 5 th search particle among the 10 search particles is the smallest, the initial position of the 5 th search particle may be used as the initial global optimal position of all the search particles.
S203, obtaining each initial information of each search particle, initial global optimal positions of all search particles and node information of at least two anchor pointsSearching particle information of the kth iteration of the particles, global optimal positions of all searched particles of the kth iteration of the particles and an iteration coefficient of each searched particle of the kth iteration, wherein the particle information comprises: position information, speed information, historical optimum position of each search particle, k is more than or equal to 1 and less than or equal to kmax,kmaxIs a preset maximum iteration number;
after the initial information of each search particle and the initial global optimal positions of all the search particles are determined, the maximum iteration number set by a user can be obtained, iterative calculation is performed based on the initial information of each search particle, the initial global optimal positions of all the search particles and node information of at least two anchor points, and after k iterations are performed, the particle information of the kth iteration of each search particle, the global optimal positions of the kth iteration of all the search particles and the iteration coefficient of the kth iteration of each search particle can be obtained.
In some examples, the historical optimal position of the kth iteration of each search particle is determined based on position information of k previous iterations of the search particle; for example, assuming that k is 10, the historical optimal position of the kth iteration of the search particle may be the optimal position of the 10 pieces of position information of the previous 10 iterations of the search particle. The optimal position may be a position at which an objective function value corresponding to the search particle is minimized.
In some examples, in the process of the previous k iterations, the same or similar steps as those in steps S204 to S211 may be adopted for the iterations, and details are not repeated here.
S204, aiming at the nth search particle, based on the position information x of the kth iteration of the nth search particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) Global optimum position gbest of kth iteration of all search particlesτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy formula (1):
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k)) (1)
determining velocity information v of the (k +1) th iteration of the nth search particlen(k + 1); wherein N is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kInertial weight for kth iteration of nth search particle, cn1,kFirst learning factor for kth iteration of nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; lambda [ alpha ]1And λ2Are each [0, 1]Random numbers uniformly distributed thereon;
in some examples, when k is 0, then xn(k) For the nth search for initial position information of the particle, vn(k) For the initial velocity information of the nth search particle, gbestτ(k) For all initial global optimal positions of search particles, pbestn(k) The initial optimal position of the particle is searched for the nth.
In still other examples, ωn,kHas a value range of [0.4,0.9 ]];cn1,kAnd cn2,kHas a value range of [1,3 ]]。
S205, velocity information v of the k +1 th iteration based on the nth search particlen(k +1) and location information x of kth iteration of nth search particlen(k) By formula (2):
xn(k+1)=xn(k)+vn(k+1) (2)
determining position information x of k +1 iteration of nth search particlen(k+1)。
After obtaining the velocity information of the (k +1) th iteration of the nth search particle, the position information of the (k +1) th iteration of the nth search particle may be determined by formula (2) based on the velocity information of the (k +1) th iteration and the position information of the kth iteration.
S206, classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
s207, determining global optimal positions of all the search particles during the (k +1) th iteration based on the position information of the (k +1) th iteration of all the search particles;
s208, judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that k +1 is equal to a preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th 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 the node to be positioned based on the global optimal position of all the search particles in the k +1 th iteration or the classification result of each search particle in the k +1 th iteration;
s210, obtaining an iteration coefficient of the (k +1) th iteration of each search particle by adopting an iteration coefficient adjustment strategy corresponding to a classification result of the (k +1) th iteration of each search particle;
s211, correspondingly taking the iteration coefficient of the (k +1) th iteration of each searched particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each searched particle as the particle information of the kth iteration, taking the global optimal position of all the searched particles in the (k +1) th iteration as the global optimal position of all the searched particles in the kth iteration, and executing the step S204.
After determining the position information and the speed information of each search particle during the (k +1) th iteration, in order to avoid trapping the finally determined positioning result into a local optimal solution, in the embodiment of the invention, each search particle can be classified firstly based on the position information of each search particle during the (k +1) th iteration, the node information of at least two anchor nodes and the global optimal position of all search particles during the (k +1) th iteration, so as to obtain a classification result of each search particle during the (k +1) th iteration; and then, adjusting the iteration coefficient to be adopted in the (k +1) th iteration according to the classification result of each search particle, namely, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the (k +1) th iteration to obtain the iteration coefficient of the (k +1) th iteration of each search particle. After the iteration coefficients are 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 to obtain a classification result of each search particle at the k +1 th iteration, the following steps may be adopted for classification:
step A1, aiming at the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1), node information of at least two anchor nodes, by the following formula:
Figure BDA0002460026320000171
determining an objective function value f (x) of position information of an nth search particle at a (k +1) th iterationn(k +1)), where M is a total number of at least two anchor nodes,
Figure BDA0002460026320000172
is the distance, x, between the jth anchor node of the at least two anchor nodes and the node to be positionedjFor location information of jth anchor node, | | xn(k+1)-xj| | is the position information x of the nth search particle at the k +1 iterationn(k +1) and location information x of jth anchor nodejThe euclidean distance between.
Step A2, in the objective function value f (x)n(k +1)) and 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 into a short-distance search particle;
step A3, in the objective function value f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) Classifying the nth search particle as a remote search particle when the difference value is greater than a second preset classification threshold value;
step A4, in the objective functionValue f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference value is between the first preset classification threshold value and the second preset classification threshold value, classifying the nth search particle into a middle-distance search particle, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
In some examples, when classifying the respective search particles, the location information x at the k +1 th iteration of each search particle may be calculatedn(k +1), node information of at least two anchor nodes, to calculate an objective function value of position information at the (k +1) th iteration of each search particle. And then comparing the objective function value of the position information of each search particle in the k +1 th iteration with the global optimal position of all the search particles in the k +1 th iteration, so that the classification result of each search particle can be determined, namely the particle to which each search particle belongs can be determined.
For example, the objective function value f (x) of the position information when the nth search particle iterates (k +1) th timen(k +1)), and global optimal position gbest for the kth iteration of all search particlesτ(k) When the difference value of (a) is smaller than a 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 is greater than a second preset classification threshold value, classifying the nth search particle into a remote search particle;
when the objective function value f (x)n(k +1)) and gbestτ(k) When the difference value is between the first preset classification threshold and the second preset classification threshold, the nth search particle may be classified as the middle-distance search particle.
In this way, a classification result for each search particle can be obtained. Then, an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the (k +1) th iteration can be adopted to obtain the iteration coefficient of the (k +1) th iteration of each search particle.
In still other examples, when the iteration coefficient of the (k +1) th iteration of each search particle is obtained by using the iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle, the following steps may be adopted for adjustment:
step B1, aiming at the nth searching particle, when the nth searching particle is a short-distance searching particle, increasing the second learning factor c of the kth iteration according to the preset first adjusting step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,k+1
Step B2, 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 stepn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1
Step B3, when the nth search particle is the middle distance search particle, according to the following formula:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1A first learning factor cn1,k+1And a second learning factor cn2,k+1Wherein, ω ismaxIs the inertial weight omegan,k+1Maximum value of the range of values of, ωminIs the inertial weight omegan,k+1Is the minimum value of the range of values of (a).
In some examples, the objective function value f (x) of the position information when the nth search particle iterates (k +1) th timen(k +1)), and global optimal position gbest for the kth iteration of all search particlesτ(k) If the difference is smaller than the first preset classification threshold, the local optimization capability of the search particle should be enhanced, so the second learning factor c of the kth iteration can be increased according to the preset first adjustment step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,k+1(ii) a Wherein the first adjustment step size canSo as to be an adjustment value set empirically in advance.
When the objective function value f (x)n(k +1)) and gbestτ(k) If the difference is greater than the second preset classification threshold, the global optimization capability of the searched 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 lengthn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1(ii) a The second adjustment step size may also 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 of (a) is between the first preset classification threshold and the second preset classification threshold, the local optimizing capability and the global optimizing capability of the search particle should be dynamically adjusted, so that the following formula can be adopted:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1A first learning factor cn1,k+1And a second learning factor cn2,k+1
In still other examples, after classifying each search particle, the iteration coefficients of a class of search particles may be adjusted according to the classification in addition to one adjustment of the iteration coefficients of each search particle.
That is, the same adjustment step length is used to adjust the iteration coefficient of the search particle for the search particle classified as the short-distance search particle, and the same adjustment step length is used to adjust the iteration coefficient of the search particle for the search particle classified as the long-distance search particle. This is also possible.
By 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 to avoid the objective function from falling into a local optimal solution, so that 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 be further determined whether the (k +1) th iteration satisfies a preset output condition, and if not, the iteration is continued through step S210 and step S211. If so, the position of the node to be positioned can be determined,
in some examples, the location of the node to be located may be determined based on the global optimal locations at the k +1 th iteration of all search particles or the classification results at the k +1 th iteration of each search particle.
In still other examples, when determining the position of the node to be located based on the global optimal positions of all the search particles at the (k +1) th iteration or the classification result of each search particle at the (k +1) th iteration, the position of the node to be located may be determined based on the global optimal positions of all the search particles at the (k +1) th iteration, or the position of the node to be located may be determined based on the classification result of each search particle at the (k +1) th iteration.
When the position of the node to be positioned is determined based on the global optimal positions of all the search particles in the (k +1) th iteration, the global optimal positions of all the search particles in the (k +1) th iteration can be used as the positions of the node to be positioned.
In still other examples, when the anchor node includes a mobile terminal, the position of the mobile terminal has uncertainty, and therefore, such uncertainty will cause an error between the position of the node to be located determined by using the co-location method of the embodiment of the present invention and the actual position of the node to be located. In order to reduce the error, in the embodiment of the present invention, the position of the node to be located may be determined based on the classification result at the k +1 th iteration of each search particle.
When the position of the node to be positioned is determined based on the classification result of the (k +1) th iteration of each search particle, the weighted average of the positions of all the close-range search particles can be used as the position of the node to be positioned. For example, the following steps may be taken to determine the position of a node to be located:
step C1, acquiring objective function values of all close-range searching particles in the plurality of searching particles when k +1 is iterated;
step C2, based on the objective function value of each short-distance search particle, using the following formula:
Figure BDA0002460026320000201
determining a weight value for each close-search particle, wherelWeight for the ith short-range search particle, f (x)l(k +1)) is the objective function value of the ith close-range particle at the (k +1) th iteration, L is the total number of all close-range particles;
step C3, obtaining the position information of all the close-range searching particles during the (k +1) th iteration, and adopting the following formula:
Figure BDA0002460026320000211
determining location information of a node to be located
Figure BDA0002460026320000212
Wherein x isl(k +1) is the position information of the kth +1 th iteration of the ith short-range search particle.
Because the difference between the positions of all the close-range searching particles and the position of the node to be positioned is small, and all the close-range searching particles are distributed near the node to be positioned, the weighted average value of the positions of all the close-range searching particles is used as the position of the node to be positioned, so that the positioning error of the node to be positioned can be reduced, and the positioning accuracy is improved.
Corresponding to the above method embodiment, an embodiment of the present invention further provides a co-location apparatus, as shown in fig. 3, which is a schematic structural diagram of a co-location apparatus according to an embodiment of the present invention, and the apparatus may include:
an anchor node information obtaining module 310, configured to obtain node information of at least two anchor nodes in communication connection with a node to be positioned, where the node information includes a distance between each anchor node and the node to be positioned 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;
an iteration module 330, configured to obtain particle information of a kth iteration of each search particle, global optimal positions of all search particles, and an 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 node information of at least two anchor points, where the particle information includes: position information, speed information, historical optimum position of each search particle, k is more than or equal to 0 and less than or equal to kmax,kmaxIs a preset maximum iteration number;
a position and velocity information determining module 340, configured to determine position information and velocity information of a 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 search particles, and the iteration coefficient of the k th 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 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, so as to obtain a classification result of each search particle at the k +1 th iteration;
the global optimal position determining module 360 is configured to determine global optimal positions of all search particles in the k +1 th iteration based on the position information of all search particles in the k +1 th iteration;
the determining module 370 is configured to determine whether the (k +1) th iteration meets a preset output condition, where the preset output condition is that k +1 is equal to a preset maximum iteration number, or global optimal positions of all the search particles during the (k +1) th iteration are smaller than a preset global optimal position threshold; if yes, the positioning module is triggered, and if no, the iteration coefficient adjusting module 390 is triggered;
the positioning module 380 is configured to determine a position of a node to be positioned based on the global optimal positions of all the search particles in the k +1 th iteration or the classification result of each search particle in the k +1 th iteration;
an iteration coefficient adjusting module 390, configured to obtain an iteration coefficient of the (k +1) th iteration of each search particle by using an iteration coefficient adjusting policy corresponding to the classification result of the (k +1) th iteration of each search particle; and the iteration coefficient of the (k +1) th iteration of each search particle is correspondingly used as the iteration coefficient of the kth iteration, the particle information of the (k +1) th iteration of each search particle is correspondingly used as the particle information of the kth iteration, the global optimal position of all the search particles during the (k +1) th iteration is used as the global optimal position of all the search particles during the kth iteration, and the position and speed information determining module 340 is triggered.
When a node to be located is located, the co-location device provided in the embodiment of the present invention may first obtain node information of at least two anchor nodes in communication connection with the node to be located, and initialize the node information to obtain initial information of a plurality of search particles and initial global optimal positions of all search particles, then perform k iterations 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, obtain particle information of each search particle for the kth iteration, the global optimal positions of all search particles for the kth iteration, and an iteration coefficient of each search particle for the kth iteration, and based on the particle information of each search particle for the kth iteration, the global optimal positions of all search particles for the kth iteration, and the iteration coefficient of each search particle for the kth iteration, determining the position information and the speed information of the (k +1) th iteration of each search particle; classifying each search particle based on the position information of each search particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all search particle in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration; determining global optimal positions of all the search particles during the (k +1) th iteration based on the position information of the (k +1) th iteration of all the search particles, and determining historical optimal positions of the (k +1) th iteration of each search particle based on the position information of the (k +1) th iteration of each search particle; judging whether the (k +1) th iteration meets a preset output condition, if so, determining the position of a node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration; if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k +1 th iteration to obtain the iteration coefficient of the k +1 th iteration of each search particle; and correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of all the search particles during the (k +1) th iteration as the global optimal position of all the search particle kth iterations, and executing the step of 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 kth iteration of each search particle, the global optimal positions of all the search particles during the kth iteration and the iteration coefficient of the kth iteration of each search particle. In this way, 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 during multiple iterations or the classification result of each search particle during multiple iterations; therefore, the node to be positioned can be positioned, and in the embodiment of the invention, each searching particle is classified based on the position information of each searching particle in the k +1 th iteration, the node information of at least two anchor nodes and the global optimal position of all searching particles in the k +1 th iteration to obtain the classification result of each searching particle in the k +1 th iteration; then, obtaining an iteration coefficient of the (k +1) th iteration of each search particle based on an iteration coefficient adjustment strategy corresponding to the classification result of the (k +1) th iteration of each search particle; therefore, the situation that a local extreme value is trapped during iteration can be avoided, the finally obtained position information of the node to be positioned is globally optimal, and the positioning precision can be improved.
Optionally, the position 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 particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) Global optimum position gbest of kth iteration of all search particlesτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy the following formula:
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k))
determining velocity information v of the (k +1) th iteration of the nth search particlen(k + 1); wherein N is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kInertial weight for kth iteration of nth search particle, cn1,kFirst learning factor for kth iteration of nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; lambda [ alpha ]1And λ2Are each [0, 1]Random numbers uniformly distributed thereon;
velocity information v based on the (k +1) th iteration of the nth search particlen(k +1) and location information x of kth iteration of nth search particlen(k) By the following formula:
xn(k+1)=xn(k)+vn(k+1)
determining position information x of k +1 iteration of nth search particlen(k+1)。
Optionally, the classification module 350 is specifically configured to:
for the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1) at least twoNode information of each anchor node by the following formula:
Figure BDA0002460026320000241
determining an objective function value f (x) of position information of an nth search particle at a (k +1) th iterationn(k +1)), where M is a total number of at least two anchor nodes,
Figure BDA0002460026320000242
is the distance, x, between the jth anchor node of the at least two anchor nodes and the node to be positionedjLocation information for the jth anchor node;
at the value of the objective function f (x)n(k +1)) and 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 into a short-distance search particle;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) Classifying the nth search particle as a remote search particle when the difference value is greater than a second preset classification threshold value;
at the value of the objective function f (x)n(k +1)) and global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference value is between the first preset classification threshold value and the second preset classification threshold value, classifying the nth search particle into a middle-distance search particle, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
Optionally, the iteration coefficient adjusting module 390 is specifically configured to:
aiming at 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 adjusting step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,k+1
When the nth search particle is a long-distance search particle, increasing the first learning factor of the kth iteration according to a preset second adjusting step lengthcn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1
When the nth search particle is a middle-distance search particle, the following formula is adopted:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1A first learning factor cn1,k+1And a second learning factor cn2,k+1Wherein, ω ismaxIs the inertial weight omegan,k+1Maximum value of the range of values of, ωminIs the inertial weight omegan,k+1Is the minimum value of the range of values of (a).
Optionally, the positioning module 380 is specifically configured to:
acquiring objective function values of all close-range searching particles in a plurality of searching particles when k +1 is iterated;
based on the objective function value of each close-range search particle, the following formula is adopted:
Figure BDA0002460026320000251
determining a weight value for each close-search particle, wherelWeight for the ith short-range search particle, f (x)l(k +1)) is the objective function value of the ith close-range particle at the (k +1) th iteration, L is the total number of all close-range particles;
when the (k +1) th iteration is performed, the position information of all the close-range searching particles is obtained by adopting the following formula:
Figure BDA0002460026320000252
determining location information of a node to be located
Figure BDA0002460026320000253
Wherein x isl(k +1) is the position information of the kth +1 th iteration of the ith short-range search particle.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 complete mutual communication 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 embodiments when executing the program stored in the memory 403.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a 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 processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In a further embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the co-location method according to any one of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the steps of the co-location method according to any of the above embodiments.
The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website site, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DS L)) or wireless (e.g., infrared, wireless, microwave, etc.) manner to another website site, computer, server, or data center.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic apparatus, and the storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of co-location, 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 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 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 each k-th iteration of the search particles, global optimal positions of all k-th iterations of the search particles and iteration coefficients of each k-th iteration of the search particles based on initial information of each search particle, initial global optimal positions of all the search particles and node information of the 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 kmaxSaid k ismaxIs a preset maximum iteration number;
determining position information and 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 particles 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 in the k +1 th iteration, the node information of the at least two anchor nodes and the global optimal position of all the search particles in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
determining global optimal positions of all the search particles in the k +1 th iteration based on the position information of the k +1 th iteration of all the search particles;
judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that the (k +1) th iteration is equal to the preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th iteration is smaller than a preset global optimal position threshold;
if so, determining the position of the node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration;
if not, adopting an iteration coefficient adjustment strategy corresponding to the classification result of each search particle in the k +1 th iteration to obtain the iteration coefficient of the k +1 th iteration of each search particle;
and correspondingly taking the iteration coefficient of the (k +1) th iteration of each search particle as the iteration coefficient of the kth iteration, correspondingly taking the particle information of the (k +1) th iteration of each search particle as the particle information of the kth iteration, taking the global optimal position of the (k +1) th iteration of all search particles as the global optimal position of the kth iteration of all search particles, and executing the step of 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 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.
2. The method of claim 1, wherein the determining the position information and the velocity 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 search particles, and the iteration coefficient of the k-th iteration of each search particle comprises:
for an nth search particle, based on location information x of a kth iteration of the nth search particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) Global optimal position gbest of kth iteration of all search particlesτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy the following formula:
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k))
determining velocity information v for the (k +1) th iteration of the nth search particlen(k + 1); n is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kFor the nth search grainInertial weight of sub-kth iteration, said cn1,kA first learning factor for a kth iteration of the nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; said lambda1And said λ2Are each [0, 1]Random numbers uniformly distributed thereon;
velocity information v based on the (k +1) th iteration of the nth search particlen(k +1) and position information x of kth iteration of the nth search particlen(k) By the following formula:
xn(k+1)=xn(k)+vn(k+1)
determining the position information x of the (k +1) th iteration of the nth search particlen(k+1)。
3. The method according to claim 2, wherein the 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 all search particle at the k +1 th iteration to obtain the classification result of each search particle at the k +1 th iteration comprises:
for the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1), node information of the at least two anchor nodes, by the following formula:
Figure FDA0002460026310000031
determining an objective function value f (x) of position information of the nth search particle at the (k +1) th iterationn(k +1)), wherein M is a total number of the at least two anchor nodes, the
Figure FDA0002460026310000032
The distance between the jth anchor node of the at least two anchor nodes and the node to be positioned is xjThe position information of the jth anchor node;
at the value of the objective function 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 into a short-distance search particle;
at the value of the objective function f (x)n(k +1)) and the global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference value is greater than a second preset classification threshold value, classifying the nth search particle into a remote search particle;
at the value of the objective function f (x)n(k +1)) and the global optimum position gbest of the kth iteration of all search particlesτ(k) When the first preset classification threshold value and the second preset classification threshold value are in the range, classifying the nth search particle into a medium-distance search particle, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
4. The method according to claim 3, wherein obtaining the iteration coefficient of each search particle (k +1) th iteration by using an iteration coefficient adjustment strategy corresponding to the classification result of each search particle (k +1) th iteration comprises:
aiming at 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 adjusting step lengthn2,kObtaining a second learning factor c of the (k +1) th iteration of the nth search particlen2,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 adjusting step lengthn1,kObtaining a first learning factor c of the (k +1) th iteration of the nth search particlen1,k+1
When the nth search particle is a middle-distance search particle, according to the following formula:
ωn,k+1=ωmax-(ωmaxmin)·(k+1)/kmax
cn1,k+1=3cos(π·(k+1)/(2·kmax))
cn2,k+1=3sin(π·(k+1)/(2·kmax))
determining an inertial weight ω of the (k +1) th iteration of the nth search particlen,k+1A first learning factor cn1,k+1And a second learning factor cn2,k+1Wherein, the ω ismaxIs the inertial weight ωn,k+1The maximum value of the value range of (a), ωminIs the inertial weight ωn,k+1Is the minimum value of the range of values of (a).
5. The method of claim 3, wherein determining the position of the node to be located based on the classification result at the k +1 th iteration of each of the search particles comprises:
acquiring objective function values of all close-range searching particles in the plurality of searching particles when the k +1 is iterated;
based on the objective function value of each short-distance search particle, the following formula is adopted:
Figure FDA0002460026310000041
determining a weight value for each of the close-search particles, wherein the pilWeight of the search particle for the ith short distance, f (x)l(k +1)) is the objective function value for the ith close-range particle at the (k +1) th iteration, said L is the total number of all said close-range particles;
obtaining the position information of all the close-range searching particles during the (k +1) th iteration by adopting the following formula:
Figure FDA0002460026310000042
determining the position information of the node to be positioned
Figure FDA0002460026310000043
Wherein, the xl(k +1) is the position information of the ith short-range search particle at the (k +1) th iteration.
6. 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 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;
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;
an iteration module, configured to obtain, based on the initial information of each search particle, the initial global optimal positions of all the search particles, and the node information of the at least two anchor points, particle information of a kth iteration of each search particle, the global optimal positions of all the search particles, and an iteration coefficient 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 kmaxSaid k ismaxIs a preset maximum iteration number;
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 positions of all the k th iterations of the 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 in the k +1 th iteration, the node information of the at least two anchor nodes and the global optimal position of all the search particles in the k +1 th iteration to obtain a classification result of each search particle in the k +1 th iteration;
the global optimal position determining module is used for determining global optimal positions of all the search particles in the k +1 th iteration based on the position information of the k +1 th iteration of all the search particles;
the judging module is used for judging whether the (k +1) th iteration meets a preset output condition, wherein the preset output condition is that the (k +1) th iteration is equal to a preset maximum iteration time, or the global optimal position of all the search particles during the (k +1) th iteration is smaller than a preset global optimal position threshold; if yes, triggering the positioning module, and if not, triggering the iteration coefficient adjusting module;
the positioning module is configured to determine the position of the node to be positioned based on the global optimal position of all the search particles in the (k +1) th iteration or the classification result of each search particle in the (k +1) th iteration;
the iteration coefficient adjusting module is configured to obtain an iteration coefficient of the (k +1) th iteration of each search particle by using an iteration coefficient adjusting strategy corresponding to a classification result of each search particle in the (k +1) th iteration; and the iteration coefficient of the (k +1) th iteration of each search particle is correspondingly used as the iteration coefficient of the kth iteration, the particle information of the (k +1) th iteration of each search particle is correspondingly used as the particle information of the kth iteration, the global optimal position of all the search particles during the (k +1) th iteration is used as the global optimal position of all the search particles during the kth iteration, and the position and speed information determining module is triggered.
7. The apparatus of claim 6, wherein the position and velocity information determination module is specifically configured to:
for an nth search particle, based on location information x of a kth iteration of the nth search particlen(k) Velocity information v of the k-th iterationn(k) Historical optimal location pbestn(k) K-th iteration of all search particlesGlobal optimum position of generation gbestτ(k) And the iteration coefficient omega of the kth iteration of the nth search particlen,k、cn1,k、cn2,kBy the following formula:
vn(k+1)=ωn,k·vn(k)+cn1,kλ1·(pbestn(k)-xn(k))+cn2,kλ2·(gbestτ(k)-xn(k))
determining velocity information v for the (k +1) th iteration of the nth search particlen(k + 1); n is more than or equal to 1 and less than or equal to N, N is the total number of the plurality of search particles, tau is the number of the tau-th search particle in the plurality of search particles, tau is more than or equal to 1 and less than or equal to N, and omegan,kInertial weight of kth iteration for the nth search particle, cn1,kA first learning factor for a kth iteration of the nth search particle, cn2,kA second learning factor for a kth iteration of the nth search particle; said lambda1And said λ2Are each [0, 1]Random numbers uniformly distributed thereon;
velocity information v based on the (k +1) th iteration of the nth search particlen(k +1) and position information x of kth iteration of the nth search particlen(k) By the following formula:
xn(k+1)=xn(k)+vn(k+1)
determining the position information x of the (k +1) th iteration of the nth search particlen(k+1)。
8. The apparatus according to claim 7, wherein the classification module is specifically configured to:
for the nth search particle, based on the position information x of the nth search particle at the k +1 th iterationn(k +1), node information of the at least two anchor nodes, by the following formula:
Figure FDA0002460026310000061
determining an objective function value f (x) of position information of the nth search particle at the (k +1) th iterationn(k +1)), wherein M is a total number of the at least two anchor nodes, the
Figure FDA0002460026310000062
The distance between the jth anchor node of the at least two anchor nodes and the node to be positioned is xjThe position information of the jth anchor node;
at the value of the objective function 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 into a short-distance search particle;
at the value of the objective function f (x)n(k +1)) and the global optimum position gbest of the kth iteration of all search particlesτ(k) When the difference value is greater than a second preset classification threshold value, classifying the nth search particle into a remote search particle;
at the value of the objective function f (x)n(k +1)) and the global optimum position gbest of the kth iteration of all search particlesτ(k) When the first preset classification threshold value and the second preset classification threshold value are in the range, classifying the nth search particle into a medium-distance search particle, wherein the first preset classification threshold value is smaller than the second preset classification threshold value.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-5.
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 true CN111506693A (en) 2020-08-07
CN111506693B 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与粒子群算法的协同定位研究" *
邓中亮等: "室内定位关键技术综述" *

Also Published As

Publication number Publication date
CN111506693B (en) 2023-11-28

Similar Documents

Publication Publication Date Title
CN111385743B (en) Position estimation method and device and electronic equipment
US8040859B2 (en) Identification of the location of nodes distributed in ad hoc networks
CN107484123B (en) WiFi indoor positioning method based on integrated HWKNN
CN110392425B (en) Indoor positioning method, device and system and storage medium
CN108549049B (en) Ray tracing assisted Bayes fingerprint positioning method and device
CN111246383A (en) Indoor positioning algorithm optimization based on Bluetooth
JP2009517988A (en) System and method for calculating the location of a mobile device operating in a wireless network
WO2016112758A1 (en) Method and apparatus for locating terminal
WO2022214002A1 (en) Indoor positioning method and indoor positioning apparatus
CN115066012B (en) Multi-user anchor-free positioning method based on UWB
CN112987724A (en) Path optimization method and device, robot and storage medium
CN113872715B (en) Multipath signal simulation method, system, electronic equipment and storage medium
CN108566677A (en) A kind of fingerprint positioning method and device
CN111148217A (en) Positioning method and device and electronic equipment
JP2017067529A (en) Position estimation device, position estimation method, and position estimation program
Yan et al. A noise reduction fingerprint feature for indoor localization
CN111506693A (en) Cooperative positioning method and device, electronic equipment and storage medium
Sundar et al. WALE: A weighted adaptive location estimation algorithm
CN113029147B (en) Estimation method for air propagation delay of direct wave
CN114325577A (en) Non-line-of-sight positioning error correction method and device
CN108490389B (en) Positioning method and device based on multipath reflection, electronic equipment and storage medium
CN112437485B (en) Positioning method and device of fingerprint space interpolation method based on neural network
CN107708203A (en) A kind of localization method and device based on geographical fingerprint
CN113395762A (en) Position correction method and device in ultra-wideband positioning network
CN109991569B (en) Reflector positioning method and device based on millimeter wave robot

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