User portrait construction method and device based on multi-source data, medium and product

Through multi-source data, the user portrait is constructed, combined with deep package detection and machine learning, the problem of insufficient accuracy and depth of user portrait construction in the existing technology is solved, and more accurate and comprehensive capture of user behavior characteristics is achieved, and personalized services are supported. Precise marketing.

CN119006029APending Publication Date: 2024-11-22CHINA MOBILE ZIJIN INNOVATION INST CO LTD +2
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411170267.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing user portrait construction methods rely on a single data source, resulting in insufficient accuracy and depth of user behavior characteristics portraying, making it difficult to support the needs of personalized services and precise marketing.

Method used

Using multi-source data, including traffic data, call data, SMS data, location data and terminal device data, build multiple feature vectors, and build user portraits through preset user portrait models, combining deep packet detection and machine learning algorithms for data processing and analysis.

Benefits of technology

It realizes more comprehensive and accurate user behavior characteristics capture, improves the level and accuracy of user portraits, and supports the needs of personalized services and precise marketing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006029A_ABST
    Figure CN119006029A_ABST
Patent Text Reader

Abstract

The invention discloses a user portrait construction method and device based on multi-source data, a medium and a product, and relates to the technical field of big data, and the user portrait construction method based on the multi-source data comprises the steps: collecting flow data, call data, short message data, position data and terminal equipment data of a target group; according to the traffic data, the call data, the short message data, the position data and the terminal equipment data, a plurality of corresponding feature vectors are constructed, and the feature vectors at least comprise one of traffic information, active information, preference information, consumption information, position information and time period information; and inputting each feature vector corresponding to the target user in the target group into a preset user portrait model, and constructing a user portrait of the target user through the user portrait model. According to the technical scheme, data from different sources are fully integrated and mined to construct the user portrait, and the accuracy and depth of the user portrait are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a method for constructing a user portrait based on multi-source data, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In the Internet marketing scenario, user portrait is a very important means to understand user behavior, needs and preferences. It can help companies better understand their target user groups and formulate targeted marketing strategies, product designs and service improvement plans accordingly to improve transaction rates and user experience.

[0003] At present, the construction of user portraits usually relies on in-depth analysis of network traffic and the application of traditional machine learning algorithms (such as decision trees and random forests). Due to the relatively single data source, there are great limitations in understanding and profiling user behavior, resulting in insufficient accuracy of the constructed user portraits. Moreover, network traffic can only reflect one aspect of user behavior characteristics, and it is difficult to capture more detailed user behavior characteristics. The resulting user portraits are relatively thin and insufficient to support the needs of personalized services and precision marketing.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a user portrait construction method based on multi-source data, an electronic device, a computer-readable storage medium and a computer program product, aiming to solve the technical problem of insufficient accuracy and depth in portraying user behavior characteristics in current user portrait construction solutions.

[0006] To achieve the above objectives, the present application proposes a method for constructing a user portrait based on multi-source data, and the method for constructing a user portrait based on multi-source data includes: Collect traffic data, call data, SMS data, location data, and terminal device data of the target group; Constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data, and the terminal device data, wherein the feature vector includes at least one of traffic information, activity information, preference information, consumption information, location information, and time period information; Each feature vector corresponding to the target user in the target group is input into a preset user portrait model, and a user portrait of the target user is obtained by constructing the user portrait model.

[0007] In one embodiment, the step of collecting traffic data of the target group includes: Continuously obtain network data packets through deep packet inspection devices deployed at network nodes; Based on a preset time window, the flow data in each of the network data packets is classified by a pre-trained data classification model to obtain a data classification result; According to the filtering rules corresponding to the target group and the data classification result, the flow data in the network data packet is filtered to obtain the flow data of the target group.

[0008] In one embodiment, after the step of obtaining the traffic data of the target group, the method further includes: Calculating a loss function value according to the number of false captures and the number of false filters of the traffic data within a preset time window; With the goal of optimizing the loss function value, adjusting the filtering rules to obtain optimized filtering rules, and updating the current filtering rules based on the optimized filtering rules; The length of the time window is adjusted according to the real-time traffic of the network data packet, wherein when the real-time traffic is higher, the length of the corresponding time window is shorter.

[0009] In one embodiment, after the step of obtaining the traffic data of the target group, the method further includes: Collecting preset feature quantities in the traffic data within the time window, wherein the preset feature quantities include at least one of the time interval between the start and end packets, the number of data packets, the number of bytes, the average capacity of data packets, and the data transmission rate; Comparing each of the preset characteristic quantities with a preset normal flow model to obtain a characteristic deviation value; When the characteristic deviation value is greater than a preset threshold, the flow data in the time window is determined to be abnormal flow, and a preset early warning measure is executed.

[0010] In one embodiment, after the step of collecting traffic data, call data, SMS data, location data, and terminal device data of the target group, the method further includes: Inputting the collected multi-source data into a preset data access model, and performing standardization processing on the multi-source data through a preset conversion function to obtain standardized multi-source data, wherein the multi-source data includes the traffic data, the call data, the text message data, the location data, and the terminal device data; Preprocessing the standardized multi-source data to obtain preprocessed multi-source data, wherein the preprocessing includes at least one of deduplication, padding, and correction; Classifying the pre-processed multi-source data with the same identity identifier or device identifier as belonging to the same grouped user, and obtaining a plurality of grouped users and multi-source data corresponding to each of the grouped users; Or, extracting feature data from the preprocessed multi-source data, and determining a plurality of grouped users and the multi-source data corresponding to each of the grouped users according to the similarity between the feature data; The grouped users and the corresponding multi-source data are stored in a database in the form of a mapping table, wherein in the mapping table, each grouped user corresponds to a globally unique identifier one by one.

[0011] In one embodiment, the step of extracting feature data from the preprocessed multi-source data and determining a plurality of grouped users and the multi-source data corresponding to each of the grouped users according to the similarity between the feature data comprises: Extracting application type, protocol type and traffic consumption from the traffic data to obtain feature data corresponding to the traffic data; Extracting call duration, call type, and call start and end time from the call data to obtain feature data corresponding to the call data; Extract the SMS type, sending time and SMS content from the SMS data to obtain feature data corresponding to the SMS data; Extracting the location coordinates, positioning method and timestamp from the location data to obtain feature data corresponding to the location data; Extracting the device model, operating system, first use time and last active time of the device from the terminal device data to obtain feature data corresponding to the terminal device data; Vectorize each of the feature data to obtain a corresponding feature vector; Based on a plurality of preset grouping labels and related feature vectors of each of the grouping labels, cluster analysis is performed on each of the feature vectors to obtain grouping labels corresponding to each of the multi-source data; Based on the similarity between the grouping labels, the multi-source data are classified to obtain a plurality of grouped users and the multi-source data corresponding to each of the grouped users.

[0012] In one embodiment, the activity information includes at least social activity and video activity, and the preference information includes at least application preference information, device preference information, and social preference information; The step of constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data and the terminal device data comprises: Determine flow information according to the flow data, wherein the flow includes the total flow and the average daily flow within a preset period; Calculate the social activity according to the usage time of the social application and the number of visits to the social application in the traffic data; Calculate video activity based on the video application usage time and the number of video application accesses in the traffic data; Input the application usage data in the traffic data, the terminal device data, and the social application usage data in the traffic data into corresponding user behavior prediction models respectively to obtain application preference information, device preference information, and social preference information, wherein the user behavior prediction model includes an application preference prediction model, a device preference prediction model, and a social preference prediction model; Analyze the cost information, application purchase information, and service purchase information in the traffic data, the call data, and the text message data to determine consumption information; Extract the corresponding activity area range from the location data to obtain location information; The starting time point of the Internet access log in the traffic data is analyzed to determine the time period information.

