Training method and device of resident prediction model, prediction method and device, equipment and medium
By setting different Gaussian components for the resident prediction model and updating the model parameters, the problem of the inability to accurately identify the diversified resident behavior patterns in the prior art is solved, and the diversified resident type prediction of vehicle trajectory point data is realized, which improves the accuracy and flexibility of prediction.
Patent Information
- Application Number
- CN202411977074.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
AI Technical Summary
In the prior art, resident prediction is performed based on distance thresholds or time windows, and it is impossible to accurately identify diverse resident behavior patterns.
By setting different Gaussian components for the resident prediction model, the model parameters are updated according to the attribution probability between the vehicle trajectory point training data and the Gaussian component, and the diversified resident type prediction of the vehicle trajectory point data is realized.
Accurate prediction of diversified residency behavior patterns is achieved, and the accuracy and flexibility of residency prediction are improved.
Smart Images

Figure CN119807901A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a training method, a prediction method, a device, a equipment and a medium for a resident prediction model. Background Art
[0002] Stay prediction refers to predicting whether a vehicle will stay in a specific area or stop.
[0003] In the related art, only simple residence behavior judgment can be performed based on distance thresholds or time windows, and various residence behavior patterns cannot be accurately identified. Summary of the invention
[0004] To this end, the present disclosure provides a training method, prediction method, device, equipment and medium for a residence prediction model to solve the problem in the prior art that simple residence prediction based on distance thresholds or time windows cannot accurately predict diverse residence behaviors.
[0005] In order to achieve the above-mentioned object, the present disclosure provides a first aspect of a training method for a resident prediction model, comprising:
[0006] Inputting vehicle trajectory point training data into a residence prediction model, and calculating the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type;
[0007] According to the attribution probability, updating the model parameters corresponding to each Gaussian component in the resident prediction model;
[0008] Determine the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability;
[0009] According to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, it is judged whether the training result of the residence prediction model meets the preset convergence condition, and the residence prediction model whose training result meets the preset convergence condition is used as the trained residence prediction model.
[0010] In an optional implementation, determining the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability includes:
[0011] Determining a target Gaussian component corresponding to the vehicle trajectory point training data from a plurality of Gaussian components in the resident prediction model according to the attribution probability and a preset probability threshold;
[0012] Determining a parameter threshold condition of a model parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component;
[0013] In the case where the model parameter corresponding to the target Gaussian component satisfies the parameter threshold condition, the preset residence type corresponding to the target Gaussian component is used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0014] In an optional implementation, the vehicle trajectory point training data includes position data corresponding to the vehicle and time data corresponding to the vehicle, then the model parameters corresponding to the target Gaussian component include position variance parameters corresponding to the position data and time variance parameters corresponding to the time data, and the parameter threshold conditions of the model parameters corresponding to the target Gaussian component are determined according to the preset residence type corresponding to the target Gaussian component, including:
[0015] Determine a position parameter threshold of a position variance parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component, and determine a position parameter threshold condition of the position variance parameter corresponding to the target Gaussian component according to the position parameter threshold;
[0016] According to the preset dwell type corresponding to the target Gaussian component, a time parameter threshold of the time variance parameter corresponding to the target Gaussian component is determined, and according to the time parameter threshold, a time parameter threshold condition of the time variance parameter corresponding to the target Gaussian component is determined.
[0017] In an optional implementation, the vehicle trajectory point training data includes a plurality of vehicle trajectory point data arranged in chronological order, and the vehicle trajectory point training data is constructed in the following manner:
[0018] Sorting multiple historical vehicle signaling data in chronological order, and extracting geographic location information, base station information, time information, and signaling feature information from each of the sorted historical vehicle signaling data;
[0019] For each historical vehicle signaling data, based on the geographic location information and the base station information, generate the location data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the time information, generate the time data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the signaling feature information, generate the signaling feature data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data.
[0020] In an optional implementation, before inputting the vehicle trajectory point training data into the residence prediction model, the method further includes:
[0021] According to the time data included in the vehicle trajectory point data, selecting a plurality of first vehicle trajectory point data corresponding to a first preset time range from the plurality of vehicle trajectory point data;
[0022] Determine whether the position data included in the plurality of first vehicle trajectory point data are ping-pong switched between the plurality of base station areas, and if so, delete the vehicle trajectory point data having repeated position data in the plurality of first vehicle trajectory point data.
[0023] In an optional implementation, before inputting the vehicle trajectory point training data into the residence prediction model, the method further includes:
[0024] According to the time data included in the vehicle trajectory point data, selecting a plurality of second vehicle trajectory point data corresponding to a second preset time range from the plurality of vehicle trajectory point data;
[0025] The position interval between the position data included in the adjacent vehicle trajectory point data in the plurality of second vehicle trajectory point data is calculated, and when the position interval is greater than a preset position distance, the adjacent vehicle trajectory point data is deleted.
[0026] A second aspect of the present disclosure provides a residence prediction method, comprising:
[0027] Extracting target vehicle signaling data within a target time window to generate target vehicle trajectory point data corresponding to the target vehicle signaling data;
[0028] Predicting the target vehicle trajectory point data according to the trained residence prediction model to obtain the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model, wherein the trained residence prediction model is trained according to the training method of the residence prediction model described above;
[0029] The residence type corresponding to the target vehicle trajectory point data is predicted based on the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model and the preset residence type corresponding to each Gaussian component.
[0030] A third aspect of the present disclosure provides a training device for a resident prediction model, comprising:
[0031] A calculation module, used for inputting the vehicle trajectory point training data into the residence prediction model, and calculating the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type;
[0032] An updating module, used for updating the model parameters corresponding to each Gaussian component in the resident prediction model according to the attribution probability;
[0033] A classification module, for determining the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability;
[0034] A judgment module is used to judge whether the training result of the residence prediction model meets the preset convergence condition according to the predicted residence type corresponding to the vehicle trajectory point training data, and use the residence prediction model whose training result meets the preset convergence condition as the trained residence prediction model.
[0035] A fourth aspect of the present disclosure provides an electronic device, including:
[0036] one or more processors;
[0037] A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the resident prediction model or the resident prediction method;
[0038] One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
[0039] A fifth aspect of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the training method of the above-mentioned residence prediction model or the residence prediction method.
[0040] The present disclosure has the following advantages:
[0041] In the embodiments of the present disclosure, different Gaussian components can be pre-set for the residence prediction model according to different preset residence types, so that when training the residence prediction model, the model parameters corresponding to each Gaussian component in the residence prediction model can be updated according to the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, so that the residence type prediction of the vehicle trajectory point training data can be achieved according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability, and finally the training effect of the residence prediction model is judged according to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, so that each Gaussian component contained in the trained residence prediction model can accurately characterize the corresponding preset residence type, thereby realizing the diversified residence type division of the vehicle trajectory point training data according to different Gaussian components. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings are used to provide further understanding of the present disclosure and constitute a part of the specification. They are used to explain the present disclosure together with the following detailed description, but do not constitute a limitation of the present disclosure.
[0043] Figure 1 A flowchart of a method for training a resident prediction model provided in an embodiment of the present disclosure;
[0044] Figure 2 A schematic diagram of a training method for a resident prediction model provided in an embodiment of the present disclosure;
[0045] Figure 3 A flowchart of a residence prediction method provided by an embodiment of the present disclosure;
[0046] Figure 4 A block diagram of a training device for a resident prediction model provided in an embodiment of the present disclosure;
[0047] Figure 5 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0048] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0049] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0050] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0051] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0052] The embodiments described in the present disclosure may be described with reference to plan views and / or cross-sectional views by way of ideal schematic diagrams of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0053] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.
[0054] In the prior art, only simple residence behavior prediction can be performed based on time windows, distance thresholds or normal distribution. The above methods not only rely on the accuracy of prediction data and prediction parameter selection, but also when the residence behavior is more complex, it is difficult to accurately predict diverse residence behavior patterns.
[0055] In view of this, the embodiments of the present disclosure provide a training method, prediction method, device, equipment and medium for a residence prediction model. By pre-setting different Gaussian components for the residence prediction model according to different preset residence types, when training the residence prediction model, the model parameters corresponding to each Gaussian component in the residence prediction model can be updated according to the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, so as to predict the residence type of the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability, and finally judge the training effect of the residence prediction model according to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, so that each Gaussian component contained in the trained residence prediction model can accurately characterize the corresponding preset residence type, thereby realizing the diversified residence type division of the vehicle trajectory point training data according to different Gaussian components.
[0056] In a first aspect, an embodiment of the present disclosure provides a method for training a resident prediction model. Figure 1 A flowchart of a method for training a resident prediction model provided in an embodiment of the present disclosure, referring to Figure 1 , the method comprising:
[0057] Step S110: input the vehicle trajectory point training data into the residence prediction model, and calculate the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type.
[0058] Among them, the vehicle trajectory point training data is the training data used to train the residence prediction model, which is used to characterize the corresponding position, time and other related features of the vehicle.
[0059] The vehicle trajectory point training data may include multiple vehicle trajectory point data corresponding to different times, and each vehicle trajectory point data may include valid data information such as position data for characterizing the vehicle position, time data of the vehicle time, signaling characteristic data of signaling strength and frequency, etc., which is not limited in this embodiment of the present disclosure.
[0060] In an optional implementation, in order to improve the information validity and comprehensiveness of the vehicle trajectory point data, vehicle trajectory point training data may be generated based on historical vehicle signaling data arranged in chronological order.
[0061] Correspondingly, the vehicle trajectory point training data includes multiple vehicle trajectory point data arranged in chronological order, and the vehicle trajectory point training data is constructed in the following manner: sorting multiple historical vehicle signaling data in chronological order, and extracting geographic location information, base station information, time information and signaling feature information from each sorted historical vehicle signaling data; for each historical vehicle signaling data, generating the location data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data according to the geographic location information and the base station information; generating the time data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data according to the time information; generating the signaling feature data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data according to the signaling feature information.
[0062] Among them, vehicle signaling data refers to the information used to control and manage communication sessions during the communication process. The spatial position of the vehicle and other related information can be determined through the information exchange between the Internet of Vehicles card and the base station.
[0063] Correspondingly, the historical vehicle signaling data is the signaling data generated by the Internet of Vehicles card within a preset historical time.
[0064] When generating vehicle trajectory point training data, corresponding vehicle trajectory point data is generated for each historical vehicle signaling data, so that the final vehicle trajectory point training data is obtained according to the vehicle trajectory point data corresponding to each historical vehicle signaling data.
[0065] Each vehicle trajectory point data includes position data, time data and signaling feature data. The position data can be generated based on the geographical location information and base station information extracted from the historical vehicle signaling data, the time data can be generated based on the time information extracted from the historical vehicle signaling data, and the signaling feature data can be generated based on the signaling feature information extracted from the historical vehicle signaling data.
[0066] Among them, geographic location information is data information representing the vehicle location, base station information is data information representing the interactive base station of signaling data, time information is data information representing the interaction time of signaling data, and signaling characteristic information is data information representing the signaling characteristics corresponding to the signaling data, which may include data information such as signaling strength and signaling frequency.
[0067] Specifically, for each historical vehicle signaling data, it may include relevant information such as International Mobile Subscriber Identity (IMSI), card number, time, longitude, latitude, base station identification, etc.
[0068] Therefore, after the historical vehicle signaling data are sorted in chronological order, the geographical location information, base station information, time information and signaling feature information can be extracted from each sorted historical vehicle signaling data.
[0069] For example, the longitude and latitude contained in the historical vehicle signaling data are used as geographic location information, the time contained in the historical vehicle signaling data is used as time information, the base station identifier contained in the historical vehicle signaling data is used as base station information, and the signaling strength and signaling frequency contained in the historical vehicle signaling data are used as signaling characteristic information.
[0070] It should be noted that when generating the time data and signaling feature data contained in the vehicle trajectory point data, the time information and signaling feature information can be directly used as the time data and signaling feature data. When generating the location data contained in the vehicle trajectory point data, it needs to be generated based on the geographical location information and the base station information.
[0071] Specifically, the location data included in the vehicle trajectory point data may be the base station coordinates of the target base station corresponding to the geographical location information and / or the base station information.
[0072] In an optional implementation, in order to improve the data accuracy of the location data, the location data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data is generated based on the geographic location information and the base station information, including: when the signaling strength data contained in the signaling characteristic data exceeds the preset strength threshold, the base station coordinates of the target base station corresponding to the base station information are used as the location data contained in the vehicle trajectory point data; when the signaling strength data contained in the signaling characteristic data does not exceed the preset strength threshold, the geographic location information is used as the location data contained in the vehicle trajectory point data.
[0073] Among them, the preset strength threshold can be adaptively set according to actual application needs. By screening the signaling strength data according to the preset strength threshold, when the signaling strength is strong, the base station coordinates of the target base station corresponding to the base station information can be directly used as the position data contained in the vehicle trajectory point data, and when the signaling strength is weak, the geographical location information is used as the position data, thereby improving the data accuracy of the position data contained in the vehicle trajectory point data.
[0074] The residence prediction model may be a mixed Gaussian model, which is a probability model used to represent a complex distribution composed of multiple Gaussian distributions. The residence prediction model needs to include multiple Gaussian components, each of which corresponds to a preset residence type.
[0075] Specifically, the preset residence type can be adaptively set according to the user's actual residence scenario, and the embodiments of the present disclosure are not limited to this.
[0076] Exemplarily, the preset residence type may be a work residence type, a residential residence type, a transportation residence type, a leisure residence type, and the like.
[0077] Therefore, after the vehicle trajectory point training data is input into the residence prediction model, the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model can be calculated.
[0078] Among them, the attribution probability is used to characterize the degree to which the vehicle trajectory point training data belongs to a certain Gaussian component. The larger the attribution probability, the greater the possibility that it belongs to the Gaussian component.
[0079] Accordingly, the expectation maximization (EM) algorithm can be used to estimate the parameters of the residence prediction model. Therefore, in step E, the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model needs to be calculated based on the weights of different Gaussian components and the Gaussian probability density function.
[0080] For example, for any vehicle trajectory point data x included in the vehicle trajectory point training data i =(s i ,t i ,f i ), where s i Represents position data, t i represents time data, f i Indicates signaling characteristic data.
[0081] Then the probability density function of the residence prediction model is:
[0082]
[0083] Among them, K is the number of Gaussian components, ω k is the weight of the kth Gaussian component and satisfies and are the mean vector and covariance matrix of the kth Gaussian component, respectively. is a Gaussian probability density function.
[0084] in, are the position mean vector, time mean vector, and signaling feature mean vector of the k-th Gaussian component respectively. The diagonal elements in the covariance matrix represent the variance of the k-th Gaussian component in each dimension, that is, They represent the position variance, time variance, and signaling feature variance respectively. The off-diagonal elements represent the covariance between the dimensions. For example, represents the covariance between time and position, represents the covariance between the signaling feature and the position.
[0085] Correspondingly, in step E, the vehicle trajectory point data x i The probability of belonging to the kth Gaussian component p(k|x i ) is calculated as:
[0086]
[0087] Among them, μ j and Σ j With the above μ k and Σ k The structure is the same as that of , which will not be described here. This formula represents the k-th Gaussian component to generate the vehicle trajectory point data x i The likelihood of generating vehicle trajectory point data x with all Gaussian components i The ratio of the sum of the probabilities.
[0088] Step S120: updating the model parameters corresponding to each Gaussian component in the resident prediction model according to the attribution probability.
[0089] Among them, the parameter types of the model parameters corresponding to each Gaussian component are the same. Specifically, the model parameters corresponding to each Gaussian component may include a mean parameter, a covariance matrix parameter, and a weight parameter. The model parameters corresponding to each Gaussian component are updated in M steps.
[0090] Correspondingly, according to the attribution probability, the model parameters corresponding to each Gaussian component in the resident prediction model are updated, including: for any Gaussian component, according to the attribution probability between each vehicle trajectory point data and any Gaussian component, the number of valid data corresponding to any Gaussian component is calculated; according to the number of valid data corresponding to any Gaussian component and the attribution probability between each vehicle trajectory point data and any Gaussian component, the mean parameter corresponding to any Gaussian component is updated; according to the mean parameter corresponding to any Gaussian component and the number of valid data corresponding to any Gaussian component, the covariance matrix parameters corresponding to any Gaussian component are updated; according to the number of valid data corresponding to any Gaussian component and the total amount of vehicle trajectory point data, the weight parameter corresponding to any Gaussian component is updated.
[0091] Among them, the number of valid data belonging to the kth Gaussian component is n k It can be calculated as follows:
[0092]
[0093] Where N is the total amount of vehicle trajectory point data, that is, the total number of vehicle trajectory point data, p(k|x i ) is the vehicle trajectory point data x i The probability of belonging to the kth Gaussian component.
[0094] Correspondingly, the mean parameter μ of the kth Gaussian component is k It can be updated by the following formula:
[0095]
[0096] The covariance matrix parameters Σ of the kth Gaussian component k It can be updated by the following formula:
[0097]
[0098] Among them, (x i -μ k ) T Represents the vehicle trajectory point data x i With mean μ k The transpose of the difference vector between .
[0099] The weight parameter ω of the kth Gaussian component k It can be updated by the following formula:
[0100]
[0101] Step S130: Determine the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability.
[0102] In this step, the predicted residence type corresponding to each vehicle trajectory point data in the vehicle trajectory point training data can be comprehensively predicted by combining the model parameters corresponding to the Gaussian components and the attribution probabilities corresponding to the Gaussian components.
[0103] That is, only when the model parameters corresponding to the Gaussian component and the attribution probability corresponding to the Gaussian component meet the corresponding threshold conditions, the preset residence type corresponding to the Gaussian component will be used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0104] When there is no model parameter corresponding to the Gaussian component and the attribution probability corresponding to the Gaussian component satisfies the corresponding threshold condition, the predicted residence type corresponding to the vehicle trajectory point training data is determined to be a non-residence type.
[0105] Step S140: judging whether the training result of the residence prediction model meets the preset convergence condition according to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, and taking the residence prediction model whose training result meets the preset convergence condition as the trained residence prediction model.
[0106] Specifically, a prediction accuracy threshold may be set so that the predicted residence type corresponding to each vehicle trajectory point data in the vehicle trajectory point training data and the actual residence type are compared, and the model prediction accuracy of the residence prediction model is determined based on the comparison results corresponding to all vehicle trajectory point data.
[0107] Therefore, when the model prediction accuracy is greater than the prediction accuracy threshold, it is determined that the training result of the resident prediction model meets the preset convergence condition, and the resident prediction model whose training result meets the preset convergence condition is used as the trained resident prediction model.
[0108] It should also be noted that the above steps S110 to S130 can be executed cyclically during the model training process until the training result of the resident prediction model meets the preset convergence condition, thereby obtaining the trained resident prediction model.
[0109] In the disclosed embodiment, different Gaussian components are pre-set for the residence prediction model according to different preset residence types, so that when training the residence prediction model, the model parameters corresponding to each Gaussian component in the residence prediction model can be updated according to the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, so that the residence type prediction of the vehicle trajectory point training data is realized according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability, and finally the training effect of the residence prediction model is judged according to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, so that each Gaussian component contained in the trained residence prediction model can accurately characterize the corresponding preset residence type, thereby realizing the diversified residence type division of the vehicle trajectory point training data according to different Gaussian components.
[0110] In addition, those skilled in the art may also make various modifications and variations to the method disclosed herein:
[0111] In an optional implementation, in order to improve the prediction accuracy of the predicted residence type corresponding to the vehicle trajectory point training data, the predicted residence type corresponding to the vehicle trajectory point training data is determined according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability, including: determining the target Gaussian component corresponding to the vehicle trajectory point training data from multiple Gaussian components in the residence prediction model according to the attribution probability and the probability threshold; determining the parameter threshold conditions of the model parameters corresponding to the target Gaussian component according to the preset residence type corresponding to the target Gaussian component; when the model parameters corresponding to the target Gaussian component meet the parameter threshold conditions, using the preset residence type corresponding to the target Gaussian component as the predicted residence type corresponding to the vehicle trajectory point training data.
[0112] The numerical value of the preset probability threshold can be adaptively set according to actual application needs, and the embodiments of the present disclosure do not limit this.
[0113] Furthermore, when the attribution probability is greater than or equal to a preset probability threshold, the Gaussian component may be used as a target Gaussian component corresponding to the vehicle trajectory point training data.
[0114] It should be noted that when the vehicle trajectory point training data includes multiple vehicle trajectory point data, it is necessary to determine the corresponding target Gaussian component for each vehicle trajectory point data, so as to determine the predicted residence type corresponding to the vehicle trajectory point data based on the model parameters corresponding to the Gaussian component.
[0115] It should also be noted that the number of target Gaussian components can be one or more. For example, if the preset probability threshold is 0.6, and the attribution probabilities between the vehicle trajectory point data and Gaussian component 1 and Gaussian component 2 are 0.7 and 0.8 respectively, then Gaussian component 1 and Gaussian component 2 are both target Gaussian components corresponding to the vehicle trajectory point data.
[0116] Furthermore, after the target Gaussian component is determined, it is necessary to determine a parameter threshold condition of a model parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component.
[0117] For different preset residence types, the parameter threshold conditions of the model parameters are different, so that it is convenient to make adaptive judgments on the model parameters of the Gaussian components according to different residence scenarios.
[0118] Exemplarily, for the target Gaussian component 1, the corresponding preset residence is the working residence type, and the parameter threshold condition of the model parameter corresponding to the target Gaussian component is the parameter threshold condition corresponding to the working residence type.
[0119] Therefore, when the model parameters corresponding to the target Gaussian component meet the parameter threshold condition, the preset residence type corresponding to the target Gaussian component is used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0120] It should be noted that the preset dwell type corresponding to the vehicle trajectory point training data may be one or more, and the embodiment of the present disclosure does not limit this.
[0121] For example, for any vehicle trajectory point data in the vehicle trajectory point training data, the target Gaussian components corresponding to the vehicle trajectory point data are Gaussian component 1 and Gaussian component 2, and the model parameters of the Gaussian component 1 and Gaussian component 2 all meet their corresponding parameter threshold conditions. Therefore, the preset residence types corresponding to the Gaussian component 1 and Gaussian component 2 can be used as predicted residence types.
[0122] In the disclosed embodiment, a target Gaussian component corresponding to the vehicle trajectory point training data is selected by a preset probability threshold, and a parameter threshold condition of a model parameter corresponding to the target Gaussian component is determined by a preset residence type corresponding to the target Gaussian component, thereby further judging the model parameter of the Gaussian component according to the parameter threshold condition, and finally predicting the predicted residence type corresponding to the vehicle trajectory point training data according to the judgment result, thereby improving the prediction accuracy of the predicted residence type corresponding to the vehicle trajectory point training data in a variety of residence scenarios.
[0123] In an optional implementation, in order to improve the accurate evaluation of the model parameters corresponding to the target Gaussian component in different residence scenarios, the vehicle trajectory point training data includes the position data corresponding to the vehicle and the time data corresponding to the vehicle, then the model parameters corresponding to the target Gaussian component include the position variance parameters corresponding to the position data and the time variance parameters corresponding to the time data, and according to the preset residence type corresponding to the target Gaussian component, the parameter threshold conditions of the model parameters corresponding to the target Gaussian component are determined, including: according to the preset residence type corresponding to the target Gaussian component, determining the position parameter threshold of the position variance parameter corresponding to the target Gaussian component, and determining the position parameter threshold condition of the position variance parameter corresponding to the target Gaussian component according to the position parameter threshold; according to the preset residence type corresponding to the target Gaussian component, determining the time parameter threshold of the time variance parameter corresponding to the target Gaussian component, and determining the time parameter threshold condition of the time variance parameter corresponding to the target Gaussian component according to the time parameter threshold.
[0124] Among them, the position data corresponding to the vehicle and the time data corresponding to the vehicle are the same as the position and time data contained in the vehicle trajectory point data mentioned above, and will not be repeated here.
[0125] Among them, the position variance parameter and the time variance parameter are both variance parameters contained in the covariance matrix parameters corresponding to the target Gaussian component.
[0126] Specifically, the position variance parameter corresponding to the position data is the variance of the target Gaussian component in the position data dimension, that is, the covariance matrix Σ in formula (1) k The location variance in The time variance parameter corresponding to the time data is the variance of the target Gaussian component in the time data dimension, that is, the covariance matrix Σ in formula (1) k The time variance in
[0127] Correspondingly, the location parameter threshold and the time parameter threshold are used to evaluate the parameter values of the location variance parameter and the time variance parameter.
[0128] Specifically, under different preset residence types, the threshold values of the location parameter threshold and the time parameter threshold are different. For example, the time parameter threshold corresponding to the work residence type may be greater than the time parameter threshold of the transportation residence type, and the location parameter threshold corresponding to the leisure residence type may be greater than the location parameter threshold corresponding to the residential residence type.
[0129] Furthermore, the position parameter threshold condition and the time parameter threshold condition may be determined according to the position parameter threshold and the time parameter threshold.
[0130] For example, the position parameter threshold condition is set to determine that the position variance parameter corresponding to the target Gaussian component satisfies the position parameter threshold condition when the position variance parameter is less than the position parameter threshold, and the time parameter threshold condition is set to determine that the time variance parameter corresponding to the target Gaussian component satisfies the time parameter threshold condition when the time variance parameter is greater than the time parameter threshold.
[0131] It should be noted that the threshold settings of the position parameter threshold and the time parameter threshold can be adaptively adjusted according to different preset dwell types.
[0132] Therefore, under different parameter thresholds, the parameter threshold conditions corresponding to the target Gaussian component are also different, and only when the position variance parameter and the time variance parameter corresponding to the target Gaussian component respectively meet the position parameter threshold conditions and the time parameter threshold conditions, can the preset residence type corresponding to the target Gaussian component be used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0133] In the embodiment of the present disclosure, corresponding position parameter threshold conditions and time parameter threshold conditions are set for different preset residence types, thereby achieving comprehensive judgment of model parameters according to different residence scenarios.
[0134] In an optional implementation, before inputting the vehicle trajectory point training data into the residence prediction model, it also includes: selecting a plurality of first vehicle trajectory point data corresponding to a first preset time range from a plurality of vehicle trajectory point data based on the time data contained in the vehicle trajectory point data; determining whether the position data contained in the plurality of first vehicle trajectory point data is ping-pong switched between a plurality of base station areas, and if so, deleting the vehicle trajectory point data having duplicate position data in the plurality of first vehicle trajectory point data.
[0135] The first preset time range may be adaptively set according to actual application needs, for example, to 5 minutes, 10 minutes, etc.
[0136] Among them, the ping-pong switching of the position data contained in the multiple first vehicle trajectory point data between multiple base station areas means that when the vehicle is within the signal coverage range of multiple adjacent base stations, due to the drastic or similar changes in the signal strength of these base stations, the position data will frequently switch between the above-mentioned base station areas, but the vehicle does not actually move.
[0137] Therefore, when it is determined that the position data included in the plurality of first vehicle trajectory point data are ping-pong switched between the plurality of base station areas, the vehicle trajectory point data having repeated position data in the plurality of vehicle trajectory point data needs to be deleted.
[0138] For example, the base station areas corresponding to the position data contained in multiple first vehicle trajectory point data are ABCBCDCD respectively. Therefore, the above position data has a ping-pong switching situation among base station areas A, B, C, and D. Therefore, by deleting the vehicle trajectory point data with repeated position data, the base station areas corresponding to the position data contained in the multiple first vehicle trajectory point data after deletion are ABCD respectively.
[0139] In the disclosed embodiment, by performing anomaly detection on ping-pong data in the vehicle trajectory point training data, the data accuracy of the position data in the vehicle trajectory point training data is effectively improved.
[0140] In an optional implementation, before the vehicle trajectory point training data is input into the resident prediction model, it also includes: selecting a plurality of second vehicle trajectory point data corresponding to a second preset time range from the plurality of vehicle trajectory point data based on the time data contained in the vehicle trajectory point data; calculating the position interval between the position data contained in adjacent vehicle trajectory point data in the plurality of second vehicle trajectory point data, and deleting the adjacent vehicle trajectory point data when the position interval is greater than the preset position distance.
[0141] The second preset time range may be adaptively set according to actual application needs, for example, to 3 minutes, 5 minutes, etc.
[0142] The size of the preset position distance may be adaptively set according to actual application requirements, and the embodiments of the present disclosure do not limit this.
[0143] Thus, for the multiple second vehicle trajectory point data corresponding to the selected second preset time range, the position interval between the position data contained in the adjacent vehicle trajectory point data in the second vehicle trajectory point data is calculated, and the position interval is judged according to the preset position distance. Thus, when the position interval is greater than the preset position distance, the adjacent vehicle trajectory point data is deleted to avoid drift data in the position data.
[0144] For example, the vehicle location data suddenly switches from a nearby base station to a distant base station, and then switches from the distant base station back to the nearby base station after a period of time.
[0145] In the disclosed embodiment, by performing anomaly detection on drift data in vehicle trajectory point training data, the data accuracy of position data in the vehicle trajectory point training data is effectively improved.
[0146] To facilitate understanding, the specific implementation details of the above embodiment are described below with a specific example.
[0147] Among the existing residence prediction methods, the following methods are mainly used:
[0148] (1) Time window-based algorithm: A time threshold is set. When the duration of a vehicle’s signaling data in a certain location or cell exceeds the threshold, the vehicle is determined to be stationed at that location.
[0149] (2) Algorithm based on distance threshold: Calculate the distance between adjacent signaling data points of the vehicle. If the distance between multiple consecutive signaling data points is less than a set threshold (for example, 50 meters), the vehicle is considered to be in a stationary state.
[0150] (3) Normal distribution model algorithm: Normal distribution is a common unimodal distribution model. The average dwell time in the coverage area of the same base station in a certain period of time is estimated. Then, for new signaling data, its probability density value under the normal distribution is calculated. If the probability density value exceeds a certain threshold, it can be judged to be in the dwell state.
[0151] However, the above-mentioned residence prediction method has the following problems:
[0152] (1) For algorithms based on time windows, the setting of the time window is critical. If the window setting is unreasonable, it may lead to inaccurate residence judgment. In addition, for some complex traffic scenarios, such as vehicles frequently entering and exiting a small area in a busy traffic area, it may not be possible to accurately judge residence.
[0153] (2) The distance threshold-based algorithm needs to process and calculate a large amount of signaling data, which has a high computational complexity. In addition, the signaling data itself sometimes has a large position error (such as position deviation due to signal interference), which may affect the accuracy of the judgment.
[0154] (3) The normal distribution is unimodal and has difficulty in handling multimodal situations in signaling trajectory dwell data. For example, in an area with both commercial activities and transportation hubs, the dwell time may have two or more typical modes (such as longer dwell time for shopping and shorter dwell time for waiting for the bus), and the normal distribution cannot well describe these different modes at the same time.
[0155] In view of this, this example provides a method for training a residence prediction model, through which the trajectory data can be classified into different residence behavior categories according to different Gaussian components. Even in the case of fuzzy boundaries, the trajectory data can be effectively and flexibly divided into residence types.
[0156] Figure 2 A schematic diagram of a training method for a resident prediction model provided for this example, see Figure 2 , the method comprising:
[0157] Step S201: input the vehicle trajectory point training data into the residence prediction model, and calculate the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type.
[0158] The vehicle trajectory point training data may include a plurality of vehicle trajectory point data, and each vehicle trajectory point data is constructed according to a historical vehicle signaling data.
[0159] Specifically, the collected historical vehicle signaling data is preprocessed, such as residence point data cleaning, denoising, coordinate conversion, ping-pong data, drift data and other processing operations to ensure the accuracy and reliability of the data.
[0160] For example, historical vehicle signaling data is generated by the Internet of Vehicles card and stored in Kafka (a distributed stream processing platform). In addition, the historical vehicle signaling data needs to be sorted according to the time series.
[0161] In order to ensure low latency and high throughput of vehicle signaling data and avoid data loss during transmission, the format of the transmitted vehicle signaling data may include fields such as IMSI, card number, time, longitude, latitude, base station identification, etc.
[0162] Therefore, through Spark Streaming (a streaming processing framework), geographic location information (such as converting base station identifiers into corresponding geographic location coordinates), time information, etc. are extracted from the vehicle signaling data according to the vehicle signaling data format, and vehicle trajectory point data corresponding to the vehicle signaling data is constructed.
[0163] Accordingly, after constructing the vehicle trajectory point data, when the position data of the vehicle trajectory point data is ping-pong data (that is, the position data of the Internet of Vehicles card switches back and forth between nearby base stations, but the vehicle does not actually move), the vehicle trajectory point data needs to be further cleaned.
[0164] In the case where the position data of the vehicle trajectory point data is drift data (ie, the vehicle's position data suddenly switches from a nearby base station to a distant base station, and then switches back to the nearby base station after a period of time), the vehicle trajectory point data needs to be deleted.
[0165] Therefore, after constructing the vehicle trajectory point training data, a resident prediction model, such as a mixed Gaussian model, is trained to describe the distribution of the vehicle trajectory point data.
[0166] Assume the vehicle trajectory point data is x i =(s i ,t i ,f i ), where s iIndicates location data (such as base station coordinates or longitude and latitude), t i represents time data, f i Indicates signaling characteristic data, such as signaling strength or frequency.
[0167] Therefore, the expectation maximization (EM) algorithm is used to estimate the parameters of the residence prediction model. In step E, the data x of each vehicle trajectory point is calculated. i The probability p(k|x) of belonging to each Gaussian component k is i ).
[0168] Step S202: updating the model parameters corresponding to each Gaussian component in the resident prediction model according to the attribution probability.
[0169] Specifically, in the M step, the model parameters including the mean vector parameters, the covariance matrix parameters and the weight parameters can be updated according to the belonging probability obtained in the E step.
[0170] Step S203: According to the attribution probability and a preset probability threshold, a target Gaussian component corresponding to the vehicle trajectory point training data is determined from multiple Gaussian components in the resident prediction model.
[0171] In this step, a residence determination rule may be formulated based on the model parameters of the residence prediction model and the attribution probability of the vehicle trajectory point data.
[0172] For example, for each vehicle trajectory point data x i , if it belongs to a Gaussian component k, the probability p(k|x i ) , Greater than the preset probability threshold p th , then the Gaussian component is determined to be the corresponding target Gaussian component.
[0173] Step S204: determining a position parameter threshold of a position variance parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component, and determining a position parameter threshold condition of the position variance parameter corresponding to the target Gaussian component according to the position parameter threshold.
[0174] Step S205: determining a time parameter threshold of a time variance parameter corresponding to the target Gaussian component according to a preset dwell type corresponding to the target Gaussian component, and determining a time parameter threshold condition of the time variance parameter corresponding to the target Gaussian component according to the time parameter threshold.
[0175] Among them, the location parameter threshold and the time parameter threshold can be dynamically adjusted according to different preset residence classes and data characteristics.
[0176] Step S206: When the model parameters corresponding to the target Gaussian component meet the parameter threshold condition, the preset residence type corresponding to the target Gaussian component is used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0177] For example, for any vehicle trajectory point data in the vehicle trajectory point training data, if the position variance of the target Gaussian component corresponding to the data is Less than the position parameter threshold Time variance Greater than the time parameter threshold It is determined that the model parameters corresponding to the target Gaussian component meet the parameter threshold conditions. At this time, the user corresponding to the vehicle trajectory point data is in a resident state, and the predicted resident type corresponding to the vehicle trajectory point data is the preset resident type corresponding to the target Gaussian component.
[0178] Step S207: judging whether the training result of the residence prediction model meets the preset convergence condition according to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, and taking the residence prediction model whose training result meets the preset convergence condition as the trained residence prediction model.
[0179] Exemplarily, the vehicle trajectory point training data can be divided into 8:2 ratios, where 80% of the data is used as the training set of the model and 20% of the data is used as the test set of the model. The evaluation accuracy range is 0.0-1.0, so the evaluation accuracy of the model is judged according to the predicted residence type and the actual residence type corresponding to the test set. When the model evaluation accuracy corresponding to the test set is greater than or equal to a preset accuracy threshold such as 0.8, it means that the training result of the residence prediction model meets the preset convergence condition, otherwise the residence prediction model is further trained and tuned.
[0180] The resident prediction model with an evaluation accuracy greater than or equal to 0.8 is used as the trained resident prediction model and stored in HDFS (a distributed file system). The path where the model is stored is then saved in the redis database to facilitate subsequent rapid loading of the model to achieve real-time resident prediction of road conditions.
[0181] The training method of the resident prediction model provided by the embodiment of the present disclosure has the following advantages:
[0182] (1) Capturing the complex distribution of data. If the data has multiple residence points, the residence prediction model can effectively capture the data center and its distribution characteristics.
[0183] (2) Reduce the uncertainty of prediction caused by noise data. In view of factors such as signal interference and user equipment anomalies, the resident prediction model uses multiple Gaussian components to represent this uncertainty to a certain extent. Different Gaussian components can correspond to different possible states. At the same time, the resident prediction model can regard some abnormal points as coming from a Gaussian component with a small probability. By adjusting the weights of each component, it can better reflect the distribution probability of data in different situations, thereby reducing the impact of noise on the model.
[0184] (3) Complex multimodal optimization, where the boundaries of dwelling points are unclear. By training the dwell prediction model, the vehicle trajectory point data can be divided into different preset dwell types such as "work dwelling", "leisure dwelling", and "transportation dwelling", so that the dwell prediction model can assign the probability of belonging to different clusters (Gaussian components) to each vehicle trajectory point data. This allows for better processing of the clustering of vehicle trajectory point data even when the boundaries are fuzzy, and for more flexible division of dwell types.
[0185] In a second aspect, the present disclosure provides a method for predicting residence. Figure 3 A flowchart of a residence prediction method provided by an embodiment of the present disclosure, referring to Figure 3 , the method comprising:
[0186] Step S310: extracting the target vehicle signaling data within the target time window, and generating target vehicle trajectory point data corresponding to the target vehicle signaling data.
[0187] Among them, the target vehicle signaling data within the target time window in Kafka can be processed in real time based on spark streaming through windowing.
[0188] Among them, the data structure and data generation method of the target vehicle trajectory point data are the same as the vehicle trajectory point data in the vehicle trajectory point training data, and will not be described in detail here.
[0189] Step S320: predicting the target vehicle trajectory point data according to the trained residence prediction model to obtain the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model.
[0190] Specifically, the trained residence prediction model can be called based on spark streaming to calculate the attribution probability between each vehicle trajectory point data in the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model.
[0191] Step S330: predicting the residence type corresponding to the target vehicle trajectory point data according to the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model and the preset residence type corresponding to each Gaussian component.
[0192] For each vehicle trajectory point data in the target vehicle trajectory point data, whether it belongs to the Gaussian component is determined according to the attribution probability between it and each Gaussian component. Therefore, when the vehicle trajectory point data belongs to the Gaussian component, the preset residence type corresponding to the Gaussian component is used as the residence type corresponding to the vehicle trajectory point data, and the vehicle trajectory point data is saved in the database.
[0193] When the vehicle trajectory point data does not belong to any Gaussian component, it is determined that the vehicle corresponding to the vehicle trajectory point data does not have a resident behavior.
[0194] In the disclosed embodiment, a residence prediction model is used to fully capture the multimodal distribution characteristics of trajectory point data in spatial and temporal dimensions. Through the combination of multiple Gaussian components, the residence behavior patterns in different residence scenarios can be accurately described. Whether in densely populated commercial areas, residential areas or transportation hubs, it can effectively distinguish between real residence and false residence, greatly improving the accuracy of residence judgment. In addition, vehicle trajectory point data is often unevenly distributed. Some areas may have a large number of residence trajectory points, while other areas are blank or low-density areas. By adjusting the weights, means and covariances of different Gaussian distributions, these unevenly distributed data can be flexibly fitted, so that the residence points can be accurately predicted.
[0195] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0196] In a third aspect, the present disclosure provides a training device for a resident prediction model. Figure 4 A block diagram of a training device for a resident prediction model provided in an embodiment of the present disclosure, referring to Figure 4 , the training device 40 of the resident prediction model includes:
[0197] A calculation module 41 is used to input the vehicle trajectory point training data into the residence prediction model, and calculate the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type;
[0198] An updating module 42, configured to update the model parameters corresponding to each Gaussian component in the resident prediction model according to the attribution probability;
[0199] A classification module 43, configured to determine the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability;
[0200] The judgment module 44 is used to judge whether the training result of the residence prediction model meets the preset convergence condition according to the predicted residence type corresponding to the vehicle trajectory point training data, and use the residence prediction model whose training result meets the preset convergence condition as the trained residence prediction model.
[0201] In an optional implementation, determining the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability includes:
[0202] Determining a target Gaussian component corresponding to the vehicle trajectory point training data from a plurality of Gaussian components in the resident prediction model according to the attribution probability and a preset probability threshold;
[0203] Determining a parameter threshold condition of a model parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component;
[0204] In the case where the model parameter corresponding to the target Gaussian component satisfies the parameter threshold condition, the preset residence type corresponding to the target Gaussian component is used as the predicted residence type corresponding to the vehicle trajectory point training data.
[0205] In an optional implementation, the vehicle trajectory point training data includes position data corresponding to the vehicle and time data corresponding to the vehicle, then the model parameters corresponding to the target Gaussian component include position variance parameters corresponding to the position data and time variance parameters corresponding to the time data, and the parameter threshold conditions of the model parameters corresponding to the target Gaussian component are determined according to the preset residence type corresponding to the target Gaussian component, including:
[0206] Determine a position parameter threshold of a position variance parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component, and determine a position parameter threshold condition of the position variance parameter corresponding to the target Gaussian component according to the position parameter threshold;
[0207] According to the preset dwell type corresponding to the target Gaussian component, a time parameter threshold of the time variance parameter corresponding to the target Gaussian component is determined, and according to the time parameter threshold, a time parameter threshold condition of the time variance parameter corresponding to the target Gaussian component is determined.
[0208] In an optional implementation, the vehicle trajectory point training data includes a plurality of vehicle trajectory point data arranged in chronological order, and the vehicle trajectory point training data is constructed in the following manner:
[0209] Sorting multiple historical vehicle signaling data in chronological order, and extracting geographic location information, base station information, time information, and signaling feature information from each of the sorted historical vehicle signaling data;
[0210] For each historical vehicle signaling data, based on the geographic location information and the base station information, generate the location data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the time information, generate the time data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the signaling feature information, generate the signaling feature data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data.
[0211] In an optional implementation, before inputting the vehicle trajectory point training data into the residence prediction model, the device is further used to:
[0212] According to the time data included in the vehicle trajectory point data, selecting a plurality of first vehicle trajectory point data corresponding to a first preset time range from the plurality of vehicle trajectory point data;
[0213] Determine whether the position data included in the plurality of first vehicle trajectory point data are ping-pong switched between the plurality of base station areas, and if so, delete the vehicle trajectory point data having repeated position data in the plurality of first vehicle trajectory point data.
[0214] In an optional implementation, before inputting the vehicle trajectory point training data into the residence prediction model, the device is further used to:
[0215] According to the time data included in the vehicle trajectory point data, selecting a plurality of second vehicle trajectory point data corresponding to a second preset time range from the plurality of vehicle trajectory point data;
[0216] The position interval between the position data included in the adjacent vehicle trajectory point data in the plurality of second vehicle trajectory point data is calculated, and when the position interval is greater than a preset position distance, the adjacent vehicle trajectory point data is deleted.
[0217] The functions or modules included in the device provided in the embodiments of the present disclosure can be used to execute the method described in the first aspect of the method embodiment above. Its specific implementation and technical effects can be referred to the description of the method embodiment above. For the sake of brevity, they will not be repeated here.
[0218] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.
[0219] Reference Figure 5 , an embodiment of the present disclosure provides an electronic device, comprising:
[0220] One or more processors 501;
[0221] A memory 502 having one or more programs stored thereon, which, when executed by one or more processors, enables the one or more processors to implement any one of the above-mentioned methods for training a resident prediction model or a resident prediction method;
[0222] One or more I / O interfaces 503 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0223] Among them, the processor 501 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 502 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 503 is connected between the processor 501 and the memory 502, and can realize information interaction between the processor 501 and the memory 502, including but not limited to a data bus (Bus), etc.
[0224] In some embodiments, the processor 501 , the memory 502 , and the I / O interface 503 are connected to each other through a bus, and further connected to other components of the computing device.
[0225] The present embodiment also provides a computer-readable medium having a computer program stored thereon. When the program is executed by a processor, the training method of the resident prediction model or the resident prediction method provided in the present embodiment is implemented. To avoid repeated description, the specific steps of the training method of the resident prediction model or the resident prediction method are not repeated here.
[0226] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the invented method described above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0227] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0228] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.
[0229] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.
Claims
1. A method for training a resident prediction model, characterized in that: The method comprises: Inputting the vehicle trajectory point training data into the residence prediction model, calculating the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type; According to the attribution probability, updating the model parameters corresponding to each Gaussian component in the resident prediction model; Determine the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability; According to the predicted residence type and the actual residence type corresponding to the vehicle trajectory point training data, it is judged whether the training result of the residence prediction model meets the preset convergence condition, and the residence prediction model whose training result meets the preset convergence condition is used as the trained residence prediction model.
2. The method for training a resident prediction model according to claim 1, characterized in that: The determining, according to the model parameter corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component, and the attribution probability, the predicted residence type corresponding to the vehicle trajectory point training data comprises: Determining a target Gaussian component corresponding to the vehicle trajectory point training data from a plurality of Gaussian components in the resident prediction model according to the attribution probability and a preset probability threshold; Determining a parameter threshold condition of a model parameter corresponding to the target Gaussian component according to a preset residence type corresponding to the target Gaussian component; In a case where the model parameter corresponding to the target Gaussian component satisfies the parameter threshold condition, the preset residence type corresponding to the target Gaussian component is used as the predicted residence type corresponding to the vehicle trajectory point training data.
3. The training method of the resident prediction model according to claim 2, characterized in that: The vehicle trajectory point training data includes position data corresponding to the vehicle and time data corresponding to the vehicle, then the model parameters corresponding to the target Gaussian component include position variance parameters corresponding to the position data and time variance parameters corresponding to the time data, and the parameter threshold conditions of the model parameters corresponding to the target Gaussian component are determined according to the preset residence type corresponding to the target Gaussian component, including: Determine, according to a preset dwell type corresponding to the target Gaussian component, a position parameter threshold of a position variance parameter corresponding to the target Gaussian component, and determine, according to the position parameter threshold, a position parameter threshold condition of the position variance parameter corresponding to the target Gaussian component; According to the preset dwell type corresponding to the target Gaussian component, a time parameter threshold of the time variance parameter corresponding to the target Gaussian component is determined, and according to the time parameter threshold, a time parameter threshold condition of the time variance parameter corresponding to the target Gaussian component is determined.
4. The method for training a resident prediction model according to any one of claims 1 to 3, characterized in that: The vehicle trajectory point training data includes a plurality of vehicle trajectory point data arranged in chronological order, and the vehicle trajectory point training data is constructed in the following manner: Sorting the plurality of historical vehicle signaling data in chronological order, and extracting geographic location information, base station information, time information, and signaling feature information from each of the sorted historical vehicle signaling data; For each historical vehicle signaling data, based on the geographic location information and the base station information, generate the location data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the time information, generate the time data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data; based on the signaling feature information, generate the signaling feature data contained in the vehicle trajectory point data corresponding to the historical vehicle signaling data.
5. The method for training a resident prediction model according to claim 4, characterized in that: Before inputting the vehicle trajectory point training data into the residence prediction model, the method further includes: According to the time data included in the vehicle trajectory point data, selecting a plurality of first vehicle trajectory point data corresponding to a first preset time range from the plurality of vehicle trajectory point data; Determine whether the position data included in the plurality of first vehicle trajectory point data are ping-pong switched between the plurality of base station areas, and if so, delete the vehicle trajectory point data having repeated position data in the plurality of first vehicle trajectory point data.
6. The method for training a resident prediction model according to claim 4, characterized in that: Before inputting the vehicle trajectory point training data into the residence prediction model, the method further includes: According to the time data included in the vehicle trajectory point data, selecting a plurality of second vehicle trajectory point data corresponding to a second preset time range from the plurality of vehicle trajectory point data; The position interval between the position data included in the adjacent vehicle trajectory point data in the plurality of second vehicle trajectory point data is calculated, and when the position interval is greater than a preset position distance, the adjacent vehicle trajectory point data is deleted.
7. A residence prediction method, characterized in that: The method comprises: Extracting target vehicle signaling data within a target time window to generate target vehicle trajectory point data corresponding to the target vehicle signaling data; Predicting the target vehicle trajectory point data according to the trained residence prediction model to obtain the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model, wherein the trained residence prediction model is trained according to the training method of the residence prediction model according to any one of claims 1 to 6; The residence type corresponding to the target vehicle trajectory point data is predicted based on the attribution probability between the target vehicle trajectory point data and each Gaussian component in the trained residence prediction model and the preset residence type corresponding to each Gaussian component.
8. A training device for a resident prediction model, characterized in that: The device comprises: A calculation module, used for inputting the vehicle trajectory point training data into the residence prediction model, and calculating the attribution probability between the vehicle trajectory point training data and each Gaussian component in the residence prediction model, wherein each Gaussian component corresponds to a preset residence type; An updating module, used for updating the model parameters corresponding to each Gaussian component in the resident prediction model according to the attribution probability; A classification module, for determining the predicted residence type corresponding to the vehicle trajectory point training data according to the model parameters corresponding to each Gaussian component, the preset residence type corresponding to each Gaussian component and the attribution probability; A judgment module is used to judge whether the training result of the residence prediction model meets the preset convergence condition according to the predicted residence type corresponding to the vehicle trajectory point training data, and use the residence prediction model whose training result meets the preset convergence condition as the trained residence prediction model.
9. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6 or claim 7; One or more I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.
10. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 6 or claim 7 is implemented.