A user identity fusion and content recommendation method based on a four-layer processing pipeline

CN122412701BActive Publication Date: 2026-08-21JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610883375.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-08-21
Estimated Expiration
2046-06-18

AI Technical Summary

Technical Problem

由于不同入口在请求协议、字段结构和用户标识表达上存在差异,现有系统通常只能分别处理各自链路中的用户信息,难以对同一用户建立稳定、统一的跨平台身份关系,进而使公众号侧的交互信息与视频号侧的视频信息、内容标签及相关请求参数难以有效汇聚到同一用户视图中

Benefits of technology

[0020]1)通过请求接入层的多维特征协议识别和声明式语义映射机制,将公众号XML格式请求和视频号JSON格式请求统一转换为具有完全相同结构和字段语义的标准请求上下文对象,使后续各层无需感知原始协议差异,新增业务渠道时仅需增加映射规则而无需修改核心处理代码,系统可扩展性得到本质性提升;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122412701B_ABST
    Figure CN122412701B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of cross-platform user identity fusion and content recommendation, and in particular to a user identity fusion and content recommendation method based on a four-layer processing pipeline. The four-layer processing pipeline comprises, in sequence: a request access layer, an identity fusion layer, a recommendation decision layer and a result packaging layer. Through a cross-channel user association aggregation mechanism based on multi-factor weighted scoring, the present application automatically associates and aggregates multiple independent external identifiers of the same real user in different channels under a unified user group, breaking the "cross-channel identity island" between WeChat public accounts and video numbers, enabling the recommendation engine to make decisions based on the complete behavior data of users across platforms, significantly improving the coherence and accuracy of cross-platform recommendations, and avoiding the problems of inconsistent data, repeated processing logic and high maintenance costs caused by the independent operation of multiple modules in traditional solutions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cross-platform user identity fusion and content recommendation technology, specifically a user identity fusion and content recommendation method based on a four-layer processing pipeline. Background Technology

[0002] Within the WeChat ecosystem, Official Accounts and Video Accounts correspond to different business entry points. Official Accounts primarily handle user following and message interaction, while Video Accounts focus on video information acquisition, content access, and related parameter processing. Due to differences in request protocols, field structures, and user identifier representations between these entry points, existing systems typically process user information within their respective links, making it difficult to establish a stable and unified cross-platform identity relationship for the same user. Consequently, it becomes difficult to effectively converge the interactive information from Official Accounts with the video information, content tags, and related request parameters from Video Accounts into a single user view. In this situation, the system can only filter content and return results based on partial information, which not only affects the consistency of user identity resolution results but also easily leads to inaccurate recommendations, content duplication, or unnatural recommendation transitions. Therefore, a processing method capable of simultaneously handling cross-platform identity resolution and content recommendation is needed, enabling the unification of user identifiers and related information from different entry points before forming more coherent and accurate recommendation results. Summary of the Invention

[0003] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0004] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:

[0005] A user identity fusion and content recommendation method based on a four-layer processing pipeline, wherein the four-layer processing pipeline includes, in sequence:

[0006] The request access layer receives feature vectors in four dimensions, assigns weighted scores to each feature dimension using weight coefficients to determine the protocol type, dynamically loads the corresponding protocol parser instance from the pluggable parser registry, and unifies different protocol fields into a standardized request context using semantic mapping rules with five mapping types.

[0007] Identity Fusion Layer: Extract the original external identifier string, concatenate it with the external identifier string U_ext using a fixed salt constant S at compile time, calculate the SHA-256 hash value H, then take the modulo 10^8 as a large integer to uniformly convert the external identifier string into a fixed 8-digit decimal numerical internal user identifier, verify and remove duplicates using a Bloom filter and an exact hash table, combine the device fingerprint, session identifier, and request timestamp to calculate the association confidence, and aggregate the identifiers to form a unified internal identity representation;

[0008] Recommendation decision layer: Using user group identifiers in the unified internal identity representation as the basic unit, and based on behavioral data and attribute data, it uses formulas... Update the user preference vector, where This represents the user preference vector at the current moment; This represents the user preference vector from the previous moment; This represents the feature vector of the current behavior; Represents a user attribute feature vector; This is the historical weighting coefficient, with a value range of 0.7-0.9; This refers to the attribute weight coefficient. For behavioral feature transformation functions;

[0009] Result encapsulation layer: The output format is transformed through the adaptation function Ψ, and the format adaptation function satisfies... ,in Indicates the final output message; This indicates the content and results that have been determined by the recommendation decision-making level; Indicate the target output format and its corresponding interface specification; This indicates the context information associated with the current request; This indicates a format adaptation function.

[0010] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the four-dimensional feature vectors are heterogeneous protocol request extraction path semantic features, message body structure signature features, verification field combination features, and field pattern matching features. When determining the protocol type, if the difference between the highest weighted score and the second highest weighted score is lower than a preset confidence threshold, no forced protocol type determination is performed. Instead, an alarm log is generated and the process is transferred to the manual review channel.

[0011] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the standardized request context object output by the request access layer embeds a metadata sub-object. The metadata sub-object includes at least: the original protocol format identifier, the original request data length, the security verification result and verification algorithm identifier, and the protocol parsing time. The metadata sub-object is used to support the reverse tracing of data objects in any stage of the processing pipeline back to the original request.

[0012] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the protocol parser instance implements the security verification method, structure parsing method, and field extraction method defined by the unified parser interface; through a declarative semantic mapping rule table, fields with different names, nesting positions, and data types in different protocols are uniformly mapped to standardized request context objects with the same field name, data type, and structural position. The declarative semantic mapping rule table supports five mapping operation types: direct mapping, transformation mapping, combination mapping, conditional mapping, and extended mapping; the corresponding protocol parser instances are dynamically loaded, including XML protocol parser instances and JSON protocol parser instances; the security verification method of the XML protocol parser performs signature verification based on the SHA1 algorithm, sorts the timestamp and nonce in the URL parameters in lexicographical order, concatenates them with the system token to calculate the SHA1 hash value, and compares it with the input signature at a constant time; the field extraction method of the XML protocol parser assigns the corresponding sub-extraction logic according to the MsgType field value and performs precision normalization processing on the second-level timestamp; the security verification method of the JSON protocol parser performs HTTP... The Bearer token in the Authorization header performs validity period, signature validity, and permission scope verification; the field extraction method of the JSON protocol parser extracts fields one by one according to nested paths using JSONPath path expressions.

[0013] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the method of deduplication using a Bloom filter and a precise hash table is as follows: A Bloom filter is used to perform a first-level existence screening on the generated internal user identifiers. When the Bloom filter returns a possible existence, a precise hash table is used for a second-level deterministic confirmation. If a conflict is confirmed, a progressive offset is performed with a fixed step value of 1 until an unoccupied identifier value is found. The device fingerprint field, session identifier field, and request timestamp field are extracted from the standardized request context object. A multi-dimensional association confidence score between internal user identifiers from different channels is calculated according to a preset weight coefficient. When the score exceeds a preset association threshold, multiple internal user identifiers are aggregated under the same user group identifier, and a unified internal identity representation containing a mapping list of the main internal user identifier, the global user group identifier, and the omnichannel identifier is output. Before inputting the original external identifier string into the hash mapping, identifier normalization processing is performed: the original external identifier string is encoded, standardized, format verified, semantically discriminated, and labeled with confidence. According to the confidence score, the identifiers are divided into three categories: the main identifier with a confidence score of not less than 0.85 directly enters the hash mapping process, the auxiliary identifiers with a confidence score between 0.4 and 0.84 participate in the multi-factor association analysis, and the clue identifiers with a confidence score of less than 0.4 are only used for reference when the main identifier is missing.