[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the user portrait construction method based on multi-source data as described above.

[0014] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the user portrait construction method based on multi-source data as described above are implemented.

[0015] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the user portrait construction method based on multi-source data as described above.

[0016] This application proposes a method for constructing a user portrait based on multi-source data, firstly collecting the traffic data, call data, SMS data, location data and terminal device data of the target group, then constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the SMS data, the location data and the terminal device data, wherein the feature vector includes at least one of traffic information, active information, preference information, consumption information, location information and time period information, then inputting each feature vector corresponding to the target user in the target group into a preset user portrait model, and finally constructing a user portrait of the target user through the user portrait model. In addition to collecting the traffic data of the target group, the technical solution of this application also collects multi-source data such as corresponding call data, SMS data, location data and terminal device data, further enriching the source data for constructing the user portrait, making it easier to capture more comprehensive and detailed behavioral characteristics of the target user, overcoming the limitations caused by the single data source, and making the final user portrait more layered and accurate, sufficient to support the needs of personalized services and precision marketing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 A flowchart of the first embodiment of the method for constructing a user profile based on multi-source data in this application; Figure 2 A schematic diagram of a feasible user portrait model hierarchy in an embodiment of the present application; Figure 3 A schematic diagram of a process for standardizing, preprocessing, and determining grouped users of multi-source data in an embodiment of the present application; Figure 4 A schematic diagram of the implementation steps of a feasible method for constructing a user portrait based on multi-source data according to an embodiment of the present application; Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the method for constructing a user portrait based on multi-source data in an embodiment of the present application.

[0020] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0021] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0022] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, a server, etc., or an electronic device or a control device capable of realizing the above functions. The following takes the server as an execution subject as an example to illustrate this embodiment and the following embodiments.

[0024] At present, the methods used by operators to build group user portraits mainly rely on deep packet inspection (DPI) technology alone or in parallel with traditional machine learning algorithms (such as decision trees and random forests), but fail to achieve deep integration. This method has obvious disadvantages in insufficient data fusion, low processing efficiency and limited accuracy of user portraits. Specifically, single or sequential use of technology cannot fully integrate and mine data from different sources, such as network traffic, call records and location information, which limits the ability to fully understand user behavior from multiple dimensions, resulting in the lack of comprehensiveness and depth of the constructed user portrait. In addition, the user portrait construction solutions currently on the market have repeated and redundant steps in the data processing process, such as decentralized operations of data collection, preprocessing and analysis, which increase the time cost of data processing and reduce processing efficiency. Moreover, when using a single technology or a technology that is not deeply integrated to process complex multi-source data, it is difficult to capture the subtle differences in user behavior, which affects the accuracy and practicality of user portraits and makes it difficult to meet the needs of personalized services and precision marketing.

[0025] In order to overcome the technical problems and defects in the above-mentioned prior art, the present application embodiment provides a method for constructing a user portrait based on multi-source data. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for constructing a user portrait based on multi-source data of the present application. The method for constructing a user portrait based on multi-source data includes: Step S10, collecting traffic data, call data, SMS data, location data and terminal device data of the target group; Among them, the target group refers to the user group for which the user portrait needs to be constructed this time, and can be screened according to the needs in the actual scenario, for example, the user group whose source IP address (Internet Protocol Address) or destination IP address of the data packet meets the preset conditions, the user group in a certain region, the user group that has used or is using a certain product or application, etc.

[0026] Among them, traffic data can be obtained from key nodes of the network, such as network entrances, exits, and next to core switches, and real-time traffic data capture and storage are supported by high-performance processors and large-capacity storage.

[0027] In addition, call data refers to call detail records (CDR), and SMS data refers to SMS records. Both can be obtained through operators, and location data can be obtained through the base station or GPS (Global Positioning System) corresponding to the terminal device, and terminal device data can be read directly from the terminal device.

[0028] In the embodiment of the present application, when constructing the user portrait, a large amount of data from different channels and sources is collected, including traffic data, call data, SMS data, location data, and terminal device data, etc. By combining network traffic, communication data (call data and SMS data), as well as geographic location information (location data) and terminal device information (terminal device data), the feature dimensions of the data are enriched, which facilitates a more comprehensive analysis of the user's behavioral characteristics, making the constructed user picture more comprehensive and accurate, and reflecting more realistic user behavior characteristics.

[0029] Step S20, constructing a plurality of corresponding feature vectors according to the traffic data, call data, SMS data, location data and terminal device data, wherein the feature vector includes at least one of traffic information, activity information, preference information, consumption information, location information and time period information; When constructing a user portrait by fusing multi-source data, the embodiments of the present application focus on several key dimensions for feature construction, including traffic information, activity information, preference information, consumption information, location information, and time period information.

[0030] Among them, traffic information is a basic indicator to measure users' Internet usage habits, helping to identify heavy and light users of data traffic; activity information can reflect the user's activity level on various types of applications or social media, and can reveal the user's activity level on various applications or platforms; preference information reveals the user's preference for various applications, platforms or devices; consumption information shows the user's economic status and consumption capacity; location information includes the user's main activity area and activity range, which helps to understand the user's lifestyle and activity habits; time period information includes the user's main Internet time period (such as night and working hours), reflecting the user's living habits and possible demand time.

[0031] By using the above-mentioned information of various dimensions as feature vectors for constructing user portraits, various characteristic data about the Internet can be taken into account in the process of constructing user portraits. It also further combines information such as user preferences and activity, and further combines information such as user consumption, location, time period, etc. Compared with traditional user portrait construction solutions, it is more comprehensive, making the user portrait more layered and accurate, facilitating the formulation of more refined marketing strategies and personalized services, and improving transaction rates and user experience.

[0032] Step S30, input each feature vector corresponding to the target user in the target group into a preset user portrait model, and obtain a user portrait of the target user through the user portrait model construction.

[0033] It is understandable that the target group includes multiple users, and the target user is the user in the target group for which a user profile needs to be constructed, which can be one or more. The feature vector constructed in step S20 also includes the feature vector corresponding to the target user. When it is necessary to construct a user profile of the target user, the input feature vectors are identified and processed by a pre-trained user profile model, so as to predict and output the user profile corresponding to the target user.

[0034] Among them, user portrait refers to a comprehensive information description about the user formed by comprehensive analysis of the user's multi-source data and multi-dimensional data. This information includes basic attributes, behavioral characteristics, interest preferences, social networks, and scenario information. User portraits have important application value in the fields of personalized recommendations, user segmentation, and precision marketing. It should be noted that the technical solution of the embodiment of this application mainly integrates social network and geographic location data to improve the accuracy and practicality of user portraits.

[0035] For example, refer to Figure 2The user portrait model in the embodiment of the present application is a multi-level user portrait model, which includes a basic layer, a behavior layer, an interest layer, a social layer, and a scenario layer. Specifically, the basic layer is used to record the user's basic information, such as age, gender, geographic location, etc.; the behavior layer is used to record the user's online and offline behavior, such as purchase records, browsing history, search keywords, etc.; the interest layer is used to analyze the user's interest preferences based on the user's behavior, such as favorite music types, movie styles, etc.; the social layer is used to describe the user's social network, including friend relationships, interaction frequency, etc.; the scenario layer is used to identify the user's frequent scenes (such as work, leisure, travel, etc.) based on the user's behavior and location information, and provide personalized services accordingly.

[0036] In another feasible embodiment, before applying the user portrait model, the user portrait model needs to be trained and tested. The important feature vectors selected in step S30 can be used to train the user portrait model, and the type of the user portrait model can be a decision tree, a random forest, a support vector machine, etc. Specifically, the performance of the model can be verified by cross-validation, A / B testing, etc. to ensure the effect of feature selection on the performance of the model. In the real-time application process, the change detection algorithm and real-time data stream processing technology are used to dynamically update the feature selection results to ensure that the model can adapt to user behavior and environmental changes.

[0037] For example, if there is a multi-source dataset containing the following features: age, gender, geographic location, browsing history, purchase history, etc. The goal is to predict the user's purchase tendency. The specific steps are as follows: Normalize age, one-hot encode gender, and properly encode and normalize geographic location, browsing history, purchase history, etc.; calculate the mutual information value between each feature and purchase tendency to obtain the mutual information score of each feature; use all features to train the random forest model and calculate the importance score of each feature; select the most important features from high to low based on the mutual information and random forest importance score, such as selecting the top 10 features; use the selected important features to retrain the user's purchase tendency prediction model, and perform cross-validation to evaluate the model performance.

