A method, medium and device for predicting tobacco-related delivery by integrating spatiotemporal and network topological characteristics

Through the delivery tobacco prediction method that integrates space-time and network topological characteristics, the shortcomings of the existing technology in the big data analysis of delivery tobacco are solved, high-precision delivery tobacco prediction is achieved, and digital management and consumers of the tobacco industry are promoted. Protect.

CN114580499BActive Publication Date: 2024-12-03SHAANXI OF CHINA TOBACCO GENERAL CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210095412.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2024-12-03
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

The existing crime prediction methods are not suitable for big data analysis of delivery tobacco-related crimes, and there are shortcomings in feature calculations and big data feature analysis, and they have failed to effectively utilize the characteristics and network topological characteristics of delivery tobacco-related crimes.

Method used

Using a delivery smoke-related prediction method that integrates spatiotemporal and network topological features, the delivery smoke-related prediction is constructed through data preprocessing, model training and model verification steps, and through the correlation feature selection method and classifier algorithm. and continuously improve the model through cross-validation and manual verification.

Benefits of technology

It realizes high-precision prediction of tobacco crimes involving delivery, promotes digital management of the tobacco industry, provides protection for consumer interests, and continuously improves prediction accuracy through dynamic closed-loop iterative models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580499B_ABST
    Figure CN114580499B_ABST
Patent Text Reader

Abstract

The present invention belongs to a method for predicting cigarette-related crimes. In order to solve the technical problems that the existing crime prediction methods are not suitable for the analysis of big data related to cigarettes in mail delivery and have deficiencies in both feature calculation and big data feature analysis, a method for predicting cigarette-related crimes in mail delivery, a computer-readable storage medium and a device are provided. Big data and artificial intelligence technology are used in the analysis of cigarette-related crimes in mail delivery, a new concept of spatiotemporal pattern of mail delivery is proposed, and the spatiotemporal characteristics of the mail delivery big data are calculated based on this. The mail delivery network is described by a weighted directed graph, and the network topology characteristics of the mail delivery network are calculated, and the mail delivery relationship is described based on this. The feature selection method is used to select the preferred features, and the mail delivery-related cigarette prediction model constructed by combining the preferred feature calculation and the classifier method has achieved results in the accuracy of judging unknown mail delivery data, which proves the feasibility and effectiveness of the prediction method of the present invention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to a method for predicting smoke-related items, and in particular to a method, medium and device for predicting smoke-related items in express delivery that integrates spatiotemporal and network topological features. Background Art

[0002] In recent years, with the rapid development of the express delivery industry and e-commerce industry, new tobacco-related criminal behaviors such as "Internet + express delivery" that rely on mobile social platforms, use express parcels to disguise and transport fake and smuggled cigarettes, and use electronic settlement platforms for real-time settlement have become an important criminal model that damages the development of the tobacco industry.

[0003] In his dissertation titled "Urban Theft Crime Prediction Method Fusion of LSTM and ST-GCN", Han Xinge of the Chinese People's Public Security University established a city theft crime prediction model fusion of LSTM and ST-GCN by analyzing and extracting the temporal and spatial characteristics of the number of urban theft crimes and combining external environmental influencing factors. This model is based on the near-repetitive phenomenon generated during the occurrence of theft cases and predicts the spatiotemporal distribution of theft cases at the "community" scale in units of "days". DCorlette et al. published "FM Shipman. Link Prediction Applied to an Open Large-Scale Online Social Network" in the Proceedings of the 21st ACM conference on Hypertext and hypermedia. Through the study of existing information such as node attributes and network status, it predicts links that are not currently observed or may be generated in the future.

[0004] The analysis and prediction of criminal behavior using the above methods still have the following problems: (1) The existing methods are not suitable for the analysis of big data on postal cigarettes. The above two methods are based on the analysis of the public data set "Community Theft Crime Data in Chicago, USA", and the other is based on the analysis of the friendship relationships between users in the social network LiveJournal. Unlike data in other application fields, big data on postal cigarettes has its own characteristics. For example, postal cigarette crimes target individual retail terminals and consumers, and have the characteristics of a small number of items, high frequency, wide coverage, and a large total amount. The above two methods have limited reference value for postal cigarette crimes.

[0005] (2) Existing methods have deficiencies in feature calculation. The first method mentioned above uses the LSTM deep network model to calculate deep time series features, but does not study the application of traditional time series features that have been widely proven to be effective, such as mean, standard deviation, and Shannon entropy; in addition, in this method, the Chicago community administrative district map is converted into a community topology map, and the number of cases, holiday data, weather data, etc. of each community (i.e., nodes in the community topology map) every day are added as attributes to the nodes, and the ST-GCN deep model is used to calculate deep spatiotemporal features. However, the centrality of node degree, common neighbors, Jaccard coefficient, etc., as well as network topology features widely used in complex network analysis, are not calculated. In the second method, only two network topology features are calculated, and the time series features are not calculated.