[0014] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the multi-dimensional association confidence score in the identity fusion layer is calculated by integrating the following four dimensions: device fingerprint consistency weight 0.35, when two identifiers from different channels share the same device fingerprint value within a preset time window, this dimension scores 1.0; time series association weight 0.25, the score decays linearly within a preset threshold according to the time interval; behavioral pattern similarity weight 0.25, the score is based on the cosine similarity of the content preference vectors corresponding to the two identifiers; network environment association weight 0.15, the score is based on the consistency of IP address network segment affiliation; after normalization of each dimension score, the weighted sum of the scores and their corresponding weights is obtained to obtain the comprehensive association confidence score.

[0015] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the unified internal identity representation output by the identity fusion layer includes the following structured fields: an 8-digit numeric master internal user identifier; a global user group identifier string; a full-channel identifier mapping list, where each record includes an external identifier string, the namespace identifier of the channel to which it belongs, the corresponding internal numeric identifier, and the confidence score of the mapping; a device fingerprint list; association analysis metadata, including an association method identifier, a comprehensive confidence score, and an enumeration list of association evidence; and identity tracing information, including the first appearance timestamp, the last update timestamp, and the mapping version number.

[0016] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the identity fusion layer further maintains persistent storage records of identifier mappings. Each storage record includes: the external original identifier string, the namespace to which the identifier belongs, the allocated final internal numeric identifier, the complete SHA-256 hash value, the conflict offset step number, and the mapping creation timestamp. The complete SHA-256 hash value field is used to support the audit verification of the mapping correctness at any point in time, and the conflict offset step number field is used to support the complete restoration of the conflict resolution process.

[0017] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the user preference vector constructed by the recommendation decision layer is generated based on a three-level profile system of a base layer, an intermediate layer, and a surface layer: the base layer carries the user's long-term preferences and stable attributes, the intermediate layer reflects the mid-term interest evolution trend, and the surface layer captures the user's immediate needs and temporary interest shifts; the three-level profiles are independently updated through different time decay coefficients and then weighted to synthesize the current moment's preference vector.

[0018] As a preferred embodiment of the user identity fusion and content recommendation method based on a four-layer processing pipeline described in this invention, the result encapsulation layer maintains a sending history while performing format adaptation. The sending history includes user identifier, content identifier, sending timestamp, channel type, sending result, and user feedback information. The sending history is used for duplicate content filtering and sending frequency control in subsequent processing and does not participate in the current round of recommendation decision-making.

[0019] Compared with the prior art, the beneficial effects of the present invention are:

[0020] 1) By using the multi-dimensional feature protocol recognition and declarative semantic mapping mechanism of the request access layer, the official account XML format request and video account JSON format request are uniformly converted into a standard request context object with the same structure and field semantics. This makes it unnecessary for subsequent layers to be aware of the differences in the original protocol. When adding new business channels, only mapping rules need to be added without modifying the core processing code, and the system scalability is fundamentally improved.

[0021] 2) Through the deterministic salted SHA-256 hash mapping mechanism of the identity fusion layer, external user identifiers of different lengths, character sets and namespaces (such as 28-bit openid and custom format user ID) are uniformly converted into fixed 8-bit numeric internal identifiers, eliminating storage redundancy (saving about 7 times storage space), inefficient indexing and cross-channel mutual recognition barriers caused by format differences.

[0022] 3) Through a two-level conflict detection and progressive conflict resolution mechanism assisted by Bloom filters, the uniqueness of global identifiers is guaranteed while maintaining extremely low space and time overhead, thus ensuring the engineering completeness of identifier mapping.

[0023] 4) By using a cross-channel user association aggregation mechanism based on multi-factor weighted scoring (combining features from four dimensions: device fingerprint consistency, time series correlation, behavioral pattern similarity, and network environment correlation), multiple independent external identifiers of the same real user in different channels are automatically associated and aggregated into a unified user group, breaking down the "cross-channel identity silos" between WeChat Official Accounts and Video Accounts, enabling the recommendation engine to make decisions based on complete cross-platform user behavior data;

[0024] 5) Through a unified internal identity representation system (including master internal ID, user group identifier, omnichannel mapping list and associated meta information), a complete data view based on user groups is provided for subsequent user profile construction and content recommendation, which significantly improves the consistency and accuracy of cross-platform recommendations;

[0025] 6) User identifier conversion, identity association aggregation, profile initialization, content recommendation decision and result encapsulation are integrated into a four-layer unified processing pipeline of "request access - identity fusion - recommendation decision - result encapsulation", which avoids the problems of inconsistent data, repetitive processing logic and high maintenance costs caused by the independent operation of multiple modules in the traditional solution. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0027] Figure 1 This is a flowchart of a user identity fusion and content recommendation method based on a four-layer processing pipeline according to the present invention;

[0028] Figure 2 This is a framework diagram of the request access layer and identity fusion layer of a user identity fusion and content recommendation method based on a four-layer processing pipeline according to the present invention.

[0029] Figure 3 This is a framework diagram of the recommendation decision layer and result encapsulation layer of a user identity fusion and content recommendation method based on a four-layer processing pipeline according to the present invention.

[0030] Figure 4 This is an interaction sequence diagram of a user identity fusion and content recommendation method based on a four-layer processing pipeline according to the present invention. Detailed Implementation

[0031] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0032] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.

[0033] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0034] This invention proposes a user identity fusion and content recommendation method based on a four-layer processing pipeline. It is used to establish a unified processing link between different business entry points of WeChat Official Accounts and WeChat Video Accounts, so that scattered user information, content information and related parameters can be uniformly associated and processed. On this basis, stable identity recognition results and more reasonable content return results are formed, thereby improving the consistency of cross-platform identity recognition, enhancing the accuracy, coherence and stability of content recommendation, and improving the synergy and scalability of the overall processing link.

[0035] The overall approach of this invention mainly focuses on two aspects: user identity fusion and content recommendation. Regarding user identity fusion, this invention first uniformly identifies, associates, and aggregates user identifiers and related information from different entry points such as WeChat Official Accounts and Video Accounts, forming a unified data view for the same user. Regarding content recommendation, this invention matches, filters, and generates results based on the fused user information, the currently requested content, and related content information, thereby making the recommendation results more aligned with the user's current needs and maintaining good consistency. Furthermore, this invention divides the overall process into four levels: request access, identity fusion, recommendation decision-making, and result encapsulation. The overall processing flow is as follows: Figure 1 As shown below, the technical solutions at each level will be given an overall overview and a layered explanation in turn.

[0036] First, at the access request layer, the system implements deep identification and unified conversion of multi-source protocols, and its processing flow is as follows: Figure 2 As shown.

[0037] The request access layer is located at the entry point of the entire processing pipeline. The core technical problem this layer needs to solve is that the requests generated by the two business entry points, WeChat Official Accounts and Video Accounts, differ fundamentally in four dimensions: encoding format, field naming system, data nesting structure, and security verification mechanism. Official Account callback requests use XML tag text format, fields are named according to the WeChat Official Accounts platform message body specifications, and the user identifier is encoded as a 28-bit fixed-length string (openid). Request validity relies on SHA1 signature verification in the URL query parameters. Video Account API requests use a hierarchical JSON key-value pair format, fields are named according to RESTful interface conventions, the user identifier is embedded in a multi-level nested structure as a custom format string, and request validity relies on Bearer token verification in the HTTP message header. These differences in data structure between the two protocols result in the same business semantics (such as user identity, content identifier, and operation type) being distributed across different protocols with completely different field names, at different nesting levels, and with different data types. If this difference is not systematically masked, all subsequent processing layers will have to embed protocol-aware logic, leading to code branching, high costs for adding new channels, and system architecture degradation. Therefore, the design goal of this layer is to build a deterministic conversion mechanism from "external heterogeneous protocols" to "internal unified representation", so that protocol differences end at this layer, and subsequent layers face a standardized request context with the exact same structure and semantics, without needing to be aware of the original source of the request.

