Website user behavior record analysis method based on rrweb
Through the rrweb-based rewrite initialization method, encapsulation plug-in and cache storage strategy, combined with Power UI analysis, the shortcomings of traditional user behavior records are solved, efficient and accurate user behavior data collection and analysis are achieved, and strong data support is provided to enterprises.
Patent Information
- Application Number
- CN202510311043.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional user behavior recording methods have incomplete data capture, insufficient analysis depth, and poor replay effect, which is difficult to meet the needs of enterprises for refined operations and intelligent decision-making.
The website user behavior record analysis method based on rrweb, obtain user information by rewriting the initialization method and performing non-standard serialization processing, encapsulate unified plug-ins, add cache mechanisms and database subtable storage, combine with Power UI for visual data analysis, and use machine learning algorithms to detect abnormal behaviors.
It realizes efficient and accurate recording and playback of user behavior, provides strong data support, and provides a data foundation for website operation, product optimization and user research.
Smart Images

Figure CN120256762A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and particularly relates to a method for analyzing website user behavior records based on rrweb. Background Art
[0002] With the rapid development of the Internet and the deepening of digital transformation, user behavior data has become a key resource for enterprises to understand market demands, optimize product experiences, and improve service quality. However, traditional user behavior recording methods often have problems such as incomplete data capture, insufficient analysis depth, and poor playback effects, making it difficult to meet the needs of enterprises in refined operation and intelligent decision-making.
[0003] Based on the above problems, the present invention proposes a method for analyzing website user behavior records based on rrweb. Summary of the Invention
[0004] In order to make up for the deficiencies of the prior art, the present invention provides a simple and efficient method for analyzing website user behavior records based on rrweb.
[0005] The present invention is realized by the following technical solutions:
[0006] A method for analyzing website user behavior records based on rrweb, characterized in that it includes the following steps:
[0007] Step S1, rewrite the rrweb initialization method;
[0008] On the basis of rrweb, rewrite the initialization process. While the init method is executed, obtain user information, and at the same time perform non-standard serialization processing, including data processing and information encryption, and at the same time add a watermark identifier;
[0009] In the said step S1, the process of rewriting the rrweb initialization method is as follows:
[0010] Step S1.1, start executing the processing logic of the init method in rrweb after receiving the recording request, which includes 3 methods, namely the takeFullSnapshot method, the observe method, and the getUserInfo method;
[0011] Among them, the takeFullSnapshot method is used to obtain a full snapshot of the document as the basis for subsequent incremental snapshots; first send an emit of a meta meta-information, and then execute the snapshot(document, {...}) method, traverse the entire document tree, create a unique ID for each node and serialize it, and maintain it in the mapping of the mirror reflection object;
[0012] The observe method is used to initialize various listeners. First, it encapsulates an event through wrapEvent to form a payload with a timestamp (used for subsequent restoration during playback), and then executes the wrappedEmit function (triggering the encapsulated event). The wrappedEmit function wraps the emit sending method passed in from the outside, that is, it passes the payload with the timestamp as a parameter to the emit sending method written by the developer for rrweb to use.
[0013] The getUserInfo method is used to initialize the current user information, obtain the information of the user in the current session, and record the current browser information. The system timestamp together forms a user node and is serialized, and is transmitted to the backend together with the screen recording content for subsequent targeted analysis of users and data verification.
[0014] Step S1.2: After the screen recording ends, perform non-standard serialization processing, which is divided into the following two aspects:
[0015] Perform de-scripting processing on the information to ensure that all JavaScript in the recorded page is not executed, record the view state not reflected in HTML, and convert relative paths to absolute paths.
[0016] Use "the current timestamp + IP information + user unique identifier UUID" as the unique flag of the video and splice it with the screen recording data, and use the AES encryption method to perform symmetric encryption on the recorded data.
[0017] Step S2: Package a unified plugin to reduce docking development.
[0018] Re-package rrweb into a ready-to-use plugin based on the B / S architecture system. The plugin includes functions such as initialization, recording, playback, stopping recording, and data uploading, and is exposed to the outside through the API of the plugin, thus simplifying docking development.
[0019] The entire plugin uses asynchronous threads for recording, which does not affect the business logic of the original system. At the same time, it provides a set of unified interfaces for the plugin, including an initialization interface, a start recording interface, a stop recording interface, and a playback interface. External developers can implement the functions of rrweb by simply calling these interfaces without caring about the internal implementation details.
[0020] In step S2, the input parameter of the initialization interface is <userId.systemId>, that is, the system secret key assigned to the user ID, and the return value is the initialization status status.
[0021] The input parameters of the start recording interface are <dom, type, limit>, namely the node, recording type, and duration. The recording type includes automatic stop at a specific time period and manual stop. The return value is the unified identifier assigned to the current screen recording process;
[0022] The input parameter of the stop recording interface is <uuid>, that is, the screen recording process identifier, and the return value is the initialization status status;
[0023] The input parameters of the playback interface are <usrId, startTime, endTime, systemId>, that is, the user ID, start time, end time, and allocated system secret key, and the return value is the list of screen recording playback addresses.
[0024] Step S3: Add a caching mechanism and database sharding storage to improve efficiency;
[0025] Add a caching mechanism and database sharding storage strategy to the rrweb service. Among them, the caching mechanism is divided into front-end caching and back-end caching; for database sharding storage, there are two modes: sharding by time and sharding by the number of users, which are applicable to two different types of scenarios;
[0026] In step S3, the front-end caching refers to using the browser's LocalStorage or IndexedDB client storage technology to temporarily store user operation data; when the network condition is poor or temporarily offline, capture user operations and synchronize them to the server later;
[0027] The back-end caching is to deploy a Redis or Memcached in-memory database on the server side to cache frequently accessed session data, reduce the query pressure on the main database, and accelerate the data reading speed.
[0028] When performing database sharding storage, sharding by time is to disperse data storage into different tables according to the creation time or update time of the session; for example, new tables can be created monthly or weekly to store data, which is convenient for data management and can improve query efficiency. This type of sharding mode is mainly for the situation where there are few users and the system is used frequently.
[0029] Sharding by the number of users is to migrate data to a new table when the data volume of a single user reaches a custom threshold. This helps to balance the data volume of each table and avoid performance bottlenecks caused by a single large table. This type of sharding mode is mainly for the situation where there are many users and the system is single.
[0030] Step S4: Use the Power UI interface development tool suite for visual data analysis;
[0031] In the Power BI Desktop tool, connect to the rrweb data source through the Get Data function;
[0032] Clean the rrweb data using the Power Query editor, including removing duplicates, handling missing values, and converting data types; according to the analysis requirements, perform custom transformations on the data, such as converting timestamps to datetime formats, classifying event types, etc.; establish a data model in the Power BI tool, set the relationships between tables, and lay the foundation for subsequent data analysis;
[0033] Analyze the user click, scroll, and input behavior patterns through the DAX functions and visualization tools of the Power BI tool, and identify high-frequency operations and inefficient paths;
[0034] Utilize the load time and response time information in the rrweb data to evaluate the page performance and identify performance bottlenecks;
[0035] Combine machine learning algorithms to detect abnormal user behaviors, including frequent refreshes and abnormal clicks;
[0036] According to the analysis results, design a dashboard containing key performance indicators (KPIs), and the key indicators include user activity, page stay time, and the number of abnormal behaviors;
[0037] According to the data type and analysis purpose, custom-select appropriate chart types, such as bar charts, line charts, pie charts, maps, etc., and organize the analysis results into a report for unified export.
[0038] Since the rrweb data may be stored in JSON format, in step S4, select a connector that supports JSON or directly access the AP using a Web connector, import the rrweb data into the Power BI Desktop tool, and perform a preliminary preview to ensure data integrity and accuracy.
[0039] A website user behavior record analysis system based on rrweb, including:
[0040] A front-end recording module, which embeds a packaged plugin (packaged based on rrweb and user behavior analysis requirements) in a web page or application, is responsible for real-time capturing the operation behaviors of the user's specified area, including mouse clicks, scrolls, keyboard inputs, and page changes, and records the captured data as a snapshot stream in an incremental manner, and synchronously records the information of the user's operations;
[0041] A data transmission module, which is responsible for compressing and encrypting the data recorded by the front-end, and sending it to the server through an HTTP request;
[0042] A back-end storage module, which is responsible for encrypting and storing the received data on the server according to the specified data structure, including video data and related behavior record data; The data review module is responsible for analyzing the extracted video information data by using natural language processing technology;
[0044] The analysis and display module is responsible for providing a simple operation interface for displaying the analysis results and playing back user behaviors, so as to be subsequently integrated into the business system for independent use.
[0045] A rrweb-based website user behavior record analysis device, characterized in that it includes a memory and a processor; the memory is used to store computer programs, and the processor is used to implement the above method steps when executing the computer programs.
[0046] A readable storage medium, characterized in that: a computer program is stored on the readable storage medium, and the computer program implements the above method steps when executed by a processor.
[0047] The beneficial effect of the present invention is that: the rrweb-based website user behavior record analysis method overcomes the limitations of the prior art in terms of user behavior data collection, analysis and playback, encapsulates it into a separate page screen recording plugin based on the rrweb open source framework, and combines new artificial intelligence technologies. By efficiently and accurately recording and playing back the behaviors of users on web pages or applications, it provides strong data support for website operation, product optimization, user research, operation behavior security verification, etc. Description of the Drawings
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0049] Attached Figure 1 It is a schematic diagram of the rrweb-based website user behavior record analysis method of the present invention.
[0050] Attached Figure 2 It is a schematic diagram of the rrweb-based website user behavior record analysis system of the present invention.
[0051] Attached Figure 3 It is a schematic diagram of the method for rewriting the rrweb initialization method of the present invention. Detailed Embodiments
[0052] To enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0053] In recent years, rrweb (Record and Replay the Web, used to record and replay user operations in the Web interface), as an open-source web session recording and replay library, has gradually become a popular choice in the field of user behavior record analysis with its characteristics of high efficiency, lightweight, and easy integration.
[0054] rrweb is a relatively popular open-source library for recording the screen. Different from traditional screen recording methods, rrweb does not record a real video stream, but a JSON array that records the changes in the page DOM. Therefore, it cannot record the entire display screen, but only one tab of the browser (screen recording), which also makes rrweb have a certain degree of portability and lower requirements for system transformation.
[0055] As a powerful open-source library, rrweb is designed specifically for front-end developers. By capturing DOM changes, user inputs (such as clicks, scrolls, keyboard inputs, etc.) and CSS style changes in the browser, rrweb can create an accurate replay of the user session, which is extremely valuable for troubleshooting, user behavior analysis, product demonstrations, or educational purposes.
[0056] The core advantages of rrweb lie in its lightweight and high efficiency. It adopts the incremental snapshot technology, only records the changed part of the DOM since the last snapshot, thus greatly reducing the data volume and transmission cost. At the same time, rrweb supports data compression and segmentation, further improving its performance in environments with limited bandwidth or high network latency.
[0057] In terms of integration, rrweb provides flexible APIs, enabling developers to easily embed it into existing Web applications. Whether through simple configuration parameters or writing custom logic, rrweb can meet the requirements in different scenarios. In addition, rrweb also supports multiple backend storage and replay methods, such as sending the recorded data to the server for storage, or directly playing and displaying it on the client side.
[0058] The method for analyzing website user behavior records based on rrweb includes the following steps:
[0059] Step S1, rewrite the rrweb initialization method;
[0060] Under normal circumstances, after starting screen recording, when rrweb initializes, it will obtain a full snapshot of the current page and add listeners to monitor different types of changes to the page (such as changes to the DOM, as well as changes to the mouse, scrolling, and page resizing, etc.). When these changes (mutations) occur, different serialization processes are performed according to the type, and the processed data is sent out by emit. During serialization processing, each serialized node is assigned an ID, and a mapping from the ID to the node and a mapping from the node to the serialized Node are maintained.
[0061] However, due to the usage requirements of the actual business scenario, the initialization process of rrweb is rewritten. While the init method is being executed, user information is obtained, and at the same time, non-standard serialization processing is performed, including data processing and information encryption. At the same time, a watermark identifier is added to meet the subsequent requirements for user analysis and security;
[0062] In step S1, the process of rewriting the rrweb initialization method is as follows:
[0063] Step S1.1: After receiving the recording request, start executing the processing logic of the init method in rrweb, which includes 3 methods, namely the takeFullSnapshot method, the observe method, and the getUserInfo method;
[0064] Among them, the takeFullSnapshot method is used to obtain a full snapshot of the document as the basis for subsequent incremental snapshots; first, emit a meta meta-information, and then execute the snapshot(document, {...}) method, traverse the entire document tree, create a unique ID for each node and serialize it, and maintain it in the mapping of the mirror reflection object;
[0065] The observe method is used to initialize various listeners; first, encapsulate the event through wrapEvent to encapsulate a payload with a timestamp (used for subsequent playback restoration), and then execute the wrappedEmit (trigger the encapsulated event) function. The wrappedEmit function wraps the emit sending method passed in by the external parameter, that is, passes the payload with the timestamp as the input parameter to the emit sending method written by the developer used by rrweb;
[0066] The getUserInfo method is used to initialize the current user information, obtain the information of the user in the current session, record the current browser information, and serialize the user node composed of the system timestamp together, and transmit it to the backend together with the screen recording content for subsequent targeted analysis of the user and data verification;
[0067] Step S1.2, after the screen recording ends, perform non-standard serialization processing, which is divided into the following two aspects:
[0068] Perform de-scripting processing on the information to ensure that all JavaScript in the recorded page is not executed, record the view state not reflected in the HTML, and convert the relative path to an absolute path;
[0069] Use "current timestamp + IP information + user unique identifier UUID" as the unique flag of the video and splice it with the screen recording data, and use the AES encryption method to symmetrically encrypt the recorded data.
[0070] Step S2, encapsulate a unified plugin to reduce docking development;
[0071] Since rrweb defaults to processing the content of the entire page document, and after integration, separate development configuration modifications need to be made for each functional page, which has a certain performance impact on the system and is not very convenient for development docking.
[0072] Repackage rrweb into a ready-to-use plugin based on the B / S architecture system. The plugin includes functions such as initialization, recording, playback, stopping recording, and data uploading, and is exposed to the outside through the API of the plugin, thus simplifying docking development;
[0073] The entire plugin uses asynchronous threads for recording, which does not affect the business logic of the original system. At the same time, a set of unified interfaces are provided for the plugin, including an initialization interface, a start recording interface, a stop recording interface, and a playback interface. External developers only need to call these interfaces to implement the functions of rrweb without caring about the internal implementation details;
[0074] In step S2, the input parameter of the initialization interface is <userId.systemId>, that is, the system secret key assigned to the user ID, and the return value is the initialization status status;
[0075] The input parameters of the start recording interface are <dom, type, limit>, that is, the node, the recording type and duration. The recording type includes automatic stop and manual stop at a time period, and the return is the unified identifier assigned to the current screen recording process;
[0076] The input parameter of the stop recording interface is <uuid>, that is, the screen recording process identifier, and the return value is the initialization status status;
[0077] The input parameters of the playback interface are <usrId, startTime, endTime, systemId>, that is, the user ID, start time, end time, and allocated system secret key, and the return value is the list of screen recording playback addresses.
[0078] Step S3: Add a caching mechanism and database sharding storage to improve efficiency;
[0079] Adding a caching mechanism and database sharding storage strategy in the rrweb service can significantly improve the performance and efficiency of the system, especially when dealing with a large amount of user session data; among them, the caching mechanism is divided into front-end caching and back-end caching; for database sharding storage, there are two modes: sharding by time and sharding by the number of users, which are applicable to two different types of scenarios;
[0080] In the said step S3, the front-end caching refers to using the browser's LocalStorage or IndexedDB client storage technology to temporarily store user operation data; when the network condition is poor or temporarily offline, capture user operations and synchronize them to the server later;
[0081] The back-end caching is to deploy a Redis or Memcached in-memory database on the server side to cache frequently accessed session data, reduce the query pressure on the main database, and accelerate the data reading speed.
[0082] When performing database sharding storage, sharding by time is to disperse the data and store it in different tables according to the creation time or update time of the session; for example, new tables can be created monthly or weekly to store data, which is not only convenient for data management but also can improve query efficiency. This type of sharding mode is mainly for the situation where there are few users and the system is used frequently.
[0083] Sharding by the number of users is to migrate the data to a new table when the data volume of a single user reaches a custom threshold. This helps to balance the data volume of each table and avoid performance bottlenecks caused by a too large single table. This type of sharding mode is mainly for the situation where there are many users and the system is single.
[0084] Step S4: Use the Power UI interface development tool suite for visual data analysis;
[0085] In the Power BI Desktop tool, connect to the rrweb data source through the Get Data function;
[0086] Clean the rrweb data using the Power Query editor, including removing duplicates, handling missing values, and converting data types; perform custom transformations on the data according to the analysis requirements, such as converting timestamps to datetime formats and classifying event types; establish a data model in the Power BI tool, set the relationships between tables, and lay the foundation for subsequent data analysis;
[0087] Analyze the user click, scroll, and input behavior patterns through the DAX functions and visualization tools of the Power BI tool, and identify high-frequency operations and inefficient paths;
[0088] Utilize the loading time and response time information in the rrweb data to evaluate page performance and identify performance bottlenecks;
[0089] Combine machine learning algorithms to detect abnormal user behaviors, including frequent refreshes and abnormal clicks;
[0090] According to the analysis results, design a dashboard containing key performance indicators (KPIs), and the key indicators include user activity, page dwell time, and the number of abnormal behaviors;
[0091] According to the data type and analysis purpose, custom-select appropriate chart types, such as bar charts, line charts, pie charts, maps, etc., and organize the analysis results into a report for unified export.
[0092] Since the rrweb data may be stored in JSON format, in step S4, select a connector that supports JSON or directly access the AP using a web connector, import the rrweb data into the Power BI Desktop tool, and perform a preliminary preview to ensure data integrity and accuracy.
[0093] The rrweb-based website user behavior record analysis system includes:
[0094] The front-end recording module is to embed a packaged plugin (packaged based on rrweb and user behavior analysis requirements) in the web page or application, which is responsible for capturing the operation behaviors of the user's specified area in real time, including mouse clicks, scrolls, keyboard inputs, and page changes, and recording the captured data as a snapshot stream incrementally, and synchronously recording the information of the user's operations;
[0095] The data transmission module is responsible for compressing and encrypting the data recorded by the front end and sending it to the server through an HTTP request;
[0096] The back-end storage module is responsible for encrypting and storing the data received by the server according to the specified data structure, including video data and related behavior record data; A data review module, responsible for analyzing the extracted video information data using natural language processing technology;
[0098] An analysis and display module, responsible for providing a simple operation interface for displaying the analysis results and playing back user behaviors, so as to be subsequently integrated into the business system for independent use.
[0099] This rrweb-based website user behavior record analysis device includes a memory and a processor; the memory is used to store computer programs, and the processor is used to implement the above method steps when executing the computer programs.
[0100] A computer program is stored on this readable storage medium, and the computer program implements the above method steps when executed by a processor.
[0101] Compared with the prior art, this rrweb-based website user behavior record analysis method has the following characteristics:
[0102] First, it has a fast response speed in a high-concurrency environment, can quickly implement the screen recording and playback services, and can ensure that the original business system process is not affected.
[0103] Second, it considers the data accuracy and database stability in data landing, ensuring high reliability and high availability in system use and service provision.
[0104] Third, it considers the network security requirements in network transmission. Through the gateway for reverse proxy and security encryption technology, it ensures the traffic control and secure access mechanism of the application, and improves the stability and reliability of the model.
[0105] Fourth, it refers to the leading algorithms and technologies at home and abroad in technology use, ensuring the high availability and feasibility of data processing logic.
[0106] The above-described embodiments are only one of the specific implementation manners of the present invention. The ordinary changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.< / uuid> < / uuid>
Claims
1. A method for analyzing website user behavior records based on rrweb, characterized in that: It includes the following steps: Step S1: Rewrite the rrweb initialization method; On the basis of rrweb, rewrite the initialization process. While the init method is executed, obtain user information, and at the same time perform non-standard serialization processing, including data processing and information encryption, and add a watermark identifier; Step S2: Package a unified plugin to reduce docking development; Repackage rrweb into a ready-to-use plugin based on the B / S architecture system. The plugin includes functions such as initialization, recording, playback, stopping recording, and data uploading, and is exposed to the outside through the API of the plugin, thus simplifying docking development; The entire plugin uses asynchronous threads for recording, which does not affect the business logic of the original system. At the same time, provide a set of unified interfaces for the plugin, including an initialization interface, a start recording interface, a stop recording interface, and a playback interface. External developers can implement the functions of rrweb by simply calling these interfaces without caring about the internal implementation details; Step S3: Add a caching mechanism and database sub-table storage to improve efficiency; Add a caching mechanism and database sub-table storage strategy in the rrweb service. Among them, the caching mechanism is divided into front-end caching and back-end caching; for database sub-table storage, there are two modes: sub-table by time and sub-table by user volume, which are applicable to two different types of scenarios; Step S4: Use the Power UI interface development tool suite for visual data analysis; In the Power BI Desktop tool, connect to the rrweb data source through the Get Data function; Use the Power Query editor to clean the rrweb data, including removing duplicates, handling missing values, and converting data types; according to the analysis requirements, perform custom conversions on the data; establish a data model in the Power BI tool, set the relationships between tables, and lay a foundation for subsequent data analysis; Analyze the user click, scroll, and input behavior patterns through the DAX functions and visualization tools of the Power BI tool to identify high-frequency operations and inefficient paths; Use the loading time and response time information in the rrweb data to evaluate the page performance and identify performance bottlenecks; Combine machine learning algorithms to detect abnormal user behaviors, including frequent refreshing and abnormal clicks; According to the analysis results, design a dashboard containing key performance indicators (KPIs). The key indicators include user activity, page stay time, and the number of abnormal behaviors; According to the data type and analysis purpose, custom-select the chart type, and organize the analysis results into a report for unified export.
2. The method for analyzing website user behavior records based on rrweb according to claim 1, wherein: In the said Step S1, the process of rewriting the rrweb initialization method is as follows: Step S1.1: After receiving a recording request, start executing the processing logic of the init method in rrweb, which includes 3 methods, namely the takeFullSnapshot method, the observe method, and the getUserInfo method; Among them, the takeFullSnapshot method is used to obtain a full snapshot of the document, which serves as the basis for subsequent incremental snapshots. First, it emits a meta meta-information, and then executes the snapshot(document, {...}) method, traversing the entire document tree, creating a unique ID for each node and serializing it, maintaining it in the mapping of the mirror reflection object; The observe method is used to initialize various listeners. First, it encapsulates an event with wrapEvent to create a payload with a timestamp, and then executes the wrappedEmit function. The wrappedEmit function wraps the emit sending method passed in from the outside, that is, passing the payload with a timestamp as a parameter to the emit sending method written by the developer used by rrweb; The getUserInfo method is used to initialize the current user information, obtain the information of the user in the current session, and record the current browser information. The system timestamp together forms a user node and is serialized, and is transmitted to the backend together with the screen recording content for subsequent targeted analysis of users and data verification; Step S1.2: After the screen recording ends, perform non-standard serialization processing, which is divided into the following two aspects: Perform de-scripting processing on the information to ensure that all JavaScript in the recorded page is not executed, record the view state not reflected in the HTML, and convert relative paths to absolute paths; Use "current timestamp + IP information + user unique identifier UUID" as the unique flag of the video and splice it with the screen recording data, and use the AES encryption method to perform symmetric encryption on the recorded data.
3. The rrweb-based website user behavior record analysis method according to claim 1, characterized in that: In the step S2, the initialization interface input parameter is <userId.systemId>, that is, the system secret key assigned to the user ID, and the return value is the initialization status status; The start recording interface input parameters are <dom, type, limit>, that is, the node, recording type, and duration. The recording type includes automatic stop and manual stop at a time period, and the return is the unified identifier assigned to the current screen recording process; The input parameters of the stop recording interface are <uuid>, that is, the screen recording process identifier, and the return value is the initialization status status;< / uuid> The playback interface input parameters are <usrId, startTime, endTime, systemId>, that is, the user ID, start time, end time, and assigned system secret key, and the return value is the list of screen recording playback addresses.
4. The rrweb-based website user behavior record analysis method according to claim 1, characterized in that: In the step S3, the front-end cache refers to using the browser's LocalStorage or IndexedDB client storage technology to temporarily store user operation data; when the network condition is poor or temporarily offline, capture user operations and synchronize them to the server later; The back-end cache is to deploy a Redis or Memcached in-memory database on the server side to cache frequently accessed session data, reduce the query pressure on the main database, and accelerate the data reading speed. When storing data in sub - tables of a database, table partitioning by time distributes data to different tables according to the creation time or update time of the session; Table partitioning by the number of users migrates data to a new table when the data volume of a single user reaches a custom threshold.
5. The method for analyzing website user behavior records based on rrweb according to claim 1, characterized in that: In step S4, select a connector that supports JSON or directly access the AP using a Web connector, import rrweb data into the PowerBI Desktop tool, and perform a preliminary preview to ensure data integrity and accuracy.
6. A website user behavior record analysis system based on rrweb, characterized in that: It includes: The front - end recording module embeds the encapsulated plugin in a web page or application, and is responsible for capturing the operation behaviors of the specified area of the user in real - time, including mouse clicks, scrolling, keyboard input, and page changes, and records the captured data as a snapshot stream in an incremental manner, and synchronously records the information of the user's operations; The data transmission module is responsible for compressing and encrypting the data recorded by the front - end, and sending it to the server through an HTTP request; The back - end storage module is responsible for encrypting and storing the data received by the server according to the specified data structure, including video data and related behavior record data; The data review module is responsible for analyzing the extracted video information data using natural language processing technology; The analysis and display module is responsible for providing a simple operation interface for displaying the analysis results and playing back the user's behaviors, so as to be subsequently integrated into the business system for separate use.
7. A device for analyzing website user behavior records based on rrweb, characterized in that: It includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method steps described in any one of claims 1 to 5 when executing the computer program.
8. A readable storage medium, characterized in that: A computer program is stored on the readable storage medium, and when the computer program is executed by the processor, the method steps described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method for collecting behavior data of website user
CN107797908A
Method, device and equipment for analyzing user operation behaviors and storage medium
CN112527748A
Test data recording method and device
CN115629968A
Website monitoring system with page recording function
CN117555755A