[0006] (3) Existing methods have shortcomings in big data feature analysis. The first method calculated deep temporal features, deep spatiotemporal features, and network topology features, and also studied feature fusion methods, but did not conduct in-depth research on the redundancy of the calculated feature data, that is, which features are suitable for the problem being processed. Summary of the invention

[0007] In order to solve the technical problems that the existing crime prediction methods are not suitable for the analysis of big data related to cigarette delivery and have deficiencies in both feature calculation and big data feature analysis, the present invention provides a method, medium and device for predicting cigarette delivery that integrates spatiotemporal and network topological features.

[0008] In order to achieve the above object, the present invention adopts the following technical solutions:

[0009] A method for predicting the tobacco-related delivery by integrating spatiotemporal and network topological features is special in that it includes the following steps:

[0010] S1, data preprocessing

[0011] S1.1, structure the original delivery data of multiple known category labels to obtain the sending and receiving information;

[0012] The sending and receiving information includes the sending time, sender data, sending address data, recipient data and receiving address data; the category label indicates whether the delivery data involves tobacco, where 1 indicates that it involves tobacco and 0 indicates that it does not involve tobacco;

[0013] S1.2, determine whether the information sent and received in step S1.1 is complete, if complete, execute step S2.1, otherwise, fill in the missing information and then execute step S2.1;

[0014] S2, model training

[0015] S2.1, the parcel delivery frequency related to the receiving address and the sending address in the sending and receiving information in a given time period is taken as a one-dimensional time series;

[0016] S2.2, using a time series analysis method to calculate the spatiotemporal characteristics of the one-dimensional time series, and at the same time, using a weighted directed graph to describe the delivery network, calculating the network topology characteristics of the delivery network, and combining the sending time in the sent and received information to form a multi-dimensional fusion feature vector for each sent and received information;

[0017] S2.3, using the correlation feature selection method, selecting preferred features from the feature vector set composed of the multi-dimensional fusion feature vectors of each piece of sent and received information to form a preferred feature set;

[0018] S2.4, obtaining the optimal feature data through calculation of the optimal feature set, using the classifier algorithm, and obtaining the delivery-related tobacco prediction model through cross-validation training;

[0019] S3, Model Validation

[0020] S3.1, structure the unstructured delivery data with unknown category labels to obtain structured sending and receiving information with unknown corresponding labels;

[0021] S3.2, determine whether the received and sent information obtained in step S3.1 is complete, if complete, execute step S3.3, otherwise, fill in the missing information and execute step S3.3;

[0022] S3.3, using the preferred feature set obtained in step 2.3, calculating the fusion features of the structured transceiver information with unknown labels processed in step S3.2, and obtaining the preferred feature data corresponding to the structured transceiver information with unknown labels;

[0023] Wherein, the fusion features include spatiotemporal features and network topology features;

[0024] S3.4, using the prediction model for tobacco-related delivery obtained in step S2.4 and the preferred feature data corresponding to the structured delivery information with unknown labels obtained in step S3.3, obtain the category label output value corresponding to the structured delivery information with unknown labels, and predict whether the relevant package delivery involves tobacco-related delivery according to the category label output value;

[0025] S3.5, manually verify whether the category label output value corresponding to the structured sending and receiving information with unknown labels obtained in step S3.4 is accurate, and use the manual verification results as training data to re-train the delivery-related smoking prediction model to continuously improve the delivery-related smoking prediction model.

[0026] Furthermore, step S1.1 is specifically as follows:

[0027] S1.1.1, use the Chinese word segmentation method based on the predefined dictionary to perform preliminary word segmentation on the original delivery data;

[0028] S1.1.2, constructing the names of administrative regions of all levels in the planned forecast area into a custom word library in advance, and integrating the preliminary word segmentation results of step S1.1.1 through the custom word library to improve the word segmentation accuracy;

[0029] S1.1.3, constructing a stop word library containing various symbols, filtering the delivery data integrated in step S1.1.2 by using the stop word library, filtering out the symbols in the delivery data, and obtaining structured sending and receiving information;

[0030] In step S1.2, the filling of missing information specifically includes filling the missing information according to the custom word library in step S1.1.2.

[0031] Furthermore, in step S2.1, the spatiotemporal features are 13-dimensional spatiotemporal features, the network topology features are 4-dimensional topology features; and the multi-dimensional fusion feature vector is a 69-dimensional feature vector.

[0032] Furthermore, the 13-dimensional spatiotemporal features include the mean, standard deviation and median of the time series, the absolute sum, MAD and Shannon entropy of the first-order differences, the maximum and minimum values ​​of the delivery frequency, the percentage of the last occurrence of the maximum value, the total number of delivery records, the total number of delivery records within the range of the maximum and minimum values ​​of the delivery frequency, the frequency of the number of delivery records exceeding once, and the frequency of the number of delivery records greater than the mean.

[0033] Furthermore, let the one-dimensional time series be x=(x1, x2, ..., x n ),but:

[0034] The absolute sum of first-order differences ASC is calculated by the following formula:

[0035]

[0036] The MAD of the first-order difference is calculated as follows:

[0037]