[0038] In the protocol identification stage, this invention constructs a multi-dimensional feature-weighted scoring mechanism. Unlike traditional methods that rely solely on single features such as Content-Type, this system comprehensively judges from four dimensions: the semantic keyword pattern of the URL path, the structural signature of the first few bytes of the message body (XML and JSON have mutually exclusive start identifiers), the existence of the signature-timestamp-random number combination in the URL parameters or the Bearer authentication pattern in the HTTP header, and the matching results between the top-level field name of the request body and the protocol field pattern regular expression library. The weighted sum of each dimension, determined through training with historical data, is used to determine the final result. When the difference between the highest and second-highest scores is too small, the system refuses to force a judgment and instead submits the application to a manual review channel, thus fundamentally preventing protocol misjudgment.

[0039] In the protocol parsing phase, this invention designs a pluggable parser registry mechanism based on a unified parser interface. Each protocol corresponds to a parser instance that implements three standard contract methods: security verification, structure parsing, and field extraction. The system dynamically loads the corresponding instance based on the judgment result. Taking the XML protocol parser as an example, its security verification performs a signature consistency check based on SHA1—sorting the timestamp and random number in lexicographical order and concatenating them with the system token to calculate the hash value, which is then compared with the incoming signature at a constant time to defend against time-series side-channel attacks. Field extraction is assigned to sub-extraction logic for text, events, or media based on message type, while simultaneously performing precision normalization on the second-level timestamp. When a new business channel is added, only a new parser instance needs to be implemented and registered, with zero modification to the main process code.

[0040] The core innovation of this layer lies in the design of a declarative semantic mapping engine. Traditional imperative adaptation methods hardcode field conversion logic into the code, resulting in high change costs and a lack of explicit traceability of mapping relationships. This invention manages mapping rules in the form of a declarative configuration table, achieving complete separation of mapping logic from business code. Each rule includes attributes such as source protocol, source field location path, mapping operation type, target standard field name, and conversion function reference. Based on a systematic analysis of cross-protocol field conversion requirements, this invention summarizes and defines five basic mapping operation types: (a) Direct mapping—the source field is renamed, while its value and type remain unchanged; (b) Transformation mapping—the source value is transformed by a pure function (such as time unit conversion) and then assigned a value; (c) Combination mapping—multiple scattered source field values ​​are merged into a single target field through a combination function (e.g., merging the three fields of message type, event type, and event parameters into a single content type field, making the implicit semantic relationship explicit in the data structure); (d) Conditional mapping—selecting different assignment logic based on conditional judgments of the source field values; (e) Extended mapping—deriving additional information from the source field that does not directly exist in the source protocol (e.g., extracting multiple attributes from a nested device information object and generating a globally unique device fingerprint field through hash calculation). The mapping rule table is version-managed using a declarative configuration file, supporting hot reloading updates. The workload when adding a new channel is reduced from "writing a complete set of conversion code" to "filling in mapping rule records," and the marginal cost is independent of the number of existing protocols.

[0041] After protocol identification, parsing, and semantic mapping, the system assembles the generated standard fields into a standardized request context object. This object is designed according to three principles: format independence (the top-level structure remains consistent regardless of the original encoding), semantic integrity (no business semantics of the original request are lost), and traceability (embedded metadata sub-objects fully record the original format, validation results, and parsing time, supporting reverse tracing from any stage to the original request). Before output, it employs three levels of validation—required field integrity, field format validity, and cross-field logical consistency—to intercept abnormal data at the entry point.

[0042] It is important to clarify that the request access layer unifies the field structure and representation format—it maps fields with different names, nesting positions, and data types from different protocols to a standard set of fields with the same field name, data type, and top-level position. However, at this stage, the value carried in the user identifier field is still the original external identifier string, and these values ​​are independent and non-interchangeable in the namespaces of different channels. The work of uniformly mapping external identifiers to the system's internal identifier system is completed by the subsequent identity fusion layer. The boundary between the two layers is clear: the request access layer stops at protocol format normalization and does not involve the fusion of identifiers and identities. For a specific example of data format conversion, please refer to Example 1.

[0043] The core transformation process of this layer can be formally represented as:

[0044]

[0045] in, Represents the standardized request context object. This represents the original request data. The intelligent protocol conversion function of this invention contains four progressive stages: protocol identification, deep parsing, semantic mapping, and context verification.

[0046] Second, at the identity fusion layer, the system solves the core technical challenge of intelligent mapping and global consistency assurance of cross-channel user identifiers. Its processing flow is as follows: Figure 2 As shown.

[0047] The identity fusion layer, located after the request access layer, plays a crucial role as a core hub and data processing bridge in the overall system architecture. It's essential to strictly distinguish the technical boundaries between these two layers: the request access layer addresses the issue of "the same business semantics being expressed in different protocols with different field names, nesting levels, and data types"—its output is a standard request context object, where all business fields have identical field names and structural positions, but the user identifier field still carries the original string form of the external identifier within its respective namespace. The identity fusion layer, building upon this, addresses a completely different and deeper problem: how to uniformly map these external identifier strings with varying namespaces and formats (the WeChat Official Account uses a 28-character fixed-length openid, while the Video Account uses a user identifier in a custom format defined by the business system, with no mutual recognition in length, character set, or naming rules) to a consistent, computable, and mutually recognized identifier system within the system, and aggregate multiple identifiers of the same real user across channels into a unified identity view through multi-factor association. In short, the request access layer unifies the "data container" (field structure and representation format), while the identity fusion layer unifies the "identity value" (identifier namespace and semantics). The two layers each perform their respective functions and are interconnected upstream and downstream.

[0048] This layer is designed with a four-level progressive processing pipeline: "Identifier Extraction and Normalization - Deterministic Hash Mapping - Conflict Detection and Resolution - Multi-Factor Cross-Channel Association". Among them, the deterministic salted hash mapping engine and the multi-factor cross-channel user association aggregation mechanism are the two core innovative components of this layer, which will be elaborated on below, while the other components will be given a general description.

[0049] During the identifier extraction and normalization phase, the system comprehensively extracts all user identity-related field information from the standard request context object passed in from the request access layer, including explicit user identifiers, session identifiers, device fingerprints, and additional identity clues in extended parameters. The system establishes a hierarchical priority system based on the reliability of each identifier source: the openid issued by the WeChat official certification system serves as the primary identifier (confidence 1.0); the user identifier authenticated through login within the Video Account business system serves as the secondary primary identifier (confidence 0.85); session tokens and temporary credentials serve as secondary identifiers (confidence 0.6); and device fingerprints serve as secondary association identifiers (confidence 0.4). After encoding standardization and format verification, the extracted identifiers are categorized into three types: primary identifiers, secondary identifiers, and clue identifiers—primary identifiers directly enter the hash mapping process, while secondary and clue identifiers participate in subsequent multi-factor association analysis but do not directly participate in hash mapping.

