Method, device and electronic device for determining regional crowd activity

By acquiring people flow data from multiple data terminals and using federated learning model correction, the problem of time-consuming and low accuracy in determining regional crowd activity caused by a single data source is solved, and more accurate and reliable activity calculations are achieved.

CN113724116BActive Publication Date: 2024-10-22JINGDONG CITY BEIJING DIGITS TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011507173.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-18
Publication Date
2024-10-22
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

In the existing technology, the process of determining regional crowd activity is time-consuming, low in accuracy, and poor in reliability, mainly due to the reliance on a single data source and the failure to effectively handle the timing instability and position offset problems of the data source.

Method used

By obtaining the first flow of people data in the target area of ​​multiple data terminals at the target time, and collaborating with the second flow of people data from other data terminals, the target federated learning model is used to correct the first flow of people data, and the historical data are combined to calculate the crowd activity to avoid single data Errors caused by source instability and position deviation.

Benefits of technology

It improves the accuracy and reliability of regional crowd activity determination, ensures that the results are close to the real situation, and shortens the time-consuming determination process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113724116B_ABST
    Figure CN113724116B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and electronic device for determining regional crowd activity. The method includes: obtaining first crowd flow data of a target area at a target time on a data terminal; coordinating with second crowd flow data of the target area at the target time on other data terminals, and correcting the first crowd flow data through a target federated learning model to obtain target corrected crowd flow data of the target area at the target time; obtaining the crowd activity of the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within a first preset time period. Therefore, the present application improves the accuracy and reliability of the process of determining regional crowd activity by spatial processing and temporal processing, after correcting the original crowd flow data to obtain the first crowd flow data, and coordinating the second crowd flow data on other data terminals to further correct the first crowd flow data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and electronic device for determining the activity level of a population in a region. Background Art

[0002] With the continuous development of society and the rapid increase of urban population, the possibility of social abnormal events has increased dramatically, so the monitoring and early warning of abnormal events are of great significance. Among them, "monitoring based on regional population activity" is an important early warning method for social abnormal events.

[0003] In the prior art, when trying to determine the activity of a regional population, the number of regional visitors is usually obtained through a single data source in a certain area to be calculated, and then a constant is artificially determined based on empirical knowledge, and the ratio between the number of visitors and the constant is used as the activity of the regional population.

[0004] As can be seen from the above, in the existing technology, staff often rely on traditional calculations and experience knowledge to analyze a single data source. This will inevitably lead to problems such as long time consumption, low accuracy, and poor reliability in the process of determining the activity of regional populations. Therefore, how to shorten the time consumption of the process of determining the activity of regional populations and improve the accuracy and reliability of the process of determining the activity of regional populations has become one of the important research directions. Summary of the invention

[0005] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0006] To this end, the first purpose of the present application is to propose a method for determining the activity of a regional population, so as to solve the technical problems existing in the existing method for determining the activity of a regional population, such as long time consumption, low accuracy and poor reliability.

[0007] The second objective of the present invention is to provide a device for determining the activity level of a population in a region.

[0008] A third objective of the present invention is to provide an electronic device.

[0009] A fourth object of the present invention is to provide a computer-readable storage medium.

[0010] In order to achieve the above-mentioned objectives, an embodiment of the first aspect of the present application provides a method for determining regional crowd activity, the method comprising the following steps: obtaining first crowd flow data of a target area at a target time on a data terminal; coordinating with second crowd flow data of the target area at the target time on other data terminals, and correcting the first crowd flow data through a target federated learning model to obtain target corrected crowd flow data of the target area at the target time; obtaining the crowd activity of the target area at the target time according to the target corrected crowd flow data and the total corrected crowd flow data at the historical target time within a first preset time period.

[0011] In addition, the method for determining regional population activity according to the above embodiment of the present application may also have the following additional technical features:

[0012] According to one embodiment of the present application, obtaining the first crowd flow data of the target area at the target moment on the data terminal includes: obtaining the original crowd flow data of the target area at each historical target moment within a second preset time period; based on the original crowd flow data at each of the historical target moments, correcting the original crowd flow data at the target moment to obtain the first crowd flow data.

[0013] According to one embodiment of the present application, based on the original crowd flow data at each of the historical target moments, the original crowd flow data at the target moment is corrected to obtain the first crowd flow data, including: obtaining the time difference between the target moment and each of the historical target moments; based on the time difference corresponding to each of the historical target moments, obtaining the influence weight of each of the historical target moments on the target moment; based on the original crowd flow data at each of the historical target moments and the influence weight, the original crowd flow data at the target moment is corrected to obtain the first crowd flow data.

[0014] According to one embodiment of the present application, based on the weight data and the original crowd flow data of each of the historical target moments, the original crowd flow data of the target moment is corrected to obtain the first crowd flow data, including: based on the original crowd flow data and the weight data of each of the historical target moments, obtaining the crowd flow impact value of each of the historical target moments on the target moment; obtaining the mean of the crowd flow impact values ​​of each of the historical target moments; adding the mean to the original crowd flow data of the target moment to obtain the first crowd flow data.

[0015] According to an embodiment of the present application, each of the second people flow data is people flow data after the original people flow data of the other data end is corrected.

