Low-intrusive user operation behavior acquisition system and method under QT framework

By designing a low-invasive user operation behavior acquisition system under the QT framework, using the top-level event filter and the dynamic library for operation behavior acquisition, the problem of difficulty in accurately capturing user operation behavior in the existing technology is solved, efficient and accurate operation behavior acquisition is achieved, and the universality and ease of use of the system are improved.

CN120029872AActive Publication Date: 2025-05-23NINGBO TIANXUN TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510522490.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-05-23
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

In the prior art, it is difficult to accurately understand the controls contained in the software without obtaining functional software code, and it is difficult to achieve accurate capture of user operations without affecting the operation of the software.

Method used

A low-invasive user operation behavior acquisition system under the QT framework is proposed, including a top-level event filter and a dynamic library for operation behavior acquisition. The top-level event filter captures events generated by user operation behavior, and performs recursive analysis of event attributes based on the object tree through the operation behavior acquisition dynamic library to determine user operation behavior and generate operation records.

Benefits of technology

It realizes efficient and accurate acquisition of user operation behavior without modifying the core business logic of the functional software, reducing the coupling between the acquisition system and the functional software, and improving versatility and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029872A_ABST
    Figure CN120029872A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of Internet technology and communication, and particularly relates to a low-intrusive user operation behavior acquisition system and method under a QT framework. The system is deployed in human-computer interaction function software based on QT development, and comprises a top event filter used for capturing an event generated by an operation behavior of a user using the human-computer interaction function software and transmitting the event to an operation behavior acquisition dynamic library; and the operation behavior collection dynamic library is used for performing recursive analysis on the attributes of the events based on the object tree, determining user operation behaviors and generating operation records. According to the low-intrusive acquisition architecture based on the event filter, the universality and usability are greatly improved. According to the method, accurate event capture can be realized without predicting the specific setting of a software control structure, the adaptability and the flexibility are enhanced, the universality is good, the method is suitable for all software developed based on QT, and the calling flexibility is good by adopting a dynamic library mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of Internet technology and communication, and in particular to a low-intrusive user operation behavior collection system and method under a QT framework. Background Art

[0002] As a cross-platform C++ graphical user interface application development framework, QT is widely used in the development of GUI programs and is also used in the development of non-GUI programs. QT provides a rich application programming interface (API), allowing developers to easily build modern interfaces and provide a good user experience. The QT framework provides support for a variety of operating systems, including Linux, which makes QT very popular in the field of cross-platform application development. Therefore, in the Linux operating system environment, the user interfaces of many applications are developed based on the QT library.

[0003] The collection of user operation behavior involves recording various operations performed by users on the interface, such as button clicks, drop-down box selections, check box state changes, etc. The collection of user operation behavior plays a vital role in personnel training, software testing, user experience optimization, and function improvement. At present, the operation behavior collection methods are mainly divided into two categories:

[0004] The first method is to use code embedding technology under the condition that the software code is completely known and controllable, that is, inserting log printing code at key operation points, recording the operation behavior in the log file, and obtaining the user's actual operation behavior by analyzing the log file. The advantage of this method is that the recorded operation behavior has extremely high accuracy, but its limitation is that, usually for confidentiality and commercial confidentiality considerations, the software code cannot be provided to the collector, let alone modify the source code; in addition, the module for collecting operation behavior is highly coupled with the software, which is not conducive to maintenance and generalization.

[0005] The second method is to use image recognition technology to obtain user behavior when the software code is unknown. The advantage of this method is that it is completely independent of the knowledge of the software source code, but its disadvantage is that image recognition essentially compresses multidimensional space information into two-dimensional space, which inevitably leads to information loss, thus affecting the accuracy of operation behavior collection. At the same time, the development of such software requires analysis of each collection requirement to obtain accurate sub-events, and the analysis process is very complicated, so the amount of coding is huge, the development cost is relatively high, and the accuracy is low.

[0006] In general, the difficulty in solving the problem lies in two points. First, without obtaining the functional software code, it is impossible to accurately know the controls contained in the software; second, even if the control information is obtained, it is difficult to accurately track points and accurately capture user operations without affecting the operation of the software. Summary of the invention

[0007] The purpose of the present invention is to overcome the defects of the prior art and propose a low-intrusive user operation behavior collection system and method under the QT framework.

[0008] In view of this, the present invention proposes a low-intrusive user operation behavior collection system under the QT framework, which is deployed in the human-computer interaction function software developed based on QT. The system includes: a top-level event filter and an operation behavior collection dynamic library, wherein:

[0009] The top-level event filter is used to capture events generated by the user's operation behavior of using the human-computer interaction function software, and transmit them to the operation behavior collection dynamic library;

[0010] The operation behavior acquisition dynamic library is used to recursively analyze the attributes of events based on the object tree, determine the user operation behavior and generate operation records.

[0011] Preferably, the top-level event filter is deployed in the main function of the human-computer interaction function software.

[0012] Preferably, the operation behavior collection dynamic library is linked to the human-computer interaction function software.

[0013] Preferably, the operation behavior collection dynamic library includes:

[0014] The control dynamic identification module is used to deeply traverse the QT top-level object, obtain all sub-controls in its object tree, and uniquely identify the sub-controls;

[0015] An event processing function binding module is used to traverse all sub-controls of the same type for different sub-control types, set unique properties for each sub-control, and bind a corresponding event processing function to each sub-control; and

[0016] The event processing function module is used to provide event processing functions for various sub-control types, and the event processing functions are used to extract operation information from events and generate operation records.

[0017] Preferably, the processing process of the control dynamic identification module includes:

[0018] Step S1: Get the current object and determine whether it is empty. If it is, end; otherwise, go to step S2;

[0019] Step S2: Determine whether the CTUL_NAME attribute of the current object is empty. If it is, continue to determine whether it is a top-level object. If it is a top-level object, set the CTUL_NAME attribute of the current object to the window title. Otherwise, set the CTUL_NAME attribute of the current object to a combination of the control type and the index, call the event processing function module, and bind the event processing function to the current object.

[0020] Step S3: Get a list of all sub-objects of the current object, traverse each sub-object in the object list, and go to step S2 until the traversal is completed.

[0021] Preferably, the processing process of the event processing function binding module includes:

[0022] Step T1: According to the parent window object of the input child control, all child controls of the same type as the child control under the parent window object are obtained;

[0023] Step T2: traverse the sub-controls and determine whether the property of the identifier CTUL_NAME of each sub-control has been set. If it is yes, go to step T4; otherwise, go to step T3;

[0024] Step T3: Set the CTUL_NAME property of the current child control to the combination of the control type and index, and record the CTUL_NAME property of the parent object;

[0025] Step T4: Connect the trigger signal of the subcontrol to the corresponding slot function;

[0026] Step T5: Go to step T2 until the traversal process of all child controls is completed.

[0027] Preferably, the operation information extracted from the event by the event processing function includes: operation object name, parent object name, operation type and operation parameters; wherein,

[0028] The operation object name is the CTUL_NAME attribute;

[0029] The parent object name is the CTUL_NAME attribute of the parent object recorded in the event processing function binding module;

[0030] The operation type includes special operation behaviors of all controls defined in QT, as well as common operation behaviors for all controls;

[0031] The operation parameters are used to record the specific status of the operation event.

[0032] Preferably, the special operation behaviors of all controls defined in the QT include:

[0033] Text input and editing completion operations of text boxes;

[0034] Text editing and cursor position change operations for multi-line text boxes;

[0035] Drop-down box drop-down option selection, option change and mouse hover operation;

[0036] Slider value changes, slider clicks, and slider release operations;

[0037] The selection and deselection behavior of a checkbox;

[0038] Button click, press, and release operations;

[0039] Radio button state change operation;

[0040] Table cell click, cell editing and cell focus change operations;

[0041] Click operation of menu button;

[0042] Option click and selection change operations of list controls;

[0043] As well as closing, resizing and moving operations of the main form.

[0044] Preferably, the common operation behavior for all controls includes: mouse click, mouse movement, mouse wheel scrolling and keyboard click operations.

[0045] On the other hand, the present invention provides a low-intrusive user operation behavior collection method under the QT framework, which is implemented based on the above system and includes:

[0046] Initialization stage: When the human-computer interaction function software developed based on QT is started, the operation behavior collection dynamic library is started at the same time;

[0047] Collection phase: When the top-level event filter captures events generated by the user's operation behavior of the human-computer interaction software, it is transmitted to the operation behavior collection dynamic library; the operation behavior collection dynamic library recursively analyzes the attributes of the event based on the object tree, determines the user's operation behavior and generates an operation record.

[0048] Compared with the prior art, the advantages of the present invention are:

[0049] Low-intrusive acquisition architecture based on event filters: The present invention utilizes the event notification mechanism of the QT framework and the top-level event filter technology. It only needs to install an event filter in the human-computer interaction functional software. There is no need to modify the core business logic of the functional software or significantly change the code. Through this "low-intrusive" implementation, the coupling degree between the acquisition system and the functional software is extremely low, which greatly improves the versatility and ease of use.

[0050] Recursive dynamic identification and control binding technology: The present invention designs an algorithm for dynamically traversing the object tree. By recursively scanning all controls in the functional software (such as buttons, text boxes, drop-down boxes, etc.), each control is automatically assigned a unique identifier (such as CTUL_NAME and PARENT_NAME) and bound to an event processing function. Accurate event capture can be achieved without knowing the specific settings of the software control structure in advance, thereby enhancing adaptability and flexibility, having good versatility, and being suitable for all software developed based on QT.

[0051] Use dynamic library to call: when the operation behavior acquisition logic changes, there is no need to recompile the functional software code, which has good flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of the low-intrusive user operation behavior collection method under the QT framework of the present invention;

[0053] Figure 2 This is an indication of installing an event filter. DETAILED DESCRIPTION

[0054] The present invention is based on the event notification mechanism of the QT framework and uses hook technology to achieve low-intrusive operation behavior collection. This method not only reduces the development cost of the collection software, but also improves the accuracy of behavior collection.

[0055] For convenience, it is agreed in this document that the human-computer interface software developed using QT is called human-computer interaction functional software or simply functional software. The main principle of the present invention is that in software developed based on QT, all user operations will generate corresponding events and be captured by event filters. Therefore, the present invention installs a top-level event filter in the main function of the human-computer interaction functional software, and the filter transfers all occurring events to the operation behavior collection dynamic library for analysis. In the collection library, the attributes of each event are recursively analyzed, and the user operation behavior (such as button clicks, text input, list selection, etc.) is obtained through event attribute analysis, and the analysis results are recorded. This method can efficiently and accurately collect detailed operation data on the basis of minimal changes to the functional software.

[0056] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0057] Example 1

[0058] like Figure 1As shown, Example 1 of the present invention proposes a low-intrusive user operation behavior collection system under the QT framework, which is deployed in the human-computer interaction functional software developed based on QT. The system includes: a top-level event filter and an operation behavior collection dynamic library. The top-level event filter is used to capture events generated by the user's operation behavior using the human-computer interaction functional software, and transmit them to the operation behavior collection dynamic library; the operation behavior collection dynamic library is used to recursively analyze the attributes of the event based on the object tree, determine the user's operation behavior and generate an operation record. Separating the functional software from the collection library has stronger versatility and low intrusion.

[0059] The following is a detailed description of each component:

[0060] (1) Operation behavior collection dynamic library

[0061] The operation behavior collection dynamic library has three functions: one is to dynamically identify and traverse the object tree of the functional software, identify each control; the second is to bind an event processing function to each control; the third is to extract the operation information from the event information and record it when the event processing function is triggered.

[0062] The operation behavior collection dynamic library can be divided into the following functional modules:

[0063] A) Control dynamic identification module

[0064] The function of the control dynamic identification module is to deeply traverse a QT top-level object, obtain all child controls in its object tree, and identify the child controls. If it is a top-level object, set the CTUL_NAME property of the current object to the window title, otherwise, the CTUL_NAME property is a combination of control type + index.

[0065] The specific implementation algorithm is shown in Table 1:

[0066] Table 1

[0067]

[0068] B) Event processing function binding module

[0069] The event handling function uses a recursive method to bind the corresponding event handling function to the current control and all its sub-controls for different sub-control types. When the event handling function binding module is called, the binding functions corresponding to each control type will be called in turn, such as button binding function, drop-down box binding function, etc. These binding functions mainly handle events related to control types. Traverse all sub-controls of this type in the specified window, set unique properties (CTUL_NAME and PARENT_NAME) for each sub-control, the CTUL_NAME property is a combination of control type + index, and connect the trigger event of the sub-control to the corresponding slot function. When the operation behavior corresponding to the sub-control occurs, the slot function will be triggered to record the operation information. In the prior art, the identification of sub-controls is to uniquely identify a sub-control through the interface path, but different sub-controls in the same interface in QT can have the same objectname, so it is impossible to uniquely identify a sub-control. In order to achieve accurate event capture, it is necessary to know the specific settings of the software control structure, and the amount of such processing code is huge. This application automatically assigns a unique identifier to each control and binds an event processing function. It can achieve accurate event capture without knowing the specific settings of the software control structure in advance, enhance adaptability and flexibility, and has good versatility. It is suitable for all software developed based on QT.

