An intelligent emotion matching system based on spatiotemporal behavioral polygons

By using an intelligent emotion matching system based on spatiotemporal behavioral polygons, the problems of insufficient information authenticity and single matching dimensions in traditional dating matching technology have been solved. This system enables multi-level security authentication and personalized recommendations, thereby improving the efficiency and quality of dating matching.

CN122087635APending Publication Date: 2026-05-26BEIBU GULF UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIBU GULF UNIV
Filing Date
2025-12-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional dating matching technologies lack a spatiotemporal dimension, have insufficient information authenticity, offer only a single matching dimension, and have poor long-term effectiveness. Existing behavioral analysis technologies are easily disguised or performative, and cannot reflect deep-seated values.

Method used

An intelligent emotion matching system based on spatiotemporal behavioral polygons is adopted. The user management module verifies the authenticity of the identity, the data collection and processing module acquires multi-source spatiotemporal data and cleans and desensitizes it, the behavior analysis engine constructs true behavior centers and semantic tags, the matching calculation engine performs spatial and behavioral semantic similarity fusion calculation, and the recommendation engine performs risk filtering and ranking.

Benefits of technology

It has improved the efficiency and quality of matchmaking, achieved multi-level security authentication and personalized recommendations, promoted the practical application of behavioral geography theory, and improved the accuracy of analysis and matching precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087635A_ABST
    Figure CN122087635A_ABST
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence technology, and in particular to an intelligent emotion matching system based on spatiotemporal behavioral polygons. The system includes a user management module for verifying user identity authenticity; a data acquisition and processing module for acquiring and processing data from user smart terminal devices to obtain standard multi-source data; a behavior analysis engine for calculating true behavior centers from the standard multi-source data, and for converting discrete behavior points in the standard multi-source data into semantically meaningful behavior tags; a matching calculation engine for acquiring data from the behavior analysis engine to obtain corresponding matching degrees based on the user's residential distance and the distance to the user's true behavior centers; and a recommendation engine for ranking the matching degrees. This invention can improve the efficiency and quality of matchmaking, promote social harmony, and advance the practical application of behavioral geography theory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intelligent emotion matching system based on spatiotemporal behavioral polygons. Background Technology

[0002] Traditional dating matching technologies primarily rely on static attributes such as age, income, and education level, or calculate similarity based on user-submitted interest tags. These technologies suffer from drawbacks such as insufficient information authenticity, lack of spatiotemporal dimensions, limited matching dimensionality, and poor long-term effectiveness. Existing behavioral analysis technologies, such as micro-expression analysis, are easily faked; social media behavior analysis can be subject to performative behavior; and consumer behavior analysis only reflects economic capacity and fails to reveal deeper values. Summary of the Invention

[0003] To address the aforementioned issues, this invention provides an intelligent emotion matching system based on spatiotemporal behavioral polygons, which improves the efficiency and quality of marriage and dating matching, promotes social harmony, and drives the practical application and development of behavioral geography theory.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] An intelligent emotion matching system based on spatiotemporal behavioral polygons includes a user management module, a data acquisition and processing module, a behavior analysis engine, a matching calculation engine, and a recommendation engine.

[0006] The user management module is used to verify the authenticity of user identities;

[0007] The data acquisition and processing module is used to acquire data from user smart terminal devices to obtain multi-source spatiotemporal data, and the data acquisition and processing module processes the multi-source spatiotemporal data to obtain standard multi-source data.

[0008] The behavior analysis engine is used for data acquisition by the data acquisition and processing module. The behavior analysis engine performs true behavior center calculation on the standard multi-source data to obtain true behavior center data, and the behavior analysis engine transforms the discrete behavior points of the standard multi-source data into semantic behavior labels.

[0009] The matching calculation engine is used for data acquisition by the behavior analysis engine. The matching calculation engine performs spatial similarity and behavioral semantic similarity fusion calculation based on the behavioral feature data to obtain the corresponding matching degree based on the user's residential distance and the user's true behavior center distance.

[0010] The recommendation engine is used to sort the matching scores to obtain recommendation results;

[0011] Furthermore, the user management module includes an identity verification submodule, which is used for uploading user information and connects to a third-party interface of the government system to verify the user information in order to verify the authenticity of the user's identity.

[0012] Furthermore, the data acquisition and processing module includes a data acquisition submodule, a data cleaning submodule, a de-identified privacy data submodule, and a standardization processing submodule.

[0013] The data acquisition submodule is used to collect GPS data, WiFi data, Bluetooth data, transaction data and social media data of the smart terminal device to obtain multi-source spatiotemporal data. The data acquisition submodule sets different sampling frequencies for the GPS data, WiFi data and Bluetooth data according to the battery level, network type and behavior status of the smart terminal device.

[0014] The data acquisition submodule calculates the user's behavioral status using the GPS positioning results of the smart terminal device.

[0015] Formula (2.1)

[0016] in, For behavioral states, when If the state is determined to be moving, it is otherwise considered stationary. These are the coordinates of two consecutive GPS coordinates; For timestamps;

[0017] The data cleaning submodule is used for data acquisition by the data acquisition submodule, and the data cleaning submodule cleans the multi-source spatiotemporal data to remove invalid data, remove abnormal data, fill in missing values, and obtain valid multi-source data.

[0018] The de-identified privacy data submodule is used for data acquisition by the data cleaning submodule, and the de-identified privacy data submodule performs GPS geographic data blurring, transaction data de-identification, and user identifier anonymization processing on the effective multi-source data to obtain de-identified multi-source data;

[0019] The standardization processing submodule is used for data acquisition by the de-identified privacy data submodule, and the standardization processing submodule performs data field unification and timestamp standardization processing on the de-identified multi-source data to obtain standard multi-source data.

[0020] Furthermore, the behavior analysis engine includes a feature extraction submodule, a behavior polygon construction submodule, a true behavior center calculation submodule, and a behavior semantic understanding submodule.

[0021] The feature extraction submodule is used for data acquisition by the data acquisition and processing module, and the feature extraction submodule processes the GPS data in the standard multi-source data to generate feature point sets for each time period. The feature point sets include longitude, latitude, and dwell time.

[0022] The behavior polygon construction submodule is used for data acquisition by the feature extraction submodule, and the behavior polygon construction submodule processes the feature point set to obtain behavior polygons for each period. The attributes of the behavior polygons include vertex coordinates, area, and geometric center.

[0023] The true behavior center calculation submodule is used for data acquisition by the behavior polygon construction submodule, and the true behavior center calculation submodule processes the geometric center of the polygon to obtain true behavior center data.

[0024] The behavior semantic understanding submodule is used for data acquisition by the behavior polygon construction submodule, and the behavior semantic understanding submodule processes the vertex coordinates in the feature point set to generate semantic behavior tags based on the geographical location, merchant type, and access frequency corresponding to the vertex coordinates.

[0025] Furthermore, the feature extraction submodule sorts the GPS data in the standard multi-source data by timestamp. When the latitude and longitude distance of multiple consecutive GPS data points for a user at a certain location is less than the dwell distance threshold and the time span is greater than the dwell time threshold, the location is determined to be a dwell point. The feature extraction submodule divides the dwell points into time periods, collects the user's dwell points for each period to generate a feature point set for each time period, and marks insufficient data periods when the number of feature points is less than three periods.

[0026] The behavior polygon construction submodule obtains the remaining points in the stack of the feature point set using the Graham scan method, and defines the remaining points in the stack as vertices of the convex hull polygon. The vertices are connected in sequence to obtain the behavior polygon, and the area and geometric center of the behavior polygon are calculated to obtain the area and geometric center of the behavior polygon.

[0027] The true behavior center calculation submodule performs periodic center weighting on the geometric center of the polygon to obtain true behavior center data for each period. The true behavior center calculation submodule constructs a convex hull for the four periodic centers and uses the geometric center of the convex hull as the true behavior center to verify the true behavior center.

[0028] The behavioral semantic understanding submodule inputs the location type into the Word2Vec pre-trained model to generate a 300-dimensional semantic vector model. This 300-dimensional semantic vector model embeds the location semantics into the vertex coordinates of the behavioral polygon to obtain a semantically meaningful location type. Furthermore, the location semantic vector is weighted according to user access frequency to obtain a semantically meaningful location access frequency.