[0050] The first core innovation of this layer is a deterministic salted hash mapping engine. The key design problem the system needs to solve is how to uniformly map external identifier strings of arbitrary length and character set to an internal identifier space with a fixed format, fixed range, and efficient indexing and computation. This invention, after multi-dimensional constraint evaluation of various identifier mapping technologies—covering deterministic requirements (excluding random number and auto-incrementing sequence schemes), irreversibility requirements (excluding reversible encryption and Base-N encoding schemes), space efficiency requirements (excluding UUID and long hash string schemes), and collision probability requirements—ultimately adopts a deterministic modulo mapping scheme based on salted SHA-256 cryptographic hashing. Specifically, the scheme assumes that the system maintains a fixed compile-time salt constant. (A random string longer than 20 characters, written in the code rather than in the configuration file to ensure consistency across deployment instances), for external identification. Perform splicing operation ,right Calculating the SHA-256 hash yields a 256-bit fixed-length hash value. ,Will As a modulus of large integer pairs The internal user ID is obtained by taking the modulo. The innovation of this scheme is reflected in three aspects: (a) salt value As a global namespace isolation factor—even if two different systems happen to use the same hash algorithm and modulus, their internal ID spaces are completely isolated due to different salt values, eliminating the risk of ID collisions across systems from a mechanism perspective; (b) the modulo operation realizes a deterministic and irreversible bounded mapping from strings of arbitrary length to fixed-length 8-digit values—the 2256 output space of SHA-256 is linearly compressed to a 10^8 space, obtaining a compact numerical representation while maintaining cryptographic security strength; (c) the 8-bit numeric internal ID can be directly stored as an integer primary key in the database (requiring only 4 bytes), while the original openid requires at least 28 bytes of storage, saving about 7 times the storage space, and the insertion and query performance of numeric primary keys on B+ tree indexes is far superior to long string indexes. The internal ID space is set to 10^8 based on capacity engineering analysis: under the assumption of uniform distribution of SHA-256 hashes, it can support 100 million unique user identifiers, meet the user growth needs for more than 10 years, and is exactly the maximum value of an 8-digit decimal number, avoiding consistency problems caused by leading zero processing.

[0051] In the collision detection and resolution stage, although the collision probability of SHA-256 is extremely low in a cryptographic sense (on the order of 2-256), and the theoretical collision probability in the modulo mapping is about 7.8×10-24, to meet the requirements of engineering completeness, this invention still designs a lightweight two-level detection mechanism: The first level achieves fast screening in O(1) time through a Bloom filter (the parameters are optimized according to the expected number of elements 10^8 and the false alarm rate 0.01) - the asymmetric determination characteristic of the Bloom filter ("not present" means no false alarm, "may exist" means a controllable false alarm rate) ensures that more than 99% of the cases are directly confirmed to be without collision; the second level performs deterministic confirmation in O(1) time for the very few cases where the Bloom filter returns "may exist" through an exact hash table. If a collision is confirmed, a progressive linear offset strategy is adopted - starting from the basic internal ID and increasing by a step value of 1 until an unoccupied value is found. The simplicity of this strategy is precisely its engineering advantage: in the context of extremely low collision probability, there is no need for complex secondary hashing or chain addressing schemes.

[0052] The second core innovation of this layer is a multi-factor cross-channel user association aggregation mechanism, which is also the key difference from existing technical solutions. Existing technical solutions typically only achieve a one-to-one conversion from a single channel identifier to an internal identifier, lacking the ability to aggregate cross-channel identities. This invention innovatively recognizes that although the same real user holds external identifiers in different namespaces (mapped to different internal IDs) on WeChat Official Accounts and Video Accounts, their behavior exhibits measurable correlation characteristics at the device, time, and content preference levels. These characteristics can be systematically extracted, quantified, and comprehensively scored, thereby achieving automatic aggregation of cross-channel identities. The system selects four dimensions of association features for comprehensive scoring: (a) Device fingerprint consistency—identifiers from two different channels share the same device fingerprint value within a similar time window, which is the strongest evidence of cross-channel identity identity, with a weight coefficient of 0.35; (b) Time series correlation—after a user completes an operation on the WeChat Official Account channel, they initiate a related operation on the WeChat Video Account channel within a very short time interval. This tightly coupled cross-channel behavioral sequence pattern is difficult to explain by the coincidence of the behaviors of two independent users, with a weight coefficient of 0.25; (c) Behavioral pattern similarity—the cosine similarity between the content preference vectors corresponding to the two channel identifiers. If the two identifiers are highly consistent in their interest distribution of content types, it increases the possibility that they belong to the same user, with a weight coefficient of 0.25; (d) Network environment correlation—the degree of consistency in the IP address attribution (network segment, operator, geographical region) of the requests corresponding to the two channel identifiers, with a weight coefficient of 0.15. The comprehensive calculation formula for the association score is the weighted sum of the similarity scores of each dimension and their corresponding weights. The system sets a threshold for association determination (e.g., 0.6). When the overall association score exceeds the threshold, a cross-channel association is automatically established between the two internal IDs, generating a globally unique user group identifier. The association relationship is persistently stored in a structured format and supports dynamic review—the system periodically re-verifies low-confidence associations and unbinds associations that no longer meet the conditions, ensuring that the identity graph remains accurate dynamically as user behavior evolves.

[0053] After the above four-level progressive processing, the identity fusion layer outputs a structured unified internal identity object containing complete cross-channel identity information. Its core components include: a main internal user identifier (8-digit numerical type), a global user group identifier, a full-channel identifier mapping list (recording the correspondence between the external original identifier and the internal numerical identifier for each channel, as well as the confidence score), a device fingerprint list, association analysis metadata (recording the association method, comprehensive confidence score, and a list of associated evidence), and identity traceability information (first appearance timestamp, last update timestamp, and mapping version number). The subsequent recommendation decision layer uses this unified internal identity object as a foundation to build user profiles, thereby obtaining complete user behavior data across WeChat Official Accounts and Video Accounts, achieving accurate and coherent cross-platform content recommendations. See Example 2 for a detailed data mapping example.

[0054] The core transformation process of this layer can be expressed mathematically as follows:

[0055]

[0056] In this identifier mapping formula, This represents the internal user ID of the system, using an 8-digit numeric identifier format, with a value range of 0-99999999; It represents an external user identifier and is in the form of a raw string (such as a 28-digit openid for a WeChat Official Account or a custom user ID for a Video Account). It is a system salt constant (fixed configuration at compile time, cannot be changed at runtime), serving as a global namespace isolation factor; The string concatenation operator; This represents a hash function, implemented using the SHA-256 cryptographic hash algorithm, which outputs a fixed-length 256-bit hash value. This represents the ID space modulus, set to 100000000 (i.e., 10^8), ensuring that the mapping result is always an 8-bit decimal number identifier.

[0057] To ensure absolute consistency and environment independence of the mapping, the system strictly adheres to the following mathematical constraints: for any point in time... and Arbitrary deployment of instances and Same external identifier Must meet:

[0058]

[0059] The technical guarantee of this constraint consists of three aspects: (a) SHA-256 is a deterministic cryptographic hash function, and the same input will always produce the same output; (b) salt value. The code is embedded as a compile-time constant, without relying on external configuration files, environment variables or database storage, which fundamentally eliminates the inconsistency in mapping caused by differences in environment configuration; (c) Modulo operation is also a deterministic mathematical operation, and no random numbers or timestamps are involved in the whole process.

[0060] A progressive processing strategy is used to address hash collisions:

[0061]

[0062] in A conflict resolution counter (incrementing from 1). This is the conflict step value (usually set to 1). The ConflictDetect function employs a two-stage conflict detection mechanism combining a Bloom filter and a precise hash table: the first stage uses a Bloom filter to achieve a high probability of no conflict (guaranteeing no false positives) in O(1) time complexity; the second stage uses a precise hash table to achieve deterministic conflict confirmation in O(1) time complexity (eliminating false positives from the Bloom filter). Under the theoretical premise of an extremely low conflict probability (approximately 7.8 × 10^-24), this mechanism achieves optimal time and space efficiency while ensuring absolute correctness.