[0038] Among them, μ is the mean of the one-dimensional time series;

[0039] Shannon entropy H is calculated by the following formula:

[0040]

[0041] in,

[0042] Furthermore, in step S2.2, the use of a weighted directed graph to describe the delivery network specifically includes treating both the sending point and the receiving point as nodes, and using the delivery relationship from the sending point to the receiving point as an edge to describe the delivery network using a weighted directed graph;

[0043] In step S2.2, the network topology characteristics of the delivery network are calculated as follows:

[0044] The out-degree centrality f1 of the node at the sending point is calculated by the following formula:

[0045] f1=outDegree(u) / (N-1)

[0046] Where outDegree(·) represents the out-degree of the node, and N represents the number of all nodes in the delivery network;

[0047] The in-degree centrality of the recipient node is calculated by the following formula:

[0048] f2=InDegree(v) / (N-1)

[0049] The Adamic / Adar metric of a node pair is calculated by the following formula:

[0050]

[0051] Where Γ(Z) represents the common neighbor list of the sender point u and the receiver point v;

[0052] The Jaccard index of a node pair is calculated by the following formula:

[0053]

[0054] Among them, Γ(u) represents the neighbor list of the sender u; Γ(v) represents the neighbor list of the recipient v.

[0055] Furthermore, in step S2.4, the classifier algorithm used is specifically to use a gradient boosting decision tree classifier for predictive classification, and the parameters of the gradient boosting decision tree classifier are: the loss function is the mean square error, the learning rate is 0.1, the maximum number of iterations of the weak learner is 100, and the maximum depth of the tree is 3.

[0056] At the same time, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the special feature of the computer program is that when the computer program is executed by a processor, the steps of the above method are implemented.

[0057] In addition, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the device is special in that the processor implements the steps of the above method when executing the computer program.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] 1. The present invention is a method for predicting tobacco-related postage by integrating spatiotemporal and network topological features, and uses big data and artificial intelligence technology in the analysis of tobacco-related postage crimes. Similar reports have not been seen in existing studies. The method of the present invention can effectively predict whether tobacco is involved in postage, which has great application value in promoting digital management of tobacco industry monopoly law enforcement and safeguarding consumer interests.

[0060] 2. The prediction method of the present invention proposes a new concept of spatiotemporal pattern of delivery, and calculates the spatiotemporal characteristics of delivery big data based on it. The delivery network is described by a weighted directed graph, and the network topology characteristics of the delivery network are calculated, thereby describing the delivery relationship.

[0061] 3. In the prediction method of the present invention, the correlation feature selection method is used to select the preferred features, which provides a basis for the interpretability of the model prediction results.

[0062] 4. In the prediction method of the present invention, the prediction model of tobacco related delivery constructed by combining the calculation of the optimal features and the classifier method has achieved results in the accuracy of the unknown delivery data, which proves the feasibility and effectiveness of the prediction method of the present invention. In addition, after the model prediction results are verified on-site by the tobacco monopoly personnel, the training data set can be added to train the model again, and the model can be continuously improved according to the changes in the tobacco related delivery data to improve the prediction accuracy.

[0063] 5. The computer-readable storage medium of the present invention can store the above-mentioned prediction method as a program. When the computer program is executed by the processor, the above-mentioned prediction method can be implemented, and finally the purpose of predicting whether tobacco is involved in the delivery is achieved.

[0064] 6. The control device of the present invention can store the above prediction method as a program, and the processor can execute the program to achieve the purpose of predicting whether tobacco is involved in the delivery. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a flow chart of the method for predicting tobacco-related delivery by integrating spatiotemporal and network topological characteristics of the present invention;

[0066] Figure 2 This is a diagram showing an original delivery data in an embodiment of the present invention;

[0067] Figure 3 A delivery frequency graph of tobacco-related delivery records within a given period of time in an embodiment of the present invention;

[0068] Figure 4 A delivery frequency graph of non-smoking delivery records within a given period of time in an embodiment of the present invention;

[0069] Figure 5 Schematic diagram of a delivery network in an embodiment of the present invention (wherein dots represent various points);

[0070] Figure 6 A heat map of correlation coefficients of some of the selected smoking-related and non-smoking-related samples in the embodiment of the present invention;

[0071] Figure 7 A histogram of correlation coefficients of some smoking-related and non-smoking-related samples selected in an embodiment of the present invention;

[0072] Figure 8 Schematic diagram of the result of feature selection experiment in an embodiment of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0074] like Figure 1 As shown, the method of the present invention mainly includes three stages: a data preprocessing stage, a model training stage, and a model verification stage. The data preprocessing stage is to perform structured processing on the original mailing big data, present the original mailing data in the form of natural language, convert it into formatted valid information (such as sending and receiving addresses, etc.), and clean the structured data, fill in missing address information, etc. The model training stage includes feature calculation, feature selection, and classifier model training. The model verification stage is to use the trained classifier model to predict the mailing data to be judged to determine whether it is tobacco-related. The mailing tobacco-related crime analysis model proposed in the present invention is a dynamic closed-loop iterative model. After the model prediction results are verified on-site by tobacco monopoly personnel, the training data set can be added to train the model again, so that the model can be continuously improved according to the changes in the mailing tobacco-related data to improve the prediction accuracy. The specific method steps are as follows:

