CN115907082A - Regional pedestrian flow analysis method, device and equipment and storage medium - Google Patents

Regional pedestrian flow analysis method, device and equipment and storage medium Download PDF

Info

Publication number
CN115907082A
CN115907082A CN202211257136.1A CN202211257136A CN115907082A CN 115907082 A CN115907082 A CN 115907082A CN 202211257136 A CN202211257136 A CN 202211257136A CN 115907082 A CN115907082 A CN 115907082A
Authority
CN
China
Prior art keywords
training
model
mobile phone
prediction
phone signaling
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.)
Pending
Application number
CN202211257136.1A
Other languages
Chinese (zh)
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202211257136.1A priority Critical patent/CN115907082A/en
Publication of CN115907082A publication Critical patent/CN115907082A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an artificial intelligence technology, and discloses a regional pedestrian flow analysis method, which comprises the following steps: the method comprises the steps of performing data extraction on a mobile phone signaling information set based on time sequence to obtain a trajectory training set, performing model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model, performing verification training on the original flow analysis model by using a mobile phone signaling verification set to obtain a standard flow analysis model, obtaining a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area. The invention also relates to a blockchain technique, and the traffic prediction result can be stored in a node of the blockchain. The invention also provides a regional pedestrian flow analysis device, electronic equipment and a readable storage medium. The invention can improve the accuracy of the people flow prediction.

Description