[0063] Third, at the recommendation decision layer, the system implements an intelligent decision-making and personalized message generation engine based on a unified user profile, and its processing flow is as follows: Figure 3 As shown.

[0064] The recommendation decision layer is the business brain of the architecture. Building upon the standardized data and unified identity provided by the first two layers, it undertakes the core mission of constructing user profiles, making content recommendation decisions, and generating personalized messages. This layer employs a four-tiered progressive processing architecture: "data collection—feature engineering—profile layering—intelligent decision-making," gradually refining multi-source, heterogeneous user information into precise user understanding. In terms of profile construction, it innovatively adopts a three-tiered progressive user profile system: a base layer (long-term preferences), an intermediate layer (medium-term trends), and a surface layer (immediate needs). This allows user features at different time granularities to complement and synergize with each other, significantly improving the comprehensiveness and accuracy of understanding user needs.

[0065] During the data acquisition and feature processing phase, the system gathers user information from multiple data sources. Basic attribute information (such as registration data like work stage, gender, and occupation) forms the static foundation of the user profile. Behavioral logs record viewing history, message interactions, and search queries, reflecting the user's dynamic preferences. Environmental information such as device terminal, geographical location, and network status supplements the instantaneous context. After all raw data is cleaned and standardized, the system performs in-depth feature processing: numerical features are standardized and binned; categorical features are encoded and embedded (compressing high-dimensional sparse categorical information into low-dimensional numerical representations); time-series features are statistically extracted using sliding window methods to extract trend information; and textual features undergo topic analysis and keyword extraction. Ultimately, the original sparse, high-dimensional user information is transformed into a dense, computable feature representation.

[0066] Based on the processed features, the system constructs a multi-layered user profile system. The basic layer carries the user's long-term preferences and stable attributes, such as the distribution of interests in different content types, patterns of active periods, and spending power; the intermediate layer reflects the evolution trend of medium-term interests, such as the changing trajectory of recent hot topics and seasonal behavioral adjustments; the surface layer captures the user's real-time status, such as current emotional tendencies and temporary shifts in interests. These three layers of profiles each have their own focus while complementing each other, together forming a complete understanding of the user. On this basis, the system determines message triggering and content selection through a comprehensive evaluation of multiple factors, including the user's current level of interest, the feedback effect of historical messages, the timeliness of the content, and the control of sending frequency.

[0067] The entire recommendation decision layer adopts a modular architecture design. Different functional modules (such as user profile calculation service, decision engine service, content recommendation service, etc.) can be developed and deployed independently, and work collaboratively through a unified message bus. The core technology of this layer is a dynamic preference update mechanism based on intelligent weighted learning, which can be precisely expressed mathematically as follows:

[0068]

[0069] In this preference update model, This represents the user preference vector at the current moment, characterizing the distribution of user interest in different content types; This represents the user preference vector from the previous moment; This represents the current behavioral feature vector, which includes behavioral data such as viewing duration, completion rate, content type encoding, and interaction intensity. This represents a user attribute feature vector, covering static attribute information such as work stage, gender, and occupation. The historical weighting coefficient (range 0.7-0.9) controls the decay rate of historical preferences. This refers to the attribute weight coefficient. This is a behavioral feature transformation function that maps the original behavioral data to the preference vector space.

[0070] Message-triggered decisions are based on the following intelligent computing model:

[0071]

[0072] In this decision-making model, This represents a binary decision variable (1 triggers sending, 0 does not trigger). It is a weight vector that reflects the importance of each preference dimension; For bias terms; It is a dynamic decision threshold that adaptively adjusts based on system load and user experience requirements; The sign function converts continuous ratings into binary decision outputs. This model simultaneously considers user preference states and system-level optimization requirements, ensuring the accuracy and rationality of message push notifications.

[0073] Fourth, in the result encapsulation layer, the system is responsible for organizing, validating, formatting, and encapsulating the content results already determined by the recommendation decision layer. The processing flow is as follows: Figure 3 As shown.

[0074] The encapsulation layer is located at the end of the entire processing pipeline. This layer organizes the output process in the order of "validation—adaptation—recording—monitoring," enabling flexible switching between multi-channel outputs through a unified format adaptation function. Simultaneously, combined with sending history tracking and anomaly handling mechanisms, it stably converts the content results determined by the recommendation decision layer into externally usable response data. The focus of this layer is not on determining what content to recommend, but on ensuring that the output content meets the requirements of different channels in terms of field structure, return format, and response rules, without altering the core semantics of the recommendation results.

[0075] The system first receives the target content, result type, and relevant control parameters output by the recommendation decision layer. It then performs integrity checks and output constraint verification on the result object to confirm whether the content to be returned has the necessary fields, identification information, and formatting conditions. For results that can be directly returned, the system supplements the corresponding response headers, status fields, content structure, and context parameters based on the request source. For results that do not yet meet the conditions for direct return, the system performs field trimming, default value completion, error message encapsulation, or rollback processing according to preset rules to ensure the stability and parsability of the external response. This verification step implements the engineered organization of the established recommendation results, rather than performing a new recommendation judgment.

[0076] After successful verification, the system performs adaptive encapsulation based on the specific format specifications of the request source. For requests from WeChat Official Accounts, the system organizes the results into XML format according to the structure required for WeChat message replies, ensuring consistency between the reply content and the message interaction method on the Official Account side. For requests related to Video Accounts, the system organizes the results into JSON format according to the corresponding interface conventions, ensuring that video information, content identifiers, and related returned fields can be correctly parsed. For internal API calls, the system outputs a unified structured data object for subsequent processing by business modules. To improve the efficiency of adapting between different formats, the system uses a unified format adaptation function to complete the output conversion, the mathematical expression of which is:

[0077]

[0078] In this formula, This indicates the final output message, which can be either a sequence of bytes or a structured response object; This indicates the content and results that have been determined by the recommendation decision-making level; Indicate the target output format and its corresponding interface specification; This indicates the context information associated with the current request, such as the source, protocol requirements, version identifier, and security constraints. This represents a format adaptation function used to perform field mapping, structure organization, and encoding conversion according to the requirements of different entry points. Through this function, the system can convert unified internal results into an output format that can be directly used by external interfaces without changing the core semantics of the recommendation results.

[0079] To ensure the continuity and reasonableness of the returned results, the system also maintains a set of sending history and status tracking mechanisms. After each result is output, the system updates the correspondence between user, content, and time. This recording process can be represented as follows:

[0080]

[0081] in, This represents the existing set of sending history in the system. New records include user ID, content ID, sending time, channel type, sending result, and feedback information. The purpose of this record is not to re-participate in the current round of recommendation decisions, but rather to serve for sending traceability, result tracking, duplicate control, and anomaly detection in subsequent processing, enabling the system to more stably maintain consistency in output across different entry points.

[0082] During the output process, when anomalies such as network timeouts, missing fields, format mismatches, permission verification failures, or resource limitations occur, the system performs retries, downgrades, error encapsulation, or default result rollbacks according to preset rules to prevent technical anomalies from directly affecting external responses. Simultaneously, the system continuously monitors response time, return success rate, and output status to promptly identify and adjust problems in the encapsulation process. Through these processes, the result encapsulation layer achieves a stable connection between internal recommendation results and external standard responses, ensuring that the entire method can reliably output in a manner that meets interface requirements even after cross-platform identity fusion and content recommendation are completed.