[0075] 1. Data preprocessing stage

[0076] (1) Data structuring: The input raw delivery data is structured, that is, the delivery data of unstructured data (such as delivery process data presented in natural language) is automatically analyzed to obtain key data such as delivery time, recipient, sender, receiving address, and delivery address. The data processed here is the delivery-related tobacco big data, which is different from the conventional system.

[0077] In this step, the input signal is the original unstructured delivery data (the category label is known, that is, whether the delivery data involves tobacco), and the output signal is the structured delivery data (the category label is known, that is, whether the delivery data involves tobacco). The structured data of each delivery record includes the shipping time, shipping address, sender, receiving address, and recipient.

[0078] (2) Data cleaning: Since many delivery data lack address information, the data cleaning in this stage mainly completes the missing data judgment and automatic filling. The input signal of this part is the structured delivery data (with known category labels) after data structuring, and the output signal is the structured delivery data (with known category labels) after address filling (province-city-county (district and other geographical location information)).

[0079] 2. Model training phase

[0080] (1) Feature calculation: Delivery big data has spatiotemporal characteristics. In the model training stage, the parcel delivery frequency related to the sending and receiving addresses in a given time period is regarded as a one-dimensional time series, which is recorded as the delivery spatiotemporal pattern in the present invention. The spatiotemporal features obtained by calculating the delivery spatiotemporal pattern using the time series analysis method in signal processing are used to describe the delivery data characteristics. At the same time, the present invention uses a weighted directed graph to describe the delivery network, calculates the network topology characteristics of the delivery network, and uses it to describe the delivery relationship, thereby predicting tobacco-related crimes.

[0081] The present invention proposes the concept of spatiotemporal pattern of delivery for the processing of delivery-related tobacco data in the model training stage, which is a completely new concept and different from conventional systems. In the model training stage, the spatiotemporal features obtained by calculating the spatiotemporal pattern of delivery and the network topology features of the delivery network are integrated. The integrated new features are used to describe the delivery data, thereby predicting tobacco-related crimes, which is also different from conventional systems.

[0082] The input signal of this part is the structured delivery data after the data preprocessing stage, and the output signal is the 13-dimensional spatiotemporal features and the 4-dimensional network topology features.

[0083] (2) Feature selection: After feature calculation, the sending and receiving information of each delivery record will form a 69-dimensional feature vector. The correlation feature selection method (CFS) is used to select the optimal features from the 69-dimensional feature vector set for prediction model construction. The input signal of this part is the 69-dimensional initial feature set after feature calculation, and the output signal is the optimal feature set.

[0084] (3) Training the classifier model: Using the classifier model algorithm in the field of machine learning, combined with the optimal feature set after feature selection, the mail-delivery smoke-related prediction model is trained through the cross-validation process (training and testing) in machine learning. The input signal is the optimal feature set after feature selection and the classifier model, and the output signal is the trained mail-delivery smoke-related prediction model.

[0085] 3. Model verification phase

[0086] (1) Data structuring: This is similar to the data structuring in step 1 above, but the data processed is different. In this step, the input signal is the original unstructured delivery data to be identified (the category label is unknown and to be determined), and the output signal is the structured delivery data (the category label is unknown and to be determined). The structured data of each delivery record corresponding to the delivery data includes: shipping time, shipping address, sender, receiving address, and recipient.

[0087] (2) Data cleaning: This is similar to the data cleaning in the data preprocessing stage, but the data processed is different. The input signal in this part is the structured delivery data after data structuring (the category label is unknown and to be determined), and the output signal is the structured delivery data after address filling, which contains geographical location information such as "province-city-county (district)" (the category label is unknown and to be determined).

[0088] (3) Calculate the optimal features: Use the optimal feature set after feature selection in the model training phase to calculate the fusion features (fusion of spatiotemporal features and network topology features) of the delivery data to be identified after data structuring and data cleaning in this phase. The input signal of this part is the structured delivery data (class label unknown, to be determined) after data structuring and data cleaning in this phase, and the output signal is the optimal feature data of the delivery data to be identified.

[0089] (4) Determination of whether unknown delivery data involves tobacco: The input signal of this step is the trained delivery tobacco-related prediction model obtained in the model training phase, as well as the output signal obtained by calculating the preferred features in this phase, i.e., the preferred feature data of the delivery data to be determined. The output signal is the category label of whether the delivery data to be determined involves tobacco or not (the output value is 1 for tobacco-related and 0 for non-smoking).

[0090] (5) Verification of the results of the determination of tobacco-related content in delivery data: used to verify the tobacco-related content of unknown delivery data determined by the model. The input signal of this step is the output signal of the tobacco-related content determination of unknown delivery data at this stage, that is, the tobacco-related category label of the delivery data to be determined, 1 indicates tobacco-related content and 0 indicates no tobacco-related content. The output value is the actual tobacco-related content of the delivery data to be determined, which has been verified on-site by tobacco monopoly inspectors.