[0016] According to one embodiment of the present application, the training process of the target federated learning model includes: obtaining first sample crowd flow data of the sample area on the data end at the sample time; coordinating the second sample crowd flow data of the sample area on other data ends at the sample time to train the federated learning model to generate the target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected for the model, and the remaining sample crowd flow data is used as the feature data of the model, and the target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

[0017] According to one embodiment of the present application, the sample area on the collaborative other data terminals trains a federated learning model based on the second sample pedestrian flow data at the sample time to generate the target federated learning model, including: obtaining the intermediate results output by the local learning model on the data terminal each time of training, and sending the intermediate results output each time to the coordinator for aggregation; receiving the global intermediate results aggregated each time sent by the coordinator; adjusting the model parameters of the local learning model based on the global intermediate results and continuing the next round of training until the preset conditions are met and the training is stopped to obtain the target federated learning model.

[0018] The first aspect of the present application provides a method for determining regional crowd activity. The method can obtain first crowd flow data of a target area at a target time on a data terminal, and coordinate with second crowd flow data of a target area at the target time on other data terminals, and correct the first crowd flow data through a target federated learning model to obtain target corrected crowd flow data of the target area at the target time, and then obtain the crowd activity of the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within a first preset time period. The method no longer relies on a single data source, avoids the problem of inaccurate determination results caused by the instability of the data source in time series, ensures that the determination result of the regional crowd activity can be closer to the actual crowd activity situation, and improves the accuracy and reliability of the process of determining the regional crowd activity.

[0019] In order to achieve the above-mentioned objectives, the second aspect embodiment of the present application provides a device for determining regional crowd activity, including: a first acquisition module, used to obtain first crowd flow data of a target area at a target time on a data terminal; a second acquisition module, used to coordinate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through a target federated learning model to obtain the target corrected crowd flow data of the target area at the target time; a third acquisition module, used to obtain the crowd activity of the target area at the target time based on the target corrected crowd flow data and the total corrected crowd flow data at the historical target time within a first preset time period.

[0020] According to one embodiment of the present application, the first acquisition module includes: a first acquisition submodule, used to obtain the original crowd flow data of the target area at each historical target moment within a second preset time period; a second acquisition submodule, used to correct the original crowd flow data at the target moment based on the original crowd flow data at each historical target moment, so as to obtain the first crowd flow data.

[0021] According to one embodiment of the present application, the second acquisition submodule includes: a first acquisition unit, used to obtain the time difference between the target moment and each of the historical target moments; a second acquisition unit, used to obtain the influence weight of each of the historical target moments on the target moment based on the time difference corresponding to each of the historical target moments; and a third acquisition unit, used to correct the original crowd flow data of the target moment based on the original crowd flow data and the influence weight of each of the historical target moments, so as to obtain the first crowd flow data.

[0022] According to one embodiment of the present application, the third acquisition unit includes: a first acquisition sub-unit, used to obtain the crowd flow impact value of each historical target moment on the target moment based on the original crowd flow data and the weight data of each historical target moment; a second acquisition sub-unit, used to obtain the mean of the crowd flow impact value of each historical target moment; and a determination sub-unit, used to add the mean to the original crowd flow data of the target moment to obtain the first crowd flow data.

[0023] According to an embodiment of the present application, each of the second people flow data is people flow data after the original people flow data of the other data end is corrected.

[0024] According to one embodiment of the present application, a training module is also included, wherein the training module includes: a third acquisition submodule, used to obtain first sample crowd flow data of the sample area on the data end at the sample time; a generation submodule, used to cooperate with the second sample crowd flow data of the sample area on other data ends at the sample time to train the federated learning model to generate the target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected of the model, and the remaining sample crowd flow data is used as the feature data of the model, and the target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

[0025] According to one embodiment of the present application, the generation submodule includes: a summary unit, used to obtain the intermediate results output by each training of the local learning model on the data end, and send the intermediate results output each time to the coordinator for summary; a receiving unit, used to receive the global intermediate results summarized each time sent by the coordinator; an adjustment unit, used to adjust the model parameters of the local learning model based on the global intermediate results and continue the next round of training until the preset conditions are met to stop the training and obtain the target federated learning model.

[0026] The second aspect of the present application provides a device for determining regional crowd activity. The device can obtain first crowd flow data of a target area at a target time on a data terminal, and coordinate with second crowd flow data of a target area at a target time on other data terminals, and correct the first crowd flow data through a target federated learning model to obtain target corrected crowd flow data of the target area at the target time, and then obtain the crowd activity of the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within a first preset time period. The device no longer relies on a single data source, avoids the problem of inaccurate determination results caused by the instability of the data source in time series, ensures that the determination result of the regional crowd activity can be closer to the actual crowd activity situation, and improves the accuracy and reliability of the process of determining the regional crowd activity.

[0027] In order to achieve the above-mentioned purpose, the third aspect embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the method for determining the regional population activity as described in any one of the embodiments of the first aspect of the present application.

[0028] In order to achieve the above-mentioned purpose, the fourth aspect embodiment of the present application provides a computer-readable storage medium, which, when executed by a processor, implements the method for determining the regional population activity as described in any one of the first aspect embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flowchart of a method for determining regional population activity disclosed in one embodiment of the present application;