[0083] In practical applications, this invention addresses scenarios involving user information acquisition, parsing, and message sending. For example, WeChat Official Account interfaces typically submit an OpenID, while video account playback or streaming interfaces can submit either an OpenID or a user identifier within the system as needed. Video file requests may also include video IDs, file paths, or player parameters. The system uniformly converts these inputs into a user identifier within the system, video request context, user preferences, and message results. Traditional methods often separate information acquisition, identifier conversion, user profile creation, message sending, and result feedback, easily leading to inconsistencies in data interpretation. This invention, through a "access, parsing, calibration, sending, and feedback" approach, converges these issues into a single processing chain.

[0084] Example 1: Scenario of requesting access and unified conversion of multi-source protocols:

[0085] This embodiment takes the complete process of the same real user triggering requests successively on the WeChat Official Account channel and the WeChat Video Account channel as an example to specifically demonstrate how the request access layer can uniformly convert the two heterogeneous protocol formats, XML and JSON, into a standard request context object, and compare the format differences before and after the conversion.

[0086] Scenario A – Integration and Conversion of Official Account XML Message Callback Requests:

[0087] The system received the following raw HTTP request from the WeChat Official Accounts Platform message callback interface:

[0088] POST / wechat / callback?signature=9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b

[0089] ×tamp=1715731200&nonce=1234567890 HTTP / 1.1

[0090] Host: api.example.com

[0091] Content-Type: text / xml; charset=utf-8

[0092] Content-Length: 312

[0093] <xml>

[0094] <tousername><![CDATA[gh_1234567890ab]]>< / tousername>

[0095] <fromusername><![CDATA[oUpF8uMuAJO1M2pxb1Q9zxjfnS1kg]]>< / fromusername>

[0096] <createtime> 1715731200< / createtime>

[0097] <msgtype><![CDATA[event]]>< / msgtype>

[0098] <event><![CDATA[CLICK]]>< / event>

[0099] <eventkey><![CDATA[VIDEO_PLAY_001]]>< / eventkey>

[0100] <msgid> 7123456789012345< / msgid>

[0101] < / xml>

[0102] Analysis of the format characteristics of this request: (a) Encoding format – XML tag text, field values ​​are in...<![CDATA[...]]> Package, each field laid out flat <xml>(b) User ID – carried by the FromUserName field, with a value of 28-character openid oUpF8uMuAJO1M2pxb1Q9zxjfnS1kg; (c) Time information – carried by the CreateTime field, with a value of Unix second-level timestamp 1715731200; (d) Operation semantics – scattered in three independent fields: MsgType (event), Event (CLICK), and EventKey (VIDEO_PLAY_001). These three are at the same level in the XML structure, and their semantic causal and hierarchical relationships are not reflected in the data structure; (e) Security verification – signature information signature, timestamp, and nonce are passed through URL query parameters and are independent of the XML message body. They need to be verified by sha1(sort([timestamp, nonce, token])) signature according to WeChat specifications.

[0103] After the system performs four levels of progressive processing, it outputs a unified standard request context object:

[0104] StandardRequestContext {

[0105] trace_id: "wxmp_1715731200_oUpF8uMuAJO1M2pxb1Q9zxjfnS1kg",

[0106] protocol_type: "wechat_mp",

[0107] receive_time: 1715731200000,

[0108] user_id: "oUpF8uMuAJO1M2pxb1Q9zxjfnS1kg",

[0109] session_id: "sess_wxmp_1715731200",

[0110] device_fingerprint: null,

[0111] content_type: "video_play_event",

[0112] content_id: "VIDEO_PLAY_001",

[0113] content_payload: {"msg_type": "event", "event": "CLICK"},

[0114] entry_source: "menu_click",

[0115] params: {"MsgId": "7123456789012345"},

[0116] metadata: {

[0117] "original_format": "xml",

[0118] "original_size": 312,

[0119] "signature_verified": true,

[0120] "signature_algorithm": "SHA1",

[0121] "parse_duration_us": 1420

[0122] }

[0123] }

[0124] Scenario B – Accessing and converting JSON API requests from Video Accounts:

[0125] When a user clicks the video menu in the official WeChat account, the system guides the user to the WeChat Video Channel for streaming media playback via a shareable card. The system receives the following raw HTTP request from the WeChat Video Channel RESTful API interface:

[0126] POST / api / v1 / video / stream HTTP / 1.1

[0127] Host: api.example.com

[0128] Content-Type: application / json; charset=utf-8

[0129] Authorization: Bearer st_v_b7d4e2f8a1c3

[0130] Content-Length: 387

[0131] {

[0132] "version": "1.0",

[0133] "request_id": "req_v_20240515_a3f2c91e",

[0134] "user": {

[0135] "user_id": "v_user_8891",

[0136] "session_token": "st_v_b7d4e2f8a1c3",

[0137] "device_info": {

[0138] "platform": "iOS",

[0139] "device_model": "iPhone15",

[0140] "os_version": "17.4"

[0141] }

[0142] },

[0143] "content": {

[0144] "video_id": "vid_m7k2p9x4",

[0145] "access_type": "stream",

[0146] "quality": "1080p",

[0147] "codec": "H.265",

[0148] "duration_ms": 342000,

[0149] "file_size_bytes": 52428800

[0150] },

[0151] "context": {

[0152] "entry_source": "share_card",

[0153] "referrer_id": "vid_r3t8w5n1

[0154] }

[0155] }

[0156] Analysis of the request's format characteristics: (a) Encoding format—JSON key-value pair text, with fields organized in a hierarchical nested structure. `user`, `content`, and `context` are the three top-level sub-objects, with internal fields further nested, forming a three-level depth; (b) User identifier—carried by the nested path `user.user_id`, with a value of the custom format string `v_user_8891` (containing an underscore prefix and a numeric suffix, completely different from the 28-character format of the WeChat Official Account's `openid`); (c) Time information—not a single timestamp field is directly present, but rather partially embedded in the date string `20240515` of the `request_id`. The video duration is stored in milliseconds in the content.duration_ms field; (d) Operational semantics—the content.access_type field value of stream indicates a streaming media playback request, and the video metadata is fully organized under the content sub-object; (e) Device information—structured and embedded in the user.device_info nested sub-object, containing three fields: platform, device model, and operating system version, which are information dimensions that do not exist in the official account request; (f) Security verification—the Bearer token is passed through the HTTPAuthorization header, and the signature verification is independent of the message body.

[0157] After the system performs four levels of progressive processing, it outputs a unified standard request context object:

[0158] StandardRequestContext {

[0159] trace_id: "vc_20240515_a3f2c91e",

[0160] protocol_type: "video_channel",

[0161] receive_time: 1715731205987,

[0162] user_id: "v_user_8891",

[0163] session_id: "st_v_b7d4e2f8a1c3",

[0164] device_fingerprint: "df_iOS_7a3b2c1d",

[0165] content_type: "video_stream_request",

[0166] content_id: "vid_m7k2p9x4",

[0167] content_payload: {

[0168] "quality": "1080p",

[0169] "codec": "H.265",

[0170] "duration_ms": 342000,

[0171] "file_size_bytes": 52428800,

[0172] "access_type": "stream"

[0173] },

[0174] entry_source: "share_card",

[0175] referrer_id: "vid_r3t8w5n1",

[0176] params: {"version": "1.0"},

[0177] metadata: {

[0178] "original_format": "json",

[0179] "original_size": 387,

[0180] "token_verified": true,

[0181] "token_algorithm": "Bearer",

[0182] "parse_duration_us": 2180

[0183] }

[0184] }