[0070] Taking the button binding function as an example, its specific implementation algorithm is shown in Table 2:

[0071] Table 2

[0072]

[0073] Among them, HandlePushButtonClicked is the event processing function of the button control. Similarly, other control types such as text boxes, drop-down menus, etc., all have corresponding event processing functions, which are all included in the event processing function module.

[0074] C) Event processing function module

[0075] The event processing function module contains event processing functions set for different types of controls. The function of these functions is to extract operation information from events and save them. The extracted operation information includes:

[0076] 1. Operation object name:

[0077] This is the unique identifier of the control that triggers the event. The identifier can be used to uniquely locate the operated control. This identifier is the CTUL_NAME in the event processing function binding module.

[0078] 2. Parent object name:

[0079] This is the unique identifier of the parent window of the control that triggered the event. This identifier is the PARENT_NAME in the event handling function binding module.

[0080] 3. Operation type:

[0081] Different control types have different operation types, such as the checkbox click event "checkbox_clicked". Operation types include special operation behaviors of all controls defined in QT, as well as common operation behaviors for all controls;

[0082] Among them, the special operation behaviors of all controls defined in QT include: text input and editing completion operations of text boxes; text editing and cursor position change operations of multi-line text boxes; drop-down option selection, option change and mouse hover operations of drop-down boxes; value change, slider click and slider release operations of sliders; selection and deselection behaviors of check boxes; button click, press and release operations; radio button state change operations; table cell click, cell editing and cell focus change operations; menu button click operations; list control option click and selection change operations; and main form closing, resizing and moving operations.

[0083] Common operation behaviors for all controls, including: mouse clicks, mouse movements, mouse wheel scrolling, and keyboard clicks.

[0084] 4. Operation parameters:

[0085] Operation parameters are used to specify the state of the operation event. For example, the state of a check box click event is divided into selected and unchecked. Its operation parameter can be true or false.

[0086] (2) Human-computer interaction software

[0087] The functional software needs to be modified in two aspects. First, link the operation behavior collection dynamic library in the software; second, install the event filter in the main function. The code is as follows: Figure 2 The yellow part means defining an event filter eventFilter and installing the event filter.

[0088] CEventFilter is the event filter class implemented in the operation behavior collection dynamic library.

[0089] It is worth noting that in the embodiment of the above system, the modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0090] Example 2

[0091] Embodiment 2 of the present invention proposes a low-intrusive user operation behavior collection method under the QT framework, which is based on the system implementation of embodiment 1. It includes the following stages:

[0092] (1) Initialization phase

[0093] 1.1 The functional software is started, and the operation behavior collection dynamic library is started at the same time;

[0094] 1.2 Initialize the operation behavior collection dynamic library and create an event handler (CEventHandler) to handle various interface operation events;

[0095] 1.3 The functional software installs the top-level event filter (InstallEventFilter) in the main function. When a user operation occurs on the functional software, the top-level event filter passes the event information to the operation behavior collection dynamic library for processing.

[0096] (2) Marking and binding event processing function stage

[0097] 2.1 After receiving the event information passed by the event processor, the operation behavior collection dynamic library determines whether the event trigger is a top-level object. If it is a top-level object, it takes out the top-level object;

[0098] 2.2 Traverse the object tree with the top-level object as the root, bind the corresponding event processing function to each interface control (i.e. child object), assign a unique identifier (CTUL_NAME) to each control, and record the identifier of its parent container (PARENT_NAME). The CTUL_NAME attribute is a combination of control type + index.

[0099] (3) Collection stage

[0100] 3.1 When the user operates on the functional software, the QT event filter sends the event information to the operation behavior collection dynamic library and automatically triggers the corresponding event processing function;

[0101] 3.2 In the triggered event processing function, an operation record is generated. The operation record includes information such as operation time, operation object identifier, parent container identifier, operation type and operation parameters.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention and should be included in the scope of the claims of the present invention.

Claims

1. A low-intrusive user operation behavior collection system under the QT framework, deployed in human-computer interaction function software developed based on QT, characterized in that: The system includes: a top-level event filter and an operation behavior collection dynamic library, wherein: The top-level event filter is used to capture events generated by the user's operation behavior of using the human-computer interaction function software, and transmit them to the operation behavior collection dynamic library; The operation behavior acquisition dynamic library is used to recursively analyze the attributes of events based on the object tree, determine the user operation behavior and generate operation records.

