A mobile terminal user behavior trace evidence storage method, device, equipment and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]本发明提供一种针对移动端的用户行为追溯存证方法、装置、计算机设备及介质,以解决目前市场上已有移动端中的用户行为追溯存证方法可信度低的问题
[0010] The aforementioned solution for tracing and storing user behavior on mobile devices involves obtaining a historical hash evidence chain and the user's decentralized identity private key, representing the first historical behavior records of the target user generated on a preset application platform on the mobile device. This is achieved by comparing the historical records of the associated social platform account with the evidence chain to identify user behaviors not yet fingerprinted. The solution also involves obtaining corresponding user operation data, user operation timestamps, and URLs from the social platform server to generate a user behavior dataset. The dataset undergoes multimodal content understanding and classification to generate enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types. The metadata undergoes time window logical consistency verification based on the historical hash evidence chain. After verification, the traceability hash value of the historical hash evidence chain is calculated by combining the current system time, metadata, and previous hash values. Finally, the traceability hash value is digitally signed using the decentralized identity private key to obtain a traceability data packet. Compared to existing technologies, this solution fills the coverage gap in existing evidence storage solutions on mobile devices, achieving automated gap location, multimodal content understanding, chain-based dual verification, and clear differentiation of traceability behaviors, thereby significantly improving the completeness and reliability of asynchronous behavior tracing on mobile devices.
Smart Images