[0038] In addition, in order to continuously optimize the model to improve its accuracy and practicality, the effect of the user portrait model in actual application can be verified through A / B testing. Specifically, users can be randomly assigned to a control group and an experimental group. The control group uses the existing user portrait model, and the experimental group uses a new or optimized model. Monitor and record user behavior data in real time to ensure the integrity and accuracy of the data. Compare the performance of the two groups on key indicators through statistical analysis, and use methods such as t-tests or chi-square tests to evaluate the significance of the differences. Identify the advantages and disadvantages of the new model based on the analysis results, and perform targeted optimization, such as adjusting feature selection, optimizing algorithm parameters, or introducing more data sources.

[0039] The optimized model needs to be verified by A / B testing again, and the performance of the model is continuously improved through multiple iterations. At the same time, a user feedback mechanism is established to collect user satisfaction feedback on recommended content and personalized services as an important reference for model optimization. The performance of the model is monitored over a long period of time to ensure its continued effectiveness and accuracy in practical applications.

[0040] In the embodiments of the present application, data collection tools (ELK Stack), data analysis tools (Python's pandas and scipy), machine learning platforms (scikit-learn) and A / B testing platforms (Optimizely) can be used to systematically implement A / B testing and model optimization. Through this series of steps and technical means, the accuracy and application effect of user portraits can be significantly improved, and a deep understanding and refined management of user behavior can be achieved. The technical solution of the embodiments of the present application provides stronger support for network security and management by providing a deeper network traffic analysis and a more accurate user behavior portrait. This enables network operators to more effectively identify and manage network traffic, and promptly detect and respond to security threats.

[0041] Furthermore, in a feasible implementation manner, the step of collecting traffic data of the target group includes: Step S11, continuously acquiring network data packets through a deep packet inspection device deployed at a network node; Step S12, based on a preset time window, classifying the traffic data in each of the network data packets by using a pre-trained data classification model to obtain a data classification result; Step S13, filtering the flow data in the network data packet according to the filtering rules corresponding to the target group and the data classification result, to obtain the flow data of the target group.

[0042] In the process of building a real-time user profile using an adaptive multi-source fusion hash algorithm and network mapping in the embodiment of the present application, the flow data collection step uses deep packet inspection (DPI) technology combined with advanced data collection algorithms to achieve accurate capture of network traffic. Among them, DPI devices are deployed at key nodes of the network, such as network inlets, outlets, and core switches, and are equipped with high-performance processors and large-capacity storage to support the capture and storage of real-time data packets. The DPI device monitors network data packets in real time, and uses efficient data packet capture technology based on Berkeley Packet Filter (BPF) to ensure that network data packets can be captured accurately and without omissions even in high-speed network environments.

[0043] It is understandable that the acquired network data packets include many different types of data, such as the type of data packet (e.g., HTTP, HTTPS, FTP, etc.); the source and destination IP addresses of the data packet; whether the data packet contains valuable information (e.g., potential signs of attack, sensitive data transmission, etc.). In order to more efficiently and quickly understand the above information of the data packet, the data classification model can be combined to identify the above information in the network data packet flow data, wherein the time window is used to determine the cycle for statistics, classification and analysis of network data. Commonly used data classification models can include Random Forest and Support Vector Machine (SVM), which perform well in handling classification problems.

[0044] Before using the data classification model, the data classification model needs to be trained, and the labeled network data needs to be included. The labeling process usually needs to be combined with artificial intelligence technologies, such as natural language processing and pattern recognition, to improve the accuracy and efficiency of labeling.

[0045] The trained data classification model needs to be deployed on the DPI device so that it can filter out valuable data packets in real time during the data collection phase. The specific implementation steps are as follows: Embed the trained data classification model into the software system of the DPI device. Use efficient embedded programming technology to optimize the model algorithm into code that can run efficiently on the DPI device. During the packet capture process, call the data classification model in real time for classification and filter in combination with the customized target corresponding filtering rules. Then, through parallel computing and stream processing technology, ensure timely response and processing of data in a high-bandwidth environment.

[0046] In step S13, an adaptive filtering algorithm is mainly used to preliminarily filter and classify the captured data packets according to preset filtering rules (such as custom IP addresses, port numbers, protocol types, etc.), and filter out non-target data packets to reduce the amount of subsequent data processing. Specifically, by combining the hash table and the Bloom filter algorithm, it is possible to quickly determine whether the data packet meets the filtering conditions. For the filtered data packets, their metadata is extracted, including source IP, target IP, protocol type, packet size, etc., and fixed-length field parsing is used to optimize the metadata extraction process to ensure low latency.

[0047] During the data collection process, the DPI system uses a pattern matching-based algorithm to identify and classify data packets. The core of the algorithm is to compare the data packet with the predefined traffic pattern. If it matches, it returns 1; otherwise, it returns 0. This method can effectively filter out data packets that match a specific pattern, providing a more accurate data basis for subsequent processing. For example, the expression is: ; Where P represents a data packet and T represents a predefined traffic pattern. This function returns 1 if the data packet matches the specific pattern and 0 if it does not match.

[0048] In deep packet inspection (DPI) devices, an adaptive filtering algorithm is used to perform preliminary filtering and classification of captured data packets according to preset rules (such as IP address, port number, protocol type, etc.), filtering out non-target data packets to reduce the amount of subsequent data processing. This adaptive filtering algorithm combines the algorithms of hash tables and Bloom filters to quickly determine whether a data packet meets the filtering conditions.

[0049] Exemplarily, the specific implementation steps of the adaptive filtering algorithm may include: first, preliminarily screening the data packets according to preset rules. For example, the filtering rules may include source IP address, destination IP address, source port, destination port and protocol type, etc.; defining a hash table, which is used to store and quickly find items that meet the filtering conditions. Its definition is as follows: ; Among them, keymodp is a large prime number, and Hash(key) is the size of the hash table.

[0050] When filtering a data packet, a hash value of the data packet attribute is calculated through a hash function, and a search or storage operation is performed in the hash table to determine whether the data packet meets the filtering conditions.

[0051] In addition, BloomFilter is a space-efficient probabilistic data structure used to determine the element Whether etc. belong to a set. Its definition is as follows: ; Hash function application, using k different hash functions to perform multiple hash operations on the packet attributes: ; in and is the parameter of the hash function, p is a large prime number, and m is the size of the Bloom filter.

[0052] During the insertion and query process, when inserting the packet attributes in the Bloom filter, each index position calculated by the hash function is marked as 1. During the query, if all k index positions are 1, the packet is considered to meet the filtering conditions.

[0053] For the data packets that pass the preliminary filtering, extract their metadata, including source IP, destination IP, protocol type, packet size, etc. Use the fixed-length field parsing method to optimize the metadata extraction process to ensure low latency and high efficiency.

[0054] Through the above steps, the use of adaptive filtering algorithms can effectively reduce the amount of data to be processed later and improve the overall performance and data processing efficiency of DPI equipment. The combined use of hash tables and Bloom filters can significantly improve filtering speed and space utilization while ensuring accuracy. The identified valuable data packets are further analyzed and processed, while irrelevant data packets can be directly discarded or only briefly recorded.

[0055] Specifically, the capture of these packets relies on efficient packet capture technology based on Berkeley Packet Filter (BPF). BPF defines filtering rules to filter out packets of interest (i.e., packets that meet the filtering rules), reducing the amount of data that needs to be processed later, thereby ensuring that packets can be captured accurately and without omissions in high-speed network environments. The core of BPF lies in its filter expression, which uses assembly language-like syntax to define filter rules. The specific implementation steps are as follows: 1. Filter rule definition: structbpf_programfilter; charfilter_exp[]="tcpport80"; 2. Compile filter rules: pcap_compile(handle,&filter,filter_exp,0,net); 3. Apply filtering rules: pcap_setfilter(handle,&filter).

[0056] In another feasible embodiment, since network traffic and threat patterns are constantly changing, the model in the DPI device also needs to be regularly updated and optimized. The accuracy and adaptability of the model can be further improved by introducing new network traffic data for retraining. The steps of model updating include: collecting the latest network traffic data and annotating it; retraining the existing model with new data and adjusting the model parameters to adapt to the new data distribution; evaluating the performance of the updated model to ensure its effectiveness and stability in the actual environment.

[0057] In another feasible embodiment, during the data collection phase, the deep packet inspection (DPI) device uses regular expressions or pattern matching technology to identify sensitive data (such as personal identity information, credit card information, etc.) and pre-processes the sensitive data to protect user privacy. Regular Expression is a powerful string matching tool that can quickly find and identify strings that match the pattern in a large amount of data by defining a specific pattern.

[0058] For example, to identify national ID numbers, you can use the following regular expression: \b\d{6}(18|19|20)?\d{2}(0

[19] |1

[02] )(0

[19] |

[12]

[09] |3

[01] )\d{3}([09Xx])\b; This expression matches the common format of resident ID numbers. Specifically: `\b` matches word boundaries, ensuring that the recognized pattern is a complete ID number; `\d{6}` matches six consecutive digits, indicating the area code; `(18|19|20)?\d{2}` matches the year, which can be one of 18, 19, 20, or none, followed by a two-digit year; `(0

[19] |1

[02] )` matches the month, a two-digit number between 01 and 12; `(0

[19] |

[12]

[09] |3

[01] )` matches the date, a two-digit number between 01 and 31; `\d{3}` matches a three-digit sequence code; `([09Xx])` matches the checksum, which may be a number or letter X / x; `\b` matches a word boundary again.

[0059] In addition, to identify credit card numbers, you can use the following regular expression: \b\d{4}[]?\d{4}[]?\d{4}[]?\d{4}\b; this expression matches strings in the format of "XXXXXXXXXXXXXXX" or "XXXXXXXXXXXXXXXX". Specifically, it includes the following fields: `\b` matches word boundaries to ensure that the recognized pattern is a complete credit card number; `\d{4}` matches four consecutive digits; `[]?` matches a hyphen or space, and the character is optional; `\d{4}` matches four consecutive digits again; `[]?` matches a hyphen or space again, and the character is optional; `\d{4}` matches four consecutive digits again; `[]?` matches a hyphen or space again, and the character is optional; `\d{4}` finally matches four consecutive digits; `\b` matches a word boundary again.

[0060] The pattern matching method in the embodiment of the present application defines a series of preset rules or patterns, and detects whether the data content conforms to these rules packet by packet, thereby efficiently screening out data packets containing sensitive information. For example, specific matching patterns can be defined for sensitive information such as email addresses and phone numbers. Once the information in the data packet matches these patterns, the system will identify that the data packet contains sensitive information and take corresponding protection measures to protect the user's privacy.

[0061] In actual applications, DPI devices use regular expressions and pattern matching technology to identify sensitive data through the following steps: 1. Real-time capture of network data packets; 2. Parsing the content of the data packets to extract text information; 3. Applying predefined regular expressions and matching patterns to scan text information; 4. Identifying sensitive data that matches the pattern and marking it; 5. Taking protective measures for the identified sensitive data, such as encryption or access control. This approach ensures that the user's sensitive or private information can be detected and protected in the early stages of data collection, thereby improving the security and privacy of network data processing.

[0062] Furthermore, in a feasible implementation manner, after the step of obtaining the traffic data of the target group, the method further includes: Step S14, calculating the loss function value according to the number of false captures and false filterings of the traffic data within a preset time window; Step S15, adjusting the filtering rules with the goal of optimizing the loss function value to obtain optimized filtering rules, and updating the current filtering rules based on the optimized filtering rules; Step S16, adjusting the length of the time window according to the real-time traffic of the network data packet, wherein when the real-time traffic is higher, the corresponding time window length is shorter.

[0063] The embodiment of the present application provides a method for adaptively optimizing and adjusting the length of filtering rules and time windows, so that the filtering rules and time windows can better adapt to the real-time situation of network data flow packets, thereby improving the accuracy of data packet filtering and classification precision.

[0064] For example, the embodiment of the present application adopts a flow statistics algorithm based on a time window to calculate the characteristic quantities of each flow (including flow duration, number of packets, total number of bytes, etc.). Stochastic gradient descent (SGD) is introduced to optimize the data packet capture and filtering process, and dynamically adjust the filtering rules to adapt to changes in network behavior. By defining the loss function L as the number of misfiltered packets The number of packets that were captured incorrectly The sum of the two filters is continuously optimized through online learning to minimize the loss function value: ,in, and are weight coefficients for balancing the costs of false capture and false filtering, respectively. Falsely captured packets refer to packets that are captured by mistake and do not comply with the filtering rules, and falsely filtered packets refer to packets that comply with the filtering rules that are abandoned by mistake. The method of adaptively optimizing filtering rules in the embodiment of the present application not only improves the accuracy and efficiency of data collection, but also enables the data collection process to adapt to changes in network behavior, providing a solid foundation for building high-quality group user portraits.

[0065] In addition, the flow statistics algorithm based on the time window performs periodic statistics and analysis on the network traffic by setting a fixed time window. In each time window, the system will classify all captured network traffic and calculate the characteristic quantities of each flow. These characteristic quantities include but are not limited to flow duration, number of packets and total number of bytes. These statistical data can help identify and distinguish normal traffic from abnormal traffic, thereby improving the size of the time window for filtering and detection, which directly affects the real-time and accuracy of traffic statistics. During the peak period of network traffic, reducing the time window can improve the real-time performance of data processing; and during the low-peak period of network traffic, appropriately increasing the time window can reduce the computing overhead. That is, the time window in the embodiment of the present application can be adaptively and dynamically adjusted to adapt to the changes in the current network traffic.

[0066] For example, in each time window, feature calculations are performed on all captured network flows (network data packets), mainly including the following aspects: calculating the time interval from the first packet to the last packet of each flow, counting the total number of packets of each flow in the time window, and counting the total number of bytes of each flow in the time window.

[0067] Furthermore, in order to improve the efficiency and accuracy of the time window-based flow statistics algorithm, this paper introduces the stochastic gradient descent (SGD) algorithm to continuously optimize the filtering rules through online learning. The stochastic gradient descent (SGD) algorithm is used to minimize the loss function value in each time window. The SGD algorithm gradually optimizes the filtering rules by iteratively updating small batches of data.

[0068] The specific formula is as follows: ; in, Indicates the current filtering rule parameters. is the learning rate, is the gradient of the loss function.

[0069] The online learning strategy enables filtering rules to be continuously updated according to the changes in real-time network traffic. By monitoring network traffic in real time, filtering rules are dynamically adjusted to adapt to new network behavior patterns. This adaptive adjustment mechanism can effectively improve the accuracy of filtering rules and reduce the occurrence of false filtering and false capture.

[0070] In order to further improve the efficiency and accuracy of the flow statistics algorithm, the embodiment of the present application uses a feature selection algorithm to automatically select the most important feature quantities for flow statistics. Commonly used feature selection algorithms include feature selection based on mutual information and feature importance evaluation based on tree models. Among them, mutual information is an indicator to measure the correlation between two variables. In the feature selection process, by calculating the mutual information between each feature quantity and the target variable, relatively more representative feature quantities are screened out. This method can improve the scientificity and rationality of feature selection.

[0071] In a feasible embodiment, after the step of obtaining the traffic data of the target group, the method further includes: Step S17, collecting preset characteristic quantities in the traffic data within the time window, wherein the preset characteristic quantities include at least one of the time interval between the start and end packets, the number of data packets, the number of bytes, the average capacity of data packets, and the data transmission rate; Step S18, comparing each preset characteristic quantity with a preset normal flow model to obtain a characteristic deviation value; Step S19: When the characteristic deviation value is greater than a preset threshold, the flow data in the time window is determined to be abnormal flow, and a preset early warning measure is executed.

[0072] The various features in the traffic data collected within the time window can not only reflect the basic information of the network flow, but also be used for further analysis and classification. For example, by clustering these features, network flows with similar behaviors can be identified, thereby helping to discover potential security threats.

[0073] In the embodiment of the present application, a statistical model of normal traffic is established by statistically analyzing the characteristic quantities of network traffic. In practical applications, potential abnormal behavior is identified by comparing the deviation between real-time traffic and the normal model. First, the DPI device needs to continuously collect network traffic data over a period of time. By capturing all data packets passing through the device and extracting their relevant information, a preliminary data set is formed. The information that needs to be captured includes but is not limited to the source IP address, destination IP address, protocol type, packet size, and timestamp.

[0074] Exemplarily, in each fixed time window, the collected network traffic data is processed to calculate the characteristic quantities of each flow. The main characteristic quantities include: calculating the time interval from the first packet to the last packet of each flow; counting the total number of packets of each flow in the time window; counting the total number of bytes of each flow in the time window; calculating the average packet size of each flow; and calculating the data transmission rate of each flow. The above characteristic quantities can fully reflect the state of network traffic and are helpful for subsequent statistical analysis and model building.

[0075] In order to establish a statistical model of normal traffic, a variety of statistical methods and models can be selected. Common methods include Gaussian distribution model, multivariate Gaussian model, histogram model and kernel density estimation. For the selected statistical model, the model parameters can be estimated by maximum likelihood estimation or Bayesian estimation method. For example, for the Gaussian distribution model, the model parameters can be determined by calculating the mean and variance of the traffic characteristic quantity: ; Among them, u and are the mean and variance of the feature values, N is the number of samples, is the characteristic value of the i-th sample.

[0076] The model is trained with historical data to ensure that it can accurately reflect the characteristics of normal traffic. The model needs to be verified and adjusted during the training process to improve its accuracy and robustness. The DPI device continuously monitors network traffic and extracts the characteristics of real-time traffic in each time window. These real-time characteristics will be used as input and compared with the normal traffic model. For the real-time traffic characteristics in each time window, calculate its deviation from the normal model. For the Gaussian distribution model, the deviation can be measured by calculating the standardized distance (zscore), expressed as: ; Among them, x is the real-time feature value, u is the mean of the normal model, is the standard deviation of the normal model. The larger the value of Zscore, the larger the feature deviation value. According to the calculated feature deviation value, judge whether the traffic is abnormal. Set a preset threshold. When the feature deviation value exceeds the threshold, the traffic is considered abnormal. For example, if the threshold is set to 3, when zscore is greater than 3, an abnormal alarm is triggered.

[0077] ; In another feasible embodiment, in order to further improve the accuracy of abnormality judgment, multiple feature quantities can also be jointly analyzed. For example, a multivariate Gaussian distribution model is used to combine multiple feature quantities for comprehensive evaluation: ; Among them, x is the real-time feature vector, u is the mean vector (equivalent to the normal traffic model), is the covariance matrix, is the Mahalanobis distance (i.e., the characteristic deviation value). A preset threshold can be set in advance. When the Mahalanobis distance exceeds the preset threshold, it can be determined that the traffic is abnormal.

[0078] Once abnormal traffic is detected, the system immediately triggers the early warning mechanism. The early warning mechanism includes a variety of early warning means such as real-time alarms, log records and automatic defense to ensure timely response and handling of potential security threats. The detected abnormal behavior is recorded in detail, including time, traffic characteristics, deviation values ​​and other information. These log records are helpful for subsequent analysis and tracking. In some feasible embodiments, automatic defense mechanisms can be combined, such as dynamically adjusting firewall rules, isolating suspicious traffic, etc., to further improve network security. The collected data is then securely stored in data storage facilities for subsequent analysis and processing.

[0079] The technical solution of the embodiment of the present application has obvious advantages in resource utilization efficiency and network load management. Through the aforementioned optimized data processing and analysis method, the demand for hardware resources and the load on network entities are effectively reduced, thereby improving the overall network performance. This is of great significance for improving the service quality and reducing costs of network operators in the context of the big data era.

[0080] In a feasible embodiment, after the step of collecting the traffic data, call data, SMS data, location data and terminal device data of the target group, refer to Figure 3 , the method further comprises: Step A10, inputting the collected multi-source data into a preset data access model, and performing standardization processing on the multi-source data through a preset conversion function to obtain standardized multi-source data, wherein the multi-source data includes traffic data, call data, SMS data, location data, and terminal device data; After collecting multi-source data, it is necessary to further efficiently and accurately integrate information from multiple data sources to build a user portrait. Among them, these multi-source data include DPI traffic data, call record (CDR) data, SMS record data, location data (obtained through base stations or GPS) and terminal device data. To achieve this goal, the embodiment of the present application adopts a unified data access model (UDAM) to standardize the access process of various data sources and ensure the real-time and integrity of the data. Specifically, data format standardization is achieved through the conversion function: ; in Represents standardized multi-source data, is the original data, To access the data model, F is the conversion function, which ensures that data from different sources can be processed and analyzed uniformly to obtain standardized multi-source data.

[0081] Exemplarily, data from various sources involved in the multi-source data form corresponding data tables, and together constitute a data table model corresponding to the multi-source data. Field information corresponding to each data table is shown in Table 1 below: Data Table Model Field Information DPI flow data table User ID, access timestamp, accessed URL, traffic consumption, application type, protocol type Call Record Data Table User ID, call start time, call end time, call duration, callee ID, call type (domestic, international, roaming) SMS record data table User ID, sending time, recipient ID, SMS content, SMS type (sent / received) Location Information Data Table User ID, timestamp, location coordinates (latitude and longitude), positioning method (GPS / base station positioning), moving speed Terminal equipment information data sheet User ID, device model, operating system and version, time of first use of the device, time of last activity of the device Table 1 In a feasible embodiment, the standardization process may include data formatting. For example, for dates and timestamps, a unified formatting method is used to convert all dates and timestamps into a unified format. If the formats of the dates and timestamps in the original data are inconsistent, the following conversion formula may be used for format conversion: ; in, Represents the original date or time stamp, Indicates the standard format after conversion. The format function converts the date and time stamp according to the specified format string (that is, YYYY-MM-DDHH:MM:SS).

[0082] For other types of data, such as numeric values ​​and text, ensure that all data is stored and processed using the same data type. For example, convert all numeric data to floating point or integer types, and ensure that all text data is encoded consistently (such as UTF8).

[0083] Step A20, preprocessing the standardized multi-source data to obtain preprocessed multi-source data, wherein the preprocessing includes at least one of deduplication, padding, and correction; For each item of data in the above standardized DPI traffic data table, call record (CDR) data table, SMS record data table, location information data table and terminal device information data table, standardize the date and timestamp format, clean up invalid, erroneous and duplicate records, and fill in missing data fields to ensure accurate matching and linking of different records representing the same group of users from multiple data sources.

[0084] Exemplarily, the preprocessing process may include: using data validation rules to remove records that do not meet data quality requirements. For example, for a date field that does not conform to a predetermined format, it may be marked as an invalid record and deleted, and the expression is as follows: ; Where D is the date field, and the isValid function returns 1 (valid) or 0 (invalid) depending on whether it matches the specified format.

[0085] Identify and delete duplicate records in a data set, mainly by calculating the hash value of the record and comparing: ; in, is the hash value of the record, are the fields in the record, and the hash function calculates the hash value of the field combination. All records with the same hash value are considered duplicates, and all but the first occurrence are deleted.

[0086] For missing data fields, appropriate strategies are used to fill them. For example, numerical data can be filled with the mean or median, categorical data can be filled with the mode, or the K-Nearest Neighbor algorithm (KNN) can be used to predict missing values: ; in, is the missing value, is the value of the available similar records, and KNN is a prediction function based on the K nearest neighbor algorithm.

[0087] In the case where the multi-source data has an identity identifier or a device identifier, step A30 is performed to classify the pre-processed multi-source data with the same identity identifier or device identifier as belonging to the same grouped user, thereby obtaining multiple grouped users and multi-source data corresponding to each grouped user; In order to distinguish the ownership of various data in multi-source data (i.e., which user they belong to), in an embodiment of the present application, when there is a known association relationship between data sources, such as the same mobile phone number or device ID, these identifiers are directly associated in a mapping table, so that multi-source data belonging to different grouped users can be distinguished according to the identifiers. Because each mobile phone number or device ID corresponds one-to-one to a single user, this direct association is a relatively simple and direct method to identify the same grouped users in multi-source data.

[0088] Or, in the case where the multi-source data does not have an identity identifier or a device identifier, executing step A40, extracting feature data from the pre-processed multi-source data, and determining a plurality of grouped users and the multi-source data corresponding to each grouped user according to the similarity between the feature data; For multi-source data without identity identification or device identification, it is not possible to directly associate and divide according to the identifier. Therefore, in the embodiment of the present application, a set of heuristic rules are applied to identify records that may belong to the same grouped users by extracting feature data from the multi-source data. These rules are based on the similarity of user behavior and attributes, including the overlap of geographic location information, the similarity of device usage patterns, and the matching of network behavior patterns to separately identify the multi-source data belonging to the same grouped user in the multi-source data, thereby achieving the effect of correspondingly associating the grouped users with the multi-source data.

[0089] Step A50: storing each grouped user and the corresponding multi-source data in a database in the form of a mapping table, wherein in the mapping table, each grouped user corresponds to a globally unique identifier one by one.

[0090] Create a mapping table for each data source using its segment user's unique identifier as the key, thereby aggregating each segment user's activities from different data sources After successfully identifying the multi-source data representing the same grouped user through step A30 or step A40, each identified grouped user will be assigned a globally unique identifier (GUID). The generation of GUIDs usually adopts the standard UUID generation method to ensure the global uniqueness of the identifier of each grouped user entity, which is crucial for the integration of user information across data sources and subsequent data management, and is conducive to more efficient query of the multi-source data corresponding to each user when performing user profiling.

[0091] In the embodiment of the present application, constructing and updating the mapping table becomes the basis for maintaining the consistency and accessibility of user data. The mapping table records in detail the relationship between each GUID and its corresponding user record, and becomes a bridge to link the user data scattered in various data sources with the unified grouped user entity. It can be understood that this mapping table not only supports the unified processing and analysis of user data, but also simplifies the complexity of data management and query.

[0092] It should be noted that maintaining the integrity and timeliness of the mapping table requires regular data synchronization and updating. As new user data continues to emerge, the mapping table needs to be updated regularly to include the multi-source data of newly identified users. Specifically, it includes associating new multi-source data to existing GUIDs, or generating new GUIDs for newly identified grouped user entities and associating corresponding multi-source data.

[0093] Furthermore, in a feasible embodiment, the step of extracting feature data from the preprocessed multi-source data and determining a plurality of grouped users and the multi-source data corresponding to each of the grouped users according to the similarity between the feature data includes: Step A41, extracting application type, protocol type and traffic consumption from the traffic data to obtain feature data corresponding to the traffic data; Step A42, extracting call duration, call type, and call start and end time from the call data to obtain feature data corresponding to the call data; Step A43, extracting the SMS type, sending time and SMS content from the SMS data to obtain feature data corresponding to the SMS data; Step A44, extracting the location coordinates, positioning method and timestamp from the location data to obtain feature data corresponding to the location data; Step A45, extracting the device model, operating system, first use time and last active time of the device from the terminal device data to obtain feature data corresponding to the terminal device data; Step A46, vectorizing each feature data to obtain a corresponding feature vector; Step A47, based on the preset multiple grouping labels and the relevant feature vectors of each grouping label, cluster analysis is performed on each feature vector to obtain the grouping labels corresponding to each multi-source data; Step A48: Classify the multi-source data based on the similarity between the grouping labels to obtain a plurality of grouped users and the multi-source data corresponding to each grouped user.

[0094] The embodiment of the present application provides a detailed method for identifying grouped users based on the similarity between feature data of multi-source data, wherein there is no fixed order between steps such as step A41, step A42, step A43, step A44, and step A45. In order to accurately identify and associate multi-source data representing the same grouped users, a technical solution including multi-dimensional feature fusion and dynamic threshold adjustment mechanism can be adopted to ensure that the information extracted from different data sources can be effectively and comprehensively utilized. The specific steps include detailed feature extraction, vectorization, feature selection, and fusion from multi-source data.

[0095] For example, key feature data can be extracted from multiple data sources such as DPI traffic data table, call record (CDR) data table, SMS record data table, location information data table and terminal device information data table. For example, application type, protocol type and traffic consumption can be extracted from DPI traffic data; call duration, call type and call start and end time can be extracted from call records; SMS type, sending time and SMS content can be extracted from SMS records; location coordinates, positioning method and timestamp can be extracted from location information; device model, operating system and version, first use time and last active time of the device can be extracted from terminal device information.

[0096] The above feature data are divided into categorical, numerical, time and text types, and are processed by corresponding vectorization methods. Specifically, categorical features are converted into numerical feature vectors through one-hot encoding, numerical features are used directly or normalized, time features are converted into seconds or other forms starting from a fixed time point, and text features are vectorized through bag-of-words model, TFIDF (term frequency–inverse document frequency) or word embedding technology.

[0097] In order to filter out the features with the highest similarity to identify the user records of the same group through correlation analysis and feature selection algorithm and reduce the dimension of feature space, the similarity is calculated for each feature data X and user label group Y. The calculation formula of similarity r is: ; in, and are the means of X and Y respectively.

[0098] Exemplarily, the user grouping labels Y that may be involved include, but are not limited to: based on the analysis of users' online behavior, such as "high-traffic users", "low-traffic users", "frequent social media users", and "video streaming enthusiasts"; based on users' usage preferences for different communication services, such as "heavy data users" and "primary call users"; based on the types of applications used by users, such as "game players", "business application users", and "entertainment content consumers"; combining economic data and user registration information to divide "high consumption capacity", "medium consumption capacity", and "low consumption capacity"; using location information to analyze users' activity range and permanent locations, such as "urban users" and "suburban users"; analyzing the types of devices and network technologies (4G or 5G) used by users to identify "technology pioneers" and "traditional device users"; combining user behavior patterns and consumption records to identify "loyal users" and "potential lost users"; based on the user's activity level and historical length in the service, identifying them as "new users", "growing users", "mature users", and "silent users"; judging the user's social interaction frequency by analyzing call records and text message records, such as "high social interaction users" and "low social interaction users"; analyzing the main time periods when users go online, such as "active users at night" and "active users during working hours".

[0099] After determining these grouping labels, it can be determined whether they can be classified into the same grouping user based on the similarity between the grouping labels corresponding to each data in the multi-source data. For example, if two sets of data have multiple and completely identical grouping labels, they can be classified into the same grouping user. In this way, each multi-source data can be classified separately to obtain multiple grouping users and multi-source data associated with each grouping user.

[0100] In another feasible embodiment, the similarity between multi-source data may be evaluated based on the similarity of user behaviors and attributes, including overlap of geographic location information, similarity of device usage patterns, and matching of network behavior patterns.

[0101] Regarding the overlap of geographic location information, the overlap of geographic location information is a similarity calculation method based on user geographic location behavior, which is used to identify and link records representing the same group of users. This method focuses on analyzing and comparing the geographic location data of users in the same or similar time periods to determine whether these records may belong to the same group of users. Specifically, in order to compare the geographic location information in different records, it is first necessary to assign the location data to the corresponding time window according to the timestamp. The size of the time window (for example, one hour or one day) depends on the specific needs of the application scenario and the characteristics of the user behavior pattern. In each time window, the spatial distance between the geographic location points of the two records is calculated. Common spatial distance calculation methods include Euclidean distance or Haversine formula (used to calculate the distance between two points on the earth). If the calculated spatial distance is less than a predetermined threshold (for example, 100 meters), it is considered that the two location records belong to the same place or are very close in the time window. By comparing the location overlap in multiple time windows, the overall geographic location information overlap similarity is calculated. The overlap ratio is calculated, that is, the ratio of the number of time windows with overlapping locations to the total number of time windows in all compared time windows.

[0102] Regarding the similarity of device usage patterns, similarity analysis of device usage patterns is a method of using information about users' terminal device usage habits to identify and link records representing the same group of users. This analysis relies on an in-depth study of the behavioral patterns of users using devices at different times and places, including device models, operating systems and their versions, application installation and usage, etc. The following is a detailed description of the similarity analysis of device usage patterns: For each group of users' device usage records, a feature vector is constructed, including multi-dimensional information such as device model, operating system and version. Each dimension of the feature vector represents an aspect of the user's use of the device, such as: device model: such as iPhone12, Samsung Galaxy S20, etc.; operating system and version: such as iOS14.4, Android11, etc.; application usage: installation and usage frequency of specific applications, etc. Finally, a threshold is set based on the similarity score. When the similarity score of two records exceeds this threshold, they can be considered to belong to the same group of users.

[0103] Regarding the matching of network behavior patterns, matching analysis of network behavior patterns is one of the key strategies for identifying and linking records of users in the same group, focusing on analyzing users' activities and behavioral habits on the Internet. This analysis determines whether different data records belong to the same group of users by comprehensively evaluating the frequency, time, and persistence of users' behavioral characteristics such as visiting websites and using applications. The following describes the network behavior pattern matching method in detail: For each network behavior record of a group of users, a feature vector is constructed. This vector may contain multiple dimensions, reflecting the user's network access habits, such as: the frequency of visiting a specific website or application; the time distribution of activities (for example, daytime vs. nighttime); the average duration of web browsing or application use; and a suitable similarity measurement method is used to compare the feature vectors between different records. Common methods include cosine similarity, Jaccard similarity coefficient, or Euclidean distance. For example, cosine similarity can be used to measure the angle between two users' network behavior feature vectors, thereby inferring their similarity. Based on the calculated similarity score, if the similarity between two records exceeds a preset threshold, it can be considered that the two records represent the network behavior patterns of users in the same group.

[0104] In a feasible embodiment, the activity information includes at least social activity and video activity, and the preference information includes at least application preference information, device preference information and social preference information; The step of constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data and the terminal device data comprises: Step S21, determining flow information according to flow data, wherein the flow includes total flow and daily average flow within a preset period; Step S22, calculating the social activity according to the social application usage time and the number of social application accesses in the traffic data; Step S23, calculating the video activity according to the video application usage time and the number of video application accesses in the traffic data; Step S24, inputting the application usage data in the traffic data, the terminal device data, and the social application usage data in the traffic data into the corresponding user behavior prediction model respectively, to obtain application preference information, device preference information, and social preference information, wherein the user behavior prediction model includes an application preference prediction model, a device preference prediction model, and a social preference prediction model; Step S25, analyzing the cost information, application purchase information, and service purchase information in the traffic data, call data, and SMS data to determine consumption information; Step S26, extracting the corresponding activity area range from the position data to obtain position information; Step S27, analyzing the starting time point of the Internet access log in the traffic data to determine the time period information.

[0105] The embodiment of the present application provides a step of selecting key feature vectors from multi-source data, which can more accurately and comprehensively describe the user behavior characteristics, and facilitate comprehensive and accurate user profiling of the user. It should be noted that there is no fixed order between steps S21 to S27.

[0106] When constructing a group user portrait based on DPI traffic analysis and multi-source data fusion, the embodiments of the present application focus on several key dimensions for feature construction, including traffic usage, frequency and duration of social media use, frequency and duration of video streaming use, communication service usage preferences, application type usage frequency, economic analysis data, location data, device type and network technology usage, user loyalty, social interaction frequency, and main active time.

[0107] For example, total traffic and average daily traffic are basic indicators for measuring users' Internet usage habits. Total traffic can be calculated by summarizing the data consumption of users in a specific time period, while average daily traffic is calculated by dividing the total traffic by the corresponding number of days. These indicators can help identify heavy and light users of data usage. In addition, analyzing the total time and average usage time of users on social media applications, as well as the frequency of access, can reveal the social activity and preferences of users, which can be achieved by tracking the activity logs of social media applications. By calculating the total and average time users watch video content, as well as the frequency of access, users' consumption preferences for video entertainment content can be understood, which usually requires analyzing the user's access data to video streaming services. Data usage and call duration reflect users' usage habits in mobile network communications, which can be obtained directly from the usage data provided by operators. Analyzing the frequency of use of different types of applications (such as games, business, entertainment, etc.) can reveal users' interests, which is usually done by monitoring application usage logs. Users' consumption level can be measured by analyzing indicators such as monthly fees and the frequency of purchasing applications or services. This reflects the user's economic status and spending power. Analysis of users' main activity areas and activity ranges can be extracted from geographic location data, which helps to understand users' lifestyles and activity habits. Users' preferred device types (such as smartphones, tablets) and network technologies (4G, 5G) reflect users' technology acceptance, which can be analyzed through device and network usage records. By analyzing the usage time and login frequency of services or products, users' loyalty to specific services or products can be evaluated, which is particularly important for identifying loyal customers and potential churned customers. The frequency of users' social interactions can be determined through the analysis of call records and text message records, which helps to understand users' social networks and interaction preferences. The main time periods for users to go online (such as nighttime and working hours) can be identified by analyzing online logs, which reflects users' living habits and possible demand times.

[0108] Furthermore, the construction of the above-mentioned feature vectors may include the following steps: Total traffic of users and average daily flow The formula can be and To calculate, represents the data consumption on the i-th day, and d is the number of days in the observation period. The above indicators can help distinguish the data usage intensity of users. Social media activity can be calculated by the formula and To measure, among them, is the total social media activity, is the average social media activity, is the duration of a single social media use, and s is the total number of visits. Video content consumption preferences can also be calculated in a similar way, and the frequency of users' use of different types of applications , consumption level , device and network technology preferences are identified through specially designed monitoring and log analysis systems. By constructing feature vectors and applying the gradient boosting machine (Light-GBM, Gradient Boosting Machine) algorithm, this process can learn and simulate complex patterns of user behavior, thereby accurately predicting user preferences and behavior trends. The GBM model iteratively optimizes the loss function L(y, f(x)), where y is the target variable f(x) is the model prediction value, to gradually improve the accuracy of the prediction. The construction of feature vectors and the application of the GBM model jointly ensure the ability to deeply integrate and mine information from multi-source data, improve the accuracy and practicality of user portraits, and effectively overcome the limitations of traditional technical solutions. Moreover, the unique method of combining DPI with Light-GBM in the technical solution of the embodiment of the present application can be used for efficient and accurate user behavior analysis and interest identification, realizing an efficient and accurate user portrait construction method.

[0109] In another feasible embodiment, in order to enable user portrait data to be used by different systems and applications, the present application also provides an API (Application Programming Interface) or service. This API provides the function of accessing user portrait data and allows external systems to query the portrait information of a specific user. The design of the API should take into account security, response speed and ease of use.

[0110] Exemplarily, the API provides the following functions: obtaining portrait information of a specific user; returning a user portrait data set based on specific query conditions; and updating user portrait information in real time.

[0111] The API is implemented using the RESTful (a set of architectural constraints and principles) architecture, providing standard HTTP request methods (such as GET, POST) to handle external requests. In addition, when providing user portrait data, the API formats the data into a common JSON format. This ensures that different systems and applications can easily parse and process the data. In terms of data transmission, the security and integrity of the data can be ensured. Using the HTTPS protocol to encrypt data transmission can protect user data from interception and tampering.

[0112] Finally, after the API or service is developed, it is integrated into the target application system. In the recommendation system, the user's profile information is obtained through the API, and this information is used to customize personalized recommendations. In the advertising system, user profiles are used for precise targeting and personalization of advertising content.

[0113] The dynamic update mechanism of user portraits used in the embodiments of the present application can ensure that the portrait data continuously reflects the latest status of the user. Therefore, it can provide strong data support for applications such as personalized services, precision marketing and user segmentation, and significantly improve the identification and service efficiency of target groups.

[0114] For ease of understanding, refer to Figure 4 A feasible application of the method for constructing a user portrait based on multi-source data in an embodiment of the present application may include the following steps: Step 1, collecting traffic data; Step 2, integrating traffic data with multi-source data (including call data, SMS data, location data, and terminal device data, etc.); Step 3, preprocessing the multi-source data; Step 4, identifying grouped users and determining the multi-source data corresponding to each grouped user; Step 5, assigning a globally unique identifier GUID to each grouped user and storing it in the form of a mapping table; Step 6, constructing features based on the stored multi-source data to obtain multiple feature vectors; Step 7, using multiple feature vectors to construct a user portrait; Step 8, integrating the above user portraits into the application and providing an API for external calls.

[0115] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the user portrait construction method based on multi-source data of the present application. More forms of simple transformations based on this technical concept are all within the scope of protection of the present application.

[0116] The present application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the user portrait construction method based on multi-source data in the above-mentioned embodiment one.

[0117] Reference below Figure 5, which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic devices in the embodiments of the present application may include but are not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), PMPs (Portable Media Players: portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0118] like Figure 5 As shown, the electronic device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0119] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0120] The electronic device provided by the present application adopts the user portrait construction method based on multi-source data in the above embodiment, which can solve the technical problem of insufficient accuracy and depth in the characterization of user behavior characteristics in the current user portrait construction scheme. Compared with the prior art, the beneficial effects of the electronic device provided by the present application are the same as the beneficial effects of the user portrait construction method based on multi-source data provided in the above embodiment, and the other technical features in the electronic device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0121] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0122] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0123] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the user portrait construction method based on multi-source data in the above-mentioned embodiment.