[0030] Figure 2 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0031] Figure 3 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0032] Figure 4 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0033] Figure 5 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0034] Figure 6 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0035] Figure 7 A flowchart of a method for determining regional population activity disclosed in another embodiment of the present application;

[0036] Figure 8 A flowchart of the whole process of determining the activity of a group of people in a region by multiple data terminals disclosed in one embodiment of the present application;

[0037] Fig. 9 A schematic diagram of the structure of a device for determining regional crowd activity disclosed in one embodiment of the present application;

[0038] Fig.10 A schematic diagram of the structure of a device for determining regional crowd activity disclosed in another embodiment of the present application;

[0039] Fig.11 A schematic diagram of the structure of a device for determining regional crowd activity disclosed in another embodiment of the present application;

[0040] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0042] It should be understood that the "and / or" involved in the embodiments of the present application describes the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0043] The following describes a method, device and electronic device for determining the activity level of a group of people in a region according to an embodiment of the present application with reference to the accompanying drawings.

[0044] Figure 1 A flowchart of a method for determining the activity level of a population in a region disclosed in an embodiment of the present application.

[0045] like Figure 1 As shown, the method for determining the activity level of a population in a region proposed in the embodiment of the present application specifically includes the following steps:

[0046] S101, obtaining first crowd flow data of a target area at a target time on a data terminal.

[0047] It should be noted that in the prior art, the basis for determining the activity of the regional crowd mainly includes: the activity of the crowd in the business district, the activity of the crowd in the community, the activity of the crowd in the scenic area, etc. In other words, the traditional determination method often relies on a single data source. As a result, it is bound to lead to a large error in the final determination result. Therefore, in the embodiment of the present application, multiple data sources can be used to obtain multiple people flow time series data of the target area at the target time on the data end, that is, the first people flow data.

[0048] The data end may be any data end that attempts to determine the activity level of a population in a region.

[0049] Among them, the first person flow data on the data end can come from multiple data sources, for example, it can come from multiple operators; for another example, it can come from multiple APPs (Applications); for another example, it can come from multiple operators and multiple APPs.

[0050] The target area may be any area where the activity of a crowd is attempted to be determined, for example, a target area with a longitude range of -20° west longitude to 160° east longitude and a latitude range of 30° south latitude to 50° south latitude.

[0051] The target time may be any time, such as 10 o'clock, 14 o'clock, etc.

[0052] The first passenger flow data may be timing data. Timing data refers to a data column recorded in chronological order for the same unified indicator. For example, it may be the number of devices in the target area obtained by the operator; or the number of reporting points in the target area obtained by the APP reporting point data.

[0053] S102. Cooperate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through the target federated learning model to obtain the target corrected crowd flow data of the target area at the target time.

[0054] It should be noted that in the prior art, when trying to determine the activity of a regional population, the instability of the data source in time series is usually not taken into account. However, the population covered by telecom operators and APP companies is only a part of the real population, and this part of the population will have a fluctuating distribution different from the real population due to company business activities and other reasons during certain periods of time. For example: During the shopping festival, more users will open a certain e-commerce APP. In this case, judging from the reporting data, the number of people in a certain area during the shopping festival has increased, but the actual situation is not the case. As a result, the final determination result of the activity of the target area population for a certain period of time will inevitably lead to a large error.

[0055] Therefore, in an embodiment of the present application, after obtaining the first crowd flow data, the first crowd flow data can be corrected through the target federated learning model based on time series processing and coordinated with the second crowd flow data of the target area at the target time on other data terminals. That is, by determining the unstable points of the crowd flow data and correcting them, more accurate target corrected crowd flow data of the target area at the target time can be obtained.

[0056] The target federated learning model is a pre-trained federated learning model. Federated learning is an emerging basic technology of artificial intelligence. Its design goal is to carry out efficient machine learning among multiple participants or multiple computing nodes under the premise of ensuring information security during big data exchange, protecting terminal data and personal data privacy, and ensuring legality and compliance.

[0057] S103: Obtain the crowd activity in the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within the first preset time period.

[0058] It should be noted that in the prior art, when trying to obtain the crowd activity of the target area at the target time, the number of visitors to the area is often obtained through a single data source, and then a constant is artificially determined based on empirical knowledge, and the ratio between the number of visitors and the constant is used as the crowd activity of this area. This will inevitably lead to inaccurate crowd activity results. Therefore, in this application, after obtaining the target corrected crowd flow data, the crowd activity of the target area at the target time can be obtained based on the more accurate target corrected crowd flow data and the corrected total crowd flow data at the historical target time within the first preset time period.

[0059] The first preset duration can be set according to actual conditions. For example, the first preset duration can be set to 1 year, 6 months, etc.

[0060] It should be noted that the present application does not limit the specific method for obtaining the crowd activity in the target area at the target moment based on the target corrected crowd flow data and the corrected total crowd flow data at the historical target moment within the first preset time period, and it can be selected according to actual conditions.

[0061] As a possible implementation method, the average value of the corrected crowd flow data at the historical target moment within the first preset time period can be obtained based on the total corrected crowd flow data at the historical target moment within the first preset time period. Furthermore, the ratio of the target corrected crowd flow data to the average value can be used as the crowd activity of the target area at the target moment through the following formula:

[0062]