[0185] As clearly seen above, the request access layer does not perform simple format conversion (such as XML to JSON reserialization), but rather deep semantic alignment and structural normalization. It maps the flat, scattered, and hierarchical business information in XML, and the nested, multi-level path-based structured business information in JSON, to a single standard context object with identical field definitions. This conversion allows the subsequent identity fusion layer, recommendation decision layer, and result encapsulation layer to completely ignore the protocol differences of the original request, obtaining the required data simply by reading the standard field names. This fundamentally eliminates the if-else branch code bloat problem common in cross-protocol processing. When the system needs to access new business channels, it only needs to add a declarative mapping record corresponding to that channel to the mapping rule table and register a parser instance that implements the parser interface. The core processing pipeline code requires zero modification, fundamentally improving the system's scalability.

[0186] Example 2: Hash mapping and identity fusion scenario for cross-channel user identifiers:

[0187] This embodiment continues the cross-channel request scenario of Embodiment 1. The primary identifier is extracted from the standard request context of Scenario A (WeChat Official Account channel) in Embodiment 1. This identifier, after format validation, is confirmed to be a valid openid conforming to a 28-character length pattern (example value: oUpF8uMuAJO1M2pxb1Q9zxjfnS1kg), and is labeled as the primary identifier under the WeChat Official Account namespace with a confidence level of 1.0. The primary identifier is also extracted from the standard request context of Scenario B (Video Account channel) in Embodiment 1. This identifier, after format validation, is confirmed to be a custom format string conforming to the Video Account business system specifications (example value: v_user_8891), and is labeled as the primary identifier under the Video Account namespace with a confidence level of 0.85. Simultaneously, auxiliary identifiers (session identifier, device fingerprint) from both channels are extracted. Key observation: The device fingerprint values ​​extracted from the two channels are completely identical, and the time difference between the two requests is only about 6 seconds, providing crucial clues for subsequent cross-channel identity association.

[0188] The system performs deterministic salted SHA-256 hash mapping on both primary identifiers. The SHA-256 hash value is calculated by concatenating a compile-time fixed salt constant with the external identifier string. Then, the 256-bit hash value is modulo 10^8. The WeChat Official Account's openid is mapped to internal user ID 47291658, and the Video Account's user ID is mapped to internal user ID 21840357 (both are 8-digit decimal values). A Bloom filter checks and confirms that neither internal ID is currently in use, and the mapping relationship is directly recorded.

[0189] Comparing the mapping results with the original identifiers reveals that the identity fusion layer achieves the following multi-dimensional format unification: In terms of format, the 28-character openid for WeChat Official Accounts and the custom-formatted user identifier for Video Accounts are both uniformly mapped to 8-digit pure numeric internal IDs; in terms of storage, external identifiers require 28 bytes and 11 bytes of variable-length string storage respectively, while internal IDs uniformly use 4-byte integer storage, saving approximately 7 times the storage space; in terms of namespace, the independent namespaces originally belonging to the WeChat Official Accounts platform system and the Video Accounts business system respectively have been unified into the system's global namespace, with all channels using the same internal ID system; regarding cross-channel mutual recognition, the original identifier... The identifiers are not interchangeable across channels—the WeChat Official Account's openid is meaningless on the Video Account side, and the Video Account's user ID is also unusable on the WeChat Official Account side, while the internal ID is uniformly recognized across all channels; in terms of security, the original identifier is directly exposed and can be associated with external systems, while the internal ID is irreversibly hashed using SHA-256 and modulo operations, making it impossible to recover the original openid or user ID from the internal ID, effectively protecting user privacy; in terms of database performance, the external identifier relies on a string B+ tree index, while the internal ID uses an integer B+ tree index. The latter's insertion, join, and range query efficiency are significantly better than the former, providing structural performance guarantees for large-scale user scenarios.

[0190] After completing the hash mapping, the system initiates a multi-factor cross-channel correlation analysis. Detected correlation signals include: identical device fingerprints, a request time difference of approximately 6 seconds, and IP addresses belonging to the same network segment. The comprehensive score calculation is: Device fingerprint consistency 1.00 × 0.35 + Time series correlation 0.90 × 0.25 + Behavioral pattern similarity 0.78 × 0.25 + Network environment correlation 0.85 × 0.15 = 0.8975, exceeding the correlation threshold of 0.6, thus determining that they are the same real user.

[0191] After the association is confirmed, the system creates a global user group and generates a unified cross-channel internal identity representation. The core content of this representation includes: the main internal ID 47291658, the user group identifier UG_20240515_0001, the cross-channel identifier mapping list (including the WeChat Official Account openid→47291658, confidence 1.0; the Video Account user ID→21840357, confidence 0.85), the device fingerprint list, the association evidence list (device fingerprint exact match, time proximity within 6 seconds, consistent IP network segment, content preference cosine similarity 0.78), and identity tracing information.

[0192] This embodiment fully demonstrates the complete process of transforming heterogeneous external identifiers from the original XML / JSON request into a unified internal identity representation through deterministic hash mapping and cross-channel association analysis. The core changes before and after the integration are reflected in the following: the user identifier on the public account side changes from a 28-bit string openid to an 8-bit numeric internal ID 47291658, and on the video account side changes from a custom string to an 8-bit numeric internal ID 21840357; the cross-channel association status changes from "no association - the system regards the two identifiers as belonging to two independent users, and the user profile is split" to "complete association - the two identifiers belong to the same user group UG_20240515_0001, and the user profile is unified"; the storage occupation is reduced from approximately 39 bytes (VARCHAR(28) + VARCHAR(11)) to 8 bytes (two INTEGER(4)); the source of user profile data changes from isolated data islands of behavioral data from different channels to a merged view of complete cross-channel behavioral sequences; in terms of privacy and security, the direct exposure of the original identifier is replaced by exposing only the irreversible numeric ID. The core innovative value is reflected in: converting two non-interchangeable external identifiers into internal IDs that can be directly associated within the same system; automatically breaking down cross-channel identity silos through a multi-factor weighted association algorithm; and achieving significant improvements in storage efficiency, indexing performance, and privacy security for 8-bit numerical internal IDs.

[0193] Example 3: User Profile Labeling Scenario:

[0194] When a user first enters the system, it creates a user profile based on their work stage, gender, and occupation, and generates an initial preference vector. For example, for the combination of "college student," "female," and "student," the system reads the corresponding tag weights from the combination mapping table; if no precise combination exists, a default template is used, and weights are supplemented according to rules. Subsequently, the system writes these weights into the user preference table, allowing the user to directly use these preferences as the labeling result in subsequent message sending and content selection. If the user later engages in viewing behavior, the system updates the preference weights based on viewing duration and completion rate, ensuring the user profile continuously evolves.

[0195] Example 4: Content distribution and tag recommendation scenario:

[0196] In content-attached scenarios, the system first reads the video's category and dynamic tags, then matches the user preference vector with the video tags. If a video's tags highly match the user's preferences and its play count is within a reasonable range, the video will be prioritized as message content. If the user has already viewed the video, its ranking weight will be reduced or it will be excluded entirely. For example, if a user has recently been frequently clicking on knowledge-based content and exhibiting a high dwell time during viewing, the system will prioritize videos tagged with "knowledge-based" as message payloads, rather than attaching irrelevant content to the user.

[0197] Example 5: Result Feedback and Exception Handling Scenario:

[0198] When outputting results, the system returns JSON, XML, or text content according to the caller's format requirements. For API scenarios, the result is directly returned as structured data; for WeChat callback scenarios, it is encapsulated according to the corresponding reply rules and returned. If a request encounters a missing identifier, invalid parameters, or a failure to save a record midway, the system will not discard it directly but will record it in the exception log, awaiting retry or manual investigation. In this way, the system can ensure the stable operation of the main chain while also preserving the handling space for edge cases. Content recommendations only appear as auxiliary results when additional messages are required.