[0091] The present invention adds the unidentified delivery data verified on-site by tobacco monopoly inspectors at this stage to the training data set, and trains the model again, thereby continuously improving the delivery-related tobacco prediction model according to changes in the delivery-related tobacco data and improving the prediction accuracy.

[0092] Therefore, the delivery-related tobacco prediction model proposed by the present invention is a dynamic closed-loop iterative model, which is also different from conventional systems.

[0093] Aiming at the new tobacco-related crimes of "Internet + delivery", the present invention proposes an analysis model and analysis method for delivery-related tobacco-related crimes based on artificial intelligence and big data technology. The basic working process is as follows:

[0094] First, the unstructured original delivery data is converted into corresponding structured delivery data (including valid information such as sending time, sending address, sender, receiving address, recipient, etc.) through data preprocessing and data cleaning. The spatiotemporal features and network topological features of the structured delivery data are calculated, generally 13-dimensional spatiotemporal features and 4-dimensional network topological features, which are used to describe the delivery characteristics of the sending address data and the receiving address data in the corresponding sending and receiving information of the delivery data. The 4×(13+4)=68-dimensional features obtained by calculating the smoking-related and non-smoking spatiotemporal patterns of the delivery sending address data and the receiving address data are added to the 1-dimensional feature of the sending time to form an initial feature set of 69-dimensional features. The correlation feature selection method CFS (Correlation-based Feature Selection) is used to select the preferred features from the 69-dimensional feature vector set for prediction model construction. All feature selection algorithms applied to feature engineering, such as LaplacianScore, LASSO, etc., can be used in the present invention, and it is found through experiments that the CFS algorithm can be used for feature selection of delivery-related smoking data. According to the obtained preferred feature set, the preferred feature data of the delivery data is calculated, and then together with the classifier algorithm, the delivery-related tobacco prediction model is trained by the cross-validation method on the training data set. The present invention can use all machine learning algorithms, such as K nearest neighbor, random forest, logistic regression, support vector machine, etc. And through experiments, it is found that the gradient boosting decision tree GBDT (GradientBoosting Decision Tree) classifier algorithm is more suitable for the prediction of tobacco-related delivery data. The obtained delivery-related tobacco prediction model is verified on unknown delivery data. And the delivery data to be judged that has been verified on-site by tobacco monopoly inspectors is continuously added to the training data set to train the model, so as to continuously improve the model according to the changes in the delivery-related tobacco data and improve the prediction accuracy.

[0095] The following is a specific embodiment of the present invention:

[0096] 1. Data structuring and data cleaning

[0097] like Figure 2 As shown, the original delivery data contains a large amount of data that is irrelevant to modeling and unstructured data, such as delivery process data presented in natural language.

[0098] In order to obtain valid information in the delivery data, such as the sending time, recipient, sender, sending address and receiving address data, these data must be structured. In this embodiment, the Chinese word segmentation technology is used to automatically analyze the initial delivery data to obtain key data such as the sending time, recipient, sender, sending address and receiving address. The specific process is as follows:

[0099] (1) Use the Chinese word segmentation method based on a predefined dictionary to perform preliminary Chinese word segmentation on the data. The system word library of the Chinese word segmentation method is not targeted at mailing data and cannot accurately segment the mailing address data. For example, Guangdong Province is segmented into Guangdong and Province.

[0100] (2) In order to deal with the erroneous word segmentation results in (1), a custom word library is used, that is, the names of all provinces, cities, and counties in the country are constructed as a custom word library. The custom word library is used to integrate the results in (1) and further accurately segment the words to improve the accuracy of segmented address data. In this embodiment, the names of all provinces, cities, and counties in the country are constructed as a custom word library. In other embodiments of the present invention, it can be customized according to the planned forecast area. For example, when predicting the situation in other countries, it can be constructed according to the local hierarchical administrative division. The hierarchical administrative region here refers to the three-level region such as province, city, and county.

[0101] (3) The original delivery data presented in natural language may contain symbols such as “:” and “【】”, which will be retained in the processing results of (1) and (2). In order to filter out this useless information, a stop word library containing these symbols is also constructed so that the final segmentation result only retains valid data such as courier address, name, and contact number.

[0102] (4) Structure the analysis results and store them in a database for subsequent use.

[0103] (5) Many initial delivery data contain missing address information. Data cleaning mainly completes the missing data judgment and automatic filling. The specific process is to fill in the missing geographic location information such as province, city, county (district) based on the custom vocabulary constructed in the above data structuring process.

[0104] 2. Feature calculation

