Indoor positioning method, device, terminal equipment and medium based on federal learning

文档序号:1672116 发布日期:2019-12-31 浏览:23次 中文

阅读说明:本技术 基于联邦学习的室内定位方法、装置、终端设备及介质 (Indoor positioning method, device, terminal equipment and medium based on federal learning ) 是由 程勇 刘洋 陈天健 于 2019-09-20 设计创作,主要内容包括:本发明公开了一种基于联邦学习的室内定位方法、装置、终端设备及可计算机读存储介质,基于构建各终端设备的室内定位训练数据集;各所述终端设备基于所述室内定位训练数据集进行模型训练,以得到模型参数更新;将所述模型参数更新转化为全局模型参数以供各所述终端设备进行室内定位。本发明节省了构建位置指纹库花费的大量的时间和精力,扩展了终端设备所能够测量的室内位置,且保护了用户的隐私信息。(The invention discloses an indoor positioning method, an indoor positioning device, terminal equipment and a computer readable storage medium based on federal learning, and is based on the construction of indoor positioning training data sets of each terminal equipment; each terminal device carries out model training based on the indoor positioning training data set to obtain model parameter updating; and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning. The invention saves a great deal of time and energy spent on constructing the position fingerprint database, expands the indoor position which can be measured by the terminal equipment and protects the privacy information of the user.)

1. An indoor positioning method based on federal learning is characterized in that the indoor positioning method based on federal learning comprises the following steps:

constructing an indoor positioning training data set of each terminal device;

each terminal device carries out model training based on the indoor positioning training data set to obtain model parameter updating;

and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning.

2. The federal learning-based indoor positioning method as claimed in claim 1, wherein, before the step of constructing the indoor positioning training data set of each terminal device, further comprising:

and acquiring the position information of the position of each terminal device and the position fingerprint information acquired by each terminal device.

3. The federally learned indoor positioning method as claimed in claim 2, wherein the location information includes at least: wide-area location information and indoor location information,

the step of constructing the indoor positioning training data set owned by each terminal device comprises:

sequentially extracting target indoor position information corresponding to each piece of position fingerprint information acquired by the terminal equipment from the indoor position information;

respectively taking the position fingerprint information, target indoor position information and wide area position information to which the target indoor position information belongs as indoor positioning training data;

and counting all the indoor positioning training data to construct an indoor positioning training data set of each terminal device.

4. The federally-learned indoor positioning method as claimed in claim 3, wherein the wide-area location information is physical location information, and the indoor location information is coordinate information with the wide-area location information as a reference point.

5. The federal learning-based indoor positioning method as claimed in claim 1, wherein the step of performing model training by each terminal device based on the indoor positioning training data set to obtain model parameter updates includes:

detecting a model updating request of each terminal device for model training;

and according to the detected model updating request, each terminal device carries out model training locally to obtain model parameter updating.

6. The federally-learned indoor positioning method as claimed in claim 5, wherein the step of performing model training locally at each of the terminal devices according to the detected model update request includes:

detecting whether the model updating request comprises the global model parameters;

if so, each terminal device performs model training locally by using the global model parameters;

and if not, each terminal device utilizes the indoor positioning training data set to carry out model training locally.

7. The federal learning-based indoor positioning method as claimed in claim 1, wherein the step of updating and converting the model parameters into global model parameters for each terminal device to perform indoor positioning comprises:

carrying out preset fusion processing on the model parameter update, and converting the model parameter update into a global model parameter;

and distributing the global model parameters to each terminal device so that each terminal device can perform indoor positioning based on model training locally.

8. An indoor positioning device based on federal learning, characterized in that, the indoor positioning device based on federal learning includes:

the building module is used for building an indoor positioning training data set of each terminal device;

the training module is used for carrying out model training on each terminal device based on the indoor positioning training data set so as to obtain model parameter updating;

and the positioning module is used for updating and converting the model parameters into global model parameters so as to carry out indoor positioning on each terminal device.

9. A terminal device, characterized in that the terminal device comprises: a memory, a processor and a federal learning based indoor positioning program stored on the memory and operable on the processor, the federal learning based indoor positioning program when executed by the processor implementing the steps of the federal learning based indoor positioning method as claimed in any one of claims 1 to 7.

10. A storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the federal learning based indoor positioning method as claimed in any of claims 1 to 7.

Technical Field