[0124] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0125] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0126] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device: collects traffic data, call data, text message data, location data and terminal device data of the target group; constructs a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data and the terminal device data, wherein the feature vector includes at least one of traffic information, activity information, preference information, consumption information, location information and time period information; inputs each feature vector corresponding to the target user in the target group into a preset user portrait model, and obtains a user portrait of the target user through the user portrait model.

[0127] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0128] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0129] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0130] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for constructing a user portrait based on multi-source data, and can solve the technical problem of insufficient accuracy and depth in the characterization of user behavior characteristics in the current user portrait construction scheme. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the method for constructing a user portrait based on multi-source data provided in the above-mentioned embodiment, and will not be repeated here.

[0131] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for constructing a user portrait based on multi-source data.

[0132] The computer program product provided by this application can solve the technical problem of insufficient accuracy and depth in describing user behavior characteristics in the current user portrait construction scheme. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the user portrait construction method based on multi-source data provided in the above embodiment, and will not be repeated here.

[0133] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for constructing a user portrait based on multi-source data, characterized in that: The method for constructing a user portrait based on multi-source data includes: Collect traffic data, call data, SMS data, location data, and terminal device data of the target group; Constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data, and the terminal device data, wherein the feature vector includes at least one of traffic information, activity information, preference information, consumption information, location information, and time period information; Each feature vector corresponding to the target user in the target group is input into a preset user portrait model, and a user portrait of the target user is obtained by constructing the user portrait model.