[0199] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.< / xml>

Claims

1. A user identity fusion and content recommendation method based on a four-layer processing pipeline, characterized in that, The four-layer processing pipeline includes, in sequence: The request access layer receives feature vectors in four dimensions, assigns weighted scores to each feature dimension using weight coefficients to determine the protocol type, dynamically loads the corresponding protocol parser instance from the pluggable parser registry, and unifies different protocol fields into a standardized request context using semantic mapping rules with five mapping types. Identity Fusion Layer: Extract the original external identifier string, concatenate it with the external identifier string U_ext using a fixed salt constant S at compile time, calculate the SHA-256 hash value H, then take the modulo 10^8 as a large integer to uniformly convert the external identifier string into a fixed 8-digit decimal numerical internal user identifier, verify and remove duplicates using a Bloom filter and an exact hash table, combine the device fingerprint, session identifier, and request timestamp to calculate the association confidence, and aggregate the identifiers to form a unified internal identity representation; Recommendation decision layer: Using user group identifiers in the unified internal identity representation as the basic unit, and based on behavioral data and attribute data, it uses formulas... Update the user preference vector, where This represents the user preference vector at the current moment; This represents the user preference vector from the previous moment; This represents the feature vector of the current behavior; Represents a user attribute feature vector; This is the historical weighting coefficient, with a value range of 0.7-0.9; This refers to the attribute weight coefficient. The behavioral feature transformation function is used; content filtering and recommendation decisions are made based on the updated preference vector. Result encapsulation layer: The output format is transformed through the adaptation function Ψ, and the format adaptation function satisfies... ,in Indicates the final output message; This indicates the content and results that have been determined by the recommendation decision-making level; Indicate the target output format and its corresponding interface specification; This indicates the context information associated with the current request; This indicates a format adaptation function.

2. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The four-dimensional feature vectors are heterogeneous protocol request extraction path semantic features, message body structure signature features, verification field combination features, and field pattern matching features. When determining the protocol type, if the difference between the highest weighted score and the second highest weighted score is lower than the preset confidence threshold, no forced protocol type determination will be performed. Instead, an alarm log will be generated and transferred to the manual review channel.

3. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The standardized request context object output by the request access layer embeds a metadata sub-object. The metadata sub-object includes at least: the original protocol format identifier, the original request data length, the security verification result and verification algorithm identifier, and the protocol parsing time. The metadata sub-object is used to support the reverse tracing of data objects in any link of the processing pipeline back to the original request.

4. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The protocol parser instance implements the security verification method, structure parsing method, and field extraction method defined by the unified parser interface. It uses a declarative semantic mapping rule table to uniformly map fields from different protocols that have different names, nesting positions, and data types to standardized request context objects with the same field name, data type, and structural position. This declarative semantic mapping rule table supports five mapping operation types: direct mapping, transformation mapping, combination mapping, conditional mapping, and extended mapping. It dynamically loads corresponding protocol parser instances, including XML and JSON protocol parser instances. The security verification method of the XML protocol parser performs signature verification based on the SHA1 algorithm. It sorts the timestamp and nonce in the URL parameters lexicographically, concatenates them with the system token to calculate the SHA1 hash value, and compares it with the input signature over a constant time. The field extraction method of the XML protocol parser assigns the extraction to the corresponding sub-extraction logic based on the MsgType field value and performs precision normalization on the second-level timestamp. The security verification method of the JSON protocol parser performs HTTP... The Bearer token in the Authorization header performs validity period, signature validity, and permission scope verification; the field extraction method of the JSON protocol parser extracts fields one by one according to nested paths using JSONPath path expressions.

5. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The method for deduplication using a Bloom filter and a precise hash table is as follows: A Bloom filter is used to perform a first-level existence screening of the generated internal user identifiers. When the Bloom filter returns a possible existence, a precise hash table is used for a second-level deterministic confirmation. If a conflict is confirmed, a progressive offset is made with a fixed step value of 1 until an unoccupied identifier value is found. The device fingerprint field, session identifier field, and request timestamp field are extracted from the standardized request context object. A multi-dimensional association confidence score between internal user identifiers from different channels is calculated according to a preset weight coefficient. When the score exceeds a preset association threshold, multiple internal user identifiers are aggregated. Under the same user group identifier, the output contains a unified internal identity representation that includes a mapping list of the main internal user identifier, the global user group identifier, and the identifiers from all channels. Before inputting the original external identifier string into the hash mapping, identifier normalization is performed: the original external identifier string is encoded, standardized, formatted, semantically discriminated, and labeled with confidence. Based on the confidence score, the identifiers are divided into three categories: the main identifier with a confidence score of not less than 0.85 directly enters the hash mapping process, the auxiliary identifiers with a confidence score between 0.4 and 0.84 participate in multi-factor association analysis, and the clue identifiers with a confidence score of less than 0.4 are only used for reference when the main identifier is missing.

6. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The multi-dimensional association confidence score in the identity fusion layer is calculated by integrating the following four dimensions: device fingerprint consistency weight 0.35, when two identifiers from different channels share the same device fingerprint value within a preset time window, this dimension scores 1.0; time series association weight 0.25, the score decays linearly within a preset threshold according to the time interval; behavioral pattern similarity weight 0.25, the score is based on the cosine similarity of the content preference vectors corresponding to the two identifiers; network environment association weight 0.15, the score is based on the consistency of IP address network segment affiliation; after normalization of the scores of each dimension, the weighted sum of the scores and their corresponding weights is obtained to obtain the comprehensive association confidence score.

7. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The unified internal identity representation output by the identity fusion layer includes the following structured fields: an 8-bit numeric master internal user identifier; a global user group identifier string; a list of full-channel identifier mappings, where each record includes an external identifier string, the namespace identifier of the channel to which it belongs, the corresponding internal numeric identifier, and the confidence score of the mapping; a device fingerprint list; association analysis metadata, including an association method identifier, a comprehensive confidence score, and a list of association evidence enumerations; and identity tracing information, including the first appearance timestamp, the last update timestamp, and the mapping version number.

8. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The identity fusion layer also maintains persistent storage records of identifier mappings. Each storage record includes: the external original identifier string, the namespace to which the identifier belongs, the final internal numeric identifier assigned, the complete SHA-256 hash value, the number of collision offset steps, and the mapping creation timestamp. The complete SHA-256 hash value field is used to support the audit verification of the mapping correctness at any point in time, and the conflict offset step number field is used to support the complete restoration of the conflict resolution process.

9. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The user preference vector constructed by the recommendation decision layer is generated based on a three-level profile system of basic layer, intermediate layer and surface layer: the basic layer carries the user's long-term preferences and stable attributes, the intermediate layer reflects the mid-term interest evolution trend, and the surface layer captures the user's immediate needs and temporary interest shifts. The three-level profiles are independently updated with different time decay coefficients and then weighted to synthesize the current moment's preference vector.

10. The user identity fusion and content recommendation method based on a four-layer processing pipeline according to claim 1, characterized in that, The result encapsulation layer maintains a sending history while performing format adaptation. The sending history includes user identifier, content identifier, sending timestamp, channel type, sending result, and user feedback information. The sending history is used for duplicate content filtering and sending frequency control in subsequent processing, but does not participate in the current round of recommendation decision-making.

Citation Information

Patent Citations

  • Method and system for fusing cross-channel consumer identities in real time

    CN114116863A

  • User attribution method and system capable of meeting various configurations and conversions

    CN121120158A