[0105] Delivery is an activity in which a courier company collects express mail from a sender, delivers it to a designated receiving location within a specified time, and has the recipient sign for it. Therefore, delivery big data has spatiotemporal characteristics, that is, tobacco-related delivery data is related to geographic location and has a time stamp. The flow of fake cigarettes out of a province was counted, and it can be seen that the flow of fake cigarettes has clear regional characteristics, that is, "spatial characteristics". In addition, statistics were collected on some tobacco-related and normal delivery records across the country from 2016 to 2020, and the frequency graph was taken at intervals of 1 hour during the 00-23 time of dispatch. From the statistical results, it can be seen that tobacco-related delivery and non-smoking delivery have different time characteristics.

[0106] In order to describe the spatiotemporal characteristics of delivery data, a new concept of delivery spatiotemporal pattern is proposed. The delivery spatiotemporal pattern refers to the delivery frequency of the delivery records of smoking and non-smoking in a given period of time at the delivery address and the receiving address of the delivery package, such as Figure 3is the frequency of tobacco-related delivery records within a given period of time, such as Figure 4 is the delivery frequency of non-smoking delivery records in a given time period. If the parcel delivery frequency related to the sending address and the receiving address in a given time period is regarded as a one-dimensional time series, then this time series can be used as an important basis for whether the sending address and the receiving address are related to smoking. Obviously, the spatiotemporal characteristics obtained by calculating the spatiotemporal pattern of delivery using the time series analysis method in signal processing can be used to determine whether unknown delivery data is related to smoking.

[0107] Assume that the time series is x=(x1, x2, ..., x n ), the 13-dimensional time series features shown in Table 1 are used to describe the delivery patterns of the sender and recipient addresses. The basic statistical features and time domain statistical features are widely used time series feature algorithms, and the delivery frequency statistical features are feature algorithms designed for the characteristics of delivery behavior.

[0108] Table 1. Collection of spatiotemporal features of delivery data

[0109]

[0110] The algorithm description of some features in Table 1 is as follows:

[0111] Absolute sum of first-order differences:

[0112]

[0113] MAD (Mean Absolute Deviation): where μ is the mean of the time series.

[0114]

[0115] Shannon entropy H:

[0116]

[0117] A parcel is sent from the sending point to the receiving point. If the sending point and the receiving point are both regarded as nodes, and the delivery relationship from the sending point to the receiving point is regarded as an edge, a weighted directed graph can be used to describe the delivery network. Let G = (V, E), where V represents the set of all points and E represents the set of all edges. Figure 5 The schematic diagram of the delivery network is shown in Figure 1. Obviously, the network topology characteristics of the delivery network can also be used to describe the delivery relationship, thereby predicting tobacco-related crimes. Let u and v represent a certain sending point and receiving point, respectively, e uv Represents the delivery relationship between u and v, that is, the edge in the graph<u,v> The present invention uses the following four-dimensional features to describe the network topology relationship between the sending point and the receiving point:

[0118] (1) Out-degree centrality f1 of the node of the sending point:

[0119] f1=outDegree(u) / (N-1) (4)

[0120] Where outDegree(·) represents the out-degree of the node, and N represents the number of all nodes in the delivery network.

[0121] (2) In-degree centrality of the receiving node:

[0122] f2=InDegree(v) / (N-1) (5)

[0123] (3) Adamic / Adar metric of node pairs:

[0124]

[0125] Define that there are a sender point u and a receiver point v in the network, and define Γ(Z) to represent the common neighbor list of the sender point u and the receiver point v.

[0126] The Adamic / Adar metric of a node pair is calculated by the following formula:

[0127]

[0128] Where Γ(x) is defined as the neighbor list set of node x, and Γ(Z) represents the common neighbor list of the sender u and the receiver v;

[0129] (4) Jaccard index of node pairs:

[0130]

[0131] Assuming that the sending address and receiving address of a delivery data are A and B respectively, and the sending time is t (in the format of year-month-day-time period), according to the values ​​of A, B and t, the delivery spatiotemporal pattern of A and B before t can be obtained. According to Table 1, the 13-dimensional spatiotemporal features and 4-dimensional network topological features of the above pattern can be calculated to obtain: V Ay (A smoking mode), V An (A non-smoking mode), V By (B smoking mode) and V Bn (B is not involved in smoke mode). Combining the above features, we get a 69-dimensional vector V = (t, V Ay ,V An ,V By ,V Bn ) as the fusion feature of the delivery data and used for the training and testing of subsequent prediction models.

[0132] 3. Feature Selection

[0133] The 13-dimensional spatiotemporal features shown in Table 1 were subjected to correlation analysis. 30% of the samples were randomly selected from the smoking-related and non-smoking samples in the experimental data for analysis, and the following results were obtained: Figure 6 The correlation coefficient heat map shown in Figure 7 The histogram of correlation coefficients is shown. Figure 6 In the heat map, dark colors indicate low correlation, light colors indicate high correlation, and the darker the color, the smaller the correlation. Figure 6 and Figure 7 It can be seen that there are some characteristics with high correlation between the smoking-related spatiotemporal pattern characteristics of the sender address and the non-smoking spatiotemporal pattern characteristics of the recipient address. All correlation coefficients are divided into 8 bins and their histograms are statistically obtained. Figure 7 .Depend on Figure 7 It can be seen that about 75% of the coefficient values ​​are between [0, 0.25], which means that the calculated spatiotemporal features can better describe the characteristics of delivery data.