[0029] Formula (3.1)

[0030] in, To weight location semantic vectors according to user access frequency; For user access locations Frequency; For location semantic vector;

[0031] The behavioral semantic understanding submodule divides user behavior into time periods, and uses an LSTM time series model to obtain semantic tags that associate time and behavior with the time periods and the location types with semantic meaning. The behavioral semantic understanding submodule performs statistics on the semantic tags to retain the tags that appear most frequently as the core behavioral tags.

[0032] Furthermore, the matching calculation engine calculates the Euclidean distance between the two users' residential coordinates and the distance between their true behavioral centers based on their true behavioral centers. The matching calculation engine then selects different matching modes based on these two distances.

[0033] When the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold, a first comprehensive matching degree is obtained through residence matching calculation. The residence matching steps include:

[0034] S4.1.1 The Euclidean distance between the residences of the two users is normalized to the distance proximity:

[0035] Formula (4.1)

[0036] in, For proximity; The Euclidean distance between the two users' residences; The first distance threshold;

[0037] S4.1.2 Calculate the overlapping area of ​​the behavioral polygons of two users using the Shapely library, and calculate the overlap ratio and area similarity. The method for calculating the overlap ratio of the behavioral polygons of two users is as follows:

[0038] Formula (4.2)

[0039] in, The overlap ratio of the two users' behavior polygons; The area of ​​overlap between the two users' actions (polygonal area); The area of ​​the polygon representing the actions of the two users;

[0040] The method for calculating the similarity of the polygon area of ​​the two users' behaviors is as follows:

[0041] Formula (4.3)

[0042] in, The similarity of the polygon area of ​​the behaviors of two users;

[0043] S4.1.3 By traversing all vertices of the polygons of the two users and calculating the included angle between adjacent sides, the number and average degree of acute angles are counted. The degree of the acute angles is then normalized to shape stability to calculate shape similarity.

[0044] Formula (4.4)

[0045] in, The shape similarity of the behavior polygons of the two users; , The average acute angle between the two users;

[0046] S4.1.4 Calculate the first single-cycle score based on the overlap ratio, area similarity, and shape similarity of the behavioral polygons of the two users, and calculate the first comprehensive matching degree based on the first single-cycle score.

[0047] The single-cycle score is: Formula (4.5)

[0048] The first overall matching degree is: Formula (4.6)

[0049] in, The highest overall matching score; This is a residence indication function, which is 1 if the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold, and 0 otherwise. A set of effective periods, where the feature points have a period of three or more.

[0050] When the Euclidean distance between the residences of two users is less than a first distance threshold and greater than or equal to a second distance threshold, a second comprehensive matching degree is obtained through polygon feature matching. The steps of polygon feature matching include:

[0051] S4.2.1 Count the number of feature points in the behavior polygons of two users whose coordinate deviation is less than or equal to the deviation distance threshold to obtain the number of identical feature points. Count the number of identical feature points with the same location type to obtain the number of identical location feature points. Calculate the feature point matching score based on the number of identical feature points and the number of identical location feature points.

[0052] Formula (4.7)

[0053] in, Score the feature point matching. The number of identical feature points; The number of feature points at the same location; The maximum number of feature points; To match weights, ;

[0054] S4.2.2 Calculate the distance between the geometric centers of the behavior polygons of the two users, and normalize the distance between the geometric centers of the behavior polygons of the two users to a proximity score:

[0055] Formula (4.8)

[0056] in, The proximity of the geometric centers of the two users' behavior polygons; The distance between the geometric centers of the polygons representing the actions of the two users; This is the second distance threshold;

[0057] S4.2.3 Calculate the second single-cycle score based on the overlap ratio of the behavioral polygons of the two users, the feature point matching score, and the proximity of the geometric centers of the behavioral polygons; calculate the second comprehensive matching degree based on the second single-cycle score:

[0058] The second single-cycle score is: Formula (4.9)

[0059] in, To match weights, ;

[0060] The second overall matching degree is: Formula (4.10)

[0061] When the distance between the true behavior centers of two users is greater than a third distance threshold, the cross-regional matching degree is obtained through cross-regional attribute matching. The steps of cross-regional attribute matching include:

[0062] S4.3.1 Obtain the location type vectors of the two users through the 300-dimensional semantic vector model of the behavioral semantic understanding submodule; obtain the consumption level based on the quantified value of the average consumption amount range of the two users; obtain the behavior intensity based on the average number of behavior points of the two users per day.

[0063] S4.3.2 Calculate location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity:

[0064] The location type similarity is: Formula (4.11)

[0065] in, A vector of location types for two users;

[0066] The similarity in consumption levels is as follows: Formula (4.12)

[0067] in, The spending levels of the two users;

[0068] The similarity of the behavioral patterns is: Formula (4.13)

[0069] in, , The intensity of the two users' behavior; The similarity of the behavior cycles of the two users;

[0070] The location category similarity is: Formula (4.14)

[0071] in, This is a set of categories of places frequently visited by the two users;

[0072] S4.3.3 Calculate the cross-regional matching degree based on location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity:

[0073] Formula (4.15)

[0074] in, To match weights, and .

[0075] Furthermore, the recommendation engine includes a risky user filtering submodule, a matching degree ranking submodule, and a reinforcement learning optimization submodule.

[0076] The risk user filtering submodule is used to mark risk users based on their identity information and behavior logs;

[0077] The matching degree sorting submodule is used for data acquisition by the matching calculation engine, to sort according to matching degree, and to select the top users as the recommendation results. When the recommendation results are all users of the same type, a preset number of users of different types are randomly replaced.

[0078] The user management module also includes a feedback analysis submodule, which is used to acquire user feedback data from user surveys, free text feedback, and user behavior logs. The feedback analysis submodule processes the user feedback data to obtain feedback tags, matching weight adjustment suggestions, and feedback analysis reports.

[0079] The reinforcement learning optimization submodule is used for data acquisition by the user management module and the matching calculation engine, and the reinforcement learning optimization submodule adjusts the matching weights based on feedback tags, matching weight adjustment suggestions, feedback analysis reports, and historical matching weights.

[0080] Furthermore, it also includes a security and privacy module, which comprises a differential privacy protection submodule, an access control submodule, and a risk behavior monitoring submodule.

[0081] The differential privacy protection submodule is used for data acquisition by the data acquisition and processing module, and is used to process the desensitized GPS data and behavioral feature data to obtain data that meets the differential privacy protection requirements.

[0082] The permission control submodule is used to set corresponding operation permissions according to the account role;

[0083] The risk behavior monitoring submodule is used to acquire user behavior logs, and the risk behavior monitoring submodule performs anomaly identification on the behavior logs in order to take corresponding actions based on the abnormal behavior.

[0084] Furthermore, it also includes a real-time computing engine, which comprises a task deployment submodule, a behavior polygon incremental update submodule, and a real-time matching calculation submodule.

[0085] The task deployment submodule is used to acquire data from the data acquisition and processing module, and the task deployment submodule is configured through a Flink cluster to access the real-time data of the smart terminal into the MQTT message queue; the task deployment submodule generates a set of feature points from the real-time data of the smart terminal by constructing a data processing operator chain;

[0086] The behavior polygon incremental update submodule is used for data acquisition by the behavior analysis engine, and updates the attributes of the user behavior polygon through incremental convex hull calculation and low-latency optimization.

[0087] The real-time matching calculation submodule is used for data acquisition by the matching calculation engine, and performs real-time matching calculation based on the user's request and the updated behavior polygon.

[0088] Furthermore, when adding a new feature point to the behavior polygon, the behavior polygon incremental update submodule determines whether the new feature point is located inside the existing convex hull polygon. If the new feature point is inside the existing convex hull polygon, no update is needed; if the new feature point is outside the existing convex hull polygon, an update is performed. The update steps of the behavior polygon incremental update submodule include:

[0089] S7.1.1 Obtain the tangents between the newly added feature points and the existing convex hull to determine the convex hull vertices that need to be deleted;