The invention relates to the technical field of Fintech (financial technology), in particular to an indoor positioning method, an indoor positioning device, terminal equipment and a computer readable storage medium based on federal learning.

Background

Based on the fact that Wi-Fi signals exist in most indoor environments at present, for example, places such as office places, teaching buildings, restaurants, cafes, shopping malls, supermarkets, airports, railway stations and subway cars are covered by the Wi-Fi signals, and therefore the technology of utilizing the Wi-Fi signals to perform indoor positioning is widely applied.

However, in the existing indoor positioning method based on Wi-Fi signals, a Wi-Fi location fingerprint library needs to be centrally constructed, that is, Wi-Fi location fingerprint information is obtained by measuring at a large number of target locations, so as to construct the Wi-Fi location fingerprint library, so that not only is a large amount of time and effort consumed to construct the location fingerprint library, so that the indoor locations that can be integrally measured are very limited, but also privacy information of users, such as places and location information that users have gone by, is revealed when the location fingerprint library is constructed in a crowdsourcing manner (Wi-Fi location fingerprint information is collected by a large number of mobile terminals of users).

Disclosure of Invention

The invention mainly aims to provide an indoor positioning method, an indoor positioning device, terminal equipment and a computer readable storage medium based on federal learning, and aims to solve the technical problems that the indoor position which can be measured integrally in the existing indoor positioning mode is limited, and the privacy of a user is easily revealed.

In order to achieve the above object, the present invention provides an indoor positioning method based on federal learning, which includes:

constructing an indoor positioning training data set of each terminal device;

each terminal device carries out model training based on the indoor positioning training data set to obtain model parameter updating;

and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning.

Further, before the step of constructing the indoor positioning training data set of each terminal device, the method further includes:

and acquiring the position information of the position of each terminal device and the position fingerprint information acquired by each terminal device.

Further, the location information includes: wide-area location information and indoor location information,

the step of constructing the indoor positioning training data set owned by each terminal device comprises:

sequentially extracting target indoor position information corresponding to each piece of position fingerprint information acquired by the terminal equipment from the indoor position information;

respectively taking the position fingerprint information, target indoor position information and wide area position information to which the target indoor position information belongs as indoor positioning training data;

and counting all the indoor positioning training data to construct an indoor positioning training data set of each terminal device.

Further, the wide area location information is physical location information, and the indoor location information is coordinate information using the wide area location information as a reference point.

Further, the step of performing model training by combining each terminal device based on the indoor positioning training data set to obtain model parameter update includes:

detecting a model updating request of each terminal device for model training;

and according to the detected model updating request, each terminal device locally performs model training on each terminal device to obtain model parameter updating.

Further, the step of performing, by each of the terminal devices, model training locally according to the detected model update request includes:

detecting whether the model updating request comprises the global model parameters;

if so, each terminal device performs model training locally by using the global model parameters;

and if not, each terminal device utilizes the indoor positioning training data set to carry out model training locally.

Further, the step of converting the model parameter update into a global model parameter for each of the terminal devices to perform indoor positioning includes:

carrying out preset fusion processing on the model parameter update, and converting the model parameter update into a global model parameter;

and distributing the global model parameters to each terminal device so that each terminal device can perform indoor positioning based on model training locally.

In addition, to achieve the above object, the present invention further provides an indoor positioning device based on federal learning, including:

the building module is used for building indoor positioning training data sets owned by each terminal device;

the training module is used for carrying out model training based on the indoor positioning training data set so as to obtain model parameter updating;

and the positioning module is used for updating and converting the model parameters into global model parameters so as to carry out indoor positioning on each terminal device.

The present invention also provides a terminal device, including: a memory, a processor, and a federal learning based indoor positioning program stored on the memory and operable on the processor, the federal learning based indoor positioning program when executed by the processor implementing the steps of the federal learning based indoor positioning method as in the above.

The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores thereon a computer program, which when executed by a processor implements the steps of the federal learning based indoor positioning method as described above.

The invention provides an indoor positioning method, an indoor positioning device, terminal equipment and a computer readable storage medium based on federal learning, which are characterized in that an indoor positioning training data set owned by each terminal equipment is constructed; each terminal device carries out model training based on the indoor positioning training data set to obtain model parameter updating; and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning. The method comprises the steps of establishing an indoor positioning training data set belonging to each user on the basis of the local of each terminal device owned by the user, then performing model training of a machine learning model by combining each user terminal device on the basis of the indoor positioning data owned by the user and obtaining model parameter updating of each model, and finally performing centralized conversion processing on the model parameter updating obtained by performing the model training on each terminal device owned by the user so as to obtain global model parameters required by all user terminal devices for indoor positioning.