Regional pedestrian flow analysis method, device and equipment and storage medium
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a regional pedestrian flow analysis method and device, electronic equipment and a readable storage medium.
Background
People flow prediction is an important application in the field of artificial intelligence, and can be used for making some advanced guidance for departments and enterprises so as to avoid disastrous cases caused by people flow exceeding local load. In the prior art, methods such as GPS position information data and AI camera installation at fixed point positions are used for flow prediction, however, the GPS position information data can be influenced by high buildings, high mountain areas, satellite signals and the like, so that the people flow prediction is not accurate enough; when the AI camera is used for pedestrian flow statistics, the AI camera is difficult to be comprehensively distributed in a target area, and the pedestrian flow prediction is not accurate enough.
Disclosure of Invention
The invention provides a regional pedestrian volume analysis method and device, electronic equipment and a readable storage medium, and mainly aims to improve the accuracy of pedestrian volume prediction.
In order to achieve the above object, the present invention provides a method for analyzing a regional pedestrian flow, comprising:
acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set;
performing model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model;
acquiring a mobile phone signaling verification set, and performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model;
and acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
Optionally, the extracting data from the mobile phone signaling information set based on the time sequence to obtain a trajectory training set includes:
sequencing the mobile phone signaling information of the users in the mobile phone signaling information set according to the time sequence to obtain a signaling sequence set;
and extracting base station ID sequences connected with the users in the signaling sequence set according to a preset time interval, and summarizing the base station ID sequences of all the users to be used as a track training set.
Optionally, the performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model includes:
taking each base station ID of the users in the trajectory training set as a participle to obtain a participle sequence;
performing word list vector conversion on all the word segmentation sequences to obtain sequence vectors;
and pre-training and fine-tuning the flow prediction model by using the sequence vector to obtain the original flow analysis model.
Optionally, the pre-training and the fine-tuning training of the flow prediction model by using the sequence vector to obtain the original flow analysis model includes:
performing semantic feature representation on the sequence vector by using the flow prediction model to obtain a semantic feature vector, and outputting the prediction probability of the semantic feature vector;
calculating a first loss value based on the prediction probability, adjusting model parameters of the flow prediction model when the first loss value does not meet a preset first condition, returning to the step of performing semantic feature representation on the sequence vector by using the flow prediction model, and stopping training until the first loss value meets the preset first condition to obtain a pre-training model;
constructing a label training set based on the prediction probability, and performing label prediction on the label training set by using the pre-training model to obtain a predicted label;
calculating a second loss value based on the predicted label, performing weighting processing on the first loss value of the second loss value machine to obtain a standard loss value, adjusting model parameters of the pre-training model when the standard loss value does not meet a preset second condition, returning to the step of performing label prediction on the label training set by using the pre-training model, and stopping training until the standard loss value meets the preset second condition to obtain an original flow analysis model.
Alternatively, the standard loss value is calculated by the following formula:
L=βL 1 +L 2
L 1 =∑ i logP(u i |u 1 ,u 2 ,…,u n ;θ)
L 2 =∑ x,y logP(y|x 1 ,x 2 ,…,x m )
wherein L represents a standard loss value, L 1 Represents a first loss value, L 2 Represents a second loss value, beta is a predetermined weight, u i Representing the ith participle in the participle sequence, n representing the number of participles in the participle sequence, u n Representing the nth participle in the participle sequence, x representing data in the label training set, y representing a predicted label, x m The mth data in the label training set, P represents the probability.
Optionally, the performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model includes:
selecting verification data of a preset time period from the mobile phone signaling verification set, and performing verification prediction on the verification data of the preset time period by using the standard traffic analysis model to obtain a prediction result;
and calculating the accuracy of the prediction result, if the accuracy is less than or equal to a preset accuracy threshold, adjusting model parameters of the standard flow analysis model, returning to the step of performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model, and if the accuracy is greater than the accuracy threshold, stopping training to obtain the standard flow analysis model.
Optionally, the accuracy is calculated by the following formula:
Accuracy=t/T
the Accuracy represents the Accuracy, T represents the prediction result, and T represents the data volume of the verification data removed in the preset time period in the mobile phone signaling verification set.
In order to solve the above problem, the present invention also provides a regional pedestrian flow analysis device, including:
the data extraction module is used for acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set;
the original training module is used for carrying out model training on the pre-constructed flow prediction model by utilizing the track training set to obtain an original flow analysis model;
the standard training module is used for acquiring a mobile phone signaling verification set and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model;
and the flow analysis module is used for acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and the processor executes the computer program stored in the memory to realize the regional pedestrian volume analysis method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the regional human traffic analysis method described above.
The invention extracts the data of the mobile phone signaling information set through the time sequence to obtain the trajectory training set, and model training is carried out by using a training method in the NLP field for reference, so that the generalization capability of model training is improved, and meanwhile, as the range of the mobile phone signaling information is wide and is not influenced by the geographic environment, the pedestrian flow prediction is carried out on the mobile phone signaling information through the trained model, so that the accuracy of regional pedestrian flow prediction is greatly improved. Therefore, the regional pedestrian volume analysis method, the regional pedestrian volume analysis device, the electronic equipment and the computer readable storage medium can improve the accuracy of pedestrian volume prediction.
Drawings
Fig. 1 is a schematic flow chart of a method for analyzing regional pedestrian flow according to an embodiment of the present invention;
fig. 2 is a functional block diagram of a regional pedestrian flow analysis apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the regional pedestrian volume analysis method according to an embodiment of the present 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.
The embodiment of the invention provides a regional pedestrian flow analysis method. The execution subject of the regional people flow analysis method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present invention. In other words, the regional human traffic analysis method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flow chart of a regional pedestrian flow analysis method according to an embodiment of the present invention. In this embodiment, the regional pedestrian volume analysis method includes the following steps S1 to S4:
s1, acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a trajectory training set.
In the embodiment of the invention, the mobile phone signaling information is data for interaction between the mobile phone and the base station, and the mobile phone needs to interact with the base station to acquire signals, so that the signaling data between the mobile phone and the base station is generated. The set of mobile phone signaling information may be a historical set of mobile phone signaling data of a target area, for example, mobile phone signaling data of a past month in a certain target area of city a, including connection interaction information of users with each base station in the target area of the past month.
In detail, the extracting data of the mobile phone signaling information set based on the time sequence to obtain a trajectory training set includes:
sequencing the mobile phone signaling information of the users in the mobile phone signaling information set according to the time sequence to obtain a signaling sequence set;
and extracting base station ID sequences connected with the users in the signaling sequence set according to a preset time interval, and summarizing the base station ID sequences of all the users to be used as a track training set.
In an alternative embodiment of the present invention, the base stations may be arranged according to the connection information of the user at each base station by taking one day as a sequence. The specific operation is as follows: sequencing the signaling data of each user in one day according to the time sequence to obtain the signaling sequence of each user, then sequentially extracting the base station ID connected in the signaling sequence of each user, if the current base station ID of the user is the same as the base station ID in the last signaling data and the time interval does not exceed five minutes, not extracting the base station ID in the current signaling data until different base station IDs appear, and obtaining a base station ID sequence with the interval of five minutes to represent the behavior track of the user in the day.
And S2, performing model training on the pre-constructed flow prediction model by using the track training set to obtain an original flow analysis model.
In the embodiment of the present invention, the Pre-constructed traffic prediction model may be a GPT (Generative Pre-Training) model, and the model adopts a Training mode of Pre-Training (Pre-Training) + Fine-tuning). The GPT model uses a 12-layer transform Decoder structure, changes the transform Decoder, and only one Mask Multi-Head attachment structure is reserved in the GPT, so that a language model skeleton is built, and the GPT model becomes a transform Block.
In detail, the performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model includes:
taking each base station ID of the users in the trajectory training set as a participle to obtain a participle sequence;
performing word list vector conversion on all the word segmentation sequences to obtain sequence vectors;
and pre-training and fine-tuning the flow prediction model by using the sequence vector to obtain the original flow analysis model.
In an optional embodiment of the present invention, by taking advantage of various Language models in an NLP (Natural Language Processing) task as reference, each base station ID of a user is regarded as a token (participle) in the NLP task, and thus a behavior trace sequence can be regarded as a Natural Language sentence, which is then input into a GPT Language model for training to learn a distance relationship between different base station IDs, so as to predict information of a subsequent base station that may be connected based on existing base station information.
In detail, the pre-training and the fine-tuning training of the flow prediction model by using the sequence vector to obtain the original flow analysis model includes:
performing semantic feature representation on the sequence vector by using the flow prediction model to obtain a semantic feature vector, and outputting the prediction probability of the semantic feature vector;
calculating a first loss value based on the prediction probability, adjusting model parameters of the flow prediction model when the first loss value does not meet a preset first condition, returning to the step of performing semantic feature representation on the sequence vector by using the flow prediction model, and stopping training until the first loss value meets the preset first condition to obtain a pre-training model;
constructing a label training set based on the prediction probability, and performing label prediction on the label training set by using the pre-training model to obtain a predicted label;
calculating a second loss value based on the predicted label, performing weighting processing on the first loss value of the second loss value machine to obtain a standard loss value, adjusting model parameters of the pre-training model when the standard loss value does not meet a preset second condition, returning to the step of performing label prediction on the label training set by using the pre-training model, and stopping training until the standard loss value meets the preset second condition to obtain an original flow analysis model.
In an alternative embodiment of the invention, the standard loss value is calculated by the following formula:
L=βL 1 +L 2
L 1 =∑ i logP(u i |u 1 ,u 2 ,…,u n ;θ)
L 2 =∑ x,y logP(y|x 1 ,x 2 ,…,x m )
wherein L represents a standard loss value, L 1 Represents a first loss value, L 2 Represents a second loss value, beta is a predetermined weight, u i Representing the ith word in the word segmentation sequence, n representing the number of the words in the word segmentation sequence, u n Representing the nth participle in the participle sequence, x representing data in the label training set, y representing a prediction label, x m The mth data in the label training set, P represents the probability.
In an optional embodiment of the invention, vector transformation is performed on the participles in the participle sequence through a preset word list to obtain a sequence vector { u1, u2, …, un }, semantic feature representation is performed through a 12-layer Transformer Block to obtain a feature vector, and maximum likelihood estimation is performed on the feature vector to obtain a first loss value; and marking the data in the trajectory training set (if the data is greater than a certain probability threshold value and marked as 1, otherwise, marking the data as 0) according to the prediction probability to construct a label training set, performing maximum likelihood estimation on the data in the label training set to obtain a second loss value, and calculating a standard loss value through weighting to improve the training speed and the generalization capability of the model.
By using the NLP domain language generation model for reference, the information of the connection base station of the user is converted into sequence information, so that the GPT model is used for generating the base station ID, and the result of the people flow prediction analysis in the region is obtained.
And S3, acquiring a mobile phone signaling verification set, and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model.
In the embodiment of the invention, the mobile phone signaling verification set can history a base station information set connected by a user, and selects base station information connected by the user in a certain short time period to predict connection information for a longer time, for example, selects base station information connected by the user in one hour from the history mobile phone signaling information, inputs the base station information into a model to perform related prediction of the connection base station information in one day, and if the prediction is wrong, inputs correction information into the model to train again, and if the prediction is correct, does not perform operation.
In detail, the performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model includes:
selecting verification data of a preset time period from the mobile phone signaling verification set, and performing verification prediction on the verification data of the preset time period by using the standard traffic analysis model to obtain a prediction result;
and calculating the accuracy of the prediction result, if the accuracy is less than or equal to a preset accuracy threshold, adjusting model parameters of the standard flow analysis model, returning to the step of performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model, and if the accuracy is greater than the accuracy threshold, stopping training to obtain the standard flow analysis model.
In an optional embodiment of the present invention, the accuracy is calculated by the following formula:
Accuracy=t/T
the Accuracy represents the Accuracy, T represents the prediction result, and T represents the data volume of the verification data removed in the preset time period in the mobile phone signaling verification set.
For example, the mobile phone signaling verification set is information of base stations connected by users from nine am to nine pm, the user inputs the information of the base stations connected by the users from nine am to ten am, the predicted pedestrian volume (the number of the connected base stations) from ten am to nine pm is T, and the actual pedestrian volume from ten am to nine pm is T, so that the prediction accuracy is calculated.
And S4, acquiring a real-time mobile phone signaling set of the target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
In the embodiment of the invention, for example, the information of the base stations connected within one hour of the users in the target area is input, the time cut information is input, and the number of the connected users under each base station information is counted to be used as the result of the prediction of the pedestrian volume in the target area.
The invention extracts the data of the mobile phone signaling information set through the time sequence to obtain the trajectory training set, and model training is carried out by using a training method in the NLP field for reference, so that the generalization capability of model training is improved, and meanwhile, as the range of the mobile phone signaling information is wide and is not influenced by the geographic environment, the pedestrian flow prediction is carried out on the mobile phone signaling information through the trained model, so that the accuracy of regional pedestrian flow prediction is greatly improved. Therefore, the regional pedestrian flow analysis method provided by the invention can improve the accuracy of pedestrian flow prediction.
Fig. 2 is a functional block diagram of a regional human flow analysis device according to an embodiment of the present invention.
The regional human flow analysis device 100 of the present invention may be installed in an electronic device. According to the realized functions, the regional human flow analysis device 100 can comprise a data extraction module 101, an original training module 102, a standard training module 103 and a flow analysis module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data extraction module 101 is configured to acquire a mobile phone signaling information set, and perform data extraction on the mobile phone signaling information set based on a time sequence to obtain a trajectory training set;
the original training module 102 is configured to perform model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model;
the standard training module 103 is configured to obtain a mobile phone signaling verification set, and perform verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model;
the traffic analysis module 104 is configured to obtain a real-time mobile phone signaling set of a target area, and perform traffic prediction analysis on the real-time mobile phone signaling set by using the standard traffic analysis model to obtain a traffic prediction result of the target area.
In detail, the specific implementation of each module of the regional human flow analysis device 100 is as follows:
step one, acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set.
In the embodiment of the invention, the mobile phone signaling information is data for interaction between the mobile phone and the base station, and the mobile phone needs to interact with the base station to acquire signals, so that the signaling data between the mobile phone and the base station is generated. The set of mobile phone signaling information may be a historical set of mobile phone signaling data of a target area, for example, mobile phone signaling data of a past month in a certain target area of city a, including connection interaction information of users and each base station in the target area of the past month.
In detail, the extracting data of the mobile phone signaling information set based on the time sequence to obtain a trajectory training set includes:
sequencing the mobile phone signaling information of the users in the mobile phone signaling information set according to the time sequence to obtain a signaling sequence set;
and extracting base station ID sequences connected with the users in the signaling sequence set according to a preset time interval, and summarizing the base station ID sequences of all the users to be used as a track training set.
In an alternative embodiment of the present invention, the base stations may be arranged according to the connection information of the user at each base station by taking one day as a sequence. The specific operation is as follows: sequencing the signaling data of each user in one day according to the time sequence to obtain the signaling sequence of each user, then sequentially extracting the base station ID connected in the signaling sequence of each user, if the current base station ID of the user is the same as the base station ID in the last signaling data and the time interval does not exceed five minutes, not extracting the base station ID in the current signaling data until different base station IDs appear, and obtaining a base station ID sequence with the interval of five minutes to represent the behavior track of the user in the day.
And secondly, performing model training on the pre-constructed flow prediction model by using the track training set to obtain an original flow analysis model.
In the embodiment of the present invention, the Pre-constructed traffic prediction model may be a GPT (Generative Pre-Training) model, and the model adopts a Training mode of Pre-Training plus Fine-tuning. The GPT model uses a 12-layer transform Decoder structure, changes the transform Decoder, and only one Mask Multi-Head attachment structure is reserved in the GPT, so that a language model skeleton is built, and the GPT model becomes a transform Block.
In detail, the performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model includes:
taking each base station ID of the users in the trajectory training set as a participle to obtain a participle sequence;
performing word list vector conversion on all the word segmentation sequences to obtain sequence vectors;
and pre-training and fine-tuning the flow prediction model by using the sequence vector to obtain the original flow analysis model.
In an optional embodiment of the present invention, by using the advantages of various Language models in an NLP (Natural Language Processing) task, each base station ID of a user is regarded as a token in the NLP task, and thus, a behavior trajectory sequence can be regarded as a Natural Language sentence, and then the Natural Language sentence is input into a GPT Language model for training to learn a near-far relationship between different base station IDs, so as to predict information of a base station that may be connected subsequently based on existing base station information.
In detail, the pre-training and the fine-tuning training of the flow prediction model by using the sequence vector to obtain the original flow analysis model includes:
performing semantic feature representation on the sequence vector by using the flow prediction model to obtain a semantic feature vector, and outputting the prediction probability of the semantic feature vector;
calculating a first loss value based on the prediction probability, adjusting model parameters of the flow prediction model when the first loss value does not meet a preset first condition, returning to the step of performing semantic feature representation on the sequence vector by using the flow prediction model, and stopping training until the first loss value meets the preset first condition to obtain a pre-training model;
constructing a label training set based on the prediction probability, and performing label prediction on the label training set by using the pre-training model to obtain a predicted label;
calculating a second loss value based on the predicted label, performing weighting processing on the first loss value of the second loss value machine to obtain a standard loss value, adjusting model parameters of the pre-training model when the standard loss value does not meet a preset second condition, returning to the step of performing label prediction on the label training set by using the pre-training model, and stopping training until the standard loss value meets the preset second condition to obtain an original flow analysis model.
In an alternative embodiment of the invention, the standard loss value is calculated by the following formula:
L=βL 1 +L 2
L 1 =∑ i logP(u i |u 1 ,u 2 ,…,u n ;θ)
L 2 =∑ x,y logP(y|x 1 ,x 2 ,…,x m )
wherein L represents a standard loss value, L 1 Represents a first loss value, L 2 Represents a second loss value, beta is a predetermined weight, u i Representing the ith participle in the participle sequence, n representing the number of participles in the participle sequence, u n Representing the nth participle in the participle sequence, x representing data in the label training set, y representing a prediction label, x m The mth data in the label training set, P represents the probability.
In an optional embodiment of the invention, the participles in the participle sequence are subjected to vector transformation through a preset word list to obtain a sequence vector { u1, u2, …, un }, semantic feature representation is carried out through 12 layers of Transformer blocks to obtain a feature vector, and maximum likelihood estimation is carried out on the feature vector to obtain a first loss value; and marking the data in the trajectory training set (if the data is greater than a certain probability threshold value and marked as 1, otherwise, marked as 0) according to the prediction probability to construct a label training set, performing maximum likelihood estimation on the data in the label training set to obtain a second loss value, and calculating a standard loss value through weighting to improve the training speed and the generalization capability of the model.
By using the NLP domain language generation model for reference, the information of the connection base station of the user is converted into sequence information, so that the GPT model is used for generating the base station ID, and the result of the people flow prediction analysis in the region is obtained.
And step three, acquiring a mobile phone signaling verification set, and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model.
In the embodiment of the invention, the mobile phone signaling verification set can history a base station information set connected by a user, and selects base station information connected by the user in a certain short time period to predict connection information for a longer time, for example, selects base station information connected by the user in one hour from the history mobile phone signaling information, inputs the base station information into a model to perform related prediction of the connection base station information in one day, and if the prediction is wrong, inputs correction information into the model to train again, and if the prediction is correct, does not perform operation.
In detail, the performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model includes:
selecting verification data of a preset time period from the mobile phone signaling verification set, and performing verification prediction on the verification data of the preset time period by using the standard traffic analysis model to obtain a prediction result;
and calculating the accuracy of the prediction result, if the accuracy is less than or equal to a preset accuracy threshold, adjusting the model parameters of the standard flow analysis model, returning to the step of performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model, and if the accuracy is greater than the accuracy threshold, stopping training to obtain the standard flow analysis model.
In an optional embodiment of the present invention, the accuracy is calculated by the following formula:
Accuracy=t/T
the Accuracy represents the Accuracy, T represents the prediction result, and T represents the data volume of the verification data removed in the preset time period in the mobile phone signaling verification set.
For example, the mobile phone signaling verification set is information of base stations connected by users from nine am to nine pm, the user inputs the information of the base stations connected by the users from nine am to ten am, the predicted pedestrian volume (the number of the connected base stations) from ten am to nine pm is T, and the actual pedestrian volume from ten am to nine pm is T, so that the prediction accuracy is calculated.
And step four, acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
In the embodiment of the invention, for example, the information of the base stations connected within one hour of the target area user is input, the time cut information is input, and the number of the user connections under each base station information is counted as the result of the people flow prediction of the target area.
The invention extracts the data of the mobile phone signaling information set through the time sequence to obtain the trajectory training set, and model training is carried out by using a training method in the NLP field for reference, so that the generalization capability of model training is improved, and meanwhile, as the range of the mobile phone signaling information is wide and is not influenced by the geographic environment, the pedestrian flow prediction is carried out on the mobile phone signaling information through the trained model, so that the accuracy of regional pedestrian flow prediction is greatly improved. Therefore, the regional pedestrian flow analysis device provided by the invention can improve the accuracy of pedestrian flow prediction.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the regional pedestrian volume analysis method according to an embodiment of the present invention.
The electronic device may include a processor 10, a memory 11, a communication interface 12, and a bus 13, and may further include a computer program, such as a regional people flow analysis program, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in the electronic device and various types of data, such as codes of a regional pedestrian volume analysis program, but also temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (e.g., a regional people flow analysis program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The communication interface 12 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are commonly used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
The bus 13 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 13 may be divided into an address bus, a data bus, a control bus, etc. The bus 13 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the electronic device may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The regional people flow analysis program stored in the memory 11 of the electronic device is a combination of a plurality of instructions, and when running in the processor 10, can implement:
acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set;
performing model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model;
acquiring a mobile phone signaling verification set, and performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model;
and acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, a recording medium, a usb-disk, a removable hard disk, a magnetic diskette, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set;
performing model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model;
acquiring a mobile phone signaling verification set, and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model;
and acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the invention can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it will be obvious that the term "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A regional people flow analysis method, the method comprising:
acquiring a mobile phone signaling information set, and performing data extraction on the mobile phone signaling information set based on a time sequence to obtain a trajectory training set;
performing model training on a pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model;
acquiring a mobile phone signaling verification set, and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model;
and acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
2. The method for analyzing the regional human flow rate according to claim 1, wherein the extracting data of the mobile phone signaling information set based on the time sequence to obtain a trajectory training set comprises:
sequencing the mobile phone signaling information of the users in the mobile phone signaling information set according to the time sequence to obtain a signaling sequence set;
and extracting base station ID sequences connected with the users in the signaling sequence set according to a preset time interval, and summarizing the base station ID sequences of all the users to be used as a track training set.
3. The method for analyzing regional human flow as claimed in claim 1, wherein the performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model comprises:
taking each base station ID of the users in the trajectory training set as a participle to obtain a participle sequence;
performing word list vector conversion on all the word segmentation sequences to obtain sequence vectors;
and pre-training and fine-tuning the flow prediction model by using the sequence vector to obtain the original flow analysis model.
4. The method for analyzing regional human traffic according to claim 3, wherein the pre-training and the fine-tuning training of the traffic prediction model by using the sequence vector to obtain the original traffic analysis model comprises:
performing semantic feature representation on the sequence vector by using the flow prediction model to obtain a semantic feature vector, and outputting the prediction probability of the semantic feature vector;
calculating a first loss value based on the prediction probability, adjusting model parameters of the flow prediction model when the first loss value does not meet a preset first condition, returning to the step of performing semantic feature representation on the sequence vector by using the flow prediction model, and stopping training until the first loss value meets the preset first condition to obtain a pre-training model;
constructing a label training set based on the prediction probability, and performing label prediction on the label training set by using the pre-training model to obtain a predicted label;
calculating a second loss value based on the predicted label, performing weighting processing on the first loss value of the second loss value machine to obtain a standard loss value, adjusting model parameters of the pre-training model when the standard loss value does not meet a preset second condition, returning to the step of performing label prediction on the label training set by using the pre-training model, and stopping training until the standard loss value meets the preset second condition to obtain an original flow analysis model.
5. The regional pedestrian flow analysis method of claim 4, wherein the standard loss value is calculated by the following formula:
L=βL 1 +L 2
L 1 =∑ i logP(u i |u 1 ,u 2 ,…,u n ;θ)
L 2 =∑ x,y logP(y|x 1 ,x 2 ,…,x m )
wherein L represents a standard loss value, L 1 Represents a first loss value, L 2 Represents a second loss value, beta is a predetermined weight, u i Representing the ith word in the word segmentation sequence, n representing the number of the words in the word segmentation sequence, u n Representing the nth participle in the participle sequence, x representing data in the label training set, y representing a prediction label, x m The mth data in the label training set, P represents the probability.
6. The method for analyzing regional human traffic according to claim 1, wherein the performing verification training on the original traffic analysis model by using the mobile phone signaling verification set to obtain a standard traffic analysis model comprises:
selecting verification data of a preset time period from the mobile phone signaling verification set, and performing verification prediction on the verification data of the preset time period by using the standard traffic analysis model to obtain a prediction result;
and calculating the accuracy of the prediction result, if the accuracy is less than or equal to a preset accuracy threshold, adjusting model parameters of the standard flow analysis model, returning to the step of performing model training on the pre-constructed flow prediction model by using the trajectory training set to obtain an original flow analysis model, and if the accuracy is greater than the accuracy threshold, stopping training to obtain the standard flow analysis model.
7. The regional pedestrian flow analysis method of claim 6, wherein the accuracy is calculated by the following formula:
Accuracy=t/T
the Accuracy represents the Accuracy, T represents the prediction result, and T represents the data volume of the verification data removed in the preset time period in the mobile phone signaling verification set.
8. An area pedestrian flow analysis apparatus, comprising:
the data extraction module is used for acquiring a mobile phone signaling information set, and extracting data of the mobile phone signaling information set based on a time sequence to obtain a track training set;
the original training module is used for carrying out model training on the pre-constructed flow prediction model by utilizing the track training set to obtain an original flow analysis model;
the standard training module is used for acquiring a mobile phone signaling verification set and performing verification training on the original flow analysis model by using the mobile phone signaling verification set to obtain a standard flow analysis model;
and the flow analysis module is used for acquiring a real-time mobile phone signaling set of a target area, and performing flow prediction analysis on the real-time mobile phone signaling set by using the standard flow analysis model to obtain a flow prediction result of the target area.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the regional people traffic analysis method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the regional human traffic analysis method according to any one of claims 1 to 7.
CN202211257136.1A 2022-10-14 2022-10-14 Regional pedestrian flow analysis method, device and equipment and storage medium Pending CN115907082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211257136.1A CN115907082A (en) 2022-10-14 2022-10-14 Regional pedestrian flow analysis method, device and equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211257136.1A CN115907082A (en) 2022-10-14 2022-10-14 Regional pedestrian flow analysis method, device and equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115907082A true CN115907082A (en) 2023-04-04

Family

ID=86486218

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211257136.1A Pending CN115907082A (en) 2022-10-14 2022-10-14 Regional pedestrian flow analysis method, device and equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115907082A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116312354A (en) * 2023-05-22 2023-06-23 深圳市领耀东方科技股份有限公司 Control method and control system of LED display screen system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116312354A (en) * 2023-05-22 2023-06-23 深圳市领耀东方科技股份有限公司 Control method and control system of LED display screen system

Similar Documents

Publication Publication Date Title
CN112446025A (en) Federal learning defense method and device, electronic equipment and storage medium
CN111626047A (en) Intelligent text error correction method and device, electronic equipment and readable storage medium
CN111814962A (en) Method and device for acquiring parameters of recognition model, electronic equipment and storage medium
CN111639153A (en) Query method and device based on legal knowledge graph, electronic equipment and medium
CN112446544A (en) Traffic flow prediction model training method and device, electronic equipment and storage medium
CN113704429A (en) Semi-supervised learning-based intention identification method, device, equipment and medium
CN113807973A (en) Text error correction method and device, electronic equipment and computer readable storage medium
CN112988963A (en) User intention prediction method, device, equipment and medium based on multi-process node
CN113821622A (en) Answer retrieval method and device based on artificial intelligence, electronic equipment and medium
CN114997263B (en) Method, device, equipment and storage medium for analyzing training rate based on machine learning
CN113064994A (en) Conference quality evaluation method, device, equipment and storage medium
CN115907082A (en) Regional pedestrian flow analysis method, device and equipment and storage medium
CN115471775A (en) Information verification method, device and equipment based on screen recording video and storage medium
CN114880449A (en) Reply generation method and device of intelligent question answering, electronic equipment and storage medium
CN115205225A (en) Training method, device and equipment of medical image recognition model and storage medium
CN114461777A (en) Intelligent question and answer method, device, equipment and storage medium
CN114913371A (en) Multitask learning model training method and device, electronic equipment and storage medium
CN113627160A (en) Text error correction method and device, electronic equipment and storage medium
CN114022841A (en) Personnel monitoring and identifying method and device, electronic equipment and readable storage medium
CN112651782B (en) Behavior prediction method, device, equipment and medium based on dot product attention scaling
CN112686232A (en) Teaching evaluation method and device based on micro expression recognition, electronic equipment and medium
CN112269875A (en) Text classification method and device, electronic equipment and storage medium
CN111950707A (en) Behavior prediction method, apparatus, device and medium based on behavior co-occurrence network
CN115346095A (en) Visual question answering method, device, equipment and storage medium
CN115146064A (en) Intention recognition model optimization method, device, equipment and storage medium

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