[0090] S7.1.2 Add the newly added feature points to the convex hull vertex list, re-sort them by polar angle, and generate a new convex hull polygon;

[0091] S7.1.3 Update the properties of the convex hull polygon to obtain the updated behavior polygon;

[0092] When a user initiates a matching request, the real-time matching calculation submodule performs request preprocessing and real-time matching calculation. The request preprocessing steps include:

[0093] S7.2.1 After a user initiates a matching request, the real-time matching calculation submodule reads the user's behavior polygon data and true behavior center data from the Redis cache;

[0094] S7.2.2 Retrieve candidate users from the PostgreSQL and PostGIS databases based on the user's location;

[0095] The real-time matching calculation steps include:

[0096] S7.3.1 Invoke the matching calculation engine to calculate the matching degree;

[0097] S7.3.2 Store the matching results in Redis and return them to the user terminal of the smart terminal.

[0098] The beneficial effects of this invention are:

[0099] The user management module verifies user identity authenticity and excludes fake accounts, achieving multi-layered security authentication. The data acquisition and processing module employs an importance-based adaptive sampling method, using reinforcement learning to dynamically determine sampling frequency. Its privacy-aware data collection method utilizes differential privacy protection technology and intelligently allocates privacy budgets. The real-time multimodal data fusion method leverages a cross-modal attention fusion network to integrate data from mobile GPS, social media, transaction records, and other sources. Furthermore, the data acquisition and processing module balances data integrity with device power consumption, dynamically adjusting sampling frequency, removing invalid and abnormal data, filling in missing values, desensitizing sensitive data to prevent privacy leaks, and converting multi-source data into a unified format for easier subsequent analysis. The behavior analysis engine constructs multi-timescale behavior polygons, calculates true behavior centers, and performs behavioral semantic understanding using Graham scanning, weighted average algorithms, and LSTM / Word2Vec algorithms. The model needs to transform discrete behavioral points into semantically meaningful behavioral features. Furthermore, the behavioral analysis engine constructs multi-timescale behavioral polygons at daily, weekly, monthly, and yearly scales using a convex hull algorithm. Polygon features, including center point, area, and vertices, are calculated, and the true behavioral center is aggregated as the multi-timescale center to improve analysis accuracy. The matching calculation engine, based on a three-mode fusion matching algorithm, designs differentiated calculation logic for three scenarios: "same city, same neighborhood," "same city, different neighborhoods," and "different locations." Its core function is to fuse spatial similarity with behavioral semantic similarity. The recommendation engine implements risk user filtering, matching degree ranking, and reinforcement learning optimization to ensure the security and personalization of recommendation results. This invention introduces behavioral geography principles into the field of sentiment matching, establishing a behavior-value mapping model. Through multi-timescale behavioral polygon construction and a three-mode fusion matching strategy, it improves the efficiency and quality of marriage and dating matching, promotes social harmony, and drives the practical application of behavioral geography theory. Attached Figure Description

[0100] Figure 1 This is a structural block diagram of an intelligent emotion matching system based on spatiotemporal behavioral polygons according to a preferred embodiment of the present invention.

[0101] In the diagram, 1-User Management Module, 11-Identity Verification Submodule, 12-Feedback Analysis Submodule, 2-Data Acquisition and Processing Module, 21-Data Acquisition Submodule, 22-Data Cleaning Submodule, 23-Anonymized Privacy Data Submodule, 24-Standardization Processing Submodule, 3-Behavior Analysis Engine, 31-Feature Extraction Submodule, 32-Behavior Polygon Construction Submodule, 33-True Behavior Center Calculation Submodule, 34-Behavior Semantic Understanding Submodule, 4-Matching Calculation Engine, 5-Recommendation Engine, 51-Risk User Filtering Submodule, 52-Matching Degree Ranking Submodule, 53-Reinforcement Learning Optimization Submodule, 6-Security and Privacy Module, 61-Differential Privacy Protection Submodule, 62-Access Control Submodule, 63-Risk Behavior Monitoring Submodule, 7-Real-Time Calculation Engine, 71-Task Deployment Submodule, 72-Behavior Polygon Incremental Update Submodule, 73-Real-Time Matching Calculation Submodule. Detailed Implementation

[0102] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0103] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0104] Please see Figure 1 The present invention discloses a preferred embodiment of an intelligent emotion matching system based on spatiotemporal behavioral polygons, comprising a user management module 1, a data acquisition and processing module 2, a behavior analysis engine 3, a matching calculation engine 4, a recommendation engine 5, a security and privacy module 6, and a real-time calculation engine 7.

[0105] User management module 1 is used to verify the authenticity of user identities;

[0106] User management module 1 includes identity verification submodule 11.

[0107] The identity verification submodule 11 is used for uploading user information, and the identity verification submodule 11 connects to the third-party interface of the government system to verify the user information in order to verify the authenticity of the user's identity.

[0108] In this embodiment, the user uploads images of the front and back of their ID card, a facial image, a mobile phone number, and a marital status query application through the identity verification submodule 11.

[0109] ID card image preprocessing includes the following steps:

[0110] S1.1.1 After the user uploads an image, the image is read by calling cv2.imread() through OpenCV, and edge detection is performed using cv2.Canny() to locate the ID card border (contour detection cv2.findContours()).

[0111] S1.1.2 Perform perspective transformation on the image (cv2.warpPerspective()) to correct the tilted ID card image and uniformly adjust the resolution to 300dpi (pixel size approximately 1280×800).

[0112] S1.1.3 Use an OCR tool (such as Tesseract-OCR) to extract fields such as ID number, name, validity period, and address. Use regular expressions to validate the ID number format: (^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$).

[0113] Public Security API verification includes the following steps:

[0114] S1.2.1 Send the extracted name and ID number to the Public Security Identity Verification API through an HTTPS interface authorized by OAuth2.0, and encapsulate the request parameters into JSON format according to the GB / T 35628-2023 specification;

[0115] S1.2.2 Receive the API return result. If the return is "Information matches", proceed to the face recognition stage; if the return is "Information does not match / ID card expired", reject the application directly and record the reason.

[0116] Facial recognition verification includes the following steps:

[0117] S1.3.1 Call the camera of the smart terminal to collect real-time facial images of the user, and extract facial feature vectors (512 dimensions) through the ArcFace model.