The invention realizes that model training is carried out by combining the data owned by each terminal device without intensively constructing the position fingerprint database, thereby avoiding the situation that a large amount of time and energy are spent on constructing the position fingerprint database, and global model parameters are obtained by updating and converting the model parameters obtained by intensively carrying out the model training on each terminal device, thereby greatly expanding the indoor positions which can be measured by the terminal devices.

Drawings

FIG. 1 is a schematic diagram of the hardware operation involved in an embodiment of the present invention;

fig. 2 is a schematic flow chart of a first embodiment of an indoor positioning method based on federal learning according to the present invention;

fig. 3 is a detailed flowchart of step S200 in an embodiment of an indoor positioning method based on federal learning according to the present invention;

fig. 4 is a schematic view of an application scenario of an embodiment of an indoor positioning method based on federal learning according to the present invention;

fig. 5 is a schematic structural diagram of an indoor positioning device based on federal learning according to the invention.

The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.

Detailed Description

It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.

It should be noted that fig. 1 is a schematic structural diagram of a hardware operating environment of the terminal device. The terminal equipment of the embodiment of the invention can be terminal equipment such as a PC, a portable computer and the like.

As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.

Those skilled in the art will appreciate that the terminal device configuration shown in fig. 1 is not intended to be limiting of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.

As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a distributed task processing program. Among them, the operating system is a program that manages and controls the hardware and software resources of the sample terminal device, a handler that supports distributed tasks, and the execution of other software or programs.

In the terminal apparatus shown in fig. 1, the user interface 1003 is mainly used for data communication with each terminal; the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; and the processor 1001 may be configured to invoke the federal learning based indoor positioning procedure stored in the memory 1005 and perform the following operations:

constructing an indoor positioning training data set of each terminal device;

each terminal device carries out model training based on the indoor positioning training data set to obtain model parameter updating;

and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning.

Further, the processor 1001 may call the federal learning based indoor positioning program stored in the memory 1005, and further perform the following operations before performing the step of constructing the indoor positioning training data set of each terminal device:

the method comprises the steps of obtaining position information of positions of all terminal devices and position fingerprint information collected by all the terminal devices.

Further, the processor 1001 may invoke the federal learning based indoor positioning program stored in the memory 1005, and also perform the following operations:

sequentially extracting target indoor position information corresponding to each piece of position fingerprint information acquired by the terminal equipment from the indoor position information;

respectively taking the position fingerprint information, target indoor position information and wide area position information to which the target indoor position information belongs as indoor positioning training data;

and counting all the indoor positioning training data to construct an indoor positioning training data set of each terminal device.

Further, the processor 1001 may invoke the federal learning based indoor positioning program stored in the memory 1005, and also perform the following operations:

detecting a model updating request for controlling each terminal device to carry out model training;

and according to the detected model updating request, each terminal device carries out model training locally to obtain model parameter updating.

Further, the processor 1001 may invoke the federal learning based indoor positioning program stored in the memory 1005, and also perform the following operations:

detecting whether the model updating request comprises the global model parameters;

if so, each terminal device performs model training locally by using the global model parameters;

and if not, performing model training locally on each terminal device by using the indoor positioning training data set.

Further, the processor 1001 may invoke the federal learning based indoor positioning program stored in the memory 1005, and also perform the following operations:

carrying out preset fusion processing on the model parameter update to convert the model parameter update into a global model parameter;

and distributing the global model parameters to each terminal device so that each terminal device can perform indoor positioning based on model training locally.

Based on the structure, the invention provides various embodiments of the indoor positioning method based on the federal learning.

Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of an indoor positioning method based on federal learning according to the present invention.

While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than presented herein.

The federal learning-based indoor positioning method in the embodiment of the present invention is applied to the terminal device, and the terminal device in the embodiment of the present invention may be a terminal device such as a PC or a portable computer, which is not specifically limited herein.

The indoor positioning method based on federal learning in the embodiment comprises the following steps:

and S100, constructing an indoor positioning training data set of each terminal device.

And building an indoor positioning training data set which is exclusively owned by each terminal device at the local part of each terminal device.