[0134] To calculate the preferred features, we Figure 7 In this example, 40% of the total number of features (27-dimensional features) are selected for the experiment. The feature selection algorithm used is CFS (Correlation-based Feature Selection), which is a fast and effective feature selection algorithm suitable for processing large mail delivery data. The feature selection experiment was conducted 100 times. Each time, the Hold-Out method was used to randomly select 70% of the samples in the data set for calculation. The experimental results are shown in the figure. Figure 8 As shown, Figure 8 The vertical axis is the number of times a single feature is selected, and the corresponding feature number is marked on the bar chart. Figure 8 The preferred features are given and arranged in descending order according to the number of feature selections. Figure 8 It can be seen that the Adamic / Adar metric value of the space-time pattern of the sending address not involving smoking is selected the most times with sequence number 34, that is, the MAD value of the space-time pattern of the sending address not involving smoking is selected the second most times, indicating that these features are suitable for describing the delivery data.

[0135] 4. Training the classifier model

[0136] exist Figure 8 Based on the preferred features obtained in the above, a prediction model for postal cigarette-related crimes is constructed using a traditional classifier algorithm. The amount of postal record data is huge and the cigarette-related judgment must be real-time. Experiments have proven that the Gradient Boosting Decision Tree (GBDT) classifier, which has a fast calculation speed and is widely used, is suitable for postal cigarette-related crime prediction.

[0137] The parameters of the GBDT classifier used in the experiment are: the loss function is the mean square error, the learning rate is 0.1, the maximum number of iterations of the weak learner is 100, and the maximum depth of the tree is 3. Positive is defined as the delivery data involving tobacco, and negative is defined as not involving tobacco. TP, FP, TN, and FN are defined as the number of true positive samples, false positive samples, true negative samples, and false negative samples predicted by the method of the present invention, respectively. The evaluation indicators Accuracy, Positive Predictive Value (PPV), and Negative Predictive Value (NPV) are shown in formulas (8)-(10), respectively. The larger the values ​​of these indicators, the better the model performance.

[0138] Accuracy=(TP+TN) / (TP+FN+FP+TN) (8)

[0139] PPV=TP / (TP+FP) (9)

[0140] NPV=TN / (TN+FN) (10)

[0141] The experiment also compared the performance of classifier models such as random forest, logistic regression, GBDT and LSTM (Long Short-Term Memory). The Hold-Out method was used to divide the entire data set into training set, test set and validation set in a ratio of 6:3:1. The classifier model that was trained and tested was used to calculate its index on the validation set. Table 2 shows the experimental results of using the preferred features for prediction, among which the positive predictive value of random forest, the accuracy of GBDT and the negative predictive value of GBDT are the best results.

[0142] Table 2 Experimental results of prediction using the optimal features

[0143] Classifier Name Accuracy Positive predictive value Negative predictive value Random Forest 0.9430 0.9440 0.9416 Logistic Regression 0.9364 0.9269 0.9504 GBDT 0.9467 0.9386 0.9599 LSTM 0.9364 0.9257 0.9522

[0144] From the experimental results in Table 2, it can be seen that the GBDT classifier combined with the preferred features achieved the best prediction results. After the model training is completed, the delivery data to be judged is also pre-processed by data structuring, data cleaning, etc., and the feature data is calculated according to the preferred features. Then, the GBDT classifier can be combined to make a judgment on whether the delivery data involves tobacco. After the model prediction results are verified on-site by tobacco monopoly personnel, the training data set can be added to the model again, so as to continuously improve the model and improve the prediction accuracy according to the changes in the delivery data involving tobacco.

[0145] The prediction method of the present invention can be applied in a computer-readable storage medium, which stores a computer program. The above prediction method can be stored in the computer-readable storage medium as a computer program, and the computer program implements the steps of the above prediction method when executed by a processor.

[0146] In addition, the prediction method of the present invention can also be applied to a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the prediction method of the present invention when executing the computer program. The terminal device here can be a computer, a notebook, a PDA, and various cloud servers and other computing devices, and the processor can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, or other programmable logic device, etc.