[0118] S1.3.2 Calculate the cosine similarity between the real-time facial features and the facial features of the ID card returned by the public security API (or the locally stored facial features of the ID card): \text{Sim} = \frac{ \vec{f}_1 \cdot \vec{f}_2}{|| \vec{f}_1|| \times ||;

[0119] S1.3.3 If the similarity is ≥0.9 (ArcFace false recognition rate ≤0.001%), the face recognition passes; otherwise, it is rejected, and the user is allowed to retry 3 times.

[0120] Marital status verification includes the following steps:

[0121] S1.4.1 After user authorization, the ID number is sent to the civil affairs marriage registration interface via RSA asymmetric encryption (public key encryption, civil affairs interface private key decryption);

[0122] S1.4.2 The "unmarried / married / divorced" status returned by the receiving interface is stored only as a status identifier (e.g., 0=unmarried, 1=married, 2=divorced), and the original interface data is not stored.

[0123] The data acquisition and processing module 2 is used to acquire data from user smart terminal devices to obtain multi-source spatiotemporal data, and the data acquisition and processing module 2 processes the multi-source spatiotemporal data to obtain standard multi-source data.

[0124] Data acquisition and processing module 2 includes a data acquisition submodule 21, a data cleaning submodule 22, a de-identified privacy data submodule 23, and a standardization processing submodule 24.

[0125] The data acquisition submodule 21 is used to collect GPS data, WiFi data, Bluetooth data, transaction data and social media data from smart terminal devices to obtain multi-source spatiotemporal data. The data acquisition submodule 21 sets different sampling frequencies for GPS data, WiFi data and Bluetooth data according to the battery level, network type and behavior status of the smart terminal device.

[0126] Data acquisition submodule 21 calculates the user's behavioral status using the GPS positioning results of the smart terminal device:

[0127] Formula (2.1)

[0128] in, For behavioral states, when If the state is determined to be moving, it is otherwise considered stationary. These are the coordinates of two consecutive GPS coordinates; For timestamps.

[0129] In this embodiment, the sampling frequency is set according to the following rules.

[0130]

[0131] In this embodiment, the sampled data is cached locally (SQLite database). When the network recovers or the battery level is ≥20%, it is synchronized to the service via the MQTT protocol (QoS=1).

[0132] The multi-source spatiotemporal data in this embodiment includes:

[0133] GPS data: The data collection fields include longitude, latitude, accuracy, timestamp, and speed.

[0134] WiFi and Bluetooth data: Collect public WiFi hotspot SSID and BSSID, Bluetooth device MAC address (anonymized), and signal strength (RSSI).

[0135] Transaction data: Synchronized via payment platform API, collecting fields including transaction amount, merchant type, transaction time, and merchant geographic location (latitude and longitude);

[0136] Social media data: Collect users' publicly disclosed interest tags, posting times, and locations mentioned in the posts (e.g., "at XX coffee shop").

[0137] The data cleaning submodule 22 is used to acquire data from the data acquisition submodule 21. The data cleaning submodule 22 cleans multi-source spatiotemporal data to remove invalid data, remove abnormal data, fill in missing values, and obtain valid multi-source data.

[0138] Data cleaning submodule 22 includes abnormal data filtering and missing value completion:

[0139] The steps for filtering outlier data include:

[0140] S2.1.1 GPS data filtering: Remove records with positioning accuracy > 50 meters and records with latitude and longitude outside the reasonable range (longitude: 73°E-135°E, latitude: 4°N-53°N).

[0141] S2.1.2 Transaction data filtering: Remove abnormal records with a consumption amount ≤ 0 or > 100,000 yuan, and remove records with an empty merchant type.

[0142] S2.1.3 WiFi data filtering: Remove invalid hotspot records with a signal strength <-90dBm (RSSI<-90).

[0143] The steps for missing value completion include:

[0144] S2.2.1 Missing timestamps: The timestamps of adjacent data are used to fill in the missing timestamps;

[0145] S2.2.2 Missing GPS Coordinates: If one of three consecutive sampling points is missing, use linear interpolation to complete it.

[0146] Formula (2.2)

[0147] S2.2.3 Missing Merchant Type: Complete the type by matching merchant name keywords (e.g., “xxx brand” → “food and beverage-coffee”).

[0148] The de-identified privacy data submodule 23 is used for data acquisition by the data cleaning submodule 22. The de-identified privacy data submodule 23 performs GPS geographic data blurring, transaction data de-identification, and user identifier anonymization on valid multi-source data to obtain de-identified multi-source data.

[0149] The de-identified privacy data submodule 23 includes GPS data geo-blurring, transaction data de-identification, and user identifier anonymization.

[0150] The steps for geo-fuzzing GPS data include:

[0151] S2.3.1 Original GPS coordinates Adding Gaussian noise with a radius of 200 meters, the calculation formula is as follows:

[0152] Formula (2.3)

[0153] S2.3.2 Only retain the blurred coordinates and delete the original GPS data.

[0154] The steps for anonymizing transaction data include:

[0155] S2.4.1 Desensitize consumption amount: Convert specific amounts into ranges (e.g., 0-50 yuan, 50-100 yuan, 100-500 yuan, and over 500 yuan);

[0156] S2.4.2 Remove sensitive fields: Delete fields such as bank card number, payment account, and mobile phone number, and only retain user hash identifier, consumption time, and merchant information.

[0157] User identity anonymization steps include:

[0158] S2.5.1 Perform SHA-256 hash processing on the user ID: user_hash=sha256(user_id+salt), where salt is a randomly generated 32-bit string that is rotated periodically;

[0159] S2.5.2 All data is associated only with the user hash identifier and the original user ID is not stored.

[0160] The standardization processing submodule 24 is used to acquire data from the de-identified privacy data submodule 23. The standardization processing submodule 24 performs data field unification and timestamp standardization processing on the de-identified multi-source data to obtain standard multi-source data.

[0161] The standardization processing submodule 24 in this embodiment includes data field unification and timestamp standardization.

[0162] The steps for unifying data fields include:

[0163] S2.6.1 Define a unified JSON Schema;

[0164] S2.6.2 Populate each type of data according to the schema. For example, the content field of GPS data is filled with speed and positioning mode; the content field of transaction data is filled with consumption amount range and merchant type.

[0165] The timestamp standardization steps include:

[0166] S2.7.1 Convert all local timestamps to UTC time (datetime.utcfromtimestamp(timestamp).strftime('%Y-%m-%d%H:%M:%S'));

[0167] S2.7.2 unifies the granularity of timestamps (e.g., to the second level) and removes redundant data at the millisecond level.

[0168] The behavior analysis engine 3 is used for data acquisition in the data acquisition and processing module 2. The behavior analysis engine 3 performs true behavior center calculation on the standard multi-source data to obtain true behavior center data, and the behavior analysis engine 3 transforms the discrete behavior points of the standard multi-source data into semantic behavior labels.

[0169] The behavior analysis engine 3 includes a feature extraction submodule 31, a behavior polygon construction submodule 32, a true behavior center calculation submodule 33, and a behavior semantic understanding submodule 34.

[0170] The feature extraction submodule 31 is used for data acquisition by the data acquisition and processing module 2, and the feature extraction submodule 31 processes the GPS data in the standard multi-source data to generate a set of feature points for each time period. The set of feature points includes longitude, latitude, and dwell time.

[0171] The feature extraction submodule 31 sorts the GPS data in the standard multi-source data by timestamp. When the latitude and longitude distance of multiple consecutive GPS data of a user at a certain location is less than the dwell distance threshold and the time span is greater than the dwell time threshold, the location is determined to be a dwell point. The feature extraction submodule 31 divides the dwell points into time periods, collects the user's dwell points for each period to generate a feature point set for each time period, and marks insufficient data periods when the number of feature points is less than three periods.

[0172] In this embodiment, the feature extraction submodule 31 has a dwell distance threshold of 500 meters and a dwell time threshold of 5 minutes. The feature extraction submodule 31 retains only one duplicate dwell point in the same location (latitude and longitude deviation ≤ 10 meters) and the same period to remove duplicate dwell points.

[0173] Feature extraction submodule 31 is divided according to time period (day: 00:00-23:59; week: Monday to Sunday; month: calendar month; year: calendar year), and performs feature extraction for each period. Collect users The points of stay form a set of feature points. ,in , This refers to the duration of stay.

[0174] The behavior polygon construction submodule 32 is used for data acquisition by the feature extraction submodule 31, and the behavior polygon construction submodule 32 processes the feature point set to obtain the behavior polygons of each period. The attributes of the behavior polygons include vertex coordinates, area, and geometric center.

[0175] The behavior polygon construction submodule 32 obtains the remaining points in the stack of feature point set through the Graham scan method, and defines the remaining points in the stack as vertices of the convex hull polygon. The vertices are connected in order to obtain the behavior polygon. The area and geometric center of the behavior polygon are calculated to obtain the area and geometric center of the behavior polygon.

[0176] The Graham scan steps of the behavior polygon construction submodule 32 in this embodiment include:

[0177] S3.1.1 Find the bottom leftmost point among the feature points. First sort by latitude in ascending order, the point with the smallest latitude is... If the latitudes are the same, choose the point with the smallest longitude;

[0178] S3.1.2 Calculate the remaining points relative to polar angle : ,in for To convert latitude and longitude to Cartesian coordinates, Mercator projection is required.

[0179] S3.1.3 Sort feature points by polar angle from smallest to largest; retain the distance for points with the same polar angle. The farthest point;

[0180] S3.1.4 Initialize the stack structure, push the first 3 points onto the stack; traverse the remaining points. If the top two points of the stack are If the resulting vector is not a left turn (cross product ≤ 0), then pop the top of the stack. Repeat this operation until a left turn is achieved. Push onto the stack;

[0181] Cross product calculation: Let the two points at the top of the stack be... ,vector cross product ,like This is not a left turn;

[0182] S3.1.5 The remaining points in the stack are the vertices of the convex hull polygon. Connecting the vertices in order yields a polygon. .

[0183] The attribute calculation steps for behavior polygon construction submodule 32 include:

[0184] S3.2.1 Calculate the area of ​​a polygon Using the shoelace formula, for vertices... ,area: ,in A closed polygon;

[0185] S3.2.2 Calculate the geometric center of the polygon :

[0186] The true behavior center calculation submodule 33 is used to acquire data from the behavior polygon construction submodule 32, and the true behavior center calculation submodule 33 processes the geometric center of the polygon to obtain true behavior center data.

[0187] The true behavior center calculation submodule 33 performs periodic center weighting on the geometric center of the polygon to obtain true behavior center data for each period. Furthermore, the true behavior center calculation submodule 33 constructs a convex hull for the four periodic centers and uses the geometric center of the convex hull as the true behavior center to verify the true behavior center.

[0188] The periodic center weighting steps of the true behavior center calculation submodule 33 include:

[0189] S3.3.1 Assign weights to each cycle center: day (0.1), week (0.2), month (0.3), year (0.4), with a total weight of 1;

[0190] S3.3.2 Calculate the weighted average coordinates: , The coordinates of the sun's center; For the coordinates of the center of the circle, and so on;

[0191] The behavior semantic understanding submodule 34 is used for data acquisition by the behavior polygon construction submodule 32, and the behavior semantic understanding submodule 34 processes the vertex coordinates in the feature point set to generate semantic behavior labels based on the geographical location, merchant type, and access frequency corresponding to the vertex coordinates.

[0192] The behavioral semantic understanding submodule 34 inputs the location type into the Word2Vec pre-trained model to generate a 300-dimensional semantic vector model. This 300-dimensional semantic vector model embeds the location semantics into the vertex coordinates of the behavioral polygon to obtain the semantically meaningful location type. Furthermore, it weights the location semantic vectors according to user access frequency to obtain the semantically meaningful location access frequency.

[0193] Formula (3.1)

[0194] in, To weight location semantic vectors according to user access frequency; For user access locations Frequency; For location semantic vector;

[0195] The behavioral semantic understanding submodule 34 divides user behavior into time periods, such as 06:00-09:00 for morning, 09:00-18:00 for daytime, and 18:00-24:00 for evening. It then uses an LSTM time-series model to obtain semantic tags that associate time and behavior with each time period and semantically relevant location type. These semantic tags include "morning commute," "evening fitness," and "weekend dining." The behavioral semantic understanding submodule 34 statistically analyzes these semantic tags, retaining the most frequently occurring tags as core behavioral tags. In this embodiment, the top 5 most frequently occurring tags are retained as the core user behavioral tags.

[0196] The matching calculation engine 4 is used for data acquisition by the behavior analysis engine 3. The matching calculation engine 4 performs spatial similarity and behavioral semantic similarity fusion calculation based on behavioral feature data to obtain the corresponding matching degree based on the distance of the user's residence and the distance of the user's true behavior center.

[0197] In this embodiment, the matching calculation engine 4 calculates the Euclidean distance between the two users' residential locations based on their coordinates, and calculates the distance between their true behavioral centers based on their true behavioral centers. The matching calculation engine 4 selects different matching modes based on the Euclidean distance between the two users' residential locations and the distance between their true behavioral centers.

[0198] In this embodiment, the Euclidean distance between the residences of the two users is: ,in This refers to the residential locations of the two users; if latitude and longitude coordinates are used, they need to be converted to meters.

[0199]

[0200] when Matching by place of residence; when Using polygon feature matching mode, when the distance to the center of the true behavior is greater than 50000, it is matched by cross-regional attributes.

[0201] When the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold (500), a first comprehensive matching degree is obtained through residence matching calculation. The steps of residence matching include:

[0202] S4.1.1 Normalize the Euclidean distance between the residences of two users to the proximity of their locations:

[0203] Formula (4.1)

[0204] in, For proximity; The Euclidean distance between the two users' residences; The first distance threshold;

[0205] S4.1.2 Calculate the overlapping area of ​​the behavioral polygons of two users using the Shapely library, and calculate the overlap ratio and area similarity. The method for calculating the overlap ratio of the behavioral polygons of two users is as follows:

[0206] Formula (4.2)

[0207] in, The overlap ratio of the two users' behavior polygons; The area of ​​overlap between the two users' actions (polygonal area); The area of ​​the polygon representing the actions of the two users;

[0208] The method for calculating the similarity of the polygon area of ​​the two users' behaviors is as follows:

[0209] Formula (4.3)

[0210] in, The similarity of the polygon area of ​​the behaviors of two users;

[0211] S4.1.3 By traversing all vertices of the polygon between two users and calculating the included angle between adjacent sides, the number and average degree of acute angles are counted, and the degree of acute angles is normalized to shape stability. The range is 0-1, used to calculate shape similarity:

[0212] Formula (4.4)

[0213] in, The shape similarity of the behavior polygons of the two users; , The average acute angle between the two users;

[0214] S4.1.4 Calculate the first single-cycle score based on the overlap ratio, area similarity, and shape similarity of the behavioral polygons of the two users, and calculate the first comprehensive matching degree based on the first single-cycle score.

[0215] The single-cycle score is: Formula (4.5)

[0216] The first overall matching degree is: Formula (4.6)

[0217] in, The highest overall matching score; This is a residence indication function, which is 1 if the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold, and 0 otherwise. A set of effective periods, where the feature points have a period of three or more.

[0218] When the Euclidean distance between the residences of two users is less than a first distance threshold but greater than or equal to a second distance threshold (the second distance threshold is 5000), a second comprehensive matching degree is obtained through polygon feature matching. The steps of polygon feature matching include:

[0219] S4.2.1 Count the number of feature points in the behavior polygons of two users whose coordinate deviation is less than or equal to the deviation distance threshold to obtain the number of identical feature points. Count the number of identical feature points with the same location type to obtain the number of identical location feature points. Calculate the feature point matching score based on the number of identical feature points and the number of identical location feature points.

[0220] Formula (4.7)

[0221] in, Score the feature point matching. The number of identical feature points; The number of feature points at the same location; The maximum number of feature points; To match weights, ;

[0222] S4.2.2 Calculate the distance between the geometric centers of the behavior polygons of the two users, and normalize the distance between the geometric centers of the behavior polygons of the two users to a proximity score:

[0223] Formula (4.8)

[0224] in, The proximity of the geometric centers of the two users' behavior polygons; The distance between the geometric centers of the polygons representing the actions of the two users; This is the second distance threshold;

[0225] S4.2.3 Calculate the second single-cycle score based on the overlap ratio of the behavioral polygons of the two users, the feature point matching score, and the proximity of the geometric centers of the behavioral polygons; calculate the second comprehensive matching degree based on the second single-cycle score:

[0226] The score for the second single-cycle period is: Formula (4.9)

[0227] in, To match weights, ;

[0228] The second overall matching degree is: Formula (4.10)

[0229] When the distance between the true behavior centers of two users is greater than the third distance threshold (50000), the cross-regional matching degree is obtained through cross-regional attribute matching. The steps of cross-regional attribute matching include:

[0230] S4.3.1 Obtain the location type vectors of the two users through the 300-dimensional semantic vector model of the behavioral semantic understanding submodule 34; obtain the consumption level based on the quantified value of the average consumption amount range of the two users, such as 0-50=1, 50-100=2; obtain the behavior intensity based on the average number of behavior points of the two users per day, which reflects the frequency of activities.

[0231] S4.3.2 Calculate location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity:

[0232] Location type similarity is: Formula (4.11)

[0233] in, A vector of location types for two users;

[0234] The similarity in consumption levels is: Formula (4.12)

[0235] in, The spending levels of the two users;

[0236] Behavioral pattern similarity is: Formula (4.13)

[0237] in, , The intensity of the two users' behavior; The similarity of the behavior cycles of the two users;

[0238] Location category similarity is: Formula (4.14)

[0239] in, This is a set of categories of places frequently visited by the two users;

[0240] S4.3.3 Calculate the cross-regional matching degree based on location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity:

[0241] Formula (4.15)

[0242] in, To match weights, and .

[0243] Recommendation Engine 5 is used to sort the matching scores to obtain recommendation results.

[0244] The recommendation engine 5 includes a risky user filtering submodule 51, a matching degree ranking submodule 52, and a reinforcement learning optimization submodule 53.

[0245] The risk user filtering submodule 51 is used to mark risk users based on their identity information and behavior logs;

[0246] The risk user filtering submodule 51 includes risk feature extraction and XGBoost model prediction:

[0247] The risk feature extraction steps include:

[0248] S5.1.1 Extract user risk characteristics, including: number of failed ID card and face comparisons, number of matching requests within 24 hours, number of changes to residence in the past 7 days, and account registration duration;

[0249] S5.1.2 Normalize the features to the 0-1 interval (e.g., number of matching requests: 0-10 times = 0, 10-20 times = 0.5, >20 times = 1).

[0250] The XGBoost model prediction steps include:

[0251] S5.2.1 Load the pre-trained XGBoost binary classification model (the training dataset consists of 100,000 user-labeled data points, with positive examples representing risky users and negative examples representing normal users).

[0252] S5.2.2 Input user risk characteristics into the model and output risk probabilities;

[0253] S5.2.3 If the risk probability is greater than or equal to 0.8, mark the user as a risk user and filter them; otherwise, include them in the recommended candidate list.

[0254] The matching degree sorting submodule 52 is used to match the data acquisition of the calculation engine 4, sort according to the matching degree, and select the top users as the recommendation results. When all the recommended results are users of the same type, a preset number of users of different types are randomly replaced.

[0255] Matching score ranking submodule 52 includes matching score ranking and interpretable report generation:

[0256] The matching degree ranking steps include:

[0257] S5.3.1 Sort candidate users from high to low matching degree, and take the top 10 as the recommendation results;

[0258] S5.3.2 Optimize the diversity of the ranking results: If the top 10 users are all of the same location type, randomly replace them with 2 users of different types.

[0259] The steps for generating an interpretable report include:

[0260] S5.4.1 Extract the core criteria for matching, such as "frequent gym visits (matching weight 30%)" and "similar spending levels (matching weight 25%)".

[0261] S5.4.2 Generates a structured report, including a matching score, core matching criteria, and a comparison of user behavior characteristics (such as "You and the other person are both evening fitness enthusiasts").

[0262] User management module 1 also includes a feedback analysis submodule 12. This submodule 12 is used to acquire user feedback data from user surveys, free text feedback, and user behavior logs. Furthermore, it processes the user feedback data to obtain feedback tags, matching weight adjustment suggestions, and feedback analysis reports. In this embodiment, user management module 1 achieves closed-loop optimization of identity verification and user feedback.

[0263] In this embodiment, the processing steps of the feedback analysis submodule 12 include structured data quantification, free text data processing, and feedback data fusion to generate a "user-feedback-scenario" triplet data (such as user A + cross-regional matching + privacy concerns) that associates structured scores with text tags. The percentage of each tag and the satisfaction of each scenario are calculated weekly, a visualization report is generated, and matching strategy optimization suggestions are output (such as increasing the consumption similarity weight of cross-regional matching).

[0264] The reinforcement learning optimization submodule 53 is used for data acquisition by the user management module 1 and the matching calculation engine 4. The reinforcement learning optimization submodule 53 adjusts the matching weights based on feedback tags, matching weight adjustment suggestions, feedback analysis reports, and historical matching weights.

[0265] Reinforcement learning optimization submodule 53 includes DQN agent construction and model training and updating:

[0266] The DQN agent construction includes: State space: user characteristics (age, behavioral tags), historical feedback, and scene characteristics (same city / different city); Action space: matching weight adjustment value; Reward function: positive rewards for the number of user meetings and 3-month retention rate, and negative rewards for low satisfaction rating.

[0267] Model training and updating include: collecting new user feedback data every 7 days as training samples; training the DQN model and updating the network parameters (learning rate of 0.001 and discount factor of 0.9); and applying the trained weights to the matching calculation engine 4 to iteratively optimize the matching strategy.

[0268] Security and privacy module 6 includes differential privacy protection submodule 61, access control submodule 62, and risk behavior monitoring submodule 63.

[0269] The differential privacy protection submodule 61 is used for data acquisition by the data acquisition and processing module 2, and is used to process the desensitized GPS data and behavioral feature data to obtain data that meets the differential privacy protection requirements.

[0270] The differential privacy protection submodule 61 prevents user information from being identified separately by adding noise to the data, adding Laplace noise to the GPS data, and performing k-anonymization on the feature data.

[0271] Access control submodule 62 is used to set corresponding operation permissions based on account roles;

[0272] This embodiment defines the permissions for three types of roles:

[0273]

[0274] The risk behavior monitoring submodule 63 is used to acquire user behavior logs, and the risk behavior monitoring submodule 63 performs anomaly identification on the behavior logs in order to take corresponding actions based on the abnormal behavior.

[0275] In this embodiment, the risk behavior monitoring submodule 63 includes the definition of abnormal behavior rules and the identification and handling of abnormal behavior. The definition of abnormal behavior rules includes setting abnormal behavior thresholds, such as: more than 50 matching requests within 24 hours, more than 3 changes of residence within 1 day, and sending messages containing sensitive words to unknown users; and using a sliding window (window size = 1 hour) to collect real-time statistics on user behavior indicators. The identification and handling of abnormal behavior includes generating an alarm message and sending it to the manual review team if the user's behavior triggers the threshold; temporarily restricting the user's matching request permissions before manual review (e.g., suspending recommendations for 24 hours); restoring permissions after the review is passed; and banning the account if it is confirmed to be malicious behavior.

[0276] The real-time computing engine 7 includes a task deployment submodule 71, a behavior polygon incremental update submodule 72, and a real-time matching calculation submodule 73.

[0277] The task deployment submodule 71 is used to acquire data from the data acquisition and processing module 2. The task deployment submodule 71 is configured through the Flink cluster to access the real-time data of the smart terminal into the MQTT message queue. The task deployment submodule 71 generates a set of feature points from the real-time data of the smart terminal by constructing a data processing operator chain.

[0278] The data processing operator chain construction of the task deployment submodule 71 includes: adding filtering operators to remove invalid data (such as GPS data with positioning accuracy > 50 meters); adding desensitization operators to add Gaussian noise to GPS data and perform interval processing on transaction data; and adding feature extraction operators to filter stop points in real time and generate a set of feature points.

[0279] The behavior polygon incremental update submodule 72 is used for data acquisition by the behavior analysis engine 3, and updates the attributes of the user behavior polygon through incremental convex hull calculation and low latency optimization.

[0280] When adding a new feature point to the behavior polygon, the behavior polygon incremental update submodule 72 determines whether the new feature point is inside the existing convex hull polygon. If the new feature point is inside the existing convex hull polygon, no update is needed; if the new feature point is outside the existing convex hull polygon, an update is performed. The update steps performed by the behavior polygon incremental update submodule 72 include:

[0281] S7.1.1 Obtain the tangents between the newly added feature points and the existing convex hull to determine the convex hull vertices that need to be deleted;

[0282] S7.1.2 Add the newly added feature points to the convex hull vertex list, re-sort them by polar angle, and generate a new convex hull polygon;

[0283] S7.1.3 Update the properties of the convex hull polygon to obtain the updated behavior polygon.

[0284] The low-latency optimization of the behavior polygon incremental update submodule 72 includes pre-calculating the polar angles of feature points and storing them in the Redis cache to reduce real-time calculation time; it adopts a "batch incremental update" strategy: every 5 newly added feature points are collected, an incremental calculation is performed to balance computational efficiency and real-time performance.

[0285] The real-time matching calculation submodule 73 is used to acquire data from the matching calculation engine 4, and performs real-time matching calculations based on the user's request and the updated behavior polygon.

[0286] After a user initiates a matching request, the real-time matching calculation submodule 73 performs request preprocessing and real-time matching calculation. The request preprocessing steps include:

[0287] S7.2.1 After a user initiates a matching request, the real-time matching calculation submodule 73 reads the user's behavior polygon data and true behavior center data from the Redis cache;

[0288] S7.2.2 Retrieve candidate users from the PostgreSQL and PostGIS databases based on the user's location;

[0289] The real-time matching calculation steps include:

[0290] S7.3.1 Invokes matching calculation engine 4 to calculate the matching degree;

[0291] S7.3.2 Store the matching results in Redis and return them to the user terminal of the smart terminal.

[0292] This embodiment also includes collaborative processing of the data storage layer. To ensure the efficiency of data flow between modules, data needs to be stored in layers according to data type. The specific processing steps are as follows:

[0293] 1. Real-time data: Stored in a Redis cluster, containing real-time user behavior characteristics, matching requests, and recommendation results, with an expiration time of 1 hour.

[0294] 2. Structured spatial data: Stored in PostgreSQL+PostGIS, storing spatial data such as polygon vertices and true row centers, and creating spatial indexes (GIST index) to accelerate distance queries.

[0295] 3. Historical Feature Data: Stored in ClickHouse, this data contains long-term user behavior features and feedback data, partitioned by user hash and time, and supports batch analysis.

[0296] 4. Log data: Stored in Elasticsearch, it contains system operation logs and user behavior logs, supporting full-text search and abnormal behavior analysis.

[0297] Through the above-described hierarchical storage and data processing steps, end-to-end governance of multi-source spatiotemporal data can be achieved, ensuring the executability and efficiency of the intelligent emotion matching system.

[0298] This embodiment constructs a comprehensive test dataset of 100,000 users and 6 months of behavioral data, containing 70% synthetic data and 30% real data. It employs three methods—multi-expert annotation, longitudinal research, and social network analysis—to create realistic matching annotations. Through large-scale experiments, this embodiment demonstrates that the system performs excellently in terms of matching accuracy (37.2% improvement compared to traditional methods), user satisfaction (86.4%), system reliability (supporting hundreds of millions of users), and commercial feasibility.

[0299] The widespread application of this embodiment will improve the efficiency and quality of marriage matching, promote social harmony, advance the practical application of behavioral geography theory, provide a new technological paradigm for the field of spatiotemporal data analysis, and establish best practice standards for user data privacy protection.

Claims

1. An intelligent emotion matching system based on spatiotemporal behavioral polygons, characterized in that, It includes a user management module (1), a data acquisition and processing module (2), a behavior analysis engine (3), a matching calculation engine (4), and a recommendation engine (5). The user management module (1) is used to verify the authenticity of user identity; The data acquisition and processing module (2) is used for data acquisition from user smart terminal devices to obtain multi-source spatiotemporal data, and the data acquisition and processing module (2) processes the multi-source spatiotemporal data to obtain standard multi-source data. The behavior analysis engine (3) is used for data acquisition by the data acquisition and processing module (2). The behavior analysis engine (3) performs true behavior center calculation on the standard multi-source data to obtain true behavior center data, and the behavior analysis engine (3) transforms the discrete behavior points of the standard multi-source data into semantic behavior labels. The matching calculation engine (4) is used for data acquisition by the behavior analysis engine (3). The matching calculation engine (4) performs spatial similarity and behavioral semantic similarity fusion calculation based on the behavioral feature data to obtain the corresponding matching degree based on the distance of the user's residence and the distance of the user's true behavior center. The recommendation engine (5) is used to sort the matching degree to obtain recommendation results.

2. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 1, characterized in that: The user management module (1) includes an identity verification submodule (11), which is used to upload user information and connects to a third-party interface of the government system to verify the user information in order to verify the authenticity of the user's identity.

3. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 1, characterized in that: The data acquisition and processing module (2) includes a data acquisition submodule (21), a data cleaning submodule (22), a de-identified privacy data submodule (23), and a standardization processing submodule (24). The data acquisition submodule (21) is used to collect GPS data, WiFi data, Bluetooth data, transaction data and social media data of the smart terminal device to obtain multi-source spatiotemporal data. The data acquisition submodule (21) sets different sampling frequencies for the GPS data, WiFi data and Bluetooth data according to the battery level, network type and behavior status of the smart terminal device. The data acquisition submodule (21) calculates the user's behavioral state based on the GPS positioning results of the smart terminal device: Official (2.1) in, For behavioral states, when If the state is determined to be moving, it is otherwise considered stationary. These are the coordinates of two consecutive GPS coordinates; For timestamps; The data cleaning submodule (22) is used for data acquisition by the data acquisition submodule (21), and the data cleaning submodule (22) cleans the multi-source spatiotemporal data to remove invalid data, remove abnormal data, fill in missing values, and obtain valid multi-source data; The desensitized privacy data submodule (23) is used for data acquisition by the data cleaning submodule (22), and the desensitized privacy data submodule (23) performs GPS geographic data fuzzification, transaction data desensitization and user identifier anonymization on the effective multi-source data to obtain desensitized multi-source data; The standardization processing submodule (24) is used for data acquisition by the desensitized privacy data submodule (23), and the standardization processing submodule (24) performs data field unification and timestamp standardization processing on the desensitized multi-source data to obtain standard multi-source data.

4. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 1, characterized in that: The behavior analysis engine (3) includes a feature extraction submodule (31), a behavior polygon construction submodule (32), a true behavior center calculation submodule (33), and a behavior semantic understanding submodule (34). The feature extraction submodule (31) is used for data acquisition by the data acquisition and processing module (2), and the feature extraction submodule (31) processes the GPS data in the standard multi-source data to generate a set of feature points for each time period. The set of feature points includes longitude, latitude, and dwell time. The behavior polygon construction submodule (32) is used for data acquisition by the feature extraction submodule (31), and the behavior polygon construction submodule (32) processes the feature point set to obtain behavior polygons for each period. The attributes of the behavior polygons include vertex coordinates, area, and geometric center. The true behavior center calculation submodule (33) is used for data acquisition of the behavior polygon construction submodule (32), and the true behavior center calculation submodule (33) processes the geometric center of the polygon to obtain true behavior center data; The behavior semantic understanding submodule (34) is used for data acquisition by the behavior polygon construction submodule (32), and the behavior semantic understanding submodule (34) processes the vertex coordinates in the feature point set to generate semantic behavior tags based on the geographical location, merchant type and access frequency corresponding to the vertex coordinates.

5. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 4, characterized in that: The feature extraction submodule (31) sorts the GPS data in the standard multi-source data by timestamp. When the latitude and longitude distance of multiple consecutive GPS data of a user at a certain location is less than the dwell distance threshold and the time span is greater than the dwell time threshold, the location is determined to be a dwell point. The feature extraction submodule (31) divides the dwell points into time periods, collects the user's dwell points for each period to generate a feature point set for each time period, and marks insufficient data periods when the number of feature points is less than three periods. The behavior polygon construction submodule (32) obtains the remaining points in the stack of the feature point set by the Graham scan method, and defines the remaining points in the stack as vertices of the convex hull polygon. The vertices are connected in order to obtain the behavior polygon, and the area and geometric center of the behavior polygon are calculated to obtain the area and geometric center of the behavior polygon. The true behavior center calculation submodule (33) performs periodic center weighting on the geometric center of the polygon to obtain true behavior center data for each period. The true behavior center calculation submodule (33) constructs a convex hull for the four periodic centers and uses the geometric center of the convex hull as the true behavior center to verify the true behavior center. The behavioral semantic understanding submodule (34) inputs the location type into the Word2Vec pre-trained model to generate a 300-dimensional semantic vector model. The location semantics are then embedded into the vertex coordinates of the behavioral polygon through the 300-dimensional semantic vector model to obtain the location type with semantics. The location semantic vector is weighted according to the user access frequency to obtain the location access frequency with semantics. Official (3.1) in, To weight location semantic vectors according to user access frequency; For user access locations Frequency; For location semantic vector; The behavioral semantic understanding submodule (34) divides user behavior into time periods, and obtains semantic labels associated with time and behavior by inputting the time periods and semantic location types into an LSTM time series model. The behavioral semantic understanding submodule (34) performs statistics on the semantic labels to retain the labels with the highest frequency of occurrence as the core behavioral labels.

6. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 5, characterized in that: The matching calculation engine (4) calculates the Euclidean distance between the two users' residential locations based on their coordinates, and calculates the distance between their true behavioral centers based on their true behavioral centers. The matching calculation engine (4) selects different matching modes based on the Euclidean distance between the two users' residential locations and the distance between their true behavioral centers. When the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold, a first comprehensive matching degree is obtained through residence matching calculation. The residence matching steps include: S4.1.1 The Euclidean distance between the residences of the two users is normalized to the distance proximity: Official (4.1) in, For proximity; The Euclidean distance between the two users' residences; The first distance threshold; S4.1.2 Calculate the overlapping area of ​​the behavioral polygons of two users using the Shapely library, and calculate the overlap ratio and area similarity. The method for calculating the overlap ratio of the behavioral polygons of two users is as follows: Official (4.2) in, The overlap ratio of the two users' behavior polygons; The area of ​​overlap between the two users' actions (polygonal area); The area of ​​the polygon representing the actions of the two users; The method for calculating the similarity of the polygon area of ​​the two users' behaviors is as follows: Official (4.3) in, The similarity of the polygon area of ​​the behaviors of two users; S4.1.3 By traversing all vertices of the polygons of the two users and calculating the included angle between adjacent sides, the number and average degree of acute angles are counted. The degree of the acute angles is then normalized to shape stability to calculate shape similarity. Formula (4.4) in, The shape similarity of the behavior polygons of the two users; , The average acute angle between the two users; S4.1.4 Calculate the first single-cycle score based on the overlap ratio, area similarity, and shape similarity of the behavioral polygons of the two users, and calculate the first comprehensive matching degree based on the first single-cycle score. The single-cycle score is: Formula (4.5) The first overall matching degree is: Formula (4.6) in, The highest overall matching score; This is a residence indication function, which is 1 if the Euclidean distance between the residences of two users is greater than or equal to a first distance threshold, and 0 otherwise. A set of effective periods, where the feature points have a period of three or more. When the Euclidean distance between the residences of two users is less than a first distance threshold and greater than or equal to a second distance threshold, a second comprehensive matching degree is obtained through polygon feature matching. The steps of polygon feature matching include: S4.2.1 Count the number of feature points in the behavior polygons of two users whose coordinate deviation is less than or equal to the deviation distance threshold to obtain the number of identical feature points. Count the number of identical feature points with the same location type to obtain the number of identical location feature points. Calculate the feature point matching score based on the number of identical feature points and the number of identical location feature points. Official (4.7) in, Score the feature point matching. The number of identical feature points; The number of feature points at the same location; The maximum number of feature points; To match weights, ; S4.2.2 Calculate the distance between the geometric centers of the behavior polygons of the two users, and normalize the distance between the geometric centers of the behavior polygons of the two users to a proximity score: Official (4.8) in, The proximity of the geometric centers of the two users' behavior polygons; The distance between the geometric centers of the polygons representing the actions of the two users; This is the second distance threshold; S4.2.3 Calculate the second single-cycle score based on the overlap ratio of the behavioral polygons of the two users, the feature point matching score, and the proximity of the geometric centers of the behavioral polygons; calculate the second comprehensive matching degree based on the second single-cycle score: The second single-cycle score is: Formula (4.9) in, To match weights, ; The second overall matching degree is: Formula (4.10) When the distance between the true behavior centers of two users is greater than a third distance threshold, the cross-regional matching degree is obtained through cross-regional attribute matching. The steps of cross-regional attribute matching include: S4.3.1 Obtain the location type vectors of the two users through the 300-dimensional semantic vector model of the behavioral semantic understanding submodule (34); obtain the consumption level based on the quantified value of the average consumption amount range of the two users; obtain the behavior intensity based on the average number of behavior points of the two users per day. S4.3.2 Calculate location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity: The location type similarity is: Formula (4.11) in, A vector of location types for two users; The similarity in consumption levels is as follows: Formula (4.12) in, The spending levels of the two users; The similarity of the behavioral patterns is: Formula (4.13) in, , The intensity of the two users' behavior; The similarity of the behavior cycles of the two users; The location category similarity is: Formula (4.14) in, This is a set of categories of places frequently visited by the two users; S4.3.3 Calculate the cross-regional matching degree based on location type similarity, consumption level similarity, behavioral pattern similarity, and location category similarity: Official (4.15) in, To match weights, and .

7. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 6, characterized in that: The recommendation engine (5) includes a risk user filtering submodule (51), a matching degree ranking submodule (52), and a reinforcement learning optimization submodule (53). The risk user filtering submodule (51) is used to mark risk users based on their identity information and behavior logs; The matching degree sorting submodule (52) is used for data acquisition by the matching calculation engine (4) to sort according to matching degree and select the top users as the recommendation results. When all the recommended results are users of the same type, a preset number of users of different types are randomly replaced. The user management module (1) also includes a feedback analysis submodule (12), which is used to obtain user feedback data from user surveys, free text feedback, and user behavior logs. The feedback analysis submodule (12) processes the user feedback data to obtain feedback tags, matching weight adjustment suggestions, and feedback analysis reports. The reinforcement learning optimization submodule (53) is used for data acquisition by the user management module (1) and the matching calculation engine (4), and the reinforcement learning optimization submodule (53) adjusts the matching weight according to the feedback label, matching weight adjustment suggestion, feedback analysis report and historical matching weight.

8. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 3, characterized in that: It also includes a security and privacy module (6), which includes a differential privacy protection submodule (61), an access control submodule (62), and a risk behavior monitoring submodule (63). The differential privacy protection submodule (61) is used for data acquisition by the data acquisition and processing module (2), and the differential privacy protection submodule (61) is used to process the desensitized GPS data and behavioral feature data to obtain data that meets the differential privacy protection requirements. The permission control submodule (62) is used to set corresponding operation permissions according to the account role; The risk behavior monitoring submodule (63) is used to acquire user behavior logs, and the risk behavior monitoring submodule (63) performs anomaly identification on the behavior logs in order to process the abnormal behavior accordingly.

9. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 6, characterized in that: It also includes a real-time computing engine (7), which comprises a task deployment submodule (71), a behavior polygon incremental update submodule (72), and a real-time matching calculation submodule (73). The task deployment submodule (71) is used to acquire data from the data acquisition and processing module (2), and the task deployment submodule (71) connects the real-time data of the smart terminal to the MQTT message queue through Flink cluster configuration; the task deployment submodule (71) generates a set of feature points from the real-time data of the smart terminal by constructing a data processing operator chain; The behavior polygon incremental update submodule (72) is used for data acquisition by the behavior analysis engine (3), and updates the attributes of the user behavior polygon through incremental convex hull calculation and low latency optimization. The real-time matching calculation submodule (73) is used for data acquisition by the matching calculation engine (4), and the real-time matching calculation submodule (73) performs real-time matching calculation based on the user's request and the updated behavior polygon.

10. The intelligent emotion matching system based on spatiotemporal behavioral polygons according to claim 9, characterized in that: When adding a new feature point to the behavior polygon, the behavior polygon incremental update submodule (72) determines whether the new feature point is located inside the existing convex hull polygon. If the new feature point is located inside the existing convex hull polygon, no update is required. If the new feature point is located outside the existing convex hull polygon, an update is performed. The update steps performed by the behavior polygon incremental update submodule (72) include: S7.1.1 Obtain the tangents between the newly added feature points and the existing convex hull to determine the convex hull vertices that need to be deleted; S7.1.2 Add the newly added feature points to the convex hull vertex list, re-sort them by polar angle, and generate a new convex hull polygon; S7.1.3 Update the properties of the convex hull polygon to obtain the updated behavior polygon; When a user initiates a matching request, the real-time matching calculation submodule (73) performs request preprocessing and real-time matching calculation. The request preprocessing steps include: S7.2.1 After a user initiates a matching request, the real-time matching calculation submodule (73) reads the user's behavior polygon data and true behavior center data from the Redis cache; S7.2.2 Retrieve candidate users from the PostgreSQL and PostGIS databases based on the user's location; The real-time matching calculation steps include: S7.3.1 Call the matching calculation engine (4) to calculate the matching degree; S7.3.2 Store the matching results in Redis and return them to the user terminal of the smart terminal.