Further, in another embodiment, before the step S100 of constructing the indoor positioning training data set owned by each terminal device, the indoor positioning method based on federal learning according to the present invention further includes:

and step A, acquiring the position information of the position of each terminal device and the position fingerprint information acquired by each terminal device.

Each terminal device independently collects position information and position fingerprint information of the position, wherein the position information comprises wide area position information and indoor position information, and the position fingerprint information can be collected based on Wi-Fi signals or collected based on other wireless signals such as Bluetooth.

In this embodiment, the indoor location information is: indoor location information (such as indoor location information in an office, a teaching building, a restaurant, a cafe, a mall, a supermarket, an airport, a train station, a subway car, and the like) that a current user terminal device (which may be a mobile terminal device of a user, e.g., a mobile phone) has arrived at; the wide area location information is: outdoor wide-range location information, for example, location information of an office building or location information of a shopping mall, where the wide-range location information is physical location information that can be obtained through a positioning system based on a GPS satellite, a beidou navigation satellite system, or a mobile communication base station, or through map information, and the representation form of the wide-range location information may be longitude and latitude coordinates in the navigation system, or "XX city-XX way-XX number" in the map information, or the like; the location fingerprint information is: Wi-Fi position fingerprint information or Bluetooth position fingerprint information measured by mobile terminal equipment of a current user corresponds to indoor position information one by one, and the Wi-Fi position fingerprint information or Bluetooth position fingerprint information can comprise one or more of information listed in RSS (Simple Syndication, a format for describing and synchronizing website contents), a multipath structure, MAC (media Access control) addresses of Wi-Fi APs (Access points, wireless Access nodes, session points or Access bridges), IP (Internet protocol) addresses of the APs and the like.

It should be noted that, in this embodiment, each terminal device may store the location information and the location fingerprint information of the location where the terminal device collects the information alone in the local area of each terminal device instead of uploading the location information and the location fingerprint information to any other server, so as to avoid disclosure of the privacy information of the user, for example, information such as the place and the location where the user has gone is not disclosed.

It should be noted that, in this embodiment, the indoor location information of the location where the terminal device is located may be coordinate information with wide-area location information as a coordinate center, or the indoor location information may also be coordinate information with wide-area location information as a reference point, so that the wide-area location information may help the mobile terminal of the user to calculate a wide-area coordinate location (for example, a global coordinate location with longitude and latitude coordinates as an expression form) of the indoor location information of the location where the mobile terminal is located, that is, the indoor location information of the location where the mobile terminal of the user is located may only include a local coordinate location (that is, coordinate information with the wide-area location information as a coordinate center, or coordinate information with the wide-area location information as a reference point) of the location where the mobile terminal is located.

Further, step S100, constructing an indoor positioning training data set of each terminal device, including:

and S101, extracting target indoor position information corresponding to each piece of position fingerprint information acquired by the terminal equipment from the indoor position information in sequence.

And sequentially extracting target indoor position information which is uniquely corresponding to each piece of position fingerprint information acquired by the current terminal equipment from a plurality of pieces of indoor position information recorded by the terminal equipment.

For example, from a plurality of pieces of indoor position information expressed in a spatial coordinate format recorded by the mobile terminal of the current user, a piece of Wi-Fi position fingerprint information expressed in an RSS + multipath structure recorded by the mobile terminal of the current user and a piece of target indoor position information uniquely corresponding to the Wi-Fi position fingerprint information are extracted, and each piece of target indoor position information uniquely corresponding to each piece of Wi-Fi position fingerprint information among the plurality of pieces of current indoor position information is sequentially extracted.

And step S102, respectively using the position fingerprint information, the target indoor position information and the wide area position information to which the target indoor position information belongs as an indoor positioning training data.

And marking a piece of position fingerprint information, target indoor position information corresponding to the current position fingerprint information and wide area position information to which the current target indoor position information belongs as an indoor positioning training data of the current terminal equipment.

For example, the Wi-Fi position fingerprint information expressed in the form of RSS + multipath structure, the target indoor position information expressed in the spatial coordinate format uniquely corresponding to the current Wi-Fi position fingerprint information, and the wide area position information identified by the coordinate center of the current target indoor position information are marked as an indoor positioning training data owned by the mobile terminal of the current user alone.

Step S103, counting all the indoor positioning training data to construct an indoor positioning training data set of each terminal device.