[0147] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for predicting tobacco-related delivery by integrating spatiotemporal and network topological features, characterized in that: The following steps are involved: S1, data preprocessing S1.1, structure the original delivery data of multiple known category labels to obtain the sending and receiving information; The sending and receiving information includes the sending time, sender data, sending address data, recipient data and receiving address data; the category label indicates whether the delivery data involves tobacco, where 1 indicates that it involves tobacco and 0 indicates that it does not involve tobacco; S1.2, determine whether the information sent and received in step S1.1 is complete, if complete, execute step S2.1, otherwise, fill in the missing information and then execute step S2.1; S2, model training S2.1, the parcel delivery frequency related to the receiving address and the sending address in the sending and receiving information in a given time period is taken as a one-dimensional time series; S2.2, using a time series analysis method to calculate the spatiotemporal characteristics of the one-dimensional time series, and at the same time, using a weighted directed graph to describe the delivery network, calculating the network topology characteristics of the delivery network, and combining the sending time in the sent and received information to form a multi-dimensional fusion feature vector for each sent and received information; The spatiotemporal feature is a 13-dimensional spatiotemporal feature, the network topology feature is a 4-dimensional topology feature; the multi-dimensional fusion feature vector is a 69-dimensional feature vector; The 13-dimensional spatiotemporal features include the mean, standard deviation and median of the time series, the absolute sum of first-order differences, MAD and Shannon entropy, the maximum and minimum values ​​of delivery frequency, the percentage of the last occurrence of the maximum value, the total number of delivery records, the total number of delivery records within the range of the maximum and minimum values ​​of delivery frequency, the frequency of the number of delivery records exceeding one time, and the frequency of the number of delivery records greater than the mean; Specifically, the method of using a weighted directed graph to describe the delivery network is to regard both the sending point and the receiving point as nodes, and use the delivery relationship from the sending point to the receiving point as an edge to describe the delivery network using a weighted directed graph; The network topology characteristics of the computing delivery network are specifically as follows: The out-degree centrality f1 of the node at the sending point is calculated by the following formula: f1=outDegree(u) / (N-1) Where outDegree(·) represents the out-degree of the node, and N represents the number of all nodes in the delivery network; The in-degree centrality of the recipient node is calculated by the following formula: f2=InDegree(v) / (N-1) The Adamic / Adar metric of a node pair is calculated by the following formula: Where Γ(Z) represents the common neighbor list of the sender u and the receiver v; The Jaccard index of a node pair is calculated by the following formula: Where Γ(u) represents the neighbor list of the sender u; Γ(v) represents the neighbor list of the receiver v; S2.3, using the correlation feature selection method, selecting preferred features from the feature vector set composed of the multi-dimensional fusion feature vectors of each piece of sent and received information to form a preferred feature set; S2.4, obtaining the optimal feature data through calculation of the optimal feature set, using the classifier algorithm, and obtaining the delivery-related tobacco prediction model through cross-validation training; S3, Model Validation S3.1, structure the unstructured delivery data with unknown category labels to obtain structured sending and receiving information with unknown corresponding labels; S3.2, determine whether the received and sent information obtained in step S3.1 is complete, if complete, execute step S3.3, otherwise, fill in the missing information and execute step S3.3; S3.3, using the preferred feature set obtained in step 2.3, calculating the fusion features of the structured transceiver information with unknown labels processed in step S3.2, and obtaining the preferred feature data corresponding to the structured transceiver information with unknown labels; Wherein, the fusion features include spatiotemporal features and network topology features; S3.4, using the prediction model for tobacco-related delivery obtained in step S2.4 and the preferred feature data corresponding to the structured delivery information with unknown labels obtained in step S3.3, obtain the category label output value corresponding to the structured delivery information with unknown labels, and predict whether the relevant package delivery involves tobacco-related delivery according to the category label output value; S3.5, manually verify whether the category label output value corresponding to the structured sending and receiving information with unknown labels obtained in step S3.4 is accurate, and use the manual verification results as training data to re-train the delivery-related smoking prediction model to continuously improve the delivery-related smoking prediction model.

2. A method for predicting cigarette-related delivery by integrating spatiotemporal and network topological features as claimed in claim 1, characterized in that: Step S1.1 is specifically as follows: S1.1.1, use the Chinese word segmentation method based on a predefined dictionary to perform preliminary word segmentation on the original delivery data; S1.1.2, constructing the names of administrative regions of all levels in the planned forecast area into a custom word library in advance, and integrating the preliminary word segmentation results of step S1.1.1 through the custom word library; S1.1.3, constructing a stop word library containing various symbols, filtering the delivery data integrated in step S1.1.2 by using the stop word library, filtering out the symbols in the delivery data, and obtaining structured sending and receiving information; In step S1.2, the filling of missing information specifically includes filling the missing information according to the custom word library in step S1.1.

2.

3. A method for predicting tobacco-related delivery by integrating spatiotemporal and network topological features as claimed in claim 2, characterized in that: In step S2.1, the absolute sum of the first-order differences, the MAD of the first-order differences, and the Shannon entropy in the 13-dimensional spatiotemporal features are specifically obtained by the following formulas: Suppose the one-dimensional time series is x=(x1, x2, ..., x n ),but: The absolute sum of first-order differences ASC is calculated by the following formula: The MAD of the first-order difference is calculated as follows: Among them, μ is the mean of the one-dimensional time series; Shannon entropy H is calculated by the following formula: in, 4. A method for predicting tobacco-related delivery by integrating spatiotemporal and network topological features as claimed in claim 3, characterized in that: In step S2.4, the classifier algorithm used is specifically to use a gradient boosting decision tree classifier for predictive classification, and the parameters of the gradient boosting decision tree classifier are: the loss function is the mean square error, the learning rate is 0.1, the maximum number of iterations of the weak learner is 100, and the maximum depth of the tree is 3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.