2. The method for constructing a user profile based on multi-source data according to claim 1, characterized in that: The step of collecting traffic data of the target group includes: Continuously obtain network data packets through deep packet inspection devices deployed at network nodes; Based on a preset time window, the flow data in each of the network data packets is classified by a pre-trained data classification model to obtain a data classification result; According to the filtering rules corresponding to the target group and the data classification result, the flow data in the network data packet is filtered to obtain the flow data of the target group.

3. The method for constructing a user profile based on multi-source data according to claim 2, characterized in that: After the step of obtaining the traffic data of the target group, the method further includes: Calculating a loss function value according to the number of false captures and the number of false filters of the traffic data within a preset time window; With the goal of optimizing the loss function value, adjusting the filtering rules to obtain optimized filtering rules, and updating the current filtering rules based on the optimized filtering rules; The length of the time window is adjusted according to the real-time traffic of the network data packet, wherein when the real-time traffic is higher, the length of the corresponding time window is shorter.

4. The method for constructing a user profile based on multi-source data according to claim 2, characterized in that: After the step of obtaining the traffic data of the target group, the method further includes: Collecting preset feature quantities in the traffic data within the time window, wherein the preset feature quantities include at least one of the time interval between the start and end packets, the number of data packets, the number of bytes, the average capacity of data packets, and the data transmission rate; Comparing each of the preset characteristic quantities with a preset normal flow model to obtain a characteristic deviation value; When the characteristic deviation value is greater than a preset threshold, the flow data in the time window is determined to be abnormal flow, and a preset early warning measure is executed.