Each piece of indoor positioning training data which is owned by the terminal equipment and contains position fingerprint information, indoor position information and wide area position information is counted and stored in a local database of the current terminal equipment, and therefore an indoor positioning training data set which is owned by the current terminal equipment alone is constructed.

In this embodiment, the indoor positioning data training sets unique to the terminal devices are constructed on different terminal devices, so that after the terminal devices perform machine learning model training based on the respective indoor positioning data training sets, one terminal device can learn indoor position information of places (indoor positions recorded by other terminal devices) where the terminal device has not been moved, and thus, when one terminal device moves to a place where the terminal device has not been moved before, as long as any other terminal device associated with the current terminal device reaches and records the indoor position information of the position where the current terminal device is located, the current terminal device can obtain accurate indoor positioning information.

Further, in this embodiment, by adding wide area location information to the indoor location data of the terminal device, the effect of performing joint learning on a plurality of terminal devices is equivalent to the effect of collecting training data in a "crowdsourcing" manner and then performing machine learning model training, and compared with the "crowdsourcing" manner, this embodiment does not reveal privacy information of the user, for example, information such as places and locations that the user has gone.

And S200, performing model training on each terminal device based on the indoor positioning training data set to obtain model parameter updating.

After each terminal device constructs and completes the local indoor positioning training data set, the machine learning model training is carried out by combining the indoor positioning training data sets owned by each terminal device, so that the model parameters after model training are updated locally at each terminal device.

The model parameter update is a term referring to parameter update, and may be a transmitted model parameter, a transmitted gradient value, a loss value, or a weight of the neural network.

Further, referring to fig. 3, fig. 3 is a detailed flowchart of the step S200, where in the step S200, the combining each terminal device performs model training based on the indoor positioning training data set to obtain model parameter update includes:

step S201, a model update request for model training of each terminal device is detected.

Each terminal device detects and obtains a model updating request for controlling the terminal device to perform machine learning model training, wherein the model training request may be a starting instruction without carrying any data, or the model training request may also be a global model parameter generated by converting a model parameter update obtained by autonomously performing model training on each terminal device.

For example, in an application scenario as shown in fig. 4, after the terminal device 1 and the terminal devices 2 to n each complete the respective owned indoor positioning training data set, the server sends a model update request for controlling the terminal device 1 and the terminal devices 2 to n to perform machine learning model training through a point-to-point communication manner, or the server may also send the model update request to one or more terminal devices among the terminal device 1 and the terminal devices 2 to n simultaneously in a multicast, or broadcast manner by a coordinator, and each of the terminal devices 1 and the terminal devices 2 to n detects and acquires the model update request in real time.

Step S202, according to the detected model updating request, each terminal device carries out model training locally to obtain model parameter updating.

After obtaining a model updating request for controlling the terminal device to perform machine learning model training, each terminal device further detects whether the current model updating request includes a global model parameter generated by converting a model parameter update obtained by the terminal device independently performing model training, so that the machine learning model is locally performed on each terminal device according to a detection result.

It should be noted that, in this embodiment, each terminal device may also independently perform model training by using the own indoor positioning training data, without being associated with other terminal devices, and further, each terminal device may also perform training of a machine learning model independently on a confidential cloud server associated with the current terminal device or in association with other terminal devices according to a detection model update request.

Step S300, updating and converting the model parameters into global model parameters for indoor positioning of each terminal device.

After each terminal device carries out machine learning model training locally to obtain model parameter updating, the model parameter updating obtained by the terminal device independently carrying out the model training is fused to generate global model parameters, and the global model parameters generated by transformation are distributed to each terminal device through a model updating request for controlling each terminal device to carry out the machine learning model training, so that each terminal device can continuously carry out the model training to realize indoor positioning.

For example, in the application scenario shown in fig. 4, the server transmits a model update request for controlling each terminal device to start up model training to the terminal device 1 and the terminal devices 2 to n simultaneously using a multicast, or broadcast mode, and in the model update request transmitted to each terminal device 1 and the terminal devices 2 to n, the server carries model parameter updates obtained by performing model training on each terminal device 1 and the terminal devices 2 to n independently based on its own indoor positioning training data set, performs fusion processing on global model parameters generated by conversion, and after each terminal device 1 and the terminal devices 2 to n detects and acquires the model update request in real time, continues to perform a model of a machine learning model (for example, a LSTM model (long-short term memory model)) locally using the carried global model parameters The indoor positioning is realized by type training, that is, the server, each terminal device 1 and each terminal device 2 to each terminal device n repeat the steps of performing model training based on global model parameters to obtain model parameter updating and converting the model parameter updating fusion processing into new global model parameters until the machine learning model training of each terminal device 1 and each terminal device 2 to each terminal device n is completed, and each terminal device 1 and each terminal device 2 to each terminal device n can obtain indoor position information with accurate positions (namely, the indoor positioning is realized).