Figure CN122554071A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed ledger technology, and in particular to a method, apparatus, device, and medium for tracing and storing user behavior on mobile devices. Background Technology
[0002] With the maturity of zero-knowledge proof (ZK), decentralized identity (DID), and blockchain technologies, it has become possible to build a trusted digital identity and professional credit system.
[0003] In a professional credit system, "evidence preservation" refers to the process of recording, solidifying, and authoritatively storing information such as key behaviors, abilities, resumes, and awards and punishments generated by an individual in their professional activities. The purpose is to ensure the authenticity, immutability, and traceability of this information. However, in the mobile internet era, a large number of professional-related behaviors (such as posting career updates on the LinkedIn app, submitting code on the GitHub mobile app, and engaging in industry discussions via WeChat) occur within mobile applications.
[0004] Existing evidence preservation solutions either ignore the specific characteristics of mobile scenarios or employ crude, reactive methods, reducing reliability. Therefore, there is an urgent need for an evidence preservation solution that can seamlessly cover mobile behavior and support highly reliable asynchronous tracing. Summary of the Invention
[0005] This invention provides a method, apparatus, computer equipment, and medium for tracing and storing user behavior on mobile devices, in order to solve the problem of low reliability of existing user behavior tracing and storage methods on mobile devices.
[0006] Firstly, a method for tracing and storing user behavior on mobile devices is provided, including: The system obtains the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and obtains the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The server obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server side, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been stored in data fingerprint. The user operation data, user operation timestamp, and unique resource locator corresponding to the user behavior that has not been stored in the data fingerprint are obtained from the backend server of the application platform to generate a user behavior dataset. The user behavior dataset is parsed according to data type to obtain parsed data corresponding to each data type; Based on the historical hash evidence chain, the parsed data is subjected to time window logical consistency verification to obtain logical consistency feature values; When the logical consistency feature value is greater than the preset consistency threshold, the current system time is obtained, and the traceability hash value of the historical hash evidence chain is calculated based on the current system time, the parsed data, and the pre-obtained preceding hash value. The decentralized identity private key is used to digitally sign the traceability hash value and the parsed data to obtain a traceability evidence data packet.
[0007] Secondly, a user behavior tracing and evidence storage device for mobile devices is provided, including: The data comparison module is used to obtain the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and to obtain the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The module also obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been data fingerprint evidenced. The data acquisition module is used to acquire user operation data, user operation timestamps, and unique resource locators corresponding to the user behaviors that have not been stored in data fingerprints from the backend server of the application platform, and generate a user behavior dataset. The data analysis module is used to parse the user behavior dataset according to data type to obtain parsed data corresponding to each data type; The data verification module is used to perform time window logical consistency verification on the parsed data based on the historical hash evidence chain to obtain logical consistency feature values; The digital signature module is used to obtain the current system time when the logical consistency feature value is greater than the preset consistency threshold, calculate the trace hash value of the historical hash storage chain based on the current system time, the parsed data and the pre-obtained preceding hash value, and digitally sign the trace hash value and the parsed data using the decentralized identity private key to obtain the trace storage data packet.
[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method for tracing and storing user behavior on a mobile device.
[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described method for tracing and storing user behavior on a mobile device.
[0010] The aforementioned solution for tracing and storing user behavior on mobile devices involves obtaining a historical hash evidence chain and the user's decentralized identity private key, representing the first historical behavior records of the target user generated on a preset application platform on the mobile device. This is achieved by comparing the historical records of the associated social platform account with the evidence chain to identify user behaviors not yet fingerprinted. The solution also involves obtaining corresponding user operation data, user operation timestamps, and URLs from the social platform server to generate a user behavior dataset. The dataset undergoes multimodal content understanding and classification to generate enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types. The metadata undergoes time window logical consistency verification based on the historical hash evidence chain. After verification, the traceability hash value of the historical hash evidence chain is calculated by combining the current system time, metadata, and previous hash values. Finally, the traceability hash value is digitally signed using the decentralized identity private key to obtain a traceability data packet. Compared to existing technologies, this solution fills the coverage gap in existing evidence storage solutions on mobile devices, achieving automated gap location, multimodal content understanding, chain-based dual verification, and clear differentiation of traceability behaviors, thereby significantly improving the completeness and reliability of asynchronous behavior tracing on mobile devices. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. 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.
[0012] Figure 1 This is a schematic diagram of an application environment for a user behavior tracing and evidence preservation method for mobile terminals according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for tracing and storing user behavior on a mobile device according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a user behavior tracing and evidence storage device for mobile terminals according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0013] 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, not all, of the embodiments of the present invention. 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.
[0014] The user behavior tracing and evidence storage method for mobile devices provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can obtain the existing hash-based evidence chain and the user's decentralized identity private key from the client. Next, it compares the historical records of the social media accounts linked to the device with the evidence chain, filtering out content that has not yet been evidenced. The captured content undergoes multi-dimensional analysis (including text and images) to extract structured information such as semantic tags, sentiment tendencies, and behavioral types, forming metadata for subsequent verification. Then, based on the existing historical hash-based evidence chain, the authenticity of this metadata is verified to ensure its time and content logic are correct. After successful verification, the hash value corresponding to this traceable evidence is calculated by combining the current system time, the previous hash value, and the aforementioned metadata. Finally, the hash value is digitally signed a second time using the user's decentralized identity private key to generate the final traceable evidence data packet. This improves the credibility of user behavior tracing on mobile devices. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The present invention will now be described in detail through specific embodiments.
[0015] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a method for tracing and storing user behavior on mobile devices, as provided in an embodiment of the present invention, includes the following steps: S1. Obtain the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile terminal device, and obtain the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior.
[0016] In this embodiment of the invention, the historical hash evidence chain is a digital record chain that records user behavior in chronological order and has tamper-proof characteristics. Based on a cryptographic hash function, it generates a unique data fingerprint, represented by a hash value, for each preset user behavior (such as posting content) that occurs on a preset application platform (such as a social network), and links this fingerprint with the fingerprints of already recorded user behaviors to form an interlocking chain.
[0017] S2. Obtain the second historical behavior record of the target user generated on the application platform of the mobile device stored on the server, compare the second historical behavior record with the historical hash evidence chain, and identify user behaviors in the second historical behavior record that have not been stored in data fingerprint.
[0018] In this embodiment of the invention, the step of obtaining the second historical behavior record of the target user generated on the application platform of the mobile device stored on the server, comparing the second historical behavior record with the historical hash evidence chain, and identifying user behaviors in the second historical behavior record that have not been stored with data fingerprint evidence includes: Obtain the second historical behavior records of the target user generated on the social platform account application platform stored on the server, and obtain a list of second historical behavior records; Extract the first identifier of each record in the second historical behavior record list to obtain the first identifier list; Extract the second identifier of each stored evidence in the historical hash evidence chain to obtain a list of second identifiers; By comparing the first and second identifier lists, one or more first identifiers that are recorded in the first identifier list but not in the second identifier list are identified. The user behavior corresponding to the identified first identifier in the second historical behavior list is regarded as the user behavior that the target user has generated on the mobile device but has not been recorded as data fingerprint.
[0019] In detail, obtaining the second historical behavior record of the target user on the social platform account application platform stored on the server and obtaining the second historical behavior record list is achieved by sending an HTTP request to the platform server using the user-authorized OAuth token to obtain all the historical records published by the account on the mobile terminal.
[0020] In detail, the extraction of the first identifier for each record in the second historical behavior record list involves extracting a data field that uniquely identifies the content for each record based on the platform's data structure characteristics. In API responses, this typically includes the post ID (e.g., post_id), tweet ID (e.g., tweet_id), or a permalink URL.
[0021] In detail, the step of extracting the second identifier of each document in the historical hash evidence storage chain to obtain a list of second identifiers involves reading the complete data of the historical hash evidence storage chain from the mobile device's local secure storage (such as an encrypted SQLite database) or a distributed storage node associated with the user's decentralized identity (DID). Each node in the evidence storage chain (typically a block structure linked in chronological order) is parsed, and a unique identifier of the content recorded at the time of evidence storage (e.g., the original URL or content hash reference saved at the time of evidence storage) is extracted from the node metadata.
[0022] In detail, the step of comparing the first identifier list with the second identifier list of certified content identifiers to identify uncertified identifiers in the historical record and obtain the uncertified content identifier list involves first converting the second identifier list into a hash set. Then, the list of unique content identifiers extracted from the social platform is traversed, and each identifier is checked to see if it exists in the hash set. If it does not exist, it is determined that the content corresponding to the identifier has not yet been certified, and it is added to the uncertified list.
[0023] S3. Obtain user operation data, user operation timestamp, and unique resource locator corresponding to the user behavior that has not been stored in the data fingerprint from the backend server of the application platform, and generate a user behavior dataset.
[0024] In this embodiment of the invention, the step of obtaining user operation data, user operation timestamps, and unique resource locators corresponding to the user behavior that has not undergone data fingerprint storage from the backend server of the application platform, and generating a user behavior dataset, includes: Generate an API request set based on the user behavior that has not been fingerprinted; Based on the API request set, an API request is initiated to the social platform server to obtain the original API response set; Extract the original text, original publication time, and unique resource locator from the original API response set; Extract user operation data from the original text; Convert the original publication time into a timestamp to obtain the user operation timestamp; By integrating the user operation data, the user operation timestamp, and the unique resource locator, a user behavior dataset is obtained.
[0025] In detail, the step of generating an API request set based on the user behavior that has not undergone fingerprint verification involves reading the user behavior that has not undergone fingerprint verification, matching the corresponding API endpoint format, authentication method, and required parameters according to the social platform to which each piece of data belongs, and constructing an HTTP request object: filling the content ID into the path parameter of the endpoint URL (e.g., / statuses / show / :id), setting the correct HTTP method (usually GET), and embedding a valid access token in the request header.
[0026] In detail, the extraction of the original text, original publication time, and unique resource locator from the original API response set involves, for each response, calling the corresponding parser according to the social platform from which it originated, and following a predefined platform data pattern, precisely extracting target fields from the nested structure of JSON or XML or from HTML using XPath / CSS selectors: extracting and cleaning the original text from fields such as text and full_text; parsing and standardizing the original publication time into a unified timestamp format from fields such as created_at and date; and synthesizing the unique resource locator from the id and platform rules, or directly obtaining the unique resource locator from the url field.
[0027] S4. Parse the user behavior dataset according to data type to obtain parsed data corresponding to each data type.
[0028] In this embodiment of the invention, parsing the user behavior dataset according to data type to obtain parsed data corresponding to each data type involves traversing each record in the dataset and automatically identifying whether the data belongs to text, image, video, audio, or other types by detecting the MIME type, file extension, or content characteristics of the user operation data; subsequently, the corresponding parser is called according to different data types, including: For text data, HTML / XML tags are removed, and character statistics, word segmentation, and keyword extraction are performed. For image data, the binary content is decoded to extract format, size, and color mode. For video data, metadata is parsed to obtain duration, resolution, encoding format, and frame rate. For audio data, duration, sampling rate, and number of channels are extracted. Finally, the structured parsing results obtained for each type are categorized into their corresponding data type categories, forming parsed data that can be used for subsequent verification and signing.
[0029] In detail, the keywords refer to words or phrases that can highly summarize or characterize the core theme, entity, or intent of a text. They are usually nouns, gerunds, or proper nouns (such as "blockchain", "smart contract", "recruiting engineers"). Keywords can be extracted by preprocessing the original text (removing stop words and punctuation marks, and performing part-of-speech tagging) and then using TF-IDF (term frequency-inverse document frequency) to calculate the importance of words in the current text and the overall corpus.
[0030] In another embodiment of the present invention, the parsed data can be further processed to construct enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types. In subsequent analysis, the constructed enhanced structured metadata is used to replace the parsed data for analysis, improving the accuracy of the analysis results. Therefore, in another embodiment of the present invention, after parsing the user behavior dataset according to data type to obtain parsed data corresponding to each data type, the method further includes: An enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types is constructed from the parsed data.
[0031] The construction of enhanced structured metadata, including semantic tags, sentiment tendencies, and behavioral types, of the parsed data includes: From the parsed data of various categories such as text, image, video, and audio parsed from the user behavior dataset, text features, image features, video features, and audio features are extracted respectively and linearly projected onto a preset embedding space to obtain an aligned set of multimodal feature vectors. The multimodal feature vectors in the aligned multimodal feature set are fused using a multimodal Transformer architecture to obtain a fused feature vector; Using the fused feature vector as the key and value, and multiple preset learnable label embedding vectors as queries, the correlation score between the fused feature vector and each label embedding is calculated through a multi-head attention mechanism, and then the label classification result is output based on the correlation score through a preset activation function. The label classification result is converted into a label embedding vector, and the converted label embedding vector is concatenated with the fused feature vector to obtain a concatenated vector. The concatenated vector is input into a sentiment classification network consisting of multiple fully connected layers and a ReLU activation function; The probability distribution of each emotion category is output by the Softmax function in the last fully connected layer of the emotion classification network, and the emotion category with the highest probability distribution is taken as the final emotion tendency vector. The fused feature vector, the spliced vector, and the sentiment vector are fused to obtain a multi-dimensional fused vector; The behavior type classification result is obtained by analyzing the behavior type of the multidimensional fusion vector through a behavior classification network. The enhanced structured metadata is obtained by integrating the sentiment tendency vector, the multidimensional fusion vector, and the behavior type classification results.
[0032] In detail, the step of extracting text features, image features, video features, and audio features from the user behavior dataset and linearly projecting them onto a preset embedding space to obtain an aligned multimodal feature set involves calling corresponding pre-trained models for feature extraction for different modal data, including: For text, word and sentence vectors are extracted using BERT or similar Transformer models; for images, visual features are extracted using ResNet or Vision Transformer; for videos, spatiotemporal features are extracted using 3D CNN or temporal Transformer; and for audio, acoustic features are extracted using Wav2Vec or similar models. After feature extraction, features from different modalities are mapped to a unified timeline or semantic space through timestamp alignment or content alignment mechanisms (such as attention alignment) to ensure that multimodal features of the same content remain consistent temporally or semantically.
[0033] In detail, the process of fusing the aligned multimodal feature set using a multimodal Transformer architecture to obtain a fused feature vector involves adding learnable modality type embeddings and positional encodings to different modal features, followed by cross-modal information fusion through multiple Transformer blocks. During the encoding process, the model learns the association weights between textual, visual, and audio features, generating a sequence of hidden states rich in cross-modal semantics. Finally, the hidden states are typically labeled with [CLS] or a fixed-dimensional joint representation vector is obtained through pooling operations.
[0034] In detail, the sentiment vector is a numerical vector data that quantifies the sentiment bias of text or users in a multi-dimensional sentiment space (such as positive, negative, neutral, or more granular sentiment categories).
[0035] S5. Perform time window logical consistency verification on the parsed data based on the historical hash evidence chain to obtain the logical consistency feature value.
[0036] In this embodiment of the invention, S5 includes: Extract the key time and hash information required for verification from the preset fields in the parsed data to obtain the time pair to be verified and the hash of the content to be verified. The key time required for verification includes the original publication time T_rev (i.e. the moment when the content was first published on the social platform) and the traceability and evidence storage time T_org (i.e. the system time when the system performs the traceability operation). Based on the historical hash evidence storage chain, verify whether the original publication time in the time pair to be verified is within the timestamp interval of the adjacent nodes in the evidence storage chain, and verify whether the traced evidence storage time is later than the original publication time and not earlier than the latest node timestamp of the evidence storage chain, to obtain the first verification result. Based on the historical hash evidence storage chain, perform hash continuity backtracking verification on the time pair to be verified and the hash of the content to be verified to obtain the second verification result; Calculate the confidence scores for the time pair to be verified and the hash of the content to be verified; Convert the first verification result and the second verification result into Boolean values to obtain the first Boolean value and the second Boolean value; Multiply the product of the first Boolean value and the second Boolean value by the confidence score to obtain the logical consistency feature value.
[0037] In detail, the first verification result is a Boolean value or confidence score data generated based on the initial comparison of user biometrics or behavioral data, used to determine whether the identity matches.
[0038] In detail, the second verification result is a structured data containing verification status, matching degree and timestamp, generated after secondary verification based on decentralized identity storage and semantic consistency.
[0039] In detail, the step of extracting the key time and hash information required for verification from the parsed data to obtain the time pair to be verified and the hash of the content to be verified is to extract key time information from specified fields by parsing the parsed data, including the original publication time T_rev (i.e., the moment when the content was first published on the social platform) and the traceability evidence time T_org (i.e., the system time when the system performed the traceability operation), and encapsulate these two timestamps into a time pair to be verified, and recalculate the content hash according to the same hash algorithm (such as SHA-256) as the historical hash evidence chain based on the original text, multimedia hash and other core data recorded in the metadata, to generate the hash of the content to be verified H_content.
[0040] In detail, the first verification result is obtained by verifying whether the original publication time of the time pair to be verified is within the timestamp interval of adjacent nodes in the evidence storage chain, and verifying whether the traced evidence storage time is later than the original publication time but not earlier than the latest node timestamp in the evidence storage chain, based on the historical hash evidence storage chain. This is achieved by reading the historical hash evidence storage chain and finding the two nodes adjacent to the time pair to be verified: the node Node_before with a timestamp less than T_rev and the closest node Node_after with a timestamp greater than T_rev. Then, it is verified whether T_rev is strictly between the timestamps of these two nodes, and simultaneously checking whether T_rev is later than T_rev and not earlier than the latest node timestamp in the chain. If any condition is not met, it is determined that the time logic is inconsistent.
[0041] In detail, the step of performing hash continuity backtracking verification on the hash of the time pair to be verified and the hash of the content to be verified based on the historical hash evidence chain to obtain the second verification result involves obtaining the hash value H_before of the Node_before node based on the historical hash evidence chain, simulating the backtracking hash value H_rev_simulated of the historical hash evidence chain according to the backtracking hash formula, and then reading the actual preceding hash value stored in the Node_after node and comparing it with H_rev_simulated. If the two match, it indicates that the hash chain is continuous at the insertion point.
[0042] Specifically, the Node_after node refers to the downstream node whose timestamp is greater than and closest to the original publication time, i.e., the first certified node on the chain immediately following the target time period. It is used together with the "Node_before node" to form a time window to verify whether the content to be traced falls exactly into the remaining logical gap in the chain.
[0043] In detail, the confidence score for the time pair to be verified and the hash of the content to be verified is calculated by calculating the time difference ΔT = T_rev - T_org (usually in days), and then applying a preset decay model (such as the exponential decay function α = e^(-λ·ΔT)) to obtain the time decay coefficient. Simultaneously, the system can re-obtain the current version of the content on the social platform, calculate its hash, and compare it with H_content, assigning a content consistency coefficient based on whether they match. Finally, the time decay coefficient and the content consistency coefficient are weighted and fused (e.g., by multiplying or averaging) to obtain a comprehensive confidence score between 0 and 1.
[0044] In detail, the logical consistency feature value is a normalized comprehensive score that characterizes the degree of overall consistency between the data to be verified and the historical hash evidence chain in terms of temporal logic and hash continuity.
[0045] In this embodiment of the invention, when enhanced structured metadata is used to replace the original parsed data for time window consistency verification, the object and dimension of the verification undergo a fundamental change: the original scheme directly compares the hash continuity and timestamp intervals of the underlying data such as the original text and multimedia hashes, verifying the integrity and temporal legality of the data itself; while with enhanced structured metadata, the basis of verification is upgraded to include high-level features such as semantic tags, sentiment tendencies, and behavioral types. The core difference brought about by this replacement is that the verification step can introduce a logical consistency judgment between semantics and behavior—for example, verifying whether the extracted behavior type (such as "posting job information") constitutes a reasonable professional behavior loop with the existing behavior sequence (such as "browsing resumes" and "initiating interviews") on the chain within the time window, or verifying whether the sentiment tendency (such as "positive") is consistent with the contextual sentiment of the evidence stored at the same time, thereby not only preventing data tampering, but also identifying abnormal deviations between content semantics and temporal logic (such as content added after the fact being incorrectly classified into a type that contradicts the behavior pattern at the time). In short, original verification focuses on "whether the data has been altered", while enhanced metadata verification goes further to ask "whether it makes semantic sense", which significantly improves the credibility and intelligent identification capabilities of traceability and evidence storage.
[0046] S6. When the logical consistency feature value is greater than the preset consistency threshold, obtain the current system time, and calculate the trace hash value of the historical hash evidence chain based on the current system time, the parsed data and the pre-obtained preceding hash value.
[0047] In this embodiment of the invention, S6 includes: The current system time, the parsed data, and the preceding hash value are subjected to time standardization and metadata serialization to obtain a formatted list of data fields. The data fields in the formatted data field list are concatenated and converted to binary to obtain a binary data block; A hash calculation is performed on the binary data block to obtain a trace hash value.
[0048] In detail, the process of time standardization and metadata serialization of the current system time, the parsed data, and the preceding hash value to obtain a formatted list of data fields involves obtaining the current system time and converting it into a unified ISO 8601 format UTC timestamp. Key fields are then extracted from the parsed data, including the original content data (such as the feature hash of text or the perceptual hash of multimedia files), the original publication time (also converted to ISO 8601 format), and the traceability identifier (a fixed string, such as "RETRO"). Simultaneously, the preceding hash value is treated as a string, and all fields are sorted according to a preset order (e.g., original content data, original publication time, current system time, traceability identifier, preceding hash value), and each field is converted into a string format.
[0049] In detail, the preceding hash value is the hash data of the previous record that is immediately preceding the current record in the local hash storage chain and serves as the anchor point for the chain connection.
[0050] In this embodiment of the invention, the step of concatenating the data fields in the formatted data field list and performing binary conversion to obtain a binary data block includes: The formatted data fields in the formatted data field list are standardized to obtain a list of standardized strings; Add a separator to a preset position for each standardized string in the list of standardized strings to obtain a list of separator strings; Concatenate all the strings in the delimiter string list in order to obtain the concatenated string; The concatenated string is converted into binary byte format according to a unified character encoding format to obtain binary data blocks.
[0051] In detail, the format unification process refers to performing a uniform format conversion based on the original data type of the field. For example, if the field is a timestamp, it is converted to a UTC time string in ISO 8601 format (such as "2025-04-23T10:30:00Z"); if the field is an integer or floating-point number, it is converted to a decimal number string; if the field is a hash value or text, its string representation is directly retained.
[0052] Specifically, the preset position refers to the end of the field.
[0053] Specifically, the unified character encoding format refers to UTF-8.
[0054] S7. Use the decentralized identity private key to digitally sign the traceability hash value and the parsed data to obtain a traceability evidence data packet.
[0055] In this embodiment of the invention, the step of digitally signing the traceability hash value and the parsed data using the decentralized identity private key to obtain the traceability evidence data packet includes: Extract the key data that needs to be signed from the parsed data to obtain the key data fields; The key data fields and the traceability hash value are encapsulated into a JSON object to obtain the data string to be signed; Calculate the hash value of the data string to be signed to obtain the digest hash value; The decentralized identity private key is used to digitally sign the digest hash value to obtain the signed information; The signed information is added to the data string to be signed to obtain the traceable evidence data packet.
[0056] In detail, the step of extracting key data requiring signature from the parsed data to obtain key data fields involves parsing the parsed data and, based on a predefined signature data model, extracting several fields with legal and business significance using key-value pair access. This key data typically includes: the original content's publication timestamp, behavior classification results, a core summary of the content's semantic tags, the code triggering the traceability operation, and a confidence decay coefficient that may affect authenticity.
[0057] In detail, the process of digitally signing the digest hash using the decentralized identity private key to obtain the signed information involves accessing the decentralized identity private key through a pre-defined secure key management interface. The decentralized identity private key and a pre-defined signature algorithm (such as ECDSA, EdDSA, etc. paired with a hash function) are used to perform the digital signature operation on the digest hash value. After the signature is generated, it is encoded into a standard format (e.g., Base64URL encoding is typically used for JWT) and encapsulated together with necessary signature metadata (such as the public key identifier `kid`, the signature algorithm `alg`, and the signature creation time `created`) into an independent signature information object.
[0058] In detail, the process of adding the signed information to the data string to be signed to obtain the traceable evidence data packet typically employs a layered, widely verifiable structure, such as generating a data packet conforming to the W3C Verifiable Credential Format or JWT (JSON Web Token) structure. Usually, the original data is used as the payload, and the signature information is used as the signature or proof portion. Ultimately, a self-contained, machine-readable structured document, i.e., the traceable evidence data packet, is generated.
[0059] In this embodiment of the invention, after digitally signing the traceability hash value and the parsed data using the decentralized identity private key to obtain the traceability evidence data packet, the traceability evidence data packet is also inserted into the local hash evidence chain, and the pointing relationship of subsequent records is updated synchronously to complete the full closed loop of the professional behavior sequence.
[0060] As can be seen, the above solution proposes an asynchronous traceability and digital signature handshake method and system for mobile behavior, aiming to solve the technical pain points of existing technologies, such as the inability to effectively store mobile professional behavior data and the difficulty in reliably supplementing historical omissions. This solution first uses a difference comparison module to periodically scan or trigger comparisons between the existing local historical hash evidence chain (based on a recursive hash chain structure) on the mobile device and the remote historical records of associated social platform accounts, accurately identifying user behaviors in the second historical behavior record that have not undergone data fingerprint storage. Subsequently, the traceability crawling engine uses open APIs or web page parsing technology to legally obtain user operation data, user operation timestamps, and unique resource locators for these missing contents from the social platform server, forming a user behavior dataset to be processed. To ensure the authenticity of the traceability data, the system performs multimodal content understanding and classification, generating enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types. Based on the historical hash evidence chain, it performs strict time window logic verification, hash continuity backtracking verification, and confidence decay coefficient calculation. Only after the data passes verification is it allowed to proceed to the next step. In the digital signature handshake phase, the system uses the user's decentralized identity (DID) private key to digitally sign the data packet consisting of a traceability hash value (integrating the original data, original publication time, current system time, and previous hash values) and a traceability supplementary record meta-tag. This generates a legally valid traceability evidence data packet, which is then timestamped using a distributed ledger to ensure the non-repudiation of liability. Finally, the logical chain maintenance module securely inserts the traceability record into the corresponding logical position in the local hash evidence storage chain and dynamically updates the pointer relationships and operation logs of subsequent nodes, completing a full closed loop of the professional behavior sequence. This invention, through its innovative design of "asynchronous traceability + time-difference timestamp," allows for compliant supplementation of historically missed behaviors on mobile devices while clearly distinguishing between real-time evidence storage and post-event entry through cryptographic means. Combined with a confidence decay mechanism, it achieves intelligent grading of the credibility of traceability records, fundamentally solving the industry problems of non-closed loops and low credibility of traceability records in mobile behavior evidence storage scenarios. This provides key technical support for building a comprehensive, highly reliable, and secure professional credit system.
[0061] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0062] In one embodiment, a user behavior tracing and evidence storage device for mobile devices is provided, which corresponds one-to-one with the user behavior tracing and evidence storage methods for mobile devices described in the above embodiments. For example... Figure 3 As shown, the user behavior tracing and evidence storage device for mobile terminals includes a data comparison module 101, a data acquisition module 102, a data analysis module 103, a data verification module 104, and a digital signature module 105. Detailed descriptions of each functional module are as follows: The data comparison module 101 is used to obtain the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and to obtain the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The module also obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been data fingerprint evidenced. The data acquisition module 102 is used to acquire user operation data, user operation timestamps and unique resource locators corresponding to the user behavior that has not been stored in the data fingerprint from the backend server of the application platform, and generate a user behavior dataset. Data analysis module 103 is used to parse the user behavior dataset according to data type to obtain parsed data corresponding to each data type; Data verification module 104 is used to perform time window logical consistency verification on the parsed data according to the historical hash evidence chain to obtain logical consistency feature value; The digital signature module 105 is used to obtain the current system time when the logical consistency feature value is greater than the preset consistency threshold, calculate the trace hash value of the historical hash storage chain based on the current system time, the parsed data and the pre-obtained preceding hash value, and digitally sign the trace hash value and the parsed data using the decentralized identity private key to obtain the trace storage data packet.
[0063] In one embodiment, the data comparison module 101, when performing the step of obtaining the second historical behavior record of the target user generated on the application platform of the mobile device stored on the server, comparing the second historical behavior record with the historical hash evidence chain, and identifying user behaviors in the second historical behavior record that have not been stored with data fingerprint evidence, is specifically used for: Obtain the second historical behavior records of the target user generated on the social platform account application platform stored on the server, and obtain a list of second historical behavior records; Extract the first identifier of each record in the second historical behavior record list to obtain the first identifier list; Extract the second identifier of each stored evidence in the historical hash evidence chain to obtain a list of second identifiers; By comparing the first and second identifier lists, one or more first identifiers that are recorded in the first identifier list but not in the second identifier list are identified. The user behavior corresponding to the identified first identifier in the second historical behavior list is regarded as the user behavior that the target user has generated on the mobile device but has not been recorded as data fingerprint.
[0064] In one embodiment, the data acquisition module 102, when performing the step of retrieving user operation data, user operation timestamps, and unique resource locators corresponding to user behaviors that have not undergone data fingerprint storage from the application platform's backend server to generate a user behavior dataset, specifically performs the following: Generate an API request set based on the user behavior that has not been fingerprinted; Based on the API request set, an API request is initiated to the social platform server to obtain the original API response set; Extract the original text, original publication time, and unique resource locator from the original API response set; Extract user operation data from the original text; Convert the original publication time into a timestamp to obtain the user operation timestamp; By integrating the user operation data, the user operation timestamp, and the unique resource locator, a user behavior dataset is obtained.
[0065] In one embodiment, the data verification module 104, when performing the time window logical consistency verification of the parsed data based on the historical hash evidence chain to obtain the logical consistency feature value, is specifically used for: Extract the key time and hash information required for verification from the parsed data to obtain the time pair to be verified and the hash of the content to be verified. Based on the historical hash evidence storage chain, verify whether the original publication time in the time pair to be verified is within the timestamp interval of the adjacent nodes in the evidence storage chain, and verify whether the traced evidence storage time is later than the original publication time and not earlier than the latest node timestamp of the evidence storage chain, to obtain the first verification result. Based on the historical hash evidence storage chain, perform hash continuity backtracking verification on the time pair to be verified and the hash of the content to be verified to obtain the second verification result; Calculate the confidence scores for the time pair to be verified and the hash of the content to be verified; Convert the first verification result and the second verification result into Boolean values to obtain the first Boolean value and the second Boolean value; Multiply the product of the first Boolean value and the second Boolean value by the confidence score to obtain the logical consistency feature value.
[0066] In one embodiment, the digital signature module 105, when performing the step of obtaining the current system time when the logical consistency feature value is greater than a preset consistency threshold, and calculating the trace hash value of the historical hash evidence chain based on the current system time, the parsed data, and the pre-obtained preceding hash value, is specifically used for: The current system time, the parsed data, and the preceding hash value are subjected to time standardization and metadata serialization to obtain a formatted list of data fields. The data fields in the formatted data field list are concatenated and converted to binary to obtain a binary data block; A hash calculation is performed on the binary data block to obtain a trace hash value.
[0067] In one embodiment, the digital signature module 105, when performing the concatenation and binary conversion of data fields in the formatted data field list to obtain a binary data block, specifically performs the following: The formatted data fields in the formatted data field list are standardized to obtain a list of standardized strings; Add a separator to a preset position for each standardized string in the list of standardized strings to obtain a list of separator strings; Concatenate all the strings in the delimiter string list in order to obtain the concatenated string; The concatenated string is converted into binary byte format according to a unified character encoding format to obtain binary data blocks.
[0068] In one embodiment, the digital signature module 105, when performing the step of digitally signing the traceability hash value and the parsed data using the decentralized identity private key to obtain the traceability evidence data packet, is specifically used for: Extract the key data that needs to be signed from the parsed data to obtain the key data fields; The key data fields and the traceability hash value are encapsulated into a JSON object to obtain the data string to be signed; Calculate the hash value of the data string to be signed to obtain the digest hash value; The decentralized identity private key is used to digitally sign the digest hash value to obtain the signed information; The signed information is added to the data string to be signed to obtain the traceable evidence data packet.
[0069] The unencrypted key is grouped according to a preset byte length to obtain a set of grouped data. Each group of data in the grouped data set is encrypted to obtain an encrypted result set; The encryption key is obtained by concatenating all the encryption results in the encryption result set in sequence.
[0070] This invention provides a user behavior tracing and evidence preservation device for mobile devices, aiming to address the technical pain points of existing technologies, such as the inability to effectively preserve mobile professional behavior data and the difficulty in reliably supplementing historical omissions. The solution first uses a difference comparison module to periodically scan or trigger comparisons between the existing local historical hash evidence chain (based on a recursive hash chain structure) on the mobile device and the remote historical records of associated social platform accounts, accurately identifying user behaviors in the second historical behavior record that have not been fingerprinted. Subsequently, the tracing and crawling engine uses open APIs or web page parsing technology to legally obtain user operation data, user operation timestamps, and unique resource locators for this missing content from the social platform server, forming a user behavior dataset to be processed. To ensure the authenticity of the traced data, the system performs multimodal content understanding and classification, generating enhanced structured metadata containing semantic tags, sentiment tendencies, and behavioral types. Based on the historical hash evidence chain, it performs strict time window logic verification, hash continuity backtracking verification, and confidence decay coefficient calculation. Only after the data passes verification is it allowed to proceed to the next step. In the digital signature handshake phase, the system uses the user's decentralized identity (DID) private key to digitally sign the data packet consisting of a traceability hash value (integrating the original data, original publication time, current system time, and previous hash values) and a traceability supplementary record meta-tag. This generates a legally valid traceability evidence data packet, which is then timestamped using a distributed ledger to ensure the non-repudiation of liability. Finally, the logical chain maintenance module securely inserts the traceability record into the corresponding logical position in the local hash evidence storage chain and dynamically updates the pointer relationships and operation logs of subsequent nodes, completing a full closed loop of the professional behavior sequence. This invention, through its innovative design of "asynchronous traceability + time-difference timestamp," allows for compliant supplementation of historically missed behaviors on mobile devices while clearly distinguishing between real-time evidence storage and post-event entry through cryptographic means. Combined with a confidence decay mechanism, it achieves intelligent grading of the credibility of traceability records, fundamentally solving the industry problems of non-closed loops and low credibility of traceability records in mobile behavior evidence storage scenarios. This provides key technical support for building a comprehensive, highly reliable, and secure professional credit system.
[0071] Specific limitations regarding the mobile-based user behavior tracing and evidence preservation device can be found in the above-mentioned limitations on the mobile-based user behavior tracing and evidence preservation method, and will not be repeated here. Each module in the aforementioned mobile-based user behavior tracing and evidence preservation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0072] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a user behavior tracing and evidence storage method for mobile terminals on the server side.
[0073] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements the functions or steps of a user behavior tracing and evidence storage method for mobile devices on the client side.
[0074] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps: The system obtains the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and obtains the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The server obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server side, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been stored in data fingerprint. The user operation data, user operation timestamp, and unique resource locator corresponding to the user behavior that has not been stored in the data fingerprint are obtained from the backend server of the application platform to generate a user behavior dataset. The user behavior dataset is parsed according to data type to obtain parsed data corresponding to each data type; Based on the historical hash evidence chain, the parsed data is subjected to time window logical consistency verification to obtain logical consistency feature values; When the logical consistency feature value is greater than the preset consistency threshold, the current system time is obtained, and the traceability hash value of the historical hash evidence chain is calculated based on the current system time, the parsed data, and the pre-obtained preceding hash value. The decentralized identity private key is used to digitally sign the traceability hash value and the parsed data to obtain a traceability evidence data packet.
[0075] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: The system obtains the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and obtains the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The server obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server side, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been stored in data fingerprint. The user operation data, user operation timestamp, and unique resource locator corresponding to the user behavior that has not been stored in the data fingerprint are obtained from the backend server of the application platform to generate a user behavior dataset. The user behavior dataset is parsed according to data type to obtain parsed data corresponding to each data type; Based on the historical hash evidence chain, the parsed data is subjected to time window logical consistency verification to obtain logical consistency feature values; When the logical consistency feature value is greater than the preset consistency threshold, the current system time is obtained, and the traceability hash value of the historical hash evidence chain is calculated based on the current system time, the parsed data, and the pre-obtained preceding hash value. The decentralized identity private key is used to digitally sign the traceability hash value and the parsed data to obtain a traceability evidence data packet.
[0076] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0078] Finally, it should be noted that if any software tools or components not belonging to this company appear in the embodiments of the application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for tracing and storing user behavior evidence on mobile devices, characterized in that, include: The system obtains the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and obtains the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The server obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server side, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been stored in data fingerprint. The user operation data, user operation timestamp, and unique resource locator corresponding to the user behavior that has not been stored in the data fingerprint are obtained from the backend server of the application platform to generate a user behavior dataset. The user behavior dataset is parsed according to data type to obtain parsed data corresponding to each data type; Based on the historical hash evidence chain, the parsed data is subjected to time window logical consistency verification to obtain logical consistency feature values; When the logical consistency feature value is greater than the preset consistency threshold, the current system time is obtained, and the traceability hash value of the historical hash evidence chain is calculated based on the current system time, the parsed data, and the pre-obtained preceding hash value. The decentralized identity private key is used to digitally sign the traceability hash value and the parsed data to obtain a traceability evidence data packet.
2. The method for tracing and storing user behavior on mobile devices as described in claim 1, characterized in that, The step of obtaining the second historical behavior record of the target user generated on the application platform of the mobile device stored on the server, comparing the second historical behavior record with the historical hash evidence chain, and identifying user behaviors in the second historical behavior record that have not been stored with data fingerprint evidence includes: Obtain the second historical behavior records of the target user generated on the social platform account application platform stored on the server, and obtain a list of second historical behavior records; Extract the first identifier of each record in the second historical behavior record list to obtain the first identifier list; Extract the second identifier of each stored evidence in the historical hash evidence chain to obtain a list of second identifiers; By comparing the first and second identifier lists, one or more first identifiers that are recorded in the first identifier list but not in the second identifier list are identified. The user behavior corresponding to the identified first identifier in the second historical behavior list is regarded as the user behavior that the target user has generated on the mobile device but has not been recorded as data fingerprint.
3. The method for tracing and storing user behavior on mobile devices as described in claim 1, characterized in that, The step of obtaining user operation data, user operation timestamps, and unique resource locators corresponding to the user behaviors that have not undergone data fingerprinting from the backend server of the application platform, and generating a user behavior dataset, includes: Generate an API request set based on the user behavior that has not been fingerprinted; Based on the API request set, an API request is initiated to the social platform server to obtain the original API response set; Extract the original text, original publication time, and unique resource locator from the original API response set; Extract user operation data from the original text; Convert the original publication time into a timestamp to obtain the user operation timestamp; By integrating the user operation data, the user operation timestamp, and the unique resource locator, a user behavior dataset is obtained.
4. The method for tracing and storing user behavior on mobile devices as described in claim 1, characterized in that, The step of performing time-window logical consistency verification on the parsed data based on the historical hash evidence chain to obtain logical consistency feature values includes: Extract the key time and hash information required for verification from the parsed data to obtain the time pair to be verified and the hash of the content to be verified. Based on the historical hash evidence storage chain, verify whether the original publication time in the time pair to be verified is within the timestamp interval of the adjacent nodes in the evidence storage chain, and verify whether the traced evidence storage time is later than the original publication time and not earlier than the latest node timestamp of the evidence storage chain, to obtain the first verification result. Based on the historical hash evidence storage chain, perform hash continuity backtracking verification on the time pair to be verified and the hash of the content to be verified to obtain the second verification result; Calculate the confidence scores for the time pair to be verified and the hash of the content to be verified; Convert the first verification result and the second verification result into Boolean values to obtain the first Boolean value and the second Boolean value; Multiply the product of the first Boolean value and the second Boolean value by the confidence score to obtain the logical consistency feature value.
5. The method for tracing and storing user behavior on mobile devices as described in claim 1, characterized in that, When the logical consistency characteristic value is greater than a preset consistency threshold, the current system time is obtained, and the trace hash value of the historical hash evidence chain is calculated based on the current system time, the parsed data, and the pre-obtained preceding hash value, including: The current system time, the parsed data, and the preceding hash value are subjected to time standardization and metadata serialization to obtain a formatted list of data fields. The data fields in the formatted data field list are concatenated and converted to binary to obtain a binary data block; A hash calculation is performed on the binary data block to obtain a trace hash value.
6. The method for tracing and storing user behavior on mobile devices as described in claim 5, characterized in that, The step of concatenating and converting the data fields in the formatted data field list to binary to obtain a binary data block includes: The formatted data fields in the formatted data field list are standardized to obtain a list of standardized strings; Add a separator to a preset position for each standardized string in the list of standardized strings to obtain a list of separator strings; Concatenate all the strings in the delimiter string list in order to obtain the concatenated string; The concatenated string is converted into binary byte format according to a unified character encoding format to obtain binary data blocks.
7. The method for tracing and storing user behavior on mobile devices as described in claim 1, characterized in that, The process of digitally signing the traceability hash value and the parsed data using the decentralized identity private key to obtain a traceability evidence storage data packet includes: Extract the key data that needs to be signed from the parsed data to obtain the key data fields; The key data fields and the traceability hash value are encapsulated into a JSON object to obtain the data string to be signed; Calculate the hash value of the data string to be signed to obtain the digest hash value; The decentralized identity private key is used to digitally sign the digest hash value to obtain the signed information; The signed information is added to the data string to be signed to obtain the traceable evidence data packet.
8. A user behavior tracing and evidence storage device for mobile terminals, characterized in that, include: The data comparison module is used to obtain the historical hash evidence chain of the first historical behavior record of the target user generated on the preset application platform of the mobile device, stored on the mobile device, and to obtain the user's decentralized identity private key. The historical hash evidence chain is an information chain that records user behavior in chronological order and generates a corresponding data fingerprint evidence for each user behavior. The module also obtains the second historical behavior record of the target user generated on the application platform of the mobile device, stored on the server, compares the second historical behavior record with the historical hash evidence chain, and identifies user behaviors in the second historical behavior record that have not been data fingerprint evidenced. The data acquisition module is used to acquire user operation data, user operation timestamps, and unique resource locators corresponding to the user behaviors that have not been stored in data fingerprints from the backend server of the application platform, and generate a user behavior dataset. The data analysis module is used to parse the user behavior dataset according to data type to obtain parsed data corresponding to each data type; The data verification module is used to perform time window logical consistency verification on the parsed data based on the historical hash evidence chain to obtain logical consistency feature values; The digital signature module is used to obtain the current system time when the logical consistency feature value is greater than the preset consistency threshold, calculate the trace hash value of the historical hash storage chain based on the current system time, the parsed data and the pre-obtained preceding hash value, and digitally sign the trace hash value and the parsed data using the decentralized identity private key to obtain the trace storage data packet.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the user behavior tracing and evidence storage method for mobile terminals as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the user behavior tracing and evidence storage method for mobile terminals as described in any one of claims 1 to 7.