Spectrogram visualization method for user behavior logs
By using spectral visualization, the problem of unclear module structure and operation frequency in user behavior logs was solved, and a clear expression of module hierarchy and operation influence relationship was achieved, thus improving the efficiency of behavior analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2025-08-26
- Publication Date
- 2026-04-28
AI Technical Summary
Existing user behavior log visualization methods fail to effectively express module structure hierarchy, operation frequency, and inter-module influence relationships, resulting in chaotic behavior paths and low analysis efficiency.
The spectral visualization method is adopted. By grouping operation modules, setting module hierarchy scale and color mapping, drawing operation nodes, connections and arrows, and combining the Box area to display the operation frequency, the module structure and influence relationship are clearly expressed.
It improves the readability of behavioral processes, highlights high-frequency operation areas, helps analysts understand operational relationships, and supports expert path modeling and interaction strategy optimization.
Smart Images

Figure CN121187898B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data visualization technology, and in particular relates to a method for visualizing spectral graphs of user behavior logs. Background Technology
[0002] User behavior logs are a crucial data format for recording user actions within information systems, widely used in practical scenarios such as visual analytics platforms, interactive task systems, and intelligent decision support platforms. These logs meticulously record the types, objects, and time sequences of user actions across multiple modules or views, allowing for the reconstruction of user interaction paths and strategies during complex task completion. Systematic visual analysis of user behavior logs enables the tracking of user workflows, identification of key behavioral nodes and interaction bottlenecks, thereby assisting developers in optimizing interface layouts and functional guidance flows. Furthermore, the operational paths and behavioral characteristics contained within the logs can be used to extract expert experience, construct behavioral templates, and implement functions such as path recommendation, experience transfer, and novice assistance. Therefore, user behavior logs hold significant application value in improving system usability, understanding user behavior patterns, and supporting human-computer collaboration.
[0003] Currently, the visualization and analysis of user behavior logs typically employs timeline charts, operation flow diagrams, or path trees to present the behavior process in a time-series or structured manner. While these methods support basic operation backtracking, they still have several shortcomings in expressing the hierarchical structure of behavior and the dependencies between modules in complex interactive tasks. First, existing methods generally do not explicitly model the module or interface structure to which an operation belongs; all operation nodes are displayed uniformly on the same layer, lacking a module layering mechanism. This makes it difficult to present cross-module behavior paths in a segmented manner, resulting in an unclear structural logic of the overall behavior flow. Second, operation nodes are usually drawn using a uniform style, ignoring the differences in operation frequency across different modules. The lack of frequency-aware visual representation makes it difficult to effectively highlight high-frequency operation areas, reducing analysis efficiency. Furthermore, most existing methods only depict the operation events themselves, failing to express the relationships between operations or their impact on other modules. This makes it difficult for analysts to understand the role and overall context of operation behaviors in the task execution process.
[0004] The aforementioned problems pose practical obstacles in tasks such as expert path modeling, behavior pattern recognition, and user operation analysis. Therefore, there is an urgent need for a user behavior log visualization method that supports module structure layering, operation frequency expression, and modeling of the influence relationship between modules. Summary of the Invention
[0005] The purpose of this invention is to provide a spectral visualization method for user behavior logs, in order to solve the problems of missing module structure, unclear operation frequency, and difficulty in expressing the influence relationship between operations in existing user behavior log visualization methods.
[0006] The technical solution adopted in this invention is a spectral visualization method for user behavior logs, the steps of which include:
[0007] Step S1: Obtain user behavior log sequence data and perform preprocessing;
[0008] Step S2: Based on the behavior log sequence data in S1, determine the coordinate axis scale of the spectral graph and the color mapping of the operation type;
[0009] Step S3: Visualize the connection between the operation nodes and the operation modules;
[0010] Step S4: Draw the impact arrows of the operation module.
[0011] Step S5: Draw the Box area of the spectrum.
[0012] Furthermore, the specific steps of S1 are as follows:
[0013] S11, based on the user name and sequence identifier, obtain the unique user behavior log sequence data corresponding to each module. ,in, Indicates the first Each independent user interaction event This indicates the number of operation events in a module;
[0014] S12, user behavior log sequence data Operation events in the system are categorized according to the set of operation modules. The module name field in the code is grouped to create an initial group set, as follows:
[0015]
[0016] in, This represents the initial group set of the operation module. Indicates the first Each operation module Represents the set of operation modules The total number of operation modules in the middle, Indicates the first The name of the operation module to which each operation event belongs;
[0017] S13, Predefine a list of drawing order for operation modules. For sets The modules in the data are filtered and rearranged to obtain an ordered set of module groups. The details are as follows:
[0018]
[0019] in, This indicates the first item in the predefined operation module drawing order list. Each operation module The operation module is indicated as The set of all operation events, List of drawing order for operation modules The number of modules in Represents the set of operations The total number of modules.
[0020] Furthermore, the specific steps of S2 are as follows:
[0021] S21, Determine the time scale of the X-axis of the spectral graph from user behavior log sequence data. In the process, extract the operationTime field for each operation event to determine the global time range. Then, based on the global time range, the effective plotting area width of the spectral plot is determined as follows: Construct a time-linear scale Map the timestamp to the x-axis of the spectrum plot using the following formula:
[0022]
[0023]
[0024]
[0025]
[0026] in, This indicates the earliest occurrence time among all operation events. This indicates the occurrence time of the latest event among all operation events. Indicates the first The occurrence time of each operation event Indicates the starting coordinates of the effective plotting area on the X-axis. This indicates the end coordinates of the valid plotting area on the X-axis. Indicates the first One operation event This indicates the number of operation events in a module;
[0027] S22, determine the module hierarchy scale of the Y-axis of the spectral plot, based on the ordered module grouping set in S13. Calculate the number of operations for each module in the set of operation modules, and determine the height range of the effective plotting area of the spectral graph as [Y]. top ,Y bottom ], Construction module hierarchy scale Map the operands to the y-axis of the spectral plot, as follows:
[0028]
[0029]
[0030]
[0031] in, This represents the total number of operation events across all modules in the spectral graph. List of drawing order for operation modules The number of modules in express The Middle The number of operation events in each module This represents the initial set of groups for operation events. The first in the drawing order list V of the operation module Each operation module This indicates the top coordinate of the valid plotting area on the Y-axis. This indicates the bottom coordinates of the effective drawing area on the Y-axis.
[0032] S23, Determine the color mapping for the spectral plot operation type from user behavior log sequence data. In the process, extract the operation type field (operationType) for each operation event to obtain the operation type set. Then construct a color scale. This maps the operation type to a set of color values, as follows:
[0033]
[0034]
[0035]
[0036] in, Different colors are represented by predefined color arrays; Indicates the first Operation type of each operation event This represents the total number of operation events in a module. This indicates a "click" operation. This indicates the "import" operation. This indicates a "modify" operation.
[0037] Furthermore, the specific steps of S3 are as follows:
[0038] S31, based on module-level scale Draw the horizontal lines for each module and calculate the top and bottom positions of each module using the following formula:
[0039]
[0040]
[0041]
[0042]
[0043] in, This indicates the index of the current module in the drawing order list V of the operation modules. Indicates to index, This indicates the position of the top of the module on the Y-axis. This indicates the position of the bottom of the module on the Y-axis. Indicates the spacing between modules. Indicates the first Number of operations per module This indicates the center position of the module on the Y-axis. Indicates the first The height of each module;
[0044] S32, based on a time-linear scale Draw the operation nodes, determine the horizontal and vertical coordinates of the nodes based on the time of the operation event, and use the color scale. Determine the color of each node The formula is as follows:
[0045]
[0046]
[0047]
[0048] in, Indicates operation event The time of occurrence, , Indicates operation event The horizontal and vertical coordinates of the occurrence Indicates operation event Type;
[0049] Repeat steps S31-S32 until the user behavior log sequence data is obtained. All operation events have been traversed;
[0050] S33, draw the connection between operation event nodes, and determine the user behavior log sequence data based on S32. Current event node and the next event node The position is determined, and then the length of the connecting line and the rotation angle are calculated using the following formula:
[0051] ,
[0052] ,
[0053]
[0054]
[0055] in, , Represents the x and y coordinates of the current node. , Indicates the x and y coordinates of the next node. Indicates the current operation event The time of occurrence, Indicates the current operation event At the center position on the Y-axis Indicates the next operation event At the center position on the Y-axis, This represents the length of the line connecting the two nodes. Indicates the angle of inclination of the connecting line. This represents the arctangent function.
[0056] Furthermore, in step S4, the starting point of each arrow is first determined, and then the length, orientation, and rotation angle of the arrow are determined, using the following formula:
[0057]
[0058]
[0059] in, , The x and y coordinates represent the endpoint of the arrow. Indicates the length of the arrow. Indicates the rotation angle of the arrow. , This represents the horizontal and vertical coordinates of the current node, with the arrow pointing to the horizontal line at the center of the module affected by the operation corresponding to this node.
[0060] Furthermore, the specific steps of S5 are as follows:
[0061] S51, according to the module hierarchy scale Directly determine the top edge position of each module rectangle Box. With the lower edge position Calculate the height of the Box Then, based on the overall layout of the spectral graph, the horizontal starting position of each box is set. and width ;
[0062] S52 divides the Box into left and right parts. The left side is used to draw the operation type identifier node, and the right side is used to draw the name of the corresponding module. Set the text width threshold for the name. Any portion exceeding the threshold is pruned, and an ellipsis is added at the end as a hint. The node color is determined by the color scale S. color Perform mapping;
[0063] S53, based on the frequency of occurrence of each operation type within the module, analyze the current set of operation types. Sort the data, and let the operation type of the i-th operation event in the current module be... If the frequency of occurrence is f, then the frequency set is:
[0064]
[0065] The current module's operation type set is sorted by frequency of operation events from highest to lowest. The elements in the sequence are reordered to obtain the operation type sequence. Based on this, draw operation type identifier nodes sequentially within the Box. Each identifier node is represented by a circle with a radius of r and a horizontal spacing of d between nodes. Let the width of the left-side region inside the Box be... Therefore, the maximum number of nodes that each row can hold is:
[0066]
[0067] sequence In the diagram, the x and y coordinates of the node corresponding to the i-th operation event are as follows:
[0068]
[0069]
[0070]
[0071] in, , This represents the x and y coordinates of the node corresponding to the i-th operation event. This represents the column number of the node corresponding to the i-th operation event in its row. This represents the row number of the node corresponding to the i-th operation event. This indicates the maximum number of nodes that can be placed in each row. The horizontal starting position is indicated (the specific value can be set according to specific needs). Indicates taking the integer part. Indicates modulo, This indicates the center position of the module on the Y-axis.
[0072] Furthermore, the shape of the node can be replaced with a custom regular geometric shape or an irregular shape.
[0073] The beneficial effects of this invention are:
[0074] 1. This invention can clearly display the module where the user's operation is located, avoiding path confusion caused by different operations being mixed at the same level, and improving the readability of the behavior flow.
[0075] 2. This invention can adjust the layer height through a frequency mapping mechanism and the number of operations in the module, highlighting high-frequency operation areas and helping analysts identify key behaviors.
[0076] 3. This invention supports expressing the impact path of operations on other modules, which helps to understand the relationship between key operations and modules in a task, and facilitates the extraction of expert paths and optimization of interaction strategies. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 This is a flowchart of the spectrum plotting process of the present invention.
[0079] Figure 2 This is a visualization of the behavior log spectrum in the multi-source trajectory association analysis task of this invention, where (a) is the complete visualization and (b) is an enlarged view of the Box portion.
[0080] Figure 3This is a detailed diagram illustrating the "change" operation of this invention.
[0081] Figure 4 This is a visualization of the "Change" operation node information and its influence relationship in the option view of this invention.
[0082] Figure 5 This is a visualization of the behavior log spectrum in the ship loading and unloading event analysis task of this invention. Detailed Implementation
[0083] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0084] Example
[0085] Embodiments of the present invention provide a method for visualizing spectral graphs of user behavior logs. The process of drawing the spectral graph is as follows: Figure 1 As shown, the steps include:
[0086] Step S1: Obtain user behavior log sequence data (in the interactive visual analytics system, the system records user operation behavior logs and saves them as user behavior log sequence data), and perform preprocessing as follows:
[0087] S11, based on the user name and sequence identifier, obtain the unique user behavior log sequence data corresponding to each module. ,in, Indicates the first Each independent user interaction event This represents the number of operation events in a module, and each user behavior log sequence data. Depend on It consists of several operation events, and each independent user interaction operation event includes the following important fields:
[0088] moduleName: Indicates the name of the main module to which this operation belongs, used for behavior grouping and layer affiliation;
[0089] operationType: Indicates the type of operation, such as import, click, modify, etc.;
[0090] operationTime: Indicates the time when the operation occurred;
[0091] operationData: Represents the data involved in this operation;
[0092] affectedModule: Indicates other modules affected by this operation, serving as an important reference for inter-module dependencies;
[0093] S12, user behavior log sequence data Operation events in the system are categorized according to the set of operation modules. The module name field in the code is grouped to create an initial group set, as follows:
[0094]
[0095] in, This represents the initial group set of the operation module. Indicates the first Each operation module Represents the set of operation modules The total number of operation modules in the middle, Indicates the first The name of the operation module to which the operation event belongs.
[0096] S13, Predefine a list of drawing order for operation modules. ( yes an ordered subset ≤ ) for sets The modules in the data are filtered and rearranged to obtain an ordered set of module groups. This is used to drive the layout generation of layers in the spectral diagram; the drawing order list of the operation module. The modules in the image are those selected by the user to be displayed in the spectral diagram. The order of the modules is based on their influence relationships (e.g., operating module A will cause changes in modules B, C, and D; operating module B will cause changes in modules C and D; operating module C will cause changes in module D, then the influence relationships of the modules are as follows). ), Specifically as follows:
[0097]
[0098] in, This indicates the first item in the predefined operation module drawing order list. Each operation module The operation module is indicated as The set of all operation events, List of drawing order for operation modules The number of modules in Represents the set of operations The total number of modules.
[0099] Step S2, based on the behavioral log sequence data of S1, determines the coordinate axis scale of the spectral plot and the color mapping of the operation type. The specific steps are as follows:
[0100] S21, Determine the time scale of the X-axis of the spectral graph from user behavior log sequence data. In the process, extract the operationTime field for each operation event to determine the global time range. Then, based on the global time range, the effective plotting area width of the spectral plot is determined as follows: Construct a time-linear scale Map the timestamps to the horizontal axis of the spectral plot, as follows:
[0101]
[0102]
[0103]
[0104]
[0105] in, This indicates the earliest occurrence time among all operation events. This indicates the occurrence time of the latest event among all operation events. Indicates the first The occurrence time of each operation event Indicates the starting coordinates of the effective plotting area on the X-axis. This indicates the end coordinates of the valid plotting area on the X-axis. Indicates the first One operation event This indicates the number of operation events in a module.
[0106] S22, determine the module hierarchy scale of the Y-axis of the spectral plot, based on the ordered module grouping set in S13. Calculate the number of operations for each module in the set of operation modules to determine the effective plotting area height range of the spectral plot as [Y]. top ,Y bottom ], Construction module hierarchy scale Map the operands to the y-axis of the spectral plot, as follows:
[0107]
[0108]
[0109]
[0110] in, This represents the total number of operation events across all modules in the spectral graph. List of drawing order for operation modules The number of modules in express The Middle The number of operation events in each module This represents the initial set of groups for operation events. The first in the drawing order list V of the operation module Each operation module This indicates the top coordinate of the valid plotting area on the Y-axis. This indicates the bottom coordinates of the effective drawing area on the Y-axis.
[0111] S23, Determine the color mapping for the spectral plot operation type from user behavior log sequence data. In the process, extract the operation type field (operationType) for each operation event to obtain the operation type set. Then construct a color scale. This maps the operation type to a set of color values, as follows:
[0112]
[0113]
[0114]
[0115] in, Different colors are represented by predefined color arrays; Indicates the first Operation type of each operation event This represents the total number of operation events in a module. This indicates a "click" operation. This indicates the "import" operation. This indicates a "modify" operation.
[0116] Step S3: Visualize the connections between operation nodes and modules. The more operation events a module contains, the higher the layer of the drawing should be. The specific steps are as follows:
[0117] S31, based on module-level scale Draw the horizontal lines for each module and calculate the top and bottom positions of each module using the following formula:
[0118]
[0119]
[0120]
[0121]
[0122] in, This indicates the index of the current module in the drawing order list V of the operation modules. Indicates to The index, initially set to 1, This indicates the position of the top of the module on the Y-axis. This indicates the position of the bottom of the module on the Y-axis. Indicates the spacing between modules. Indicates the first Number of operations per module This indicates the center position of the module on the Y-axis. Indicates the first The height of each module.
[0123] After obtaining the horizontal line Y-axis position of each operation module through the above calculation, the horizontal lines corresponding to each module can be drawn. These horizontal lines start from the left side of the spectrum and span the entire drawing area, covering all modules and clearly showing the layout relationship between modules.
[0124] S32, based on a time-linear scale Draw the operation nodes, determine the horizontal and vertical coordinates of the nodes based on the time of the operation event, and use the color scale. Determine the color of each node The formula is as follows:
[0125]
[0126]
[0127]
[0128] in, Indicates operation event The time of occurrence, , Indicates operation event The horizontal and vertical coordinates of the occurrence Indicates operation event The type.
[0129] Repeat steps S31-S32 until the user behavior log sequence data is obtained. All operation events have been traversed.
[0130] S33, Draw the connection between operation event nodes. First, determine the user behavior log sequence data based on S32. Current event node and the next event node The position of each line is determined by its starting and ending points. Then, the length of the line and the rotation angle are calculated using the following formula:
[0131] ,
[0132] ,
[0133]
[0134]
[0135] in, , Represents the x and y coordinates of the current node. , Indicates the x and y coordinates of the next node. Indicates the current operation event The time of occurrence, Indicates the current operation event At the center position on the Y-axis, Indicates the next operation event At the center position on the Y-axis, This represents the length of the line connecting the two nodes. Indicates the angle of inclination of the connecting line. This represents the arctangent function.
[0136] Step S4: Draw the module influence arrows. First, determine the starting point of each arrow, which is the position of the current node. Then, determine the length, direction (a horizontal line pointing to the center of the module affected by the operation corresponding to that node), and rotation angle of the arrow, as shown in the following formula:
[0137]
[0138]
[0139] in, , The x and y coordinates represent the endpoint of the arrow. Indicates the length of the arrow. Indicates the rotation angle of the arrow. , Represents the horizontal and vertical coordinates of the current node (i.e., the starting position).
[0140] Step S5: Draw the Box area of the spectral graph. The specific steps are as follows:
[0141] S51, according to the module hierarchy scale Directly determine the top edge position of each module rectangle Box. (i.e., the top position of the module) and the bottom edge position (i.e., the bottom position of the module), calculate the height of the Box. (i.e., module height), and then, in conjunction with the overall layout of the spectral graph, set the horizontal starting position and width of each Box. The width can be adaptively set according to the width of the display window. The Box is... Figure 2 and Figure 5 The blue background part.
[0142] S52 divides the Box into left and right parts. The left side is used to draw the operation type identifier node, and the right side is used to draw the name of the corresponding module. Set the text width threshold for the name. Any portion exceeding the threshold is pruned, and an ellipsis is added at the end as a hint. The operation type identifier node is used to represent the set of operation types contained in the current module. ,in This refers to the complete set of operation types defined in step 2.
[0143] S53, based on the frequency of occurrence of each operation type within the module, analyze the current set of operation types. Sort the events to improve the orderliness of event presentation and the effectiveness of analysis and perception. Let the operation type of the i-th operation event in the current module be... If the frequency of occurrence is f, then the frequency set is:
[0144]
[0145] The current module's operation type set is sorted by frequency of operation events from highest to lowest. The elements in the sequence are reordered to obtain the operation type sequence. Accordingly, operation type identifier nodes are drawn sequentially in the Box. In this embodiment, each identifier node is represented by a circle (which can be replaced by a rhombus, matrix, or other regular or irregular shape), with a node radius of r and a horizontal spacing between nodes of d. The width of the left-side area inside the Box is set to r. Therefore, the maximum number of nodes that each row can hold is:
[0146]
[0147] sequence In the diagram, the x and y coordinates of the node corresponding to the i-th operation event are as follows:
[0148]
[0149]
[0150]
[0151] in, , This represents the x and y coordinates of the node corresponding to the i-th operation event. This represents the column number of the node corresponding to the i-th operation event in its row. This represents the row number of the node corresponding to the i-th operation event. This indicates the maximum number of nodes that can be placed in each row. The horizontal starting position is indicated (the specific value can be set according to specific needs). Indicates taking the integer part. Indicates modulo, This indicates the center position of the module on the Y-axis.
[0152] Node colors are determined by color scale S color Perform mapping, and only if the node's y-coordinate satisfies Only when the node is fully visible within the module's representation area can it be drawn, where padding represents the spacing between the node and the bottom of the Box. This indicates the position of the bottom edge of the module.
[0153] In this way, the module representation area not only visually marks the module boundaries and names, but also integrates operation type statistics and coding information, providing users with a clear and orderly overview of module behavior.
[0154] Experimental verification
[0155] I. Taking a user's analysis task executed in a multi-source trajectory correlation analysis platform as an example:
[0156] The spectral plot method proposed in this invention is used to visualize user operation logs. This task covers several key modules, including "Option View," "Automatic Association List of Multi-Source Trajectories," "Trajectory Influence Feature Option View," "Trajectory Projection Plot," "Trajectory Feature Information List," "Trajectory Point Visualization Plot," and "Trajectory Feature Statistical Chart Option View." The user performed 42 operations during the task. The log fully records the module affiliation, operation type, operation target, influencing module, and time information for each operation event. The final visualization result is as follows: Figure 2As shown in (a) and (b) therein, where (a) is a visualization graph of the behavior log spectrogram in the complete multi-source trajectory association analysis task, and (b) is an enlarged view of the Box part. In the figure, each layer vertically represents an operation module, the horizontal direction represents the operation timeline, each circular node represents an operation behavior, the color of the node encodes the operation type according to the legend, the node density reflects the speed of operation frequency, and the stacking phenomenon reveals the existence of concentrated operations at a certain moment. The module representation area is located on the left side of each module line, where the module name and the types of operation types are presented, facilitating the observer to quickly grasp the module content and behavior overview.
[0157] It can be observed from the spectrogram that the user initiates an operation from the "Option View" module and activates multiple downstream modules through the "Introduction" behavior, including the "Multi-source Trajectory Automatic Association List", "Trajectory Projection Map", "Trajectory Point Visualization Map", etc., presenting a typical multi-module linkage initialization behavior. The operation arrows clearly show the direct impact of this operation on multiple modules, verifying the support of the present invention for the modeling and expression ability of cross-module dependency relationships.
[0158] In addition, in the entire behavior path, the operation nodes of the "Trajectory Point Visualization Map" module are the most dense, and the corresponding layer is significantly higher in height in the figure than other modules, indicating a very high operation frequency. This structure visually reflects that the user has invested the most interactive behaviors in this module, indicating that this module承担了主要的信息获取与验证功能 in the current analysis task. For example, the user has performed multiple "Change" operations in this module, and the detailed information of the "Change" operation is as Figure 3 shown. By viewing the detailed information of these operations, it can be found that the user has adjusted details such as the feature mapping method, coloring strategy, and color matching parameters multiple times, which reflects the user's high attention and multiple adjustments to the trajectory point visualization result. This not only reveals the importance of this module in the task but also provides a basis for interface optimization and function enhancement of the system. For example, intelligent recommendation settings can be preferentially configured for this module to better serve the user analysis process.
[0159] Furthermore, obvious dependency chains are formed by arrows between multiple "Change"-type operation nodes in the spectrogram, such as Figure 4As shown, it particularly appears concentratedly between the "Options View" and downstream modules. This type of operation usually represents parameter setting or algorithm selection, with strong control and a wide range of influence. From the data, it can be seen that when users perform "change" operations, the scope of influence often covers multiple modules. For example, adjusting the color mapping method will simultaneously affect the presentation effects of modules such as the "Trajectory Projection Map", "Trajectory Point Visualization Map", "Trajectory Feature Radar Map", and so on. This operation chain centered around the "change" node clearly shows the synchronous influence of users on multiple modules during the parameter adjustment process, reflecting the step-by-step exploration method of users in the task, namely "adjust settings - observe changes - further optimize". Through the visual presentation of such high-frequency influence behaviors, the system can help analysts more accurately identify key operation points and understand the user's strategic path.
[0160] This analysis task verifies the adaptability and expression effect of the spectral diagram method of the present invention in multi-module and multi-type operation scenarios. Compared with the traditional linear time series display method, through the module layering and frequency mapping mechanism, the present invention clearly reveals the core position of the "Trajectory Point Visualization Map" module in the task, effectively highlighting the key points of analysis. At the same time, the operation arrows clearly express the influence path between option operations and the result view, making the strategic process of user operations clear at a glance, significantly improving the structural readability of the interaction process and the efficiency of behavior analysis.
[0161] Second, taking an analysis task performed by a user in the ship loading and unloading event analysis platform as an example:
[0162] Use the spectral diagram method proposed by the present invention to visually express the user operation log. This task involves multiple core modules such as the "Ship Event List View", "Map Drawing Settings View", "Map View", and "Statistical Chart View". During the operation process, the user successively completed tasks such as data selection, trajectory import, visual style setting, map navigation, and statistical verification, with a total of 31 operations performed. The behavior log completely records the module attribution, type, operation object, affected module, and time information of each operation event, and finally generates a spectral diagram as Figure 5 shown.
[0163] The following characteristic information can be observed from the spectral diagram:
[0164] First, the user operation path starts from the "Ship Event List View" module. Through the "select" operation, it triggers the response update of multiple downstream modules, constituting a typical linkage behavior in the task initialization stage. Subsequently, the user repeatedly performs "introduce" and "change" operations in the "Map Drawing Settings View" to adjust the trajectory range, style details, and information screening conditions presented on the map. These operations are transmitted to the "Map View" and "Statistical Chart View" through multiple arrow influence paths, reflecting the user's multi-round control behavior of layer styles and spatio-temporal ranges.
[0165] Secondly, the "change" and "introduce" operations were frequent in this task, and all occurred within the "Map Drawing Settings View" module, resulting in this module having a high visibility level in the spectral graph. This intensive operation phenomenon indicates that users pay close attention to style and parameter adjustments, and that their changes have a synchronous impact on multiple modules, reflecting a typical analysis path of "controlling parameters—observing multiple modules—optimizing results."
[0166] Furthermore, in the "Statistical Chart View" module, users performed multiple "change" operations on the event time bar chart, selecting or deselecting specific event nodes, triggering frequent linked adjustments to the map view. The spectral graph shows that most of these operation nodes have arrows pointing towards the "Map View" module, indicating that "change operations" in the "Statistical Chart View" trigger linked updates to related content on the map. This means that interactions within this module significantly impact the map module, demonstrating a strong dependency between modules. Users also frequently performed "navigation" operations (including zooming and panning) in the "Map View," combined with chart selection and adjustments, forming a closed-loop behavioral sequence of "chart positioning—map verification."
[0167] This analysis demonstrates that the method of this invention can still effectively reveal the interaction density and operational relationships of key modules in task scenarios with a small number of modules and short operation paths. Especially in the high-frequency operations of the "Map Drawing Settings View" and "Statistical Chart View," the spectral graph accurately reflects the dependency links between control parameters and result observations, supporting users in reconstructing and analyzing behavioral strategies, thus showcasing the practical value of this invention in module dependency mining and user intent understanding.
[0168] The two analysis tasks described above further illustrate the adaptability and expressiveness of the spectral plot method proposed in this invention in practical analysis tasks. It can not only accurately reveal the behavior frequency and dominant operation type of each module, but also intuitively display the strategic operation dependencies and interaction chains between modules, helping analysts understand the user behavior structure and task execution path.
[0169] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0170] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A method for visualizing spectral graphs of user behavior logs, characterized in that, The steps include: Step S1: Obtain user behavior log sequence data and perform preprocessing; Step S2: Based on the behavior log sequence data in S1, determine the coordinate axis scale of the spectral graph and the color mapping of the operation type; Step S3: Visualize the connection between the operation nodes and the operation modules; Step S4: Draw the influence arrows of the operation module; Step S5: Draw the Box area of the spectral graph; The specific steps of S1 are as follows: S11, based on the user name and sequence identifier, obtain the unique user behavior log sequence data corresponding to each module. ,in, Indicates the first Each independent user interaction event This indicates the number of operation events in a module; S12, user behavior log sequence data Operation events in the system are categorized according to the set of operation modules. The module name field in the code is grouped to create an initial group set, as follows: in, This represents the initial group set of the operation module. Indicates the first Each operation module Represents the set of operation modules The total number of operation modules in the middle, Indicates the first The name of the operation module to which each operation event belongs; S13, Predefine a list of drawing order for operation modules. For sets The modules in the data are filtered and rearranged to obtain an ordered set of module groups. The details are as follows: in, This indicates the first item in the predefined operation module drawing order list. Each operation module The operation module is indicated as The set of all operation events, List of drawing order for operation modules The number of modules in This indicates the drawing order list of the current module in the operation module. The index in.
2. The method for visualizing spectral graphs of user behavior logs according to claim 1, characterized in that, The specific steps of S2 are as follows: S21, Determine the time scale of the X-axis of the spectral graph from user behavior log sequence data. In the process, extract the operationTime field for each operation event to determine the global time range. Then, based on the global time range, the effective plotting area width of the spectral plot is determined as follows: Construct a time-linear scale Map the timestamp to the x-axis of the spectrum plot using the following formula: in, This indicates the earliest occurrence time among all operation events. This indicates the occurrence time of the latest event among all operation events. Indicates the first The occurrence time of each operation event Indicates the starting coordinates of the effective plotting area on the X-axis. This indicates the end coordinates of the valid plotting area on the X-axis. This indicates the number of operation events in a module; S22, determine the module hierarchy scale of the Y-axis of the spectral plot, based on S13. Calculate the number of operations for each module in the set of operation modules, and determine the height range of the effective plotting area of the spectral graph as [Y]. top ,Y bottom ], Construction module hierarchy scale Map the operands to the y-axis of the spectral plot, as follows: in, This represents the total number of operation events across all modules in the spectral graph. List of drawing order for operation modules The number of modules in express The Middle The number of operation events in each module This indicates the top coordinate of the valid plotting area on the Y-axis. This indicates the bottom coordinates of the effective drawing area on the Y-axis. S23, Determine the color mapping for the spectral plot operation type from user behavior log sequence data. In the process, extract the operation type field (operationType) for each operation event to obtain the operation type set. Then construct a color scale. This maps the operation type to a set of color values, as follows: in, Different colors are represented by predefined color arrays; Indicates the first Operation type of each operation event This indicates a "click" operation. This indicates the "import" operation. This indicates a "modify" operation.
3. The method for visualizing spectral graphs of user behavior logs according to claim 1, characterized in that, The specific steps of S3 are as follows: S31, based on module-level scale Draw the horizontal lines for each module and calculate the top and bottom positions of each module using the following formula: in, Indicates to index, This indicates the position of the top of the module on the Y-axis. This indicates the position of the bottom of the module on the Y-axis. Indicates the spacing between modules. Indicates the first Number of operations per module This indicates the center position of the module on the Y-axis. Indicates the first The height of each module; S32, based on a time-linear scale Draw the operation nodes, determine the horizontal and vertical coordinates of the nodes based on the time of the operation event, and use the color scale. Determine the color of each node The formula is as follows: in, Indicates operation event The time of occurrence, , Indicates operation event The horizontal and vertical coordinates of the occurrence Indicates operation event Type; Repeat steps S31-S32 until the user behavior log sequence data is obtained. All operation events have been traversed; S33, draw the connection between operation event nodes, and determine the user behavior log sequence data based on S32. Current event node and the next event node The position is determined, and then the length of the connecting line and the rotation angle are calculated using the following formula: , , in, , Represents the x and y coordinates of the current node. , Indicates the x and y coordinates of the next node. Indicates the current operation event The time of occurrence, Indicates the current operation event At the center position on the Y-axis Indicates the next operation event At the center position on the Y-axis This represents the length of the line connecting the two nodes. Indicates the angle of inclination of the connecting line. This represents the arctangent function.
4. The method for visualizing spectral graphs of user behavior logs according to claim 1, characterized in that, In step S4, the starting point of each arrow is first determined, and then the length, orientation, and rotation angle of the arrow are determined, as shown in the following formula: in, , The x and y coordinates represent the endpoint of the arrow. Indicates the length of the arrow. Indicates the rotation angle of the arrow. , This represents the horizontal and vertical coordinates of the current node, with the arrow pointing to the horizontal line at the center of the module affected by the operation corresponding to this node.
5. The method for visualizing spectral graphs of user behavior logs according to claim 1, characterized in that, The specific steps of S5 are as follows: S51, according to the module hierarchy scale Directly determine the top edge position of each module rectangle Box. With the lower edge position Calculate the height of the Box Then, based on the overall layout of the spectral graph, the horizontal starting position of each box is set. and width ; S52 divides the Box into left and right parts. The left side is used to draw the operation type identifier node, and the right side is used to draw the name of the corresponding module. Set the name text width threshold. Any portion exceeding the threshold is pruned, and an ellipsis is added at the end as a hint. The node color is determined by the color scale S. color Perform mapping; S53, based on the frequency of occurrence of each operation type within the module, analyze the current set of operation types. Sort the data, and let the operation type of the i-th operation event in the current module be... If the frequency of occurrence is f, then the frequency set is: The current module's operation types are categorized by frequency of occurrence, from highest to lowest. The elements in the sequence are reordered to obtain the operation type sequence. Based on this, draw operation type identifier nodes sequentially within the Box. Each identifier node is represented by a circle with a radius of r and a horizontal spacing of d between nodes. Let the width of the left-side region inside the Box be... Therefore, the maximum number of nodes that each row can hold is: sequence In the diagram, the x and y coordinates of the node corresponding to the i-th operation event are as follows: in, , This represents the x and y coordinates of the node corresponding to the i-th operation event. This represents the column number of the node corresponding to the i-th operation event in its row. This represents the row number of the node corresponding to the i-th operation event. This indicates the maximum number of nodes that can be placed in each row. Indicates the horizontal starting position. Indicates taking the integer part. Indicates modulo, This indicates the center position of the module on the Y-axis.
6. The method for visualizing spectral graphs of user behavior logs according to claim 5, characterized in that, The shape of the node can be replaced with a custom regular geometric shape or an irregular shape.