In the embodiment, an indoor positioning training data set owned by each terminal device is constructed; performing model training by combining each terminal device based on the indoor positioning training data set to obtain model parameter updating; and updating and converting the model parameters into global model parameters so as to enable each terminal device to carry out indoor positioning. The method comprises the steps of establishing an indoor positioning training data set belonging to each user on the basis of the local of each terminal device owned by the user, then performing model training of a machine learning model by combining each user terminal device on the basis of the indoor positioning data owned by the user and obtaining model parameter updating of each model, and finally performing centralized conversion processing on the model parameter updating obtained by performing the model training on each terminal device owned by the user so as to obtain global model parameters required by all user terminal devices for indoor positioning.

The method and the device have the advantages that the position fingerprint database does not need to be built in a centralized mode, model training is carried out by combining data owned by each terminal device, the situation that the position fingerprint database is built by spending a large amount of time and energy is avoided, model parameters obtained by model training of each terminal device in a centralized mode are updated and converted to obtain global model parameters, indoor positions which can be measured by the terminal devices are expanded to the greatest extent, machine learning model training is carried out only on the terminal devices locally or on a confidential cloud server associated with the terminal devices, indoor positioning training data owned by each terminal device are not disclosed, and accordingly user privacy information cannot be leaked.

Further, a second embodiment of the indoor positioning method based on federal learning of the present invention is proposed.

Based on the first embodiment of the indoor positioning method based on federal learning, in the second embodiment of the indoor positioning method based on federal learning of the present invention, in the step S202, the performing model training locally by combining each of the terminal devices according to the detected model update request includes:

step S2021, detecting whether the model update request includes the global model parameter.

After each terminal device detects in real time and obtains a model updating request for controlling the terminal device to perform machine learning model training, whether the current model updating request comprises a global model parameter generated by converting the model parameter updating obtained by the terminal device independently performing model training is further detected.

Step S2022, each terminal device performs model training locally using the global model parameters.

And if the terminal equipment detects that the current model updating request carries global model parameters generated by converting the model parameter updating obtained by autonomously performing model training on each terminal equipment, performing model training on the machine learning model by locally using the global model parameters generated by converting the global model parameters.

For example, in an application scenario as shown in fig. 4, the terminal device 1, the terminal device 2, and the terminal device n jointly train an LSTM model, which is a machine learning model for performing indoor positioning, each terminal device 1, the terminal device 2, and the terminal device n uses an own indoor positioning training data set to perform local training at the terminal device, and update model parameters obtained through training is sent to the server, the server performs fusion processing (for example, obtaining weighted average) on the model parameter updates sent from each terminal device 1, the terminal device 2, and the terminal device n, and sends global model parameters obtained after fusion processing to each terminal device through a model training request, so that each terminal device continues to train the LSTM model for performing indoor positioning locally according to the global model parameters.

It should be noted that, the terminal device and the server may send the model parameter update and the global model parameter by using an encryption method (for example, using a homomorphic encryption method, or password sharing method).

Step S2023, each terminal device performs model training locally using the indoor positioning training data set.

And if the terminal equipment detects that the current model updating request does not carry the global model parameters generated by converting the model parameter updating obtained by the autonomous model training of each terminal equipment, performing model training of the machine learning model by locally utilizing the own indoor positioning training data set of each terminal equipment.

For example, in an application scenario as shown in fig. 4, when the server does not carry the global model parameter obtained by performing fusion processing on the model parameter update in the model update request sent to each terminal device 1, terminal device 2 to terminal device n (at this time, the model update request is equivalent to a start instruction for controlling the terminal device to perform machine learning model training), each terminal device 1, terminal device 2 to terminal device n starts to locally train the LSTM model for performing indoor positioning by using the indoor positioning training data set constructed by each terminal device 1, terminal device 2 to terminal device n.

Further, the step S300 in the first embodiment includes:

step S301, carrying out preset fusion processing on the model parameter update, and converting the model parameter update into a global model parameter.

Step S302, distributing the global model parameter to each terminal device, so that each terminal device performs indoor positioning based on model training locally.

For example, in the application scenario shown in fig. 4, the terminal device 1, the terminal device 2 to the terminal device n jointly train an LSTM model, which is a machine learning model for indoor positioning, each terminal device 1, the terminal device 2 to the terminal device n trains locally at the terminal device using an own indoor positioning training data set, and updates and sends the trained model parameters to the server, the server performs fusion processing (for example, obtaining weighted average) on the model parameter updates sent by each terminal device 1, the terminal device 2 to the terminal device n, and sends the global model parameters obtained after the fusion processing to each terminal device through a model training request, so that each terminal device 1, the terminal device 2 to the terminal device n continuously trains the LSTM model for indoor positioning locally according to the global model parameters, and (3) until the machine learning model training of the terminal equipment 1 from the terminal equipment 2 to the terminal equipment n is completed, the terminal equipment 1 from the terminal equipment 2 to the terminal equipment n can obtain the indoor position information with accurate position.

In this embodiment, machine learning models for indoor positioning are trained locally at each terminal device by combining each terminal device, after each terminal device performs machine learning model training locally to obtain model parameter updates, model parameter updates obtained by performing model training autonomously at each terminal device are subjected to fusion processing to convert global model parameters, and the global model parameters generated by conversion are distributed to each terminal device through a model update request for controlling each terminal device to perform machine learning model training, so that each terminal device continues to perform model training to realize indoor positioning.

Realized, based on combine each terminal equipment and train indoor location machine learning model through horizontal federal study to through repeated model training in order to carry out indoor location, not having expanded the indoor position that terminal equipment can be measured, increased indoor location's location position, and still promoted indoor location's positioning accuracy and efficiency.

In addition, referring to fig. 5, an embodiment of the present invention further provides an indoor positioning device based on federal learning, and the indoor positioning device based on federal learning includes:

the building module is used for building an indoor positioning training data set of each terminal device;

the training module is used for carrying out model training on each terminal device based on the indoor positioning training data set so as to obtain model parameter updating;

and the positioning module is used for updating and converting the model parameters into global model parameters so as to carry out indoor positioning on each terminal device.

Preferably, the indoor positioning device based on federal learning of the present invention further comprises:

and the acquisition module is used for acquiring the position information of the position of each terminal device and the position fingerprint information acquired by each terminal device.

Preferably, the building block comprises:

the extraction unit is used for extracting target indoor position information corresponding to each piece of position fingerprint information acquired by the terminal equipment from the indoor position information in sequence;

the marking unit is used for respectively taking the position fingerprint information, the target indoor position information and the wide area position information to which the target indoor position information belongs as an indoor positioning training data;

and the construction unit is used for counting all the indoor positioning training data to construct an indoor positioning training data set of each terminal device.

Preferably, the training module comprises:

the detection unit is used for detecting a model updating request of each terminal device for model training;

and the training unit is used for carrying out model training locally by each terminal device according to the detected model updating request so as to obtain model parameter updating.

Preferably, the joint training unit comprises:

the detection subunit is configured to detect whether the model update request includes the global model parameter;

the first joint training subunit is used for carrying out model training on each terminal device locally by using the global model parameters;

and the second joint training subunit is used for performing model training on each terminal device locally by using the indoor positioning training data set.

Preferably, the positioning module comprises:

the conversion unit is used for carrying out preset fusion processing on the model parameter update and converting the model parameter update into a global model parameter;

and the distribution positioning unit is used for distributing the global model parameters to each terminal device so as to enable each terminal device to perform indoor positioning based on model training locally.

The steps of the federal learning-based indoor positioning method are implemented when each functional module of the federal learning-based indoor positioning device provided by this embodiment operates, and are not described herein again.

Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, which is applied to a computer and may be a non-volatile computer-readable storage medium, where a federal learning indoor positioning program is stored on the computer-readable storage medium, and when executed by a processor, the computer-readable storage medium implements the steps of the federal learning indoor positioning method.

The steps implemented when the federal learning-based indoor positioning program running on the processor is executed may refer to various embodiments of the federal learning-based indoor positioning method of the present invention, and are not described herein again.

It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.

The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.

Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.

The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于矩阵特征值扰动的TDOA直接定位方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!