Mobile shopping APP forensics method based on blockchain
Through the mobile shopping APP evidence collection method based on the blockchain, the screenshots and log files of the real mobile device are used to generate the evidence package and uploaded to the blockchain, which solves the problem of low efficiency of evidence collection on the mobile APP and improves the credibility of the evidence collection. degree and efficiency.
Patent Information
- Application Number
- CN202111130968.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-09-26
AI Technical Summary
The existing technology lacks a convenient mobile APP evidence collection method. Especially in the mobile environment, the evidence collection efficiency is low and it is difficult to meet the needs of rights holders.
Through the blockchain-based mobile shopping APP evidence collection method, the user sends the link of the product to be obtained to the server, and the server connects to the real mobile device, configures and starts the evidence collection control program, periodically takes screenshots, generates log files and video files, and packages them For the certificate package, upload the blockchain, generate the certificate and send it to the user.
Efficient evidence collection on the mobile APP is realized, the credibility of the evidence collection content is improved with the help of the blockchain, the credibility of the evidence collection is further improved through clean environment detection, and the evidence collection efficiency is improved by dynamically adjusting the pull rate.
Smart Images

Figure CN113849864B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain-based mobile shopping APP evidence collection method. Background Art
[0002] With the continuous development of science and technology, "electronic evidence" continues to appear in litigation, playing a vital role in the determination of case facts. The so-called "electronic evidence" is an electronic document that is studied as evidence and can prove the facts related to the case. With the development of information technology, the types of electronic information used in production and life also tend to be diversified, such as electronic contracts, electronic bills of lading, electronic insurance policies, electronic invoices, etc. Electronic evidence has the characteristics of intangibility, diversity, objective authenticity and easy destructibility. Electronic evidence can be easily tampered with and forged using computer technology, so it is necessary to take technical means to improve the credibility of electronic evidence. Blockchain technology is a public shared ledger that can provide proof of authenticity. In the information age, electronic information can change rapidly and evidence can be easily lost, so it is necessary to collect electronic evidence in a timely manner. The current methods of evidence collection include online evidence collection on web pages and process evidence collection. Using process evidence collection to collect evidence on mobile APPs is very time-consuming and labor-intensive, which brings difficulties and risks to the right holder in obtaining evidence.
[0003] For example, Chinese patent CN110009336A, published on July 12, 2019, discloses a blockchain-based evidence collection method and device, in which the method includes: obtaining the user's network evidence collection request, and obtaining evidence collection identification information according to the network evidence collection request; calling the smart contract deployed on the blockchain, controlling the nodes in the blockchain to perform evidence collection operations according to the evidence collection identification information to obtain the corresponding evidence collection data; signing the evidence collection data, and sending the signed evidence collection data to the user's terminal. It realizes the automatic acquisition of network evidence and improves the efficiency of evidence collection. However, it still cannot collect evidence for mobile APPs. Summary of the invention
[0004] The technical problem to be solved by the present invention is that there is currently a lack of a convenient mobile APP evidence collection method. A mobile shopping APP evidence collection method based on blockchain is proposed, which can provide efficient mobile APP evidence collection for the right holder.
[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is: a mobile shopping APP evidence collection method based on blockchain, in which the user sends the link of the product to be collected to the server, and the server is connected to a mobile real device, including the following steps: configuring the mobile real device: the configured mobile real device is used as a forensic device, registered with the server and the state is set to ready, and the forensic control program is started; the server receives and assigns forensic tasks: the server receives the user's forensic request and the link of the product to be collected, generates a forensic task, and assigns it to the forensic device in the ready state; the forensic device downloads and executes the forensic task: the forensic control program periodically queries the task list, and if there is a forensic task in the task list, then Download the corresponding link of the product to be collected, and update the status to occupied; the evidence control program generates a new log file and writes the evidence operation data into the log file; the evidence control program controls the evidence device to browse the products to be collected in the shopping app and take screenshots periodically; after browsing, send the log file and screenshots to the server and update the status to ready; the server generates an evidence certificate: the server sorts the screenshots in chronological order and generates video files, packages the log files, cleanliness detection files and video files into an evidence package and stores them; extracts the hash value of the evidence package, uploads the hash value to the blockchain storage, and obtains the corresponding block height and block hash value; generates an evidence certificate according to the template, and sends the evidence certificate and evidence package to the user.
[0006] Preferably, the method for configuring a mobile real device includes: placing the mobile real device in a trusted environment, installing a clean environment detection program, several preset shopping apps and a forensics control program in the mobile real device, and after the configuration is completed, registering the mobile real device with the server as a forensics device and setting the status to ready, and starting the forensics control program; when the forensics device downloads and executes forensics tasks, starting the clean environment detection program, obtaining a cleanliness detection file, and sending the cleanliness detection file to the server; the server adds the cleanliness detection file to the evidence storage package.
[0007] Preferably, the method for the clean environment detection program to perform cleanliness detection includes: clearing the browser cache and cookies, and restoring the browser settings to the factory state; checking the hosts file to detect whether it contains preset keywords. If it contains the preset keywords, the cleanliness detection fails; accessing the preset fixed domain name, determining whether the access is successful, and recording the response time. If the access cannot be successful or the response time exceeds the threshold, the cleanliness detection fails; recording the keyword detection results, fixed domain name access results and response time in the cleanliness detection file.
[0008] Preferably, the method for browsing the goods to be collected in the shopping APP includes: searching for the standard time in the browser, taking screenshots and saving them; opening the link of the goods to be collected in the browser, triggering the corresponding shopping APP to automatically start and enter the goods to be collected; the evidence collection control program calls the evidence collection device system interface, controls the shopping APP to display the goods content in a preset order, and periodically takes screenshots and saves them.
[0009] Preferably, displaying the product content in a preset order includes: checking whether the product is off the shelf, and terminating evidence collection if it is; browsing the product display pictures: calling the system interface to input a left-swiping operation instruction to the upper part of the shopping APP until the displayed picture no longer changes after swiping left; browsing product reviews: pulling the page down, and periodically searching for and identifying the word "review", clicking after finding it, expanding the review, and continuing to pull down a preset number of times to load the product review; browsing product details: returning from the product review, continuing to pull the page down until the picture no longer changes after pulling down.
[0010] Preferably, when browsing product details, the downward pull rate is dynamically adjusted, and the method for dynamically adjusting the rate includes: setting the length of a single downward pull, and setting the initial pull waiting interval; when the waiting interval just begins, reading several screenshots, calculating the color mean of each screenshot, and obtaining the number of screenshots with a different color mean from the last screenshot read, if the number is less than a preset threshold, reducing the waiting interval, and if the number is greater than the preset threshold, increasing the waiting interval.
[0011] Preferably, the method for calculating the color mean of each screenshot is: converting the screenshot into a grayscale image, and calculating the average value of the grayscale values of all pixels.
[0012] Preferably, the smaller the number of screenshots having color average values different from the last screenshot read, the greater the reduction in the waiting interval.
[0013] Preferably, the method for storing evidence packages on a server includes: preprocessing the evidence package: the server encrypts the evidence package and splits it into several binary data segments of preset sizes, and fills the end of the binary data segment that is less than the preset size with zeros; establishing a linked list: establishing structured data, the structured data includes a storage body and an offset value, the storage body stores data segments, the server stores a preset address function, the input of the address function is a number and an offset value, the output of the address function points to the storage address of the next structured data, and after reading a structured data, the number is incremented by 1; storing the first data segment: the server sets the number to 1, allocates the first storage address, and according to the address function, The server calculates the offset value based on the address function, the number and the first storage address; constructs the first structured data, stores the first data segment in the storage body, and then stores the initial offset value, and stores the first structured data at the first storage address; stores the remaining data segments in a loop: the number is incremented by 1, and the server searches for storage space that is sufficient to store the structured data, obtains the storage address, and calculates the offset value based on the address function, the number and the storage address; constructs the structured data, stores the next data segment and the offset value, and stores the structured data in the storage address; executes the step of storing the remaining data segments in a loop until all the data segments of the storage package are stored; the server stores the initial offset value and the number in association with the identification code.
[0014] The substantial effect of the present invention is as follows: the server connects to a real mobile device in a trusted environment, and receives a link to the product to be collected sent by the user, so that evidence can be collected. The right holder only needs to submit the link to the product to be collected to the server; with the help of blockchain, the content of the collected evidence is difficult to be tampered with, thereby improving the credibility; the credibility of the collected evidence is further improved through clean environment testing; the pulling rate is dynamically adjusted to improve the efficiency of the collected evidence. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is a flow chart of the method for collecting evidence using a mobile shopping app in Example 1.
[0016] Figure 2 This is a schematic diagram of a method for configuring a real mobile device according to Embodiment 1.
[0017] Figure 3 Schematic diagram of the cleanliness detection method of Example 1.
[0018] Figure 4 This is a schematic diagram of a method for browsing a commodity to be collected for evidence according to Embodiment 1.
[0019] Figure 5 This is a schematic diagram of a method for displaying product contents in a preset order according to Embodiment 1.
[0020] Figure 6 Schematic diagram of a method for dynamically adjusting rate according to Embodiment 1.
[0021] Figure 7 This is a schematic diagram of the method for storing evidence packages on a server in Example 2. DETAILED DESCRIPTION
[0022] The specific implementation of the present invention will be further described below through specific examples in conjunction with the accompanying drawings.
[0023] Embodiment 1:
[0024] The blockchain-based mobile shopping APP evidence collection method is that the user sends the link of the product to be collected to the server, and the server is connected to the mobile real device. Please refer to the attached Figure 1 , the method comprises the following steps:
[0025] Step A01) Configure the mobile real device: The configured mobile real device is used as a forensic device, registered with the server and set to ready, and the forensic control program is started;
[0026] Step A02) The server receives and assigns evidence collection tasks: The server receives the user's evidence collection request and the link of the product to be collected, generates an evidence collection task, and assigns it to the evidence collection device in the ready state;
[0027] Step A03) The evidence collection device downloads and executes the evidence collection task: the evidence collection control program periodically queries the task list. If there is an evidence collection task in the task list, it downloads the corresponding link of the product to be collected and updates the status to occupied;
[0028] Step A04) the evidence collection control program generates a new log file and writes the evidence collection operation data into the log file;
[0029] Step A05) The evidence collection control program controls the evidence collection device to browse the products to be collected in the shopping app and take screenshots periodically;
[0030] Step A06) After browsing, the log files and screenshots are sent to the server, and the status is updated to ready; the server generates a certificate for evidence storage:
[0031] Step A07) The server sorts the screenshots in chronological order and generates video files, and packages the log files, cleanliness detection files and video files into an evidence package and stores them;
[0032] Step A08) Extract the hash value of the evidence package, upload the hash value to the blockchain storage, and obtain the corresponding block height and block hash value;
[0033] Step A09) Generate a certificate according to the template, and send the certificate and the package to the user.
[0034] For the method of configuring the real mobile device, please refer to the attached Figure 2, including: step B01) placing the mobile real machine device in a trusted environment; step B02) installing a clean environment detection program, several preset shopping apps and a forensic control program in the mobile real machine device; step B03) after the configuration is completed, the mobile real machine device is registered with the server as a forensic device and the status is set to ready, and the forensic control program is started; step B04) when the forensic device downloads and executes the forensic task, the clean environment detection program is started, the cleanliness detection file is obtained, and the cleanliness detection file is sent to the server; the server adds the cleanliness detection file to the evidence storage package. There are multiple online shopping apps, all of which can be installed. The function of the forensic control program is to receive the control instructions sent by the server and submit the control instructions to the system of the forensic device. The mobile phone operation tools disclosed in the prior art can realize the functions of the forensic control program, such as scrcpy. In this embodiment, the value acquisition device and the server use socket for communication, which has high communication efficiency.
[0035] Please refer to the attached Figure 3 The method for performing cleanliness detection by a clean environment detection program includes: step C01) clearing the browser cache and cookies, and restoring the browser settings to the factory state; step C02) checking the hosts file to detect whether it contains preset keywords. If it contains the preset keywords, the cleanliness detection fails; step C03) accessing the preset fixed domain name, determining whether the access is successful, and recording the response time. If the access cannot be successful or the response time exceeds the threshold, the cleanliness detection fails; step C04) recording the keyword detection result, the fixed domain name access result and the response time in the cleanliness detection file.
[0036] For how to browse the products to be collected in the shopping app, please refer to the attached Figure 4 , including: step D01) searching for the standard time in the browser, taking a screenshot and saving it; step D02) opening the link of the product to be collected in the browser, triggering the corresponding shopping APP to automatically start and enter the product to be collected; step D03) the evidence collection control program calls the system interface of the evidence collection device, controls the shopping APP to display the product content in a preset order, and periodically takes screenshots and saves them. Searching for the standard time in the browser and taking screenshots can serve as proof of the time of collection. When the link of the product to be collected is opened in the browser, the system can automatically wake up the corresponding shopping APP and open it.
[0037] Please refer to the attached Figure 5, the preset order of displaying product content includes: step E01) checking whether the product is off the shelf, and terminating the evidence collection if it is off the shelf; step E02) browsing the product display picture: calling the system interface to input a left sliding operation instruction to the upper part of the shopping APP until the display picture no longer changes after sliding left; step E03) browsing product reviews: pulling the page down, and periodically searching and identifying the word "review" at the same time, clicking after finding it, expanding the review, and continuing to pull down a preset number of times to load the product review; step E04) browsing product details: returning from the product review, continue to pull the page down until the picture no longer changes after pulling down.
[0038] When browsing product details, dynamically adjust the downward scrolling rate. Please refer to the attached Figure 6 , the method for dynamically adjusting the rate includes: step F01) setting the length of a single downward pull and setting the initial pull waiting interval; step F02) when the waiting interval just starts, reading several screenshots, calculating the color mean of each screenshot, obtaining the number of screenshots with different color mean values from the last screenshot read, if the number is less than a preset threshold, reducing the waiting interval, if the number is greater than the preset threshold, increasing the waiting interval. The downward pull rate is mainly affected by the network condition. The product details of the current shopping platform are usually mainly composed of pictures. If the network is good, the product details are loaded quickly, and the product details are displayed after a preset time to obtain a screenshot of the product details, and then the pull-down can be continued quickly. If the network condition is not good, it is necessary not only to wait for the preset time to display the product details, but also to wait for the product details to be loaded. In order to reduce the time occupied by the mobile real device for evidence collection under the premise of ensuring the quality of evidence collection, this embodiment dynamically adjusts the pull-down rate according to the loading of the product details to improve the efficiency of evidence collection. Periodic screenshots are used to generate evidence collection videos, and the frequency of screenshots is relatively high. In this embodiment, screenshots are taken 10 times per second. That is, each screenshot represents 0.1 seconds. In this embodiment, the product details are displayed by pulling down 0.8 screens, waiting for a period of time, and then pulling down 0.8 screens again. After just pulling down, if the shopping APP has a preloading function, the screenshot just after the pull-down is completed and the waiting time begins should have the same or substantially the same content as the screenshot with the preset waiting time, that is, the number of screenshots with different color mean values from the last screenshot read is 0, thereby reducing the waiting time, which is equivalent to increasing the pull-down rate. On the contrary, if the shopping APP does not have a preloading function, a short period of time is required after pulling down to load the pictures of the product details. Before the pictures of the product details are displayed, the corresponding area will display the background color, which will cause the color mean value to change. By identifying the number of screenshots with different color mean values from the last screenshot read, the time consumed to load the product details pictures can be determined. In this embodiment, different color mean values refer to the difference in color mean values exceeding a preset threshold. That is, it is determined that the color mean values within a certain error range are equal.
[0039] The method for calculating the color mean of each screenshot is: converting the screenshot into a grayscale image and calculating the average grayscale value of all pixels. The fewer the number of screenshots that have a different color mean from the last screenshot read, the more the waiting interval is reduced.
[0040] The beneficial technical effects of this embodiment are: the server connects to a real mobile device in a trusted environment, and receives the link of the product to be collected sent by the user, so that evidence can be collected. The right holder only needs to submit the link of the product to be collected to the server; with the help of blockchain, the content of the evidence is difficult to be tampered with, which improves the credibility; the credibility of the evidence is further improved through clean environment testing; the pulling rate is dynamically adjusted to improve the efficiency of evidence collection.
[0041] Embodiment 2:
[0042] Based on the blockchain, this embodiment provides a solution for storing evidence packages in a decentralized manner on the server to improve the storage security of the evidence packages. Figure 7The method for storing a certificate package on a server includes: step G01) preprocessing the certificate package: the server encrypts the certificate package and splits it into a number of binary data segments of a preset size, and fills the end of the binary data segment that is less than the preset size with zeros; step G02) establishing a linked list: establishing structured data, the structured data includes a storage body and an offset value, the storage body stores the data segment, the server stores a preset address function, the input of the address function is a number and an offset value, the output of the address function points to the storage address of the next structured data, and after reading a structured data, the number is incremented by 1; step G03) storing the first data segment: the server sets the number to 1, allocates the first storage address, and calculates according to the address function, the number and the first storage address The initial offset value is obtained; Step G04) constructs the first structured data, stores the first data segment in the storage body, and then stores the initial offset value, and stores the first structured data at the first storage address; Step G05) loops to store the remaining data segments: the number is incremented by 1, and the server searches for storage space sufficient to store the structured data, obtains the storage address, and calculates the offset value according to the address function, number and storage address; Step G06) constructs the structured data, stores the next data segment and the offset value, and stores the structured data in the storage address; Step G07) performs the loop to store the remaining data segments until all the data segments of the storage package are stored; Step G08) the server stores the initial offset value and the number in association with the identification code. In this embodiment, the address function is: next address = 2*current number + 7*offset value + constant value. The distributed storage method provided in this embodiment requires obtaining the address function before reading the data segment of the evidence package. And it must be read in sequence to obtain the correct storage address, which has higher security and can avoid data leakage. In this embodiment, the address function is encrypted with the server's public key and stored. When used, it is decrypted with the server's private key and stored in the memory. The restored address function in the memory is immediately destroyed after use. This minimizes the exposure time of the address function and improves storage security.
[0043] The above embodiment is only a preferred solution of the present invention and does not limit the present invention in any form. There are other variations and modifications without exceeding the technical solution described in the claims.
Claims
1. Blockchain-based mobile shopping APP forensics method: the user sends the link of the product to be forensically collected to the server, and the server is connected to the mobile real device , It is characterized in that The following steps are involved: Configure the real mobile device: The configured mobile device is used as a forensic device, registered with the server and set to ready, and the forensic control program is started; The server receives and distributes forensic tasks: The server receives the user's evidence collection request and the link of the product to be collected, generates a evidence collection task, and assigns it to the evidence collection device in the ready state; Download and perform forensic tasks on the forensic device: The evidence collection control program periodically queries the task list, and if there is an evidence collection task in the task list, downloads the corresponding link of the product to be collected, and updates the status to occupied; The forensic control program generates a new log file and writes the forensic operation data into the log file; The evidence collection control program controls the evidence collection device to browse the products to be collected in the shopping app and take screenshots periodically; After completing the browsing, the log files and screenshots are sent to the server and the status is updated to ready; The server generates a certificate: The server sorts the screenshots in chronological order and generates video files, and packages the log files, cleanliness detection files, and video files into an evidence package and stores them; Extract the hash value of the evidence package, upload the hash value to the blockchain storage, and obtain the corresponding block height and block hash value; Generate a certificate according to the template and send the certificate and package to the user; The methods for storing the evidence package on the server include: Preprocessing of evidence package: The server encrypts the evidence package and splits it into several binary data segments of preset size, and fills the end of the binary data segment that is less than the preset size with zeros; Create a linked list: Establishing structured data, wherein the structured data includes a storage body and an offset value, the storage body stores a data segment, the server stores a preset address function, the input of the address function is a number and an offset value, the output of the address function points to the storage address of the next structured data, and after reading a structured data, the number is incremented by 1; Store the first data segment: The server sets the number to 1, allocates the first storage address, and calculates the initial offset value based on the address function, the number, and the first storage address; Construct the first structured data, store the first data segment in the storage body, and then store the initial offset value, and store the first structured data at the first storage address; Loop to store the remaining data segments: The number is incremented by 1, and the server searches for storage space that is sufficient to store the structured data, obtains the storage address, and calculates the offset value based on the address function, number, and storage address; Construct structured data, store the next data segment and offset value, and store the structured data in the storage address; Execute the step of cyclically storing the remaining data segments until all the data segments of the storage package are stored; The server stores the initial offset value and the serial number in association with the identification code.
2. According to the blockchain-based mobile shopping APP evidence collection method of claim 1, It is characterized in that Methods for configuring real mobile devices include: Place the mobile device in a trusted environment, install a clean environment detection program, several preset shopping apps, and a forensic control program in the mobile device, register the mobile device with the server as a forensic device after the configuration is complete, and set the status to ready, and start the forensic control program; When the evidence collection device downloads and executes the evidence collection task, it starts the clean environment detection program, obtains the cleanliness detection file, and sends the cleanliness detection file to the server; the server adds the cleanliness detection file to the evidence storage package.
3. According to the blockchain-based mobile shopping APP evidence collection method of claim 2, It is characterized in that Clean environment testing procedures include: Clear browser cache and cookies, and restore browser settings to factory settings; Check the hosts file to see if it contains the preset keywords. If it does, the cleanliness test fails. Access the preset fixed domain name, determine whether the access is successful, and record the response time. If the access is not successful or the response time exceeds the threshold, the cleanliness test fails; The keyword detection results, fixed domain name access results and response time are recorded in the cleanliness detection file.
4. According to any one of claims 1 to 3, the blockchain-based mobile shopping APP evidence collection method, It is characterized in that Methods for browsing the products to be collected in the shopping app include: Search for standard time in the browser and take a screenshot to save; Open the link of the product to be collected in the browser, trigger the corresponding shopping app to automatically start and enter the product to be collected; The forensic control program calls the forensic device system interface to control the shopping app to display product content in a preset order and save screenshots periodically.
5. According to the blockchain-based mobile shopping APP evidence collection method of claim 4, It is characterized in that The preset order of displaying products includes: Check whether the product has been removed from the shelves. If it has been removed from the shelves, terminate the evidence collection; To browse product display pictures: Call the system interface to input the left sliding operation instruction to the top of the shopping app until the displayed picture does not change after sliding left; Product reviews browse: Pull down the page, periodically search for and identify the word "review", click it after finding it, expand the review, and continue to pull down a preset number of times to load the product review; View product details: To return from the product reviews, continue to scroll down until the screen stops changing.
6. According to the blockchain-based mobile shopping APP evidence collection method of claim 5, It is characterized in that When browsing product details, dynamically adjust the downward scrolling rate. The methods for dynamically adjusting the rate include: Set the length of a single downward pull and the waiting interval for the initial pull; When the waiting interval just starts, read several screenshots, calculate the color mean of each screenshot, and obtain the number of screenshots with different color mean from the last screenshot read. If the number is less than the preset threshold, reduce the waiting interval; if the number is greater than the preset threshold, increase the waiting interval.
7. According to the blockchain-based mobile shopping APP evidence collection method of claim 6, It is characterized in that The method for calculating the color mean of each screenshot is: converting the screenshot into a grayscale image and calculating the average value of the grayscale values of all pixels.
8. According to the blockchain-based mobile shopping APP evidence collection method of claim 6, It is characterized in that The smaller the number of screenshots having color average values different from the last screenshot read, the more the waiting interval is reduced.
Citation Information
Patent Citations
Evidence obtaining method and device based on block chain
CN110009336A
A forensics method and a special forensics mobile terminal
CN109819101A
Online process evidence obtaining and storing method based on block chain
CN112260835A