5. The method for constructing a user profile based on multi-source data according to claim 1, characterized in that: After the step of collecting the traffic data, call data, SMS data, location data and terminal device data of the target group, the method further includes: Inputting the collected multi-source data into a preset data access model, and performing standardization processing on the multi-source data through a preset conversion function to obtain standardized multi-source data, wherein the multi-source data includes the traffic data, the call data, the text message data, the location data, and the terminal device data; Preprocessing the standardized multi-source data to obtain preprocessed multi-source data, wherein the preprocessing includes at least one of deduplication, padding, and correction; Classifying the pre-processed multi-source data with the same identity identifier or device identifier as belonging to the same grouped user, and obtaining a plurality of grouped users and multi-source data corresponding to each of the grouped users; Or, extracting feature data from the preprocessed multi-source data, and determining a plurality of grouped users and the multi-source data corresponding to each of the grouped users according to the similarity between the feature data; The grouped users and the corresponding multi-source data are stored in a database in the form of a mapping table, wherein in the mapping table, each grouped user corresponds to a globally unique identifier one by one.

6. The method for constructing a user profile based on multi-source data according to claim 5, characterized in that: The step of extracting feature data from the preprocessed multi-source data and determining a plurality of grouped users and the multi-source data corresponding to each of the grouped users according to the similarity between the feature data comprises: Extracting application type, protocol type and traffic consumption from the traffic data to obtain feature data corresponding to the traffic data; Extracting call duration, call type, and call start and end time from the call data to obtain feature data corresponding to the call data; Extract the SMS type, sending time and SMS content from the SMS data to obtain feature data corresponding to the SMS data; Extracting the location coordinates, positioning method and timestamp from the location data to obtain feature data corresponding to the location data; Extracting the device model, operating system, first use time and last active time of the device from the terminal device data to obtain feature data corresponding to the terminal device data; Vectorize each of the feature data to obtain a corresponding feature vector; Based on a plurality of preset grouping labels and related feature vectors of each of the grouping labels, cluster analysis is performed on each of the feature vectors to obtain grouping labels corresponding to each of the multi-source data; Based on the similarity between the grouping labels, the multi-source data are classified to obtain a plurality of grouped users and the multi-source data corresponding to each of the grouped users.