2. According to the low-intrusive user operation behavior collection system under the QT framework of claim 1, it is characterized in that: The top-level event filter is deployed in the main function of the human-computer interaction function software.

3. According to the low-intrusive user operation behavior collection system under the QT framework of claim 1, it is characterized in that: The operation behavior acquisition dynamic library is linked to the human-computer interaction function software.

4. According to the low-intrusive user operation behavior collection system under the QT framework of claim 1, it is characterized in that: The operation behavior collection dynamic library includes: The control dynamic identification module is used to deeply traverse the QT top-level object, obtain all sub-controls in its object tree, and uniquely identify the sub-controls; An event processing function binding module is used to traverse all sub-controls of the same type for different sub-control types, set unique properties for each sub-control, and bind a corresponding event processing function to each sub-control; and The event processing function module is used to provide event processing functions for various sub-control types, and the event processing functions are used to extract operation information from events and generate operation records.

5. According to the low-intrusive user operation behavior collection system under the QT framework of claim 4, it is characterized in that: The processing process of the control dynamic identification module includes: Step S1: Get the current object and determine whether it is empty. If it is, end; otherwise, go to step S2; Step S2: Determine whether the CTUL_NAME attribute of the current object is empty. If it is, continue to determine whether it is a top-level object. If it is a top-level object, set the CTUL_NAME attribute of the current object to the window title. If it is not a top-level object, set the CTUL_NAME attribute of the current object to a combination of the control type and the index, call the event processing function module, and bind the event processing function to the current object. Step S3: Get a list of all sub-objects of the current object, traverse each sub-object in the sub-object list, and go to step S2 until the traversal is completed.

6. The low-intrusive user operation behavior collection system under the QT framework according to claim 5 is characterized in that: The processing process of the event processing function binding module includes: Step T1: According to the parent window object of the input child control, all child controls of the same type as the child control under the parent window object are obtained; Step T2: traverse the sub-controls and determine whether the property of the identifier CTUL_NAME of each sub-control has been set. If it is yes, go to step T4; otherwise, go to step T3; Step T3: Set the CTUL_NAME property of the current child control to the combination of the control type and index, and record the CTUL_NAME property of the parent object; Step T4: Connect the trigger signal of the subcontrol to the corresponding slot function; Step T5: Go to step T2 until the traversal process of all child controls is completed.

7. The low-intrusive user operation behavior collection system under the QT framework according to claim 6 is characterized in that: The operation information extracted from the event by the event processing function includes: the name of the operation object, the name of the parent object, the operation type and the operation parameters; wherein, The operation object name is the CTUL_NAME attribute; The parent object name is the CTUL_NAME attribute of the parent object recorded in the event processing function binding module; The operation type includes special operation behaviors of all controls defined in QT, as well as common operation behaviors for all controls; The operation parameters are used to record the specific status of the operation event.

8. The low-intrusive user operation behavior collection system under the QT framework according to claim 7 is characterized in that: The special operation behaviors of all controls defined in QT include: Text input and editing completion operations of the text box; Text editing and cursor position change operations for multi-line text boxes; Drop-down box drop-down option selection, option change and mouse hover operation; Slider value changes, slider clicks, and slider release operations; The selection and deselection behavior of a checkbox; Button click, press, and release operations; Radio button state change operation; Table cell click, cell editing and cell focus change operations; Click operation of menu button; Option click and selection change operations of list controls; As well as closing, resizing and moving operations of the main form.

9. The low-intrusive user operation behavior collection system under the QT framework according to claim 7 is characterized in that: The common operation behaviors for all controls include: mouse click, mouse movement, mouse wheel scrolling and keyboard click operations.

10. A low-intrusive user operation behavior collection method under a QT framework, implemented based on the system described in any one of claims 1 to 9, comprising: Initialization phase: When the human-computer interaction function software developed based on QT is started, the operation behavior collection dynamic library is also started; Collection phase: When the top-level event filter captures the events generated by the user's operation behavior of the human-computer interaction function software, it is transmitted to the operation behavior collection dynamic library; The operation behavior collection dynamic library recursively analyzes the attributes of events based on the object tree, determines the user operation behavior and generates operation records.

Citation Information

Patent Citations

  • Qt graphical interface software-based operation log recording method and system

    CN105607985A

  • Qt desktop point burying system, method and device based on database configuration

    CN112965877A

  • Universal Swing program user behavior acquisition method and device

    CN116804924A

  • Management event notification system using event notification messages written using a markup language

    US6167448A

  • Traceability of production control activities

    WO2005031567A1