[0063] Among them, X k is the target corrected crowd flow data, and X is the average value of the corrected total crowd flow data at the historical target time within the first preset time period of the target area.

[0064] It should be noted that the average value of the total corrected passenger flow data at the historical target moment within the first preset time period of the target area is consistent with the time granularity of the target corrected passenger flow data. For example, if the time granularity corresponding to the target corrected passenger flow data is day, then X = the total corrected passenger flow data at the historical target moment in the target area within 1 year / 365; if the time granularity corresponding to the target corrected passenger flow data is hour, then X = the total corrected passenger flow data at the historical target moment in the target area within 1 year / 365*24.

[0065] Therefore, the method for determining regional crowd activity proposed in the present application can obtain the first crowd flow data of the target area at the target time on the data end, and coordinate with the second crowd flow data of the target area at the target time on other data ends, and correct the first crowd flow data through the target federated learning model to obtain the target corrected crowd flow data of the target area at the target time, and then obtain the crowd activity of the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within the first preset time period. It no longer relies on a single data source, avoids the problem of inaccurate determination results caused by the instability of the data source in time series, ensures that the determination result of the regional crowd activity can be closer to the actual crowd activity situation, and improves the accuracy and reliability of the process of determining the regional crowd activity.

[0066] It should be noted that the prior art usually uses the signaling data of the mobile devices of the telecom operators or the reporting data of the mobile phone APPs of the major companies as the data source when determining the activity of the regional population, and does not consider the spatial inaccuracy caused by the longitude and latitude offset. However, since the current GPS (Global Positioning System) still has large errors in accuracy, whether it is signaling data or reporting data, when obtaining the longitude and latitude of the device, it is bound to be offset. In this way, when the target area is a small area such as a living business district, a business building, a residential community, etc., the aforementioned position offset will cause a large error in the estimation of the number of visitors to the area. For example, when the target area is a living business district, and there is a subway station built near the living business district, due to the longitude and latitude position offset, the flow of people in the subway will inevitably be included in the flow of people in the living business district. In this way, it is bound to cause a large error in the final calculated crowd activity result.

[0067] Therefore, in the present application, when trying to obtain the first crowd flow data of the target area on the data terminal at the target time, the original crowd flow data can be corrected through spatial processing to obtain the first crowd flow data.

[0068] As a possible implementation, Figure 2 As shown, based on the above embodiment, the specific process of obtaining the first crowd flow data of the target area at the target time on the data end includes the following steps:

[0069] S201: Obtain original crowd flow data of a target area at each historical target time within a second preset time period.

[0070] The second preset time period can be set according to actual conditions, for example, the second preset time period can be set to 1 month, 1 week, etc.

[0071] It should be noted that the specific method for obtaining the original human flow data of the target area at each historical target moment within the second preset time period is not limited in this application and can be selected according to actual conditions. Optionally, the original human flow data of the target area at each historical target moment can be counted at a preset frequency.

[0072] For example, if the time granularity is day, the second preset time is 1 month, and the target time is 10 o'clock, statistics of the original passenger flow data of the target area at 10 o'clock every day within 1 month can be performed at a preset frequency.

[0073] It should be noted that for any area with special social functions, the corresponding flow of people has a certain periodic regularity. This regularity mainly includes the following two situations: the regularity of each time period on weekdays and the regularity of each time period on weekends. At the same time, due to the spatial position offset, the following two deviations in crowd activity are bound to occur: part of the flow of people outside the target area is divided into the target area, and the longitude and latitude of some people in the target area are offset to outside the target area. In addition, since the position offset is random, the situations that cause deviations in crowd activity in the aforementioned space are all sporadic and do not have periodic regularity.

[0074] Therefore, in the embodiment of the present application, the original flow data of people in the target area at each historical target time within the second preset time period can be obtained according to the preset conditions. The preset conditions can be set according to the actual situation. For example, the preset conditions can be set as the result of the determination of whether it is a working day.

[0075] For example, based on the above example, for weekdays, the original passenger flow data of the target area at 10 o'clock every day within the 22 working days of a month can be counted at a preset frequency; for weekends, the original passenger flow data of the target area at 10 o'clock every day within the 8 weekends of a month can be counted at a preset frequency.

[0076] S202: Based on the original crowd flow data at each historical target moment, the original crowd flow data at the target moment is corrected to obtain first crowd flow data.

[0077] As a possible implementation, Figure 3 As shown, based on the above embodiment, the specific process of correcting the original crowd flow data at the target moment based on the original crowd flow data at each historical target moment in step S202 to obtain the first crowd flow data includes the following steps:

[0078] S301. Obtain the time difference between the target time and each historical target time.

[0079] In the embodiment of the present application, the time difference between the target moment and each historical target moment can be obtained according to a preset principle. The preset principle can be set according to actual conditions. For example, the preset principle can be set as a periodic decreasing principle.

[0080] S302: Based on the time difference corresponding to each historical target moment, obtain the influence weight of each historical target moment on the target moment.

[0081] In the embodiment of the present application, the influence weight of each historical target moment on the target moment can be obtained by the following formula based on the time difference corresponding to each historical target moment:

[0082]

[0083] Where: t represents the target time, t i represents each moment in the time series, i.e., the historical target moment, and c represents the attenuation factor. The attenuation can be adjusted according to the actual situation.