7. The method for constructing a user profile based on multi-source data according to any one of claims 1 to 6, characterized in that: The activity information includes at least social activity and video activity, and the preference information includes at least application preference information, device preference information and social preference information; The step of constructing a plurality of corresponding feature vectors according to the traffic data, the call data, the text message data, the location data and the terminal device data comprises: Determine flow information according to the flow data, wherein the flow includes the total flow and the average daily flow within a preset period; Calculate the social activity according to the usage time of the social application and the number of visits to the social application in the traffic data; Calculate video activity based on the video application usage time and the number of video application accesses in the traffic data; Input the application usage data in the traffic data, the terminal device data, and the social application usage data in the traffic data into corresponding user behavior prediction models respectively to obtain application preference information, device preference information, and social preference information, wherein the user behavior prediction model includes an application preference prediction model, a device preference prediction model, and a social preference prediction model; Analyze the cost information, application purchase information, and service purchase information in the traffic data, the call data, and the text message data to determine consumption information; Extract the corresponding activity area range from the location data to obtain location information; The starting time point of the Internet access log in the traffic data is analyzed to determine the time period information.

8. An electronic device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for constructing a user portrait based on multi-source data as described in any one of claims 1 to 7.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for constructing a user portrait based on multi-source data as described in any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the method for constructing a user profile based on multi-source data as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method and system for determining potential flow consumption user based on interaction information

    CN119494673A

  • Big data analysis method based on credential information

    CN120408081A

  • New media product user portrait analysis system and method based on media big data

    CN120894063A

  • Method, system and device for establishing group portrait based on population database data and medium

    CN121233650A