Page change trace method, device, apparatus, medium, and program product
By obtaining page source code and generating hash values from the portal websites of financial institutions, and leveraging the immutability of blockchain, the problems of preventing tampering and ensuring the integrity of the operation chain when page information changes are solved, thus achieving accuracy and reliability in tracing page changes.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies in financial institutions' portal websites lack effective anti-tampering mechanisms and operational chain integrity when page information is changed, resulting in unreliable evidence and difficulty in meeting the requirements for proof.
By obtaining the page source code and generating a hash value from a snapshot, and leveraging the immutability of blockchain, the first hash value is compared with the second hash value. Combined with a timestamp, the system outputs traceability results when the page content has not been tampered with, thus achieving accuracy and reliability in page changes.
This improves the accuracy and reliability of page change tracing results, ensures the integrity and credibility of evidence, and meets the special needs of the financial industry for page changes.
Smart Images

Figure CN122240955A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly to a method, apparatus, device, medium, and program product for tracking page changes. Background Technology
[0002] In the financial industry, especially on the websites of banks and other financial institutions, the completeness and traceability of information disclosure are crucial. For example, the information disclosure page for wealth management products needs to display key information such as product name, yield, risk level, and investment period in real time, as this information directly affects customers' investment decisions.
[0003] When disputes arise due to changes in product information (such as yield adjustments or risk warning updates), financial institutions must provide conclusive evidence proving the time, content, and operational records of the information changes to meet evidentiary requirements. Existing technologies have significant deficiencies in terms of tamper-proof mechanisms and the integrity of the operational chain. Summary of the Invention
[0004] This application provides a page change tracing method, apparatus, device, medium, and program product to improve the accuracy and reliability of page change tracing results.
[0005] In a first aspect, embodiments of this application provide a method for tracing page changes, the method comprising:
[0006] In response to a page change traceability command, obtain the page source code and page snapshot of the page;
[0007] A first hash value is generated based on the page source code and the page snapshot;
[0008] If the first hash value and the second hash value are the same, the page change tracing result is output; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp; the timestamp is the moment when the second hash value is input into the blockchain; the second hash value is generated based on the page source code and the page snapshot when the page has undergone page changes.
[0009] In one possible implementation, before outputting the page change tracing result when the first hash value and the second hash value are the same, the method further includes:
[0010] When the page undergoes changes, obtain the page source code and a page snapshot;
[0011] The second hash value is generated based on the page source code and the page snapshot;
[0012] The second hash value is input into the blockchain to obtain the blockchain transaction identifier and the timestamp;
[0013] Store page change information locally; the page change information includes at least one of the following: the second hash value, the blockchain transaction identifier, the timestamp, the page version number, and the page operation type; the page version number is used to identify the complete state of the page, and the page operation type includes any one of the following: add page, modify page, delete page, and access page.
[0014] In one possible implementation, the step of outputting the page change tracing result when the first hash value and the second hash value are the same includes:
[0015] If the first hash value is the same as the second hash value included in the page change information stored locally, and the first hash value is the same as the second hash value in the blockchain, the page change tracing result is output.
[0016] In one possible implementation, the page is a static page or a dynamic page, and before obtaining a page snapshot of the page in response to a page change retrospective instruction, the method further includes:
[0017] The browser rendering engine obtains page data, which includes at least one of the following: the document object model tree of the page, the dynamically loaded resources of the page, the cascading style sheets of the page, the script execution results of the page, and the asynchronous request data of the page.
[0018] The page snapshot is generated based on the page data.
[0019] In one possible implementation, the operation type includes modifying the page, and before storing the page change information locally, the method further includes:
[0020] Modify the page version number of the page to obtain the modified page version number;
[0021] Based on the modified page version number, a chain of page change information is established.
[0022] In one possible implementation, the operation type includes deleting the page, and when the page has undergone changes, obtaining a page snapshot, including:
[0023] In response to the page change being a deletion operation, a snapshot of the page before deletion is generated;
[0024] The snapshot of the page before it was deleted is taken as the page snapshot.
[0025] In one possible implementation, the operation type includes accessing the page, and when the page undergoes changes, before obtaining the page source code and page snapshot, the method further includes:
[0026] Check if a record of a page snapshot is stored locally;
[0027] In response to the absence of a record for the page snapshot locally, the page snapshot is generated.
[0028] In one possible implementation, the page is a page of a financial interactive application, or a financial interactive webpage.
[0029] Secondly, embodiments of this application provide a page change tracking device, the device comprising:
[0030] The acquisition module is used to acquire the page source code and page snapshot of the page in response to the page change tracing instruction;
[0031] A generation module is used to generate a first hash value based on the page source code and the page snapshot;
[0032] The output module is used to output the page change tracing result when the first hash value and the second hash value are the same; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp; the timestamp is the moment when the second hash value is input into the blockchain; the second hash value is generated based on the page source code and the page snapshot when the page has undergone page changes.
[0033] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0034] The memory stores computer-executed instructions;
[0035] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in any of the first aspects above.
[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any of the first aspects above.
[0037] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the first aspects above.
[0038] This application provides a page change tracing method, apparatus, device, medium, and program product. Upon responding to a page change tracing instruction, it acquires the page source code and a snapshot, generates a first hash value, and compares this first hash value with a second hash value obtained from the blockchain and generated based on the page change. Leveraging the immutability of the blockchain, the two hash values will only match if the page content has not been tampered with. When both hash values are the same, the page change tracing result is output, improving the accuracy and reliability of the page change tracing result. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0040] Figure 1 A flowchart illustrating a page change tracking method provided in an embodiment of this application;
[0041] Figure 2 A flowchart illustrating a method for preserving evidence of page changes, provided as an embodiment of this application;
[0042] Figure 3 A schematic diagram of a page change tracking device provided in this application;
[0043] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application.
[0044] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application.
[0046] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0047] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0048] In the financial industry, especially on the websites of banks and other financial institutions, the completeness and traceability of information disclosure are crucial. For example, the information disclosure page for wealth management products needs to display key information such as product name, yield, risk level, and investment period in real time, as this information directly affects customers' investment decisions.
[0049] When disputes arise due to changes in product information (such as yield adjustments or risk warning updates), financial institutions must provide conclusive evidence proving the time, content, and operational records of the information changes to meet evidentiary requirements. However, web page content typically contains dynamically loaded data, such as real-time data requested asynchronously via AJAX (a web development technology) or pop-up prompts triggered by user behavior. This dynamic content cannot be directly captured by static code, leading to the risk of missing information in traditional evidence preservation methods.
[0050] Furthermore, website modification operations may involve multiple iterations (such as adding, modifying, and deleting page content), and the completeness of the operation chain directly affects the credibility of the evidence. Evidence must meet three core requirements: temporal credibility (proving that the information existed at a specific point in time), content integrity (proving that the information has not been tampered with), and operation traceability (proving a full lifecycle record of information changes).
[0051] There are two main approaches in existing technologies. One approach involves backing up and storing historical page code when changes occur. When tracing page changes, evidence is presented based on the specific code at that time. This method requires personnel with a certain level of computer expertise, as there is a disconnect between code changes and visual presentation, requiring professional developers to interpret the code and convert it into valid evidence. Furthermore, pages often contain dynamic content (such as AJAX-loaded data), and changes to dynamic content are often not reflected in the code. These changes cannot be captured by static code, leading to a loss of crucial information for tracing.
[0052] On the other hand, in addition to the above, a snapshot of the backup page can be added, which can intuitively show the effect before and after the page changes. Although the effect of page changes can be seen more intuitively, it is easy to suspect that it has been tampered with, and it is impossible to provide evidence to prove whether the snapshot has been tampered with; it lacks anti-tampering protection and there is a technical risk that the stored records can be tampered with afterward.
[0053] Therefore, existing technologies have significant shortcomings in dynamic content capture, anti-tampering mechanisms, and operational chain integrity. In this application, upon responding to a page change tracing instruction, the page source code and a snapshot are obtained, and a first hash value is generated. The first hash value is compared with a second hash value. Leveraging the immutable nature of blockchain, the two hash values will only be the same if the page content has not been tampered with, thus improving the accuracy and reliability of the page change tracing results.
[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0055] It should be noted that the executing entity of this application can be any electronic device with processing capabilities, such as a user terminal or a server, for example, a computer.
[0056] Figure 1 This is a flowchart illustrating a page change tracking method provided in an embodiment of this application. Figure 1 As shown, the method includes:
[0057] S101. In response to the page change traceability instruction, obtain the page source code and page snapshot.
[0058] Optionally, the page change tracing instruction can be an instruction that triggers the tracing of page changes, which may be triggered manually by the user or automatically by a scheduled task of an electronic device, to initiate the tracing process of the page's historical state. Page source code can be the core code that constitutes the webpage, reflecting the page structure, style, and interaction logic. A page snapshot can be a visual representation or structured data of the page at a specific moment, such as a screenshot, which can be stored in Portable Network Graphics (PNG) format.
[0059] It should be noted that the page mentioned here can be a page whose change process needs to be traced. In one implementation, the page can be a page of a financial interactive application, or a financial interactive webpage.
[0060] Optionally, the pages of a financial interactive application can be the interface of a financial application installed on a mobile device (such as a phone or tablet) or a desktop (such as a computer), where users interact with the electronic device through touch, click, swipe, or other operations. Financial interactive web pages can refer to financial website pages accessed through a browser, where users can interact with the electronic device through web forms, links, and dynamic content.
[0061] The embodiments of this application can meet the special needs of the financial industry for tracing page changes, provide data support for blockchain evidence storage and local metadata verification, ensure the integrity of the evidence chain, and improve the credibility of the evidence.
[0062] Optionally, electronic devices can respond to page change tracking instructions through an event listener mechanism, such as receiving requests to call an API or triggering custom events from the front end. Electronic devices can also obtain the page's source code and a snapshot of the page by calling the API.
[0063] S102. Generate the first hash value based on the page source code and page snapshot.
[0064] Optionally, the first hash value can be a unique identifier generated based on the page source code and snapshot. The electronic device can use a cryptographic hash algorithm, such as the Secure Hash Algorithm 256-bit (SHA-256), to process the page source code and snapshot data. For example, the electronic device can concatenate the page source code and page snapshot data into a string and use the SHA-256 algorithm to calculate the hash value of the concatenated string. Alternatively, the electronic device can first calculate the hash values of the page source code and the page snapshot separately, and then concatenate the two to generate the first hash value.
[0065] S103. If the first hash value and the second hash value are the same, output the page change tracing result; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp; the timestamp is the moment when the second hash value is input into the blockchain; the second hash value is generated based on the page source code and the page snapshot when the page has undergone page changes.
[0066] Optionally, the blockchain transaction identifier can be a transaction identifier (ID) on the blockchain, which can be used to locate the transaction record storing the second hash value. Due to the distributed ledger nature of the blockchain, which enables immutable evidence storage, if the first hash value and the second hash value are the same, the page change tracing result can indicate that the page source code and page snapshot existed and were not tampered with at a specific point in time. For example, the page change tracing result could be "the page was not tampered with."
[0067] Optionally, electronic devices can display page change tracking results via pop-up windows. Electronic devices can also obtain blockchain transaction identifiers and timestamps by calling the blockchain's node interface.
[0068] In this embodiment, upon responding to a page change tracing instruction, the page source code and snapshot are obtained, and a first hash value is generated. This first hash value is compared with a second hash value obtained from the blockchain and generated based on the page change. Leveraging the immutability of the blockchain, the two hash values will only be the same if the page content has not been tampered with. Outputting the page change tracing result when both hash values are the same improves the accuracy and reliability of the tracing results.
[0069] The following is a detailed explanation of how electronic devices can preserve evidence of page changes. Figure 2 This application provides a flowchart illustrating a method for preserving evidence of page changes, as shown in the embodiments below. Figure 2 As shown, if the first hash value and the second hash value are the same, before outputting the page change tracing result, the embodiments of this application may also perform the following steps.
[0070] S201. When there are page changes, obtain the page source code and page snapshot.
[0071] Optionally, a page change can be any change to the page's content, structure, style, or state. Electronic devices can determine if a page has been changed by comparing the current page with historical versions using a difference comparison algorithm. Alternatively, they can determine if a page has been changed by using event listeners, such as browser monitoring of Document Object Model (DOM) changes, and user action log analysis, or any one or more of these methods.
[0072] Optionally, the method for electronic devices to obtain page source code and page snapshots is similar to that described in S101 above, and will not be repeated here.
[0073] S202. Generate a second hash value based on the page source code and page snapshot.
[0074] It should be noted that the page source code and page snapshot here may be the same as or different from the page source code and page snapshot in S101. The second hash value generated based on the page source code and page snapshot is generated in a similar process to the first hash value, and will not be described again here.
[0075] S203. Input the second hash value into the blockchain to obtain the blockchain transaction identifier and the timestamp.
[0076] Optionally, the timestamp can be automatically generated by the blockchain to ensure the accuracy and immutability of the written time. Electronic devices can call smart contract methods through the blockchain node interface to write the second hash value to the blockchain, obtaining the blockchain transaction identifier and the timestamp returned by the blockchain.
[0077] S204. Store page change information locally; the page change information includes at least one of the following: second hash value, blockchain transaction identifier, timestamp, page version number, and page operation type; the page version number is used to identify the complete state of the page, and the page operation type includes any one of the following: add page, modify page, delete page, and access page.
[0078] Optionally, the page version number can be used to distinguish different historical versions. The page operation type can be used to categorize the reasons for page changes. Electronic devices can store page change information through a database or file system.
[0079] This application embodiment can completely record key information of the page change process. By generating a second hash value and inputting it into the blockchain, the trustworthiness of the hash value is ensured by leveraging the tamper-proof characteristics of the blockchain. Storing the change information locally facilitates subsequent quick querying and tracing of page changes, providing comprehensive data support for page management and tracing.
[0080] In one implementation, if the first hash value is the same as the second hash value included in the locally stored page change information, and the first hash value is the same as the second hash value in the blockchain, the electronic device outputs the page change tracing result.
[0081] Optionally, the first hash value is the same as the second hash value included in the locally stored page change information, which can indicate that the page source code and page snapshot corresponding to the first hash value are the same as the page source code and page snapshot corresponding to the second hash value included in the locally stored page change information, that is, the page source code and page snapshot corresponding to the first hash value have not been tampered with.
[0082] The first hash value is the same as the second hash value in the blockchain, which can indicate that the timestamp corresponding to the page source code and page snapshot in the blockchain has existed and has not been tampered with.
[0083] If the first hash value is the same as the second hash value included in the locally stored page change information, and the first hash value is the same as the second hash value in the blockchain, the page source code and page snapshot corresponding to the first hash value can be double-verified.
[0084] In this embodiment, the tracing result is output when the first hash value is the same as the second hash value in the locally stored page change information and also the same as the second hash value in the blockchain. This dual verification can improve the accuracy and credibility of the tracing result. The locally stored second hash value provides preliminary verification, and the second hash value in the blockchain uses its immutability for secondary verification. Only when both match is the tracing result output, effectively avoiding erroneous tracing due to local data tampering or blockchain data anomalies, and improving the reliability of evidence.
[0085] The following provides a detailed explanation of how electronic devices generate page snapshots. The pages in this application embodiment can be static pages or dynamic pages. Static pages can be web pages with fixed content, pre-generated on the server side and directly returned to the user; their content does not dynamically change due to user requests or environmental changes. Dynamic pages can be web pages generated in real time based on user requests, environmental variables, or database data; their content changes dynamically.
[0086] Before an electronic device responds to a page change tracing instruction and obtains a page snapshot, it can also obtain page data through the browser's rendering engine and generate a page snapshot based on that data. This page data can include one or more of the following: the page's document object model tree, dynamically loaded resources, cascading style sheets, script execution results, and asynchronous request data.
[0087] Optionally, the document object model tree of the page can represent the logical structure of the page. Dynamically loaded resources of the page can be additional resources loaded on demand by scripts after the page has been initially rendered. The page's cascading styles can be a set of rules describing the styles of page elements (such as layout, color, and font). The script execution result of the page can be the state changes generated after the page's code runs. Asynchronous data requests for the page can be data obtained from the server through asynchronous communication technologies such as AJAX.
[0088] Optionally, electronic devices can first capture page data through the browser rendering engine, and then integrate the page data into a visual snapshot (such as a full-screen screenshot saved as a PNG) or a structured snapshot, and generate a page snapshot through any one or more of the following: state synchronization, deduplication and compression, and version control.
[0089] For dynamic pages, the browser rendering engine can capture the document object model tree, dynamically loaded resources, cascading style sheets, script execution results, and asynchronous request data, so that the generated snapshot contains the complete visual presentation and dynamic content of the page. Compared with the shortcomings of traditional static crawling, which cannot retain dynamic elements, the embodiments of this application can provide more comprehensive and accurate information for page change tracking.
[0090] The above explains that page operation types can include adding a page, modifying a page, deleting a page, and accessing a page, among others. The following provides a detailed explanation of each page operation type.
[0091] When the operation type is to modify the page, before storing the page change information locally, the electronic device can first modify the page version number to obtain the modified page version number, and then establish a chain of related page change information based on the modified page version number.
[0092] Optionally, the electronic device can modify the page version number by incrementing it, thus distinguishing between page changes before and after the modification. The electronic device can establish a chain-like relationship between page change information based on the numerical sequence of the page version number.
[0093] This application embodiment can record the historical trajectory of page modifications, update the version number each time the page is modified, and establish a chain association, so that all modification nodes can be completely traced through the version number sequence, understand the status and modified content of the page at different points in time, facilitate the management of the page modification process, and improve the efficiency and accuracy of page change tracing.
[0094] When the operation type is page deletion, the electronic device can respond to the page change to a page deletion operation, generate a page snapshot before the page deletion, and use the page snapshot before the page deletion as the page snapshot.
[0095] Optionally, deleting a page can be done by removing the page; for example, a user can delete a page using a "delete" button on the interactive interface. The electronic device can capture the current state of the page before the deletion operation actually takes effect, generating a snapshot of the page before deletion. For example, when the electronic device detects a command to delete a page, it can intercept or listen to the operation to avoid direct deletion. Upon intercepting or listening to the deletion operation, a snapshot of the page before deletion is generated.
[0096] The embodiments of this application can completely preserve the state information of the page before deletion. A snapshot is generated before the page is deleted, which can record the visual presentation and content of the page before deletion, providing evidence for possible subsequent evidence or page recovery, avoiding the loss of key information due to page deletion, and ensuring the integrity and continuity of page change tracing.
[0097] When the operation type is accessing a page, if the page has changed, before obtaining the page source code and page snapshot, the electronic device can also check whether a page snapshot record is stored locally. If no page snapshot record is found locally, a page snapshot is generated.
[0098] Optionally, the electronic device can use a unique page identifier, such as a Uniform Resource Locator (URL), page ID, or any one or more of these as keys, to query whether an associated page snapshot record exists in local storage. If no page snapshot record exists locally, a page snapshot is generated using the method described above. If a page snapshot record exists locally and is the latest version, only that access record is recorded.
[0099] This application's embodiments can avoid duplicate storage and resource waste. By detecting whether a page snapshot record already exists locally, a snapshot is only generated if it does not exist, reducing unnecessary storage operations and resource consumption. At the same time, it ensures that snapshots can be generated in a timely manner when needed, providing accurate information for page access tracing.
[0100] In summary, the blockchain-based solution proposed in this application aims to address the core deficiency of existing solutions in terms of immutability. Blockchain ensures the trustworthiness of timestamps through distributed ledger technology. Each block contains the hash value of the previous block, forming an irreversible chain structure. Any tampering with historical data will invalidate the hash values of all subsequent blocks. Regarding data integrity, blockchain employs cryptographic hash algorithms (such as SHA-256) to double-solidify page content and snapshots. The locally stored hash value and the hash value stored on the blockchain form a cross-verification mechanism, accurately detecting single-bit-level data tampering. This technical feature effectively compensates for the vulnerability of traditional snapshots to questioning and tampering, constructing a complete chain of evidence that meets the requirements for proof through the dual locking of timestamps and hash values.
[0101] For example, the following provides detailed instructions on adding a page, modifying a page, deleting a page, and creating a user access tracking system. It should be noted that the systems described below can be web-based systems that can be deployed on electronic devices.
[0102] 1. Added a new page processing workflow.
[0103] When editors add a page, the system first calls the local browser rendering engine to generate a visual snapshot of the current page, ensuring a complete visual representation of the page's initial state. Then, it performs a double SHA-256 hash calculation on the page source code and the snapshot file to generate a unique digital fingerprint. This hash value is automatically written to the blockchain network via a smart contract, leveraging the distributed ledger characteristics of blockchain to achieve immutable evidence storage, while simultaneously triggering a network timestamp service to record the operation time accurate to the millisecond. The local database synchronously stores a combination of metadata, including version number 0 (identifying the initial version), blockchain transaction ID, operation timestamp, generated hash value, and operation type marked "new," forming a verifiable initial chain of evidence.
[0104] 2. Modify the page processing flow.
[0105] When a page is modified, the system automatically executes a version number increment mechanism, generating a new version number by adding 1 to the previous version. The local browser rendering engine is invoked to regenerate a complete page snapshot containing the modified content, ensuring strict consistency between this snapshot and the modified page content. The system synchronously calculates the hash values of the modified page content and the new snapshot, and writes these dual hash values to the blockchain for notarization via a smart contract. The local metadata database is synchronously updated with the following fields: the incremented version number, the blockchain transaction ID, the operation timestamp, the newly generated hash value, and the operation type marked as "modified," ensuring a strict correspondence between blockchain data and local metadata versions. Each snapshot generated by a modification operation is linked to the previous version, allowing for complete tracing of all modification nodes through the version number sequence.
[0106] 3. Page deletion process.
[0107] When website page editors delete a website page, the system executes the following standardized process: First, it uses the local browser's rendering function to generate a snapshot of the page in its final state before deletion, ensuring the integrity of the page's visual appearance is preserved. Then, based on the page content and the snapshot, a dual hash value is generated. This hash value, along with key data such as the operation timestamp and hash value, is written into an immutable distributed ledger via a blockchain smart contract, forming a legally valid evidence record. In local metadata management, a version number termination marking rule is executed—assigning an incrementing final version number to the deletion operation, while simultaneously recording the operation type as "delete," the precise timestamp, and the corresponding blockchain transaction ID, achieving closed-loop management of the operation chain. This process solidifies the data state at the deletion time point through blockchain evidence preservation, and, in conjunction with the termination version number mechanism, clearly identifies the end of the page's lifecycle, providing a triple verification foundation encompassing time dimension, operation type, and data integrity for any subsequent evidence submissions.
[0108] 4. User access tracking mechanism.
[0109] When a user visits a website page, the system first checks if a snapshot of the accessed URL and the latest page version number has already been generated locally. If no record is found, a passive evidence preservation process is automatically triggered: the local browser's rendering function is invoked to generate a snapshot of the current page, a hash value is generated based on the page content and the snapshot and written to the blockchain, and the operation type is marked as "access" in the local metadata. This mechanism ensures the accuracy of the evidence preservation triggering conditions through URL-version number matching detection, avoiding resource waste caused by duplicate evidence preservation. The access type marking function can distinguish between active editing and passive access behavior, providing a clear basis for operation type classification for subsequent evidence presentation.
[0110] The following details the dual-hash verification mechanism and the evidence chain retrieval process during the specific implementation.
[0111] 1. Double hash verification mechanism.
[0112] The dual-hash verification mechanism verifies data integrity by cross-referencing hash values stored locally and those stored on the blockchain. When page content or a snapshot is generated, the system immediately calculates its SHA-256 hash value, which is simultaneously written to both the local metadata database and the blockchain network. During evidence presentation, the system first extracts the hash value from local storage and matches it with the recalculated hash value of the current file to verify whether the data has been tampered with. Secondly, it compares the timestamped hash record on the blockchain with the local record, using the irreversible nature of the blockchain's distributed ledger to prove that the data existed at a specific point in time and has not been modified. This dual verification ensures the authenticity of the data itself and provides third-party trusted timestamp authentication through the blockchain's consensus mechanism.
[0113] 2. Evidence chain retrieval process.
[0114] In the evidence presentation scenario, the evidence chain retrieval process first filters operation records within a target time period based on timestamp ranges. The system automatically associates the corresponding version's page snapshot and metadata. The evidence presentation interface displays the rendering effect of historical snapshots in a split screen, with the metadata details of the operation simultaneously presented on the right, including the version number change trajectory, operation type marker, and the initial hash value stored locally. During the verification phase, the corresponding timestamp hash record stored on the blockchain is retrieved. By comparing the consistency between the local and on-chain hash values, a verification report is output, fully presenting the evidence loop of "timestamp - operation behavior - content snapshot - double hash verification".
[0115] The embodiments of this application can achieve the following technical effects:
[0116] 1. Reliable evidence storage for dynamic content.
[0117] By capturing the complete DOM tree of a webpage and dynamically loading resources using browser kernel-level rendering technology, the stored content is ensured to be pixel-perfectly consistent with the user's actual browsing interface. Real-time screenshot technology is used to record the visual presentation effects, simultaneously saving CSS stylesheets, JavaScript execution results, and asynchronous request data, overcoming the limitation of traditional static crawling in preserving dynamic elements.
[0118] 2. Traceability of the entire operation lifecycle.
[0119] This system employs a sophisticated logging mechanism to track all operations on webpage content. In new operation scenarios, the recorded information includes, but is not limited to, the time of addition, the operator's identity, the new data source, and the complete rendered DOM structure. For modification operations, a comparison graph of the original and revised versions is simultaneously retained. For deletion operations, in addition to marking the deletion timestamp, the deleted content is archived in read-only format. All four types of operation data are linked together using standardized timestamps, forming a causal chain of operations that ensures that any webpage change can be reconstructed as a complete sequence of operations.
[0120] 3. Anti-counterfeiting dual verification mechanism.
[0121] The anti-counterfeiting dual verification mechanism ensures the integrity and immutability of the stored data through a dual verification system of local hashing and blockchain-based notarization. Locally, the system generates a unique hash value for the captured webpage content, serving as a data fingerprint; simultaneously, this hash value is uploaded to the blockchain, utilizing its distributed ledger feature for permanent notarization. When verification is required, the system compares the locally recalculated hash value with the original hash value recorded on the blockchain. If they match, it proves the data has not been tampered with. This dual verification mode effectively prevents single-point tampering risks and significantly improves the credibility of the notarization results.
[0122] 4. Zero professional knowledge threshold.
[0123] This solution utilizes an intuitive visual snapshot feature, allowing users to capture the complete state of a webpage (including dynamically loaded content) with a single click, enabling evidence preservation without requiring an understanding of the technical details. The system automatically generates a verification report containing timestamps, operation steps, and hash values. Users can complete the evidence presentation process by comparing the consistency between local files and blockchain-stored evidence; the entire process requires no cryptographic or blockchain expertise. The automated verification tool proactively alerts users to any anomalies in the evidence storage, further simplifying the evidence presentation process.
[0124] The above are the method embodiments provided in this application. The apparatus provided in this application will be described below.
[0125] Figure 3 A schematic diagram of a page change tracking device provided in this application is shown below. Figure 3 As shown, the page change tracing device 400 provided in this embodiment includes: an acquisition module 401, a generation module 402, and an output module 403. Optionally, the page change tracing device 400 may further include a processing module 404.
[0126] The acquisition module 401 is used to acquire the page source code and page snapshot in response to the page change traceability instruction.
[0127] The generation module 402 is used to generate the first hash value based on the page source code and the page snapshot.
[0128] Output module 403 is used to output the page change tracing result when the first hash value and the second hash value are the same; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp. The timestamp is the moment when the second hash value was input into the blockchain; the second hash value is generated based on the page source code and page snapshot when the page has undergone page changes.
[0129] Optionally, if the first hash value and the second hash value are the same, before outputting the page change tracing result, the processing module 404 is used to obtain the page source code and page snapshot when there are page changes. Based on the page source code and page snapshot, a second hash value is generated. The second hash value is input into the blockchain to obtain the blockchain transaction identifier and the timestamp. The page change information is stored locally; the page change information includes at least one of the following: the second hash value, the blockchain transaction identifier, the timestamp, the page version number, and the page operation type; the page version number is used to identify the complete state of the page, and the page operation type includes any one of the following: adding a page, modifying a page, deleting a page, and accessing a page.
[0130] Optionally, the output module 403 is specifically used to output the page change tracing result when the first hash value is the same as the second hash value included in the locally stored page change information, and the first hash value is the same as the second hash value in the blockchain.
[0131] Optionally, the page can be a static or dynamic page. Before the acquisition module 401 acquires a page snapshot in response to the page change tracing instruction, the processing module 403 further acquires page data through the browser rendering engine. The page data includes at least one of the following: the page's document object model tree, dynamically loaded resources of the page, cascading style sheets of the page, script execution results of the page, and asynchronous request data of the page. Based on the page data, a page snapshot is generated.
[0132] For example, the operation type includes modifying a page. Before the processing module 404 stores the page change information locally, the processing module 404 also modifies the page version number to obtain the modified page version number. Based on the modified page version number, a chain of related page change information is established.
[0133] For example, if the operation type includes deleting a page, the processing module 404 is specifically used to generate a snapshot of the page before deletion in response to a page change to a page deletion operation. This snapshot of the page before deletion is then used as the final page snapshot.
[0134] For example, when the operation type includes accessing a page, before obtaining the page source code and page snapshot when the page has changed, the processing module 404 also checks whether a record of the page snapshot is stored locally. If no record of the page snapshot is found locally, a page snapshot is generated.
[0135] In one implementation, the page is a page of a financial interactive application, or a financial interactive webpage.
[0136] The page change tracking device 400 provided in this embodiment can execute the methods provided in any of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0137] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 4 As shown, the electronic device 500 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the device 500 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0138] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0139] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0140] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0141] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0142] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0143] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0144] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0145] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0146] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0147] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0148] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0149] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0150] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0152] Finally, it should be noted that other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from its scope.
Claims
1. A method for tracking page changes, characterized in that, The method includes: In response to a page change traceability command, obtain the page source code and page snapshot of the page; A first hash value is generated based on the page source code and the page snapshot; If the first hash value and the second hash value are the same, the page change tracing result is output; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp; the timestamp is the moment when the second hash value is input into the blockchain; the second hash value is generated based on the page source code and the page snapshot when the page has undergone page changes.
2. The method according to claim 1, characterized in that, If the first hash value and the second hash value are the same, before outputting the page change tracing result, the method further includes: When the page undergoes changes, obtain the page source code and a page snapshot; The second hash value is generated based on the page source code and the page snapshot; The second hash value is input into the blockchain to obtain the blockchain transaction identifier and the timestamp; Store page change information locally; the page change information includes at least one of the following: the second hash value, the blockchain transaction identifier, the timestamp, the page version number, and the page operation type; the page version number is used to identify the complete state of the page, and the page operation type includes any one of the following: add page, modify page, delete page, and access page.
3. The method according to claim 1 or 2, characterized in that, When the first hash value and the second hash value are the same, the output page change tracing result includes: If the first hash value is the same as the second hash value included in the page change information stored locally, and the first hash value is the same as the second hash value in the blockchain, the page change tracing result is output.
4. The method according to claim 1 or 2, characterized in that, The page may be a static page or a dynamic page. Before obtaining a page snapshot of the page in response to the page change retrospection instruction, the method further includes: The browser rendering engine obtains page data, which includes at least one of the following: the document object model tree of the page, the dynamically loaded resources of the page, the cascading style sheets of the page, the script execution results of the page, and the asynchronous request data of the page. The page snapshot is generated based on the page data.
5. The method according to claim 2, characterized in that, The operation type includes modifying the page. Before storing the page change information locally, the method further includes: Modify the page version number of the page to obtain the modified page version number; Based on the modified page version number, a chain of page change information is established.
6. The method according to claim 2, characterized in that, The operation type includes deleting the page. When the page has undergone changes, a page snapshot is obtained, including: In response to the page change being a deletion operation, a snapshot of the page before deletion is generated; The snapshot of the page before it was deleted is taken as the page snapshot.
7. The method according to claim 2, characterized in that, The operation type includes accessing the page. When the page undergoes changes, before obtaining the page source code and page snapshot, the method further includes: Check if a record of a page snapshot is stored locally; In response to the absence of a record for the page snapshot locally, the page snapshot is generated.
8. The method according to claim 1 or 2, characterized in that, The page in question is a page of a financial interactive application, or a financial interactive webpage.
9. A page change tracking device, characterized in that, The device includes: The acquisition module is used to acquire the page source code and page snapshot of the page in response to the page change tracing instruction; A generation module is used to generate a first hash value based on the page source code and the page snapshot; The output module is used to output the page change tracing result when the first hash value and the second hash value are the same; the second hash value is obtained from the blockchain based on the blockchain transaction identifier and the timestamp; the timestamp is the moment when the second hash value is input into the blockchain; the second hash value is generated based on the page source code and the page snapshot when the page has undergone page changes.
10. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.
12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.