[0084] S303: Based on the original crowd flow data and the influence weight at each historical target moment, the original crowd flow data at the target moment is corrected to obtain first crowd flow data.

[0085] As a possible implementation, Figure 4 As shown, based on the above embodiment, in the above step S303, based on the original crowd flow data and the influence weight at each historical target moment, the original crowd flow data at the target moment is corrected to obtain the specific process of the first crowd flow data, including the following steps:

[0086] S401. Based on the original passenger flow data and weight data of each historical target moment, obtain the passenger flow impact value of each historical target moment on the target moment.

[0087] For example, the original passenger flow data of the target area at 10 o'clock every day in the past three days are a1, a2 and a3, and the corresponding weight data are k1 to k3. In this case, the influence values ​​of each historical target moment on the passenger flow at the target moment can be obtained as a 1* k1, a 2* k2 and a 3* k3.

[0088] S402: Obtain the average of the passenger flow impact values ​​at each historical target moment.

[0089] For example, based on the above example, for the historical target time 10 o'clock, the average of the crowd flow impact values ​​at each historical target time can be obtained = (a 1* k1+a 2* k2+a 3*k3) / 3.

[0090] S403: Add the mean value to the original crowd flow data at the target time to obtain first crowd flow data.

[0091] In the embodiment of the present application, after the mean value and the original crowd flow data at the target time are obtained, the mean value and the original crowd flow data at the target time can be added by the following formula to obtain the first crowd flow data.

[0092]

[0093] Among them, X represents the original crowd flow data at the target time, represents the corrected first person flow data, X i represents the flow of people at the target time, m represents the length of the time series, and W i Indicates weight data, which can be adjusted.

[0094] Therefore, the method for determining regional crowd activity proposed in the present application can obtain the original crowd flow data of the target area at each historical target moment within the second preset time period, and based on the original crowd flow data at each historical target moment, correct the original crowd flow data at the target moment to obtain the first crowd flow data. Through spatial processing, the problem of large errors in the obtained first crowd flow data results due to longitude and latitude position offset is avoided, thereby further improving the accuracy and reliability of the process of determining regional crowd activity.

[0095] It should be noted that after each data end corrects the original crowd flow data obtained by itself through spatial processing, the inaccuracy of crowd flow data statistics caused by spatial deviation can be avoided. Furthermore, each data end can cooperate with the second crowd flow data of the target area at the target time on other data ends, and perform time series processing through the target federated learning model to further correct the first crowd flow data to obtain the target corrected crowd flow data of the target area at the target time. Among them, each second crowd flow data is the crowd flow data corrected by the original crowd flow data of other data ends.

[0096] It should be noted that the federated learning model is pre-trained, such as Figure 5 As shown in the figure, the training process of the above federated learning model specifically includes the following steps:

[0097] S501: Obtain first sample crowd flow data of a sample area on a data terminal at a sample time.

[0098] The first sample crowd flow data of the sample area at the sample time can be collected in advance. The number of the first sample crowd flow data can be preset, for example, 100 first sample crowd flow data are obtained.

[0099] S502. Cooperate with the second sample crowd flow data of the sample area on other data terminals at the sample time to train the federated learning model to generate a target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected of the model, and the remaining sample crowd flow data is used as the feature data of the model. The target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

[0100] As a possible implementation, Figure 6 As shown, based on the above embodiment, the specific process of training the federated learning model in the above step S502 in collaboration with the second sample flow data of the sample area on other data terminals at the sample time to generate the target federated learning model includes the following steps:

[0101] S601. Obtain the intermediate results of each training output of the local learning model on the data end, and send the intermediate results of each output to the coordinator for aggregation.

[0102] In the embodiment of the present application, the intermediate results of each training output of the local learning model on each data terminal can be obtained, and the intermediate results of each output can be sent to the coordinator for aggregation. Correspondingly, the coordinator can receive the intermediate results reported by each data terminal and aggregate the global intermediate results.

[0103] S602: Receive the global intermediate results sent by the coordinator each time.

[0104] In the embodiment of the present application, after the coordinator summarizes the global intermediate results each time, the results may be sent to each data party respectively. Accordingly, the global intermediate results summarized each time sent by the coordinator may be received.

[0105] S603: Adjust the model parameters of the local learning model based on the global intermediate results and continue the next round of training until the preset conditions are met to stop training and obtain the target federated learning model.

[0106] For example, since the larger the daily average data volume, the smaller the corresponding crowd flow data statistics at the target time when the deviation occurs. Therefore, the coordinator can select the data with the largest daily average data volume among multiple data as the data to be corrected, that is, the label data, and select the data from the other data as the feature data.

[0107] Furthermore, the proximity, periodicity, and trend characteristics of multi-party data can be extracted as feature data. For example, when the time granularity is hours, in this case, proximity refers to the data of the 12 hours closest to the current moment; periodicity refers to the data of the past 7 days at the current moment; and trend refers to the data of the past 30 days at the current moment. It should be noted that the values ​​of the above features can be modified according to the model effect.

[0108] Furthermore, regression algorithms such as logistic regression in federated learning can be selected to establish a regression model relationship between feature data and the data to be corrected, and the feature data is input into the trained federated learning model at each target time, and the result is the corrected passenger flow data.

[0109] Therefore, the method for determining regional crowd activity proposed in the present application can train a federated learning model by coordinating the second sample crowd flow data of the sample area at the sample time on other data terminals to generate a target federated learning model, and then correct the first crowd flow data through the target federated learning model to obtain the target corrected crowd flow data of the target area at the target time. Through time series processing, the second crowd flow data on other data terminals are coordinated to further correct the first crowd flow data, thereby avoiding the problem of large errors in the obtained first crowd flow data results due to the instability of the data source in time series, and further improving the accuracy and reliability of the process of determining regional crowd activity.

[0110] Figure 7 A flowchart of a method for determining the activity level of a population in a region disclosed in another embodiment of the present application.

[0111] like Figure 7 As shown, the method for determining the activity level of a population in a region proposed in this embodiment includes the following steps:

[0112] S701: Acquire the first crowd flow data of the target area at the target time on the data terminal.

[0113] S702: Obtain original crowd flow data of the target area at each historical target time within a second preset time period.

[0114] S703: Obtain the time difference between the target time and each historical target time.

[0115] S704: Based on the time difference corresponding to each historical target moment, obtain the influence weight of each historical target moment on the target moment.

[0116] S705: Based on the original passenger flow data and weight data of each historical target moment, obtain the passenger flow impact value of each historical target moment on the target moment.

[0117] S706: Obtain the average of the passenger flow impact values ​​at each historical target moment.

[0118] S707 . Add the mean value to the original crowd flow data at the target time to obtain first crowd flow data.

[0119] S708. Cooperate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through the target federated learning model to obtain the target corrected crowd flow data of the target area at the target time.

[0120] S709: Obtain the crowd activity in the target area at the target time according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target time within the first preset time period.

[0121] It should be noted that the above steps S701 to S709 can refer to the above records and will not be repeated here.

[0122] Therefore, the method for determining regional crowd activity proposed in the present application can, through spatial processing and time series processing, after correcting the original crowd flow data to obtain the first crowd flow data, coordinate the second crowd flow data on other data terminals to further correct the first crowd flow data, thereby avoiding the problem of large errors in the obtained first crowd flow data results due to longitude and latitude position offsets and time series instability of the data source, thereby improving the accuracy and reliability of the process of determining regional crowd activity.

[0123] It should be noted that the method for determining regional population activity proposed in this application can coordinate multiple data terminals to form a regional population activity determination system.

[0124] For example, Figure 8 As shown, the regional crowd activity determination system includes n data terminals, namely data terminals 1 to n. Optionally, each data terminal can obtain regional crowd data, that is, original crowd flow data, and each data terminal performs space-based crowd data correction on the original crowd flow data obtained by itself to obtain the first crowd flow data on each data terminal.

[0125] Furthermore, each data terminal can coordinate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through the target federated learning model to obtain corrected regional crowd data, that is, the target corrected crowd flow data of the target area at the target time.

[0126] Furthermore, each data terminal can perform activity calculation based on the target corrected crowd flow data and the corrected total crowd flow data at the historical target moment within the first preset time period to obtain the regional crowd activity, that is, the crowd activity in the target area at the target moment.

[0127] Therefore, the method for determining regional crowd activity proposed in the present application can avoid the problem of large errors in the first crowd flow data results obtained due to the longitude and latitude position offset through spatial processing. Furthermore, the second crowd flow data on other data terminals can be coordinated through time series processing to further correct the first crowd flow data, thereby avoiding the problem of large errors in the first crowd flow data results obtained due to the instability of the data source in time series, and further improving the accuracy and reliability of the process of determining regional crowd activity.

[0128] It should be noted that the method for determining regional population activity proposed in this application can be applied to a variety of application scenarios.

[0129] For the application scenario of abnormal event monitoring and early warning, if the target area is Community A, the target time is 10 o'clock, and the second preset time is 1 month, in this case, the original pedestrian flow data of Community A at 10 o'clock on each working day in the past month can be obtained, and then the time difference between 10 o'clock and 10 o'clock on each working day can be obtained, and based on the time difference corresponding to 10 o'clock on each working day, the impact weight of 10 o'clock on 10 o'clock on each working day can be obtained, and then based on the original pedestrian flow data and weight data at 10 o'clock on each working day, the pedestrian flow impact value of 10 o'clock on 10 o'clock on each working day and the average of the pedestrian flow impact values ​​at 10 o'clock on each working day are obtained, and the average is added to the original pedestrian flow data at 10 o'clock to obtain the first pedestrian flow data.

[0130] Furthermore, the second crowd flow data of Community A at 10 o'clock on other data terminals can be coordinated to correct the first crowd flow data through the target federated learning model to obtain the target corrected crowd flow data of Community A at 10 o'clock.

[0131] Therefore, the method for determining the regional crowd activity proposed in the present application can more accurately obtain the crowd activity results of Community A at 10 o'clock through spatial processing and time series processing, so that after identifying that the obtained crowd activity results are not within the preset crowd activity threshold range, it is possible to more timely and accurately realize abnormal event monitoring and early warning, thereby ensuring the safety of Community A.

[0132] Based on the same application concept, an embodiment of the present application also provides a device corresponding to a method for determining the activity level of a population in a region.

[0133] Fig. 9 A schematic diagram of the structure of a device for determining regional population activity provided in an embodiment of the present application.

[0134] like Fig. 9 As shown, the device 1000 for determining the activity of a group of people in a region includes: a first acquisition module 110, a second acquisition module 120 and a third acquisition module 130. Among them,

[0135] A first acquisition module, used to acquire first crowd flow data of a target area at a target time on a data terminal;

[0136] A second acquisition module is used to coordinate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through a target federated learning model to obtain the target corrected crowd flow data of the target area at the target time;

[0137] The third acquisition module is used to obtain the crowd activity of the target area at the target moment according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target moment within a first preset time period.

[0138] According to one embodiment of the present application, Fig.10 As shown, the first acquisition module 110 further includes:

[0139] The first acquisition submodule 111 is used to acquire the original crowd flow data of the target area at each historical target time within a second preset time period;

[0140] The second acquisition submodule 112 is used to modify the original crowd flow data at the target moment based on the original crowd flow data at each of the historical target moments to acquire the first crowd flow data.

[0141] The second acquisition submodule 112 includes:

[0142] A first acquisition unit 1121 is used to acquire a time difference between the target moment and each of the historical target moments;

[0143] A second acquisition unit 1122, configured to acquire an influence weight of each of the historical target moments on the target moment based on the time difference corresponding to each of the historical target moments;

[0144] The third acquisition unit 1123 is configured to modify the original crowd flow data at the target moment based on the original crowd flow data and the influence weight at each of the historical target moments to acquire the first crowd flow data.

[0145] The third acquisition unit 1123 includes:

[0146] A first acquisition subunit 11231 is configured to acquire a crowd flow influence value of each of the historical target moments on the target moment based on the original crowd flow data and the weight data of each of the historical target moments;

[0147] The second acquisition subunit 11232 is used to obtain the average of the crowd flow impact values ​​at each of the historical target moments;

[0148] The determination subunit 11233 is configured to add the mean value to the original crowd flow data at the target moment to obtain the first crowd flow data.

[0149] According to an embodiment of the present application, each of the second people flow data is people flow data after the original people flow data of the other data end is corrected.

[0150] According to one embodiment of the present application, Fig.11 As shown, the regional crowd activity determination device 1000 also includes a training module 140. The training module 140 includes:

[0151] The third acquisition submodule 141 is used to acquire first sample human flow data of the sample area on the data end at the sample time;

[0152] The generation submodule 142 is used to cooperate with the second sample crowd flow data of the sample area at the sample time on other data terminals to train the federated learning model to generate the target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected for the model, and the remaining sample crowd flow data is used as the feature data of the model, and the target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

[0153] The generating submodule 142 includes:

[0154] A summarizing unit 1421 is used to obtain the intermediate results of each training output of the local learning model on the data end, and send the intermediate results of each output to the coordinator for summarization;

[0155] A receiving unit 1422 is configured to receive the global intermediate result summarized each time sent by the coordinator;

[0156] The adjustment unit 1423 is used to adjust the model parameters of the local learning model based on the global intermediate result and continue the next round of training until the preset conditions are met to stop the training and obtain the target federated learning model.

[0157] Therefore, the regional crowd activity determination device proposed in the present application can, through spatial processing and time series processing, correct the original crowd flow data to obtain the first crowd flow data, and coordinate the second crowd flow data on other data terminals to further correct the first crowd flow data, thereby avoiding the problem of large errors in the obtained first crowd flow data results due to longitude and latitude position offsets and time series instability of the data source, thereby improving the accuracy and reliability of the process of determining the regional crowd activity.

[0158] Based on the same application concept, an embodiment of the present application also provides an electronic device.

[0159] Fig.12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.12 As shown, the electronic device 2000 includes a memory 210, a processor 220, and a computer program stored in the memory 210 and executable on the processor 220. When the processor executes the program, the aforementioned method for determining the activity level of a population in a region is implemented.

[0160] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0161] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0162] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0163] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.

[0164] It should be noted that in the claims, any reference signs placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0165] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0166] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for determining the activity of a population in a region, characterized in that: include: Acquire first crowd flow data of a target area at a target time on a data terminal, where the first crowd flow data is time series data from multiple data sources; In coordination with the second crowd flow data of the target area at the target time on other data terminals, the first crowd flow data is corrected through a target federated learning model to obtain target corrected crowd flow data of the target area at the target time; The crowd activity of the target area at the target moment is obtained according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target moment within the first preset time period.

2. The method for determining regional population activity according to claim 1, characterized in that: The obtaining of the first crowd flow data of the target area at the target time on the data terminal includes: Acquire original crowd flow data of the target area at each historical target time within a second preset time period; Based on the original crowd flow data at each of the historical target moments, the original crowd flow data at the target moment is corrected to obtain the first crowd flow data.

3. The method for determining regional population activity according to claim 2, characterized in that: The step of correcting the original crowd flow data at the target moment based on the original crowd flow data at each of the historical target moments to obtain the first crowd flow data includes: Obtaining the time difference between the target moment and each of the historical target moments; Based on the time difference corresponding to each of the historical target moments, obtaining an influence weight of each of the historical target moments on the target moment; Based on the original crowd flow data and the influence weight at each of the historical target moments, the original crowd flow data at the target moment is corrected to obtain the first crowd flow data.

4. The method for determining regional population activity according to claim 3, characterized in that: The step of correcting the original crowd flow data at the target moment based on the weight data and the original crowd flow data at each of the historical target moments to obtain the first crowd flow data includes: Based on the original crowd flow data and the weight data of each of the historical target moments, obtaining the crowd flow impact value of each of the historical target moments on the target moment; Obtaining the average of the crowd flow impact values ​​at each of the historical target moments; The mean value is added to the original crowd flow data at the target time to obtain the first crowd flow data.

5. The method for determining regional population activity according to claim 2, characterized in that: Each of the second people flow data is people flow data corrected from the original people flow data of the other data terminals.

6. The method for determining regional population activity according to any one of claims 1 to 5, characterized in that: The training process of the target federated learning model includes: Acquire first sample crowd flow data of the sample area on the data end at a sample time; Cooperate with the second sample crowd flow data of the sample area at the sample time on other data terminals to train a federated learning model to generate the target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected of the model, and the remaining sample crowd flow data is used as the feature data of the model, and the target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

7. The method for determining regional population activity according to claim 6, characterized in that: The step of training the federated learning model with the second sample flow data of people in the sample area at the sample time in collaboration with other data terminals to generate the target federated learning model includes: Obtaining the intermediate results of each training output of the local learning model on the data end, and sending the intermediate results of each output to the coordinator for aggregation; Receive the global intermediate results sent by the coordinator each time; Based on the global intermediate result, the model parameters of the local learning model are adjusted and the next round of training is continued until the preset conditions are met and the training is stopped to obtain the target federated learning model.

8. A device for determining the activity of a group of people in a region, characterized in that: include: A first acquisition module, used to acquire first crowd flow data of a target area at a target time on a data terminal, wherein the first crowd flow data is time series data from multiple data sources; A second acquisition module is used to coordinate with the second crowd flow data of the target area at the target time on other data terminals, and correct the first crowd flow data through a target federated learning model to obtain the target corrected crowd flow data of the target area at the target time; The third acquisition module is used to obtain the crowd activity of the target area at the target moment according to the target corrected crowd flow data and the corrected total crowd flow data at the historical target moment within a first preset time period.

9. The device for determining regional population activity according to claim 8, characterized in that: The first acquisition module includes: The first acquisition submodule is used to acquire the original crowd flow data of the target area at each historical target time within a second preset time period; The second acquisition submodule is used to modify the original crowd flow data at the target moment based on the original crowd flow data at each of the historical target moments to obtain the first crowd flow data.

10. The device for determining regional crowd activity according to claim 9, characterized in that: The second acquisition submodule includes: A first acquisition unit, used to acquire a time difference between the target moment and each of the historical target moments; A second acquisition unit, configured to acquire an influence weight of each of the historical target moments on the target moment based on the time difference corresponding to each of the historical target moments; The third acquisition unit is used to modify the original crowd flow data at the target moment based on the original crowd flow data and the influence weight at each of the historical target moments to acquire the first crowd flow data.

11. The device for determining regional crowd activity according to claim 10, characterized in that: The third acquisition unit includes: A first acquisition subunit is used to acquire the crowd flow influence value of each historical target moment on the target moment based on the original crowd flow data and the weight data of each historical target moment; A second acquisition subunit is used to acquire the average of the crowd flow impact values ​​at each of the historical target moments; A determination subunit is configured to add the mean value to the original crowd flow data at the target moment to obtain the first crowd flow data.

12. The device for determining regional crowd activity according to claim 9, characterized in that: Each of the second people flow data is people flow data corrected from the original people flow data of the other data terminals.

13. The device for determining regional crowd activity according to any one of claims 8 to 12, characterized in that: Also includes a training module, wherein the training module includes: A third acquisition submodule is used to acquire first sample human flow data of the sample area on the data end at a sample time; A generation submodule is used to cooperate with the second sample crowd flow data of the sample area at the sample time on other data terminals to train a federated learning model to generate the target federated learning model, wherein the sample crowd flow data with the largest crowd flow data between the first sample crowd flow data and the second sample crowd flow data is selected as the data to be corrected for the model, and the remaining sample crowd flow data is used as the feature data of the model, and the target federated learning model is used to establish a regression relationship between the feature data and the data to be corrected.

14. The device for determining regional crowd activity according to claim 13, characterized in that: The generating submodule comprises: A summarizing unit, used to obtain the intermediate results of each training output of the local learning model on the data end, and send the intermediate results of each output to the coordinator for summarization; A receiving unit, configured to receive the global intermediate result summarized each time sent by the coordinator; An adjustment unit is used to adjust the model parameters of the local learning model based on the global intermediate result and continue the next round of training until the preset conditions are met to stop the training and obtain the target federated learning model.

15. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for determining regional population activity as described in any one of claims 1 to 7 is implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for determining the activity level of a population in a region as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Congestion risk monitoring method and congestion risk monitoring device

    CN105844572A

  • Visitors flow rate alarm method and device

    CN108665096A

  • Data processing method and device and computer readable storage medium

    CN110210626A

  • Passenger flow data determination method and device, computer equipment and storage medium

    CN111091196A

  • Personnel condition prediction method and device and equipment and storage medium

    CN111126697A