Behavior data acquisition method and device, equipment, storage medium and program product

By binding the acquisition dimensions and preset trigger events, and generating and converting event data, the problem of high cost and low efficiency of data collection for user behavior data collection is solved, efficient and accurate data acquisition and completeness is achieved, and more comprehensive analysis is supported.

CN120407362APending Publication Date: 2025-08-01XIAOMI EV TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510600076.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the process of collecting user behavior data, the prior art has problems such as high data collection cost, low efficiency and insufficient data integrity, making it difficult to accurately obtain valuable user behavior information.

Method used

By binding the acquisition dimension and preset trigger events, event data is monitored and generated, converted into user behavior statistics results according to data processing rules, and reported in association with contextual environment information to avoid useless data collection and improve data acquisition efficiency and integrity.

Benefits of technology

It realizes accurate acquisition of required data, reduces useless data collection, improves data acquisition efficiency, ensures data integrity and accuracy, and provides a more comprehensive data foundation for subsequent analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407362A_ABST
    Figure CN120407362A_ABST
Patent Text Reader

Abstract

The invention provides a behavior data acquisition method and device, equipment, a storage medium and a program product, and relates to the technical field of computers. The method comprises the following steps: monitoring a preset trigger event bound with an acquisition dimension; generating event data in response to the preset trigger event; converting the event data into a user behavior statistical result according to a data processing rule corresponding to the acquisition dimension; and the user behavior statistical result and context environment information are associated and reported. According to the method, the required data can be accurately acquired in a universal and convenient manner by binding the acquisition dimension and the preset trigger event, so that the acquisition of useless data is avoided, and the data acquisition efficiency is improved. And the statistical result and the context environment information can be associated and reported, so that the integrity of the data is ensured, the subsequent analysis is more comprehensive, and a data basis is provided for mining more valuable information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method, apparatus, device, storage medium, and program product for collecting behavior data. Background Art

[0002] With the development of computer technologies and Internet technologies, the demand for user behavior analysis is increasing. In the user behavior analysis system, data collection is a fundamental and crucial link. Convenient and efficient collection of user behavior data can reduce the data collection cost, improve the data acquisition efficiency, and provide data support for subsequent application scenarios such as data analysis, user portrait construction, and product optimization.

[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0004] The purpose of the present disclosure is to provide a method, apparatus, device, storage medium, and program product for collecting behavior data.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for collecting behavior data is provided, including: monitoring a preset trigger event bound to a collection dimension; generating event data in response to the preset trigger event; converting the event data into a user behavior statistical result according to a data processing rule corresponding to the collection dimension; and associating and reporting the user behavior statistical result with context environment information.

[0006] In some embodiments, the collection dimension includes the online duration of a user on a first page, and the preset trigger event includes a page visibility status change event of the first page; wherein, generating event data in response to the preset trigger event includes: generating page visibility pulse data in response to a change in the page visibility status of the first page; and generating page visibility pulse data at a specified period when the first page is in a visible state; converting the event data into a user behavior statistical result includes: dynamically accumulating the online duration according to a first time difference between adjacent page visibility pulse data to generate a user behavior statistical result of the accumulated online duration.

[0007] In some embodiments, dynamically accumulating the online duration according to a first time difference between adjacent page visibility pulse data includes: accumulating the first time difference in response to the first time difference being less than or equal to the specified period; and accumulating the duration of the specified period in response to the first time difference being greater than the specified period.

[0008] In some embodiments, the specified period is determined according to preset period information or according to custom period information injected by the user through a first parameter-passing function.

[0009] In some embodiments, the collection dimension includes the active duration of the user on the second page, and the preset trigger event includes an interaction operation event of the user on the second page; wherein, in response to the preset trigger event, event data is generated, including: in response to an interaction operation event occurring on the second page, recording the timestamp of the event trigger; in response to the time interval between the timestamp and the previous user active pulse data being greater than or equal to a specified window value, generating user active pulse data; converting the event data into a user behavior statistical result, including: dynamically accumulating the active duration according to the second time difference between adjacent user active pulse data to generate a user behavior statistical result of the active duration.

[0010] In some embodiments, dynamically accumulating the active duration according to the second time difference between adjacent user active pulse data includes: in response to the second time difference being less than or equal to the specified window value, accumulating the second time difference; in response to the second time difference being greater than the specified window value, accumulating the duration of the specified window value.

[0011] In some embodiments, the specified window value is determined according to preset window duration information or according to custom window duration information injected by the user through a second parameter-passing function.

[0012] In some embodiments, the collection dimension includes page exposure data, and the preset trigger event includes a page routing change event; the event data includes the page routing data involved in the page routing change event; wherein, converting the event data into a user behavior statistical result includes: suppressing the page routing data with high-frequency changes through a debounce mechanism; and / or, in response to the page routing data satisfying a first ignoring condition, ignoring the corresponding page routing change event.

[0013] In some embodiments, monitoring a page routing change event includes: rewriting the browser native routing change method to trigger a custom routing change event when the rewritten method is called to cause a page routing change; monitoring the custom routing change event to capture the routing change behavior; monitoring the historical state change event and the anchor change event of the browser.

[0014] In some embodiments, the first ignoring condition includes: dynamically determining to ignore reporting through the routing path field value in a first ignoring function; wherein, the routing path field value includes: preset path information and / or custom path information injected by the user through a third parameter-passing function.

[0015] In some embodiments, the collection dimension includes user click behavior, and the preset trigger event includes a global click event; the event data includes the data of the element operated in the global click event; wherein, converting the event data into a user behavior statistical result includes: in response to the data of the element operated satisfying a second ignoring condition, ignoring the corresponding global click event.

[0016] In some embodiments, the second ignoring condition includes at least one of the following: the document object model of the element contains an ignoring identifier; dynamically determining ignoring reporting through the element attribute field value in a second ignoring function, where the element attribute field value includes: preset attribute information and / or custom attribute information injected by the user through a fourth parameter passing function.

[0017] In some embodiments, the context environment information is preset reporting information or custom reporting information injected by the user through a fifth parameter passing function; wherein, the preset reporting information includes at least one of the following: user identity identifier, device parameters, page running environment data, business scenario label.

[0018] According to a second aspect of the embodiments of the present disclosure, there is provided a behavior data collection device, including: a monitoring unit, configured to monitor a preset trigger event bound to a collection dimension; a trigger response unit, configured to generate event data in response to the preset trigger event; a data processing unit, configured to convert the event data into a user behavior statistical result according to a data processing rule corresponding to the collection dimension; and a reporting unit, configured to report the user behavior statistical result in association with context environment information.

[0019] In some embodiments, the collection dimension includes the online duration of the user on a first page, and the preset trigger event includes a page visibility status change event of the first page; wherein, the trigger response unit generates event data in response to the preset trigger event, including: in response to a change in the page visibility status of the first page, generating page visibility pulse data; and, when the first page is in a visible state, generating page visibility pulse data at a specified period; the data processing unit converts the event data into a user behavior statistical result, including: dynamically accumulating the online duration according to a first time difference between adjacent page visibility pulse data to generate a user behavior statistical result of the accumulated online duration.

[0020] In some embodiments, the data processing unit dynamically accumulates the online duration according to a first time difference between adjacent page visibility pulse data, including: in response to the first time difference being less than or equal to the specified period, accumulating the first time difference; in response to the first time difference being greater than the specified period, accumulating the duration of the specified period.

[0021] In some embodiments, the specified period is determined according to preset period information or according to custom period information injected by the user through a first parameter-passing function.

[0022] In some embodiments, the collection dimension includes the active duration of the user on the second page, and the preset trigger event includes an interaction operation event of the user on the second page; wherein, the trigger response unit generates event data in response to the preset trigger event, including: recording the timestamp of the event trigger in response to an interaction operation event occurring on the second page; generating user active pulse data in response to the time interval between the timestamp and the last user active pulse data being greater than or equal to a specified window value; and the data processing unit converts the event data into a user behavior statistical result, including: dynamically accumulating the active duration according to the second time difference between adjacent user active pulse data to generate a user behavior statistical result of the active duration.

[0023] In some embodiments, the data processing unit dynamically accumulates the active duration according to the second time difference between adjacent user active pulse data, including: accumulating the second time difference in response to the second time difference being less than or equal to the specified window value; and accumulating the duration of the specified window value in response to the second time difference being greater than the specified window value.

[0024] In some embodiments, the specified window value is determined according to preset window duration information or according to custom window duration information injected by the user through a second parameter-passing function.

[0025] In some embodiments, the collection dimension includes page exposure data, and the preset trigger event includes a page routing change event; the event data includes page routing data involved in the page routing change event; wherein, the data processing unit converts the event data into a user behavior statistical result, including: suppressing the page routing data with high-frequency changes through a debounce mechanism; and / or ignoring the corresponding page routing change event in response to the page routing data satisfying a first ignoring condition.

[0026] In some embodiments, the monitoring unit monitors page routing change events, including: rewriting the browser native routing change method to trigger a custom routing change event when the rewritten method is called to cause a page routing change; monitoring the custom routing change event to capture the routing change behavior; and monitoring the historical state change event and the anchor change event of the browser.

[0027] In some embodiments, the first ignoring condition includes: dynamically determining to ignore reporting through the routing path field value in a first ignoring function; wherein, the routing path field value includes: preset path information and / or custom path information injected by the user through a third parameter-passing function.

[0028] In some embodiments, the collection dimension includes user click behavior, and the preset trigger event includes a global click event; the event data includes the data of the element being operated in the global click event; wherein, the data processing unit converts the event data into a user behavior statistical result, including: in response to the data of the element being operated satisfying a second ignoring condition, ignoring the corresponding global click event.

[0029] In some embodiments, the second ignoring condition includes at least one of the following: the document object model of the element contains an ignoring identifier; dynamically determining ignoring reporting through the element attribute field value in the second ignoring function, where the element attribute field value includes: preset attribute information and / or custom attribute information injected by the user through a fourth parameter-passing function.

[0030] In some embodiments, the context environment information is preset reporting information or custom reporting information injected by the user through a fifth parameter-passing function; wherein, the preset reporting information includes at least one of the following: user identity identifier, device parameters, page running environment data, business scenario label.

[0031] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, characterized in that it includes: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the above-mentioned behavior data collection method.

[0032] According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enabling the mobile terminal to execute a behavior data collection method, the method including: monitoring a preset trigger event bound to a collection dimension; in response to the preset trigger event, generating event data; according to the data processing rule corresponding to the collection dimension, converting the event data into a user behavior statistical result; and associating and reporting the user behavior statistical result with context environment information.

[0033] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including a computer program, where the computer program, when executed by a processor, implements the above-mentioned behavior data collection method.

[0034] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

[0035] The present disclosure can accurately obtain the required data in a general and convenient manner by binding the collection dimension and the preset trigger event, avoiding the collection of useless data and improving the data collection efficiency. Moreover, it can associate and report the statistical results and the context information, ensuring the integrity of the data, making the subsequent analysis more comprehensive, and providing a data basis for mining more valuable information.

[0036] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Brief Description of the Drawings

[0037] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.

[0038] Figure 1 is a flowchart of a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0039] Figure 2 is a flowchart of collecting the user online duration dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0040] Figure 3 is a schematic diagram of collecting the user online duration dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0041] Figure 4 is a flowchart of collecting the user active duration dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0042] Figure 5 is a schematic diagram of collecting the user active duration dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0043] Figure 6 is a schematic diagram of collecting the page exposure data dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0044] Figure 7 is a schematic diagram of collecting the user click behavior dimension in a method for collecting behavior data shown according to some embodiments of the present disclosure.

[0045] Figure 8 is a block diagram of a device for collecting behavior data shown according to some embodiments of the present disclosure.

[0046] Figure 9 is a block diagram of a device for collecting behavior data shown according to some embodiments of the present disclosure. Detailed Implementation Modes

[0047] Some exemplary embodiments of the present disclosure will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Various changes, variations, and equivalents of the methods, apparatuses, and / or systems described herein will become apparent after understanding the present disclosure. For example, the order of operations described herein is merely an example and is not limited to those set forth herein, but may be changed as will be apparent after understanding the present disclosure, except for operations that must be performed in a specific order. Additionally, descriptions of features known in the art may be omitted for the sake of clarity and conciseness.

[0048] The implementation modes described in some of the following exemplary embodiments of the present disclosure do not represent all implementation modes consistent with the present invention of the present disclosure. On the contrary, they are merely examples of apparatuses and methods consistent with some aspects of the present invention of the present disclosure as detailed in the appended claims.

[0049] In some embodiments of the present disclosure, for the acquisition of data, information, and aspects such as the collection, gathering, updating, analysis, processing, use, transmission, and storage of the user's personal information involved, the laws and regulations of the country where the location is located may be complied with.

[0050] In some embodiments of the present disclosure, data, information, etc. may be acquired after obtaining the user's consent.

[0051] The following will, with reference to the accompanying drawings, elaborate on the detailed implementation modes of the embodiments of the present disclosure.

[0052] Figure 1 is a flowchart of a behavior data acquisition method shown according to some embodiments of the present disclosure. As Figure 1 shown, the behavior data acquisition method may be applied to electronic devices, including but not limited to terminal devices such as smart phones, smart tablets, wearable devices, desktop computers, laptop computers, smart speakers, etc., and may also include server sides such as local servers and cloud servers. The server side may be deployed in a computer or a computer cluster composed of multiple computers. The behavior data acquisition method may include the following steps.

[0053] In step S110, monitor a preset trigger event bound to the acquisition dimension.

[0054] In the embodiments of the present disclosure, the collection dimension can be a perspective for collecting and analyzing user behavior data from different aspects during the user's use of an application or browser. The collection dimension can be set according to user behavior types (such as browsing behavior, click behavior, etc.), time (day, week, month, etc.), user attributes (age, gender, region, etc.), etc. The preset trigger event can be a specific behavior or situation that is set in advance and can trigger data collection.

[0055] In step S120, in response to the preset trigger event, event data is generated.

[0056] In the embodiments of the present disclosure, the event data can be the raw data generated by the preset trigger event, covering the relevant information of the event occurrence, such as the event occurrence time, the objects involved, the operating subject, etc. After the preset trigger event occurs, the relevant information of the event can be sorted out to form event data.

[0057] In step S130, according to the data processing rules corresponding to the collection dimension, the event data is converted into user behavior statistical results.

[0058] In the embodiments of the present disclosure, the data processing rules can be a series of processing methods and algorithms formulated for converting event data into valuable user behavior statistical results for different collection dimensions. The corresponding event data can be processed according to the data processing rules set in advance for different collection dimensions.

[0059] In step S140, the user behavior statistical results are associated and reported with the context information.

[0060] In the embodiments of the present disclosure, the context information can be the surrounding environment information around the event occurrence. For example, it can include device information (mobile phone brand, computer model), network environment (4G, WiFi), event occurrence time, user information, page information targeted by the event, etc. The obtained user behavior statistical results can be integrated with the context information at the time of event occurrence and reported together.

[0061] It can be seen that through the embodiments of the present disclosure, the step of manually inserting the buried point code in the data collection of the traditional buried point method can be avoided, thereby reducing the omissions or errors that may be caused by manual operations, ensuring the accuracy and comprehensiveness of the collection. And it can reduce the maintenance cost brought by the change of the buried point code in the later stage, and further reduce the development cost.

[0062] As can be seen from the above steps, through the behavior data collection method provided by the present disclosure, it is possible to accurately obtain the required data in a general and convenient manner by binding the collection dimension and the preset trigger event, avoiding the collection of useless data, and improving the data collection efficiency. Moreover, it is possible to associate and report the statistical results and the context information, ensuring the integrity of the data, making the subsequent analysis more comprehensive, and providing a data basis for mining more valuable information.

[0063] In some embodiments of the present disclosure, the collection dimension includes the online duration of the user on the first page, and the preset trigger event includes the page visibility status change event of the first page.

[0064] In the embodiments of the present disclosure, the online duration of the user on the first page measures the user's behavior on a specific page (such as the first page) from the time perspective. Information such as the user's attention and participation in the page content can be understood by counting the online duration. For example, in a video learning application, the first page is the course list page. By analyzing the online duration of the user on this page, it is possible to judge the user's hesitation time for course selection or the browsing depth of the course list.

[0065] In the embodiments of the present disclosure, the page visibility status change event of the first page may refer to the situation where the visible or invisible state of the first page changes. Such changes cover various scenarios, such as when the user switches the application program, minimizes the window, etc., causing the page to change from visible to invisible, or when the application is reopened, causing the page to change from invisible to visible. This event is the trigger condition for starting data collection, which can ensure that the data collection is closely associated with the actual state change of the page, thereby improving the effectiveness of data statistics.

[0066] In some embodiments of the present disclosure, when the preset trigger event is the page visibility status change event of the first page, in response to the preset trigger event, generating event data may include: generating page visibility pulse data in response to the change in the page visibility status of the first page; and generating page visibility pulse data at a specified period when the first page is in the visible state.

[0067] In the embodiments of the present disclosure, when the page visibility status changes, page visibility pulse data can be generated immediately. This data records the time point when the status change occurs, which is equivalent to a time mark. For example, when the page changes from invisible to visible, the current time can be recorded.

[0068] In some embodiments of the present disclosure, the specified period is determined according to the preset period information, or is determined according to the custom period information injected by the user through the first parameter passing function.

[0069] During the period when the first page remains visible, page visibility pulse data can be generated at a specified period. Herein, the specified period can be preset period information, and the preset period information can be set based on information such as data collection requirements or the number of user accesses recorded in historical data; the specified period can also be determined according to custom period information injected by the user through a first parameter-passing function; for example, the specified period can be 30 seconds. Then, during the period when the first page remains visible, a new pulse data can be generated every 30 seconds, continuously recording the time point information of the page in the visible state.

[0070] Herein, the first parameter-passing function can be used as an interface or a function that allows the user to pass in custom parameters or configuration information, and the parameters or configuration information can include the period information defined by the user himself.

[0071] In some embodiments of the present disclosure, when the event data is page visibility pulse data, converting the event data into a user behavior statistical result may include: dynamically accumulating the online duration according to the first time difference between adjacent page visibility pulse data to generate a user behavior statistical result of the accumulated online duration.

[0072] In the embodiments of the present disclosure, the online duration can be dynamically accumulated by analyzing the time difference (i.e., the first time difference) between adjacent page visibility pulse data. For example, assuming that the generation time of the first pulse data is 0 second and the second pulse data is generated at 30 seconds, then the time difference of 30 seconds between these two pulse data is accumulated into the online duration. As the page remains visible, new pulse data can be continuously generated, continuously calculating and accumulating the time difference between adjacent pulse data, and finally obtaining the accumulated online duration of the user on the first page, forming a user behavior statistical result.

[0073] Through the embodiments of the present disclosure, taking the change in the page visibility state as a trigger condition can avoid invalid data collection when there is no substantial change in the page state. Data is generated only when the page visibility truly changes, ensuring that the collected data is closely related to the user's actual operations and the real state of the page, improving the accuracy and pertinence of the data. And during the period when the page remains visible, pulse data can be generated at a specified period, and thus it is possible to statistically calculate the user's stay time on the page in a relatively accurate and convenient manner, effectively reflecting the actual stay duration of the user on this page.

[0074] Figure 2 is a flowchart for collecting the user online duration dimension in a behavior data collection method shown according to some embodiments of the present disclosure, as Figure 2 shown, the method for collecting the user online duration dimension may include the following steps.

[0075] Step S210, monitor a preset trigger event bound to the collection dimension of the online duration of the user on the first page; the preset trigger event includes a page visibility status change event of the first page.

[0076] Step S220, in response to a change in the page visibility status of the first page, generate page visibility pulse data; and, when the first page is in a visible state, generate page visibility pulse data at a specified period.

[0077] Step S230, dynamically accumulate the online duration according to the first time difference between adjacent page visibility pulse data, and generate a user behavior statistics result of the cumulative online duration.

[0078] Step S240, associate and report the user behavior statistics result of the cumulative online duration with the context environment information.

[0079] The specific implementation manners of the above steps have been described in detail in the relevant embodiments, and will not be elaborated here.

[0080] In some embodiments of the present disclosure, dynamically accumulating the online duration according to the first time difference between adjacent page visibility pulse data includes: in response to the first time difference being less than or equal to the specified period, accumulating the first time difference; in response to the first time difference being greater than the specified period, accumulating the duration of the specified period.

[0081] In the embodiments of the present disclosure, adjacent page visibility pulse data refers to two data with time stamps generated sequentially during the page visibility monitoring process. These data record the time points of page visibility status changes or generated periodically, and are the basic data for calculating the time difference and accumulating the online duration.

[0082] Among them, when the first time difference is less than or equal to the specified period, the time difference can be directly accumulated into the online duration. For example, if the specified period is 30 seconds and the time difference between adjacent pulse data is 20 seconds, then these 20 seconds will be added to the cumulative online duration. This processing method conforms to the normal time statistics logic, and can accurately accumulate the actual page stay time when the page remains visible and pulse data is generated periodically.

[0083] If the first time difference is greater than the specified period, instead of accumulating this actual time difference, the duration of the specified period can be accumulated. Suppose the specified period is 30 seconds, and the time difference between adjacent pulse data is 50 seconds. At this time, only 30 seconds is accumulated into the online duration. This is because when the time difference is greater than the specified period, it means that the latter pulse data and the former pulse data are not within the same period of continuous visibility of the page. For example, the former pulse data is the pulse data triggered when the page becomes invisible, and the latter pulse data is the pulse data triggered when the page becomes visible after 30 seconds. Obviously, the page is invisible during this period. Therefore, only a limited 30 seconds can be accumulated instead of the actual time difference. Obviously, this accumulation method conforms to the actual situation and is relatively consistent with the actual online duration of the page.

[0084] Through the embodiments of the present disclosure, by classifying and processing different time difference situations, the statistical deviation of the online duration caused by the time difference of the page being offline is avoided. When the time difference is greater than the specified period, the duration of the specified period is accumulated, which avoids over-statistics of the online duration and ensures the reliability of the data.

[0085] Figure 3 It is a schematic diagram of collecting the user's online duration dimension in a behavior data collection method shown according to some embodiments of the present disclosure, as Figure 3 shown, the process of automatically collecting the user's online duration may include the following content.

[0086] The user side 301 opens the page, and when the data collection side 302 determines that the page is running in the foreground, it is regarded as the user being online (not switching to the background or locking the screen. The visibilityState attribute of the page can be monitored and obtained through the visibilitychange event. When the visibilityState attribute is visible, the page is visible). When the user is online, a pulse can be reported every duration of the specified period (such as 30s, which can also be defined by oneself) (information such as the page url, user identity information, page title, browser ua, device id, etc. can be carried). After the data processing side 303 receives the reported information, the time difference between the current pulse record and the previous pulse record can be calculated. When the specified period is set to 30s, if the time difference ≤ 30s, this difference (i.e., the real time difference) can be directly accumulated into the online duration; if the time difference > 30s, it means that the user is offline during this period, and only 30s (i.e., the duration of the specified period) needs to be accumulated. By comparing the actual interval time of the pulse with the specified period in this way and then determining the period to be accumulated, the user's online duration can be simulated and calculated.

[0087] In some embodiments of the present disclosure, the collection dimension includes the active duration of the user on the second page, and the preset trigger event includes the interaction operation event of the user on the second page.

[0088] In the embodiments of the present disclosure, the active duration of the user on the second page may be the time length of the actual interaction operations performed by the user on the second page. The active duration focuses on the time when the user actually participates in page operations. For example, in a chat page (the second page) of a social application, the active duration can reflect the time of operations such as the user actually sending messages and viewing messages.

[0089] The interaction operation events of the user on the second page clearly stipulate that data collection is triggered only when the user performs specific interaction behaviors on the second page. These interaction operation events are the starting points of data collection, ensuring that the collected data is closely related to the actual behaviors of the user. Among them, the interaction operation events can be, for example, mouse movement events, mouse click events, or touch screen operation events.

[0090] In some embodiments of the present disclosure, generating event data in response to the preset trigger event may include: recording the timestamp of the event trigger in response to an interaction operation event occurring in the second page; generating user active pulse data in response to the time interval between the timestamp and the previous user active pulse data being greater than or equal to the specified window value.

[0091] In the embodiments of the present disclosure, when an interaction operation event occurs in the second page, the timestamp of the event trigger can be immediately recorded. The timestamp can accurately record the specific time point when the interaction operation occurs, providing an important time reference basis for subsequent data processing.

[0092] Among them, the time interval between the currently recorded timestamp and the previous user active pulse data can be calculated, and this time interval can be compared with the specified window value. If the time interval is greater than or equal to the specified window value, new user active pulse data will be generated. This means that new active records are generated only when the interaction operation interval of the user reaches a certain time (the specified window value), avoiding overly frequent data generation.

[0093] In some embodiments of the present disclosure, the specified window value is determined according to the preset window duration information, or is determined according to the custom window duration information injected by the user through the second parameter passing function.

[0094] In the embodiments of the present disclosure, the preset window duration information can be a set of default window duration information set in advance. The specified window value can be directly read from this set of preset information for subsequent generation of user active pulse data and calculation of active duration.

[0095] The second parameter passing function can also be provided to the user. The second parameter passing function can be used as an interface or a function, allowing the user to pass in custom parameters or configuration information, which may include the window duration information defined by the user himself. After the user passes in the custom window duration information through the second parameter passing function, this information can be used as the specified window value for subsequent generation of user active pulse data and calculation of active duration. In this way, higher flexibility can be provided to meet the personalized needs of different users or different scenarios.

[0096] In some embodiments of the present disclosure, converting the event data into user behavior statistical results may include: dynamically accumulating the active duration according to the second time difference between adjacent user active pulse data to generate the user behavior statistical result of the active duration.

[0097] In the embodiments of the present disclosure, the active duration can be dynamically accumulated by analyzing the second time difference between adjacent user active pulse data. Similar to the method of calculating the online duration, the time differences between adjacent active pulse data can be accumulated to obtain the active duration of the user on the second page, forming the user behavior statistical result.

[0098] Through the embodiments of the present disclosure, the interaction operation events of the user on the page can be used as the trigger condition, and only the data related to the actual active operations of the user is collected, so as to accurately reflect the active situation of the user on the page, avoiding the deviation that may be brought by the simple online duration statistics. Moreover, the generation of user active pulse data can be controlled by specifying the window value, avoiding excessive data collection caused by frequent user operations. While ensuring the accurate statistics of the active duration, unnecessary data volume is reduced, and the costs of data storage and processing are lowered.

[0099] Figure 4 It is a flowchart for collecting the user active duration dimension in a behavior data collection method shown according to some embodiments of the present disclosure. As Figure 4 shown, the method for collecting the user active duration dimension may include the following steps.

[0100] Step S410, monitoring a preset trigger event bound to the collection dimension of the active duration of the user on the second page; the preset trigger event includes the interaction operation event of the user on the second page.

[0101] Step S420, in response to the occurrence of an interaction operation event on the second page, recording the time stamp of the event trigger; in response to the time interval between the time stamp and the time of the last user active pulse data being greater than or equal to the specified window value, generating user active pulse data.

[0102] Step S430: Dynamically accumulate the active duration based on the second time difference of adjacent user active pulse data to generate a user behavior statistical result of the active duration.

[0103] Step S440: Correlate and report the user behavior statistical result of the cumulative online duration with the context environment information.

[0104] The specific implementation manners of the above steps have been described in detail in the relevant embodiments and will not be elaborated here.

[0105] In some embodiments of the present disclosure, dynamically accumulating the active duration based on the second time difference of adjacent user active pulse data includes: in response to the second time difference being less than or equal to the specified window value, accumulating the second time difference; in response to the second time difference being greater than the specified window value, accumulating the duration of the specified window value.

[0106] In the embodiments of the present disclosure, when the second time difference is less than or equal to the specified window value, this second time difference can be directly accumulated into the active duration of the user on the second page. For example, if the specified window value is 30 seconds and the second time difference between two adjacent user active pulse data is 20 seconds, then these 20 seconds will be added to the active duration statistics. This processing method is applicable to the situation where the user continuously performs interactive operations within a short time interval and can accurately reflect the actual active time of the user.

[0107] Among them, the specified window value is a pre-set time length threshold for measuring whether the time interval between adjacent user active pulse data is reasonable. It plays a role in standardizing and adjusting the calculation process of the active duration and helps to more accurately count the active time of the user.

[0108] If the second time difference is greater than the specified window value, the actual second time difference will not be accumulated, but the duration of the specified window value will be accumulated. Suppose the specified window value is 30 seconds and the second time difference of adjacent user active pulse data is 90 seconds. At this time, the system will only accumulate 30 seconds into the active duration. This is because when the time difference is large, there may be a situation where the user temporarily leaves the page or is in an inactive state but has not completely left the page. In order to make the active duration statistics more reasonable and more in line with the actual active situation, the specified window value is used for accumulation.

[0109] Through the embodiments of the present disclosure, by comparing the second time difference with a specified window value and adopting different accumulation methods, the active duration of the user on the second page can be more accurately and reasonably counted, so that the statistical result can more truly reflect the actual active situation of the user. Among them, the duration accumulation method in the embodiments of the present disclosure can adapt to various user behavior scenarios. For the situation where the user operates frequently, accumulating according to the actual time difference can accurately record the active time; for the situation where the user has a long time interval between operations, accumulating with the specified window value can avoid overcounting the inactive time, making the active duration statistics more reasonable and more in line with the actual usage scenario.

[0110] Figure 5 It is a schematic diagram for collecting the user active duration dimension in a behavior data collection method shown according to some embodiments of the present disclosure. As Figure 5 shown, the process of automatically collecting the user active duration may include the following content.

[0111] The user side 501 opens the page, and the data collection side 502 determines whether the user shows "activity" by monitoring whether there is an interaction operation event made by the user on the page (for example, monitoring the movement of the user's mouse on the page through the mousemove event, or judging whether the user is active through the touch-related events (such as touchmove) on the mobile device). For the "activity" shown by the user, a pulse can be reported once every not less than the specified window value (such as 30s, which can also be defined by oneself) (information such as the page url, user identity information, page title, browser ua, device id, etc. can be carried). After receiving the reported information, the data processing side 503 calculates the time difference between the current pulse record and the previous pulse record. When the specified window value is set to 30s, if the time difference ≤ 30s, it can be considered that the user has been in an active state during the time period composed of the two pulse reporting moments, and then this difference can be directly added to the active duration; if the time difference > 30s, it means that the user has not been in an active state during this period, and only 30s (i.e., the specified window value) needs to be added. By comparing the actual interval time of the pulse with the specified window value and then determining the time period to be accumulated in this way, the active duration of the user can be simulated and calculated.

[0112] In this embodiment, the acquisition logic is as follows: If the user becomes active once (for example, moves the mouse) at a moment more than 30 seconds after the last reported pulse data, the user can report the data once. Within the next 30s, no matter how active the user is, the data will not be reported again, thus avoiding redundancy. After 30 seconds, if the user becomes active, the data can be reported again. When the data side obtains the calculation interval between two pieces of data, if it is greater than 30s, 30s is taken, which is regarded as the user being active for only 30s. If it is less than 30s, the actual time interval is taken. For example, the situation where the time interval is less than 30s can be that the user opens two browser windows, or a user operates on two devices, etc.

[0113] In this embodiment, since it is inconvenient to measure the active duration with its actual occurrence duration. For example, when the user clicks the mouse once, the click process is very fast, for example, less than 100 milliseconds in actuality. It is impossible to accumulate this negligible time as the active duration, and it also does not conform to the reality (when the user clicks the mouse in 1 millisecond, it does not usually mean that the user is only active for 1 millisecond). Therefore, when the user has an interaction operation, 30s is taken as the active duration, and it is regarded that the user is active within these 30s. Thus, there is no redundant reporting within these 30s. In addition, if a user reports pulse data after operating on the computer side and then operates on the mobile phone side and reports pulse data within 30s, the data side will accumulate the actual time interval according to these two pieces of data.

[0114] In some embodiments of the present disclosure, the acquisition dimension includes page exposure data, and the preset trigger event includes a page routing change event; the event data includes the page routing data involved in the page routing change event.

[0115] In the embodiments of the present disclosure, page exposure data is collected from the perspective of page display for user behavior data, mainly focusing on the exposure situation of the page, that is, information such as the data content and the number of times the page is displayed in front of the user. By analyzing the page exposure data, the user's interest and access frequency for different pages can be understood.

[0116] The page routing change event can refer to the event triggered when the page performs a routing jump (switches from one page to another page), or the event that occurs when the page URL information changes but no jump occurs in a single-page application (SPA). The page routing change event is the condition for starting the collection of page exposure data, ensuring that the data collection is closely related to the actual switching operation of the page.

[0117] The page routing data can include detailed information about the page routing change event. For example, it can include the source page identifier, the target page identifier, the time of page jump, the jump method (such as clicking a link to jump, automatic jump, etc.). These data can be used to analyze the user's page browsing path and browsing behavior.

[0118] In some embodiments of the present disclosure, when the collection dimension includes page exposure data and the event data includes page routing data involved in the page routing change event, converting the event data into user behavior statistical results may include: suppressing page routing data with high-frequency changes through a debounce mechanism; and / or, in response to the page routing data satisfying a first ignoring condition, ignoring the corresponding page routing change event.

[0119] In the embodiments of the present disclosure, the debounce mechanism is a mechanism for handling high-frequency events. In this solution, for high-frequency changes in page routing, by setting a time threshold, only the data of the last event is retained within this threshold, and intermediate duplicate or invalid events are filtered out to reduce the data volume and improve the accuracy of data processing.

[0120] The first ignoring condition may be some pre-set rules or criteria for determining whether a page routing change event needs to be ignored. Page routing change events that meet these conditions will not be included in the calculation of user behavior statistical results, thereby excluding some page switching operations that have no practical value for user behavior analysis.

[0121] In some embodiments of the present disclosure, the first ignoring condition includes: dynamically determining ignoring reports through the routing path field value in the first ignoring function; where the routing path field value includes: preset path information and / or custom path information injected by the user through a third parameter-passing function.

[0122] In the embodiments of the present disclosure, some known field values that need to be ignored can be set in the first ignoring function. When the source page identifier or target page identifier in the page routing data matches the set field value, the current page routing change event can be ignored and not included in the calculation of user behavior statistical results.

[0123] Among them, a set of path information can be preset as the routing path field value in the first ignoring function; or a third parameter-passing function can be provided to the user, enabling the user to inject their own defined path information through the third parameter-passing function as the routing path field in the first ignoring function, thereby increasing the flexibility of whether to ignore page routing change events and allowing the user to customize the page routing that needs to be ignored from reporting according to their own needs or specific scenarios.

[0124] Through the embodiments of the present disclosure, high-frequency changed page routing data can be suppressed through the debounce mechanism, avoiding a large amount of redundant data generated by the user's rapid page switching, making the collected data more refined and accurate, and reducing the interference of data noise on the analysis results. Some page routing change events can also be ignored by setting the first ignoring condition to ensure that the statistical results better meet the statistical needs of users.

[0125] In some embodiments of the present disclosure, monitoring page routing change events includes: rewriting the browser's native routing change method to trigger a custom routing change event when the rewritten method is called and causes a page routing change; monitoring the custom routing change event to capture routing change behavior; monitoring the browser's history state change event and anchor change event.

[0126] In the embodiments of the present disclosure, the browser's native routing change method can be a method provided by the browser itself for managing page routing and history records. For example, it can include methods such as pushState (used to add a record to the history stack and update the URL without refreshing the page), replaceState (used to replace the record in the current history stack and update the URL, also without refreshing the page), etc. These methods are the basic functions for the browser to achieve page non-refresh jumps and history management.

[0127] The user can add a custom routing change event when rewriting the browser's native routing change method. When the rewritten method is called and causes a page routing change, this event will be triggered to notify the system that the page has undergone a routing change for subsequent data collection and processing.

[0128] During the rewriting process, in addition to retaining the basic functions of the original method, additional logic can be added so that when the rewritten method is called to implement a page routing change, a custom routing change event can be triggered.

[0129] For example, in a Web application, the original browser's pushState and replaceState methods are used to manage history records and achieve page non-refresh jumps. After rewriting these methods, the URL data before and after the use of the pushState or replaceState method can be intercepted. By comparing whether the URL data has changed before and after the method is used, it can be determined whether the call of the pushState or replaceState method has caused a page routing change; and when it is determined that a page routing change has occurred, a custom routing change event is triggered.

[0130] In the embodiments of the present disclosure, the browser's history state change event (popstate event, such as the event triggered when the user clicks the forward or backward button of the browser) can be monitored to respond to the browser's forward / backward operation. When these events occur, it means that the routing state of the page may have changed, and the system can capture relevant information to determine the routing change situation.

[0131] In the embodiments of the present disclosure, the anchor change event (hashchange event) of the browser can also be monitored to capture the change of the hash fragment. The change of the anchor (such as the part after # in the URL) will also cause a partial update or jump of the page content. Monitoring this event helps to capture the page state change caused by the anchor change, so as to more comprehensively master the page routing change behavior.

[0132] Through the embodiments of the present disclosure, by rewriting the native browser routing change method and monitoring the custom routing change event, the page routing change triggered by the in-app code can be accurately captured. At the same time, monitoring the historical state change event and the anchor change event of the browser can cover the page routing change caused by the user's browser operations (such as forward and backward) and the anchor change. In this way, the page routing change information can be comprehensively obtained to ensure that no user behavior related to the routing change is missed. Moreover, this solution can adapt to different types of page routing change scenarios, whether it is the non-refresh jump within the application, the user's operation on the browser history, or the page change caused by the anchor change, all can be effectively monitored and captured. Thus, the versatility and adaptability of the page exposure data collection method are improved, making it applicable to various Web applications with different architectures and interaction methods.

[0133] Figure 6 It is a schematic diagram for collecting the page exposure data dimension in a behavior data collection method according to some embodiments of the present disclosure, as Figure 6 shown. The process of automatically collecting the page exposure data may include the following contents.

[0134] When the user side 601 enters the page, the data collection side 602 can initialize the monitor. In a web system, when the url changes, it is regarded as user access (page exposure). In the embodiments of the present disclosure, based on the transformation of the browser underlying api (rewriting the pushState and replaceState methods), after initializing the monitor, the data collection side 602 can monitor the default browser events (including the hashChange and popstate events), and report at the time of page initialization. Supplementary to the rewritten method to monitor the custom routing change event, the monitoring of the pushState and replaceState methods is realized, so as to convert the exposure behavior into the monitoring of the url change. When the url change is detected, the data collection side 602 can collect and report the page exposure data (for example, it may include information such as the page url, the department information of the logged-in person, the logged-in person, the page title, the browser ua, the device id, etc.).

[0135] In addition, in the embodiments of the present disclosure, a first ignoring function may be defined. The data collection side 602 may receive the url data through the first ignoring function, compare the url data with the set fields in the first ignoring function, and obtain a comparison result on whether the url data matches the set fields in the first ignoring function (i.e., the result on whether the url data matches the first ignoring function). If the result is a match, it indicates that the url data needs to be ignored. Among them, the first ignoring function may return a boolean value according to the comparison result, and then determine whether not to report based on the returned boolean value. For example, it may not report when the returned value is true.

[0136] In the embodiments of the present disclosure, the data collection side 602 may also adopt a debounce control mechanism, so that reporting will only be performed when there is no new url change within a certain period of time (such as 40 ms). This not only ensures the timeliness of data reporting but also avoids redundant reporting caused by continuous program calls (such as redirects, etc.).

[0137] In the embodiments of the present disclosure, the singleton pattern may be adopted to ensure that the monitor is only created once throughout its life cycle, avoid duplicate reporting of the page, and reduce memory occupancy.

[0138] In the embodiments of the present disclosure, a switch control attribute may be provided, which can be configured in the SDK that can implement the behavioral data collection method provided by the present disclosure, so that developers can independently turn on or off the page exposure function according to specific requirements.

[0139] In some embodiments of the present disclosure, the collection dimension includes user click behavior, and the preset trigger event includes a global click event; the event data includes the data of the element being operated in the global click event.

[0140] In the embodiments of the present disclosure, the collection dimension of user click behavior may, from the perspective of the user's interaction with the page, specifically focus on the behavioral data of the user's click operations on the page. By collecting and analyzing user click behavior, information such as the user's attention, preferences, and operation habits for different elements on the page can be understood. The global click event may refer to an event triggered by any click operation on the page. For example, it may be an element touch or click event. The global click event may be a broad concept covering all possible click scenarios and serving as a condition for initiating the collection of user click behavior data. The data of the element being operated may record the detailed information of the element clicked by the user in the global click event. These data can help determine the specific object clicked by the user and provide a specific direction and basis for analyzing user click behavior.

[0141] In the embodiments of the present disclosure, when a global click event occurs, an event object can be created, and the data of the operated element related to the click event can be recorded through the event object. These data can describe in detail the characteristics of the clicked element, such as the type of the element (button, link, picture, etc.), the ID of the element, the position of the element on the page, the page to which the element belongs, and other information.

[0142] In some embodiments of the present disclosure, when the collection dimension includes the user click behavior and the event data includes the data of the operated element of the global click event, converting the event data into a user behavior statistical result includes: in response to the data of the operated element satisfying the second ignoring condition, ignoring the corresponding global click event.

[0143] In the embodiments of the present disclosure, a preset rule or standard can be used as the second ignoring condition to determine whether the data of the operated element meets the requirement of ignoring the corresponding click event. The second ignoring condition can be determined according to specific business requirements and analysis objectives. For example, it can be used to filter out those click events that have no practical value for user behavior analysis.

[0144] The recorded data of the operated element can be compared with the second ignoring condition. If the data of the operated element meets these preset conditions, the corresponding global click event can be ignored, that is, the click event is not included in the calculation of the user behavior statistical result. For example, assuming that the clicked element is some specific internal test elements, advertisement elements (for some analysis scenarios that only focus on core business operations), etc., these click operations can be ignored by setting the second ignoring condition.

[0145] In some embodiments of the present disclosure, the second ignoring condition includes at least one of the following: the document object model of the element contains an ignoring identifier; dynamically determining ignoring reporting through the element attribute field value in the second ignoring function, where the element attribute field value includes: preset attribute information and / or custom attribute information injected by the user through the fourth parameter passing function.

[0146] In the embodiments of the present disclosure, the document object model (DOM) is a programming interface for HTML documents, which can be used to define the logical structure of the document and provide methods for accessing and operating the document content. A specific identifier (i.e., the ignoring identifier, such as an attribute, class name, etc.) can be set in advance in the DOM of the element to indicate that the element should be ignored. Then, when this ignoring identifier is detected, it can be determined that the click event of the element should be ignored.

[0147] In the embodiments of the present disclosure, it is also possible to determine whether to ignore reporting the global click event according to the element attribute field value in the second ignoring function. Among them, preset attribute information can be preset as the element attribute field value in the second ignoring function; alternatively, a fourth parameter-passing function can be provided to the user, so that the user can inject the element attribute information defined by himself / herself as the element attribute field value in the second ignoring function.

[0148] Through the embodiments of the present disclosure, it is possible to ignore the corresponding global click event through the second ignoring condition, effectively filtering out click data that has no practical significance for user behavior analysis. This avoids the interference of these invalid data on the statistical results, makes the collected data more refined and accurate, improves the quality of the data, and provides a more reliable basis for subsequent analysis.

[0149] Figure 7 FIG. is a schematic diagram of collecting the user click behavior dimension in a behavior data collection method shown according to some embodiments of the present disclosure, as Figure 7 shown, the process of automatically collecting user click behavior may include the following content.

[0150] The user side 701 enters the page, and the data collection side 702 can perceive each click action of the user in real time by monitoring the global click event, and then capture the click event. When the user clicks on the page (mobile touch screen), the browser can create an event object, and all relevant information of the event can be included in the event object. The data collection side 702 can parse the button-related information through this event object, that is, identify and obtain the clicked element (such as the button name), the element Dom attribute (such as the button position), and the custom attribute (such as the ignore flag), etc. to collect the click data, and then report it in combination with other relevant data collected (such as page url, department information where the logged-in person is located, logged-in person, page title, browser ua, device id, etc.).

[0151] Among them, a custom "ignore flag" attribute can be integrated in the Dom layer (where the Dom layer is not restricted by the framework), making the data collection more flexible. If the user adds this attribute to the Dom structure of a specific button or element, the click event of this button or element will be ignored in the subsequent collection process. In addition, in the collection function of the user click behavior dimension, a switch attribute and a second ignoring function can be provided to achieve personalized processing of complex interaction scenarios, greatly improving the flexibility of data collection.

[0152] Among them, the data acquisition side 702 can receive the information of the clicked element (such as button name, button type, etc.) through the second ignore function set in this embodiment, compare the information of the clicked element with the set fields in the second ignore function, and obtain the comparison result of whether the information of the clicked element matches the set fields in the second ignore function. If the result is a match, it means that the click event corresponding to the information of the clicked element needs to be ignored. Among them, the second ignore function can return a boolean value according to the comparison result, and then determine whether to ignore the click event through the returned boolean value. For example, the click event can be ignored when the return value is true.

[0153] In some embodiments of the present disclosure, the context environment information is preset reporting information or custom reporting information injected by the user through the fifth parameter passing function; wherein, the preset reporting information includes at least one of the following: user identity identifier, device parameters, page running environment data, business scenario tags.

[0154] In the embodiments of the present disclosure, the context environment information can be obtained through various channels, which can be preset reporting information or custom reporting information injected by the user through the fifth parameter passing function.

[0155] For the preset reporting information, different types of data included therein can be identified. Among them, the user identity identifier can be used to uniquely determine the user individual, the device parameters can record the relevant characteristics of the device used by the user (such as device model, operating system version, etc.), the page running environment data can cover the environment information during page running (such as network type, screen resolution, etc.), and the business scenario tags can be used to mark the business scenario where the current operation is located (such as product browsing scenario, settlement scenario, etc. in an e-commerce application). These data can be extracted and sorted respectively for subsequent association with the user behavior statistical results.

[0156] The user can also inject custom reporting information through the parameter passing function, and the system will receive and process these custom reporting information. Among them, the parameter passing function is a mechanism defined by the user for passing specific information to the system. The system can parse these custom information to ensure that the format is correct and meets the data processing requirements of the system, and then associate it with the user behavior statistical results.

[0157] Through the embodiments of the present disclosure, the user is allowed to inject custom reporting information through the parameter passing function, making the system more flexible and adaptable. The user can flexibly add the required information to the system according to the actual situation, thereby meeting the personalized data analysis requirements and improving the versatility and scalability of the system.

[0158] It should be noted that the above-mentioned drawings are only schematic illustrations of the processes included in the methods according to some embodiments of the present disclosure, and are not for restrictive purposes. It is easy to understand that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously in, for example, multiple modules.

[0159] The following are embodiments of the apparatus of the present disclosure, which can be used to execute the method embodiments of the present disclosure. For details not disclosed in the apparatus embodiments of the present disclosure, please refer to the method embodiments of the present disclosure.

[0160] Figure 8 is a block diagram of a behavior data acquisition device shown according to some embodiments of the present disclosure. Referring to Figure 8 , the device includes: a monitoring unit 801, a trigger response unit 802, a data processing unit 803, and a reporting unit 804.

[0161] The monitoring unit 801 is configured to monitor a preset trigger event bound to the acquisition dimension; the trigger response unit 802 is configured to generate event data in response to the preset trigger event; the data processing unit 803 is configured to convert the event data into a user behavior statistical result according to the data processing rule corresponding to the acquisition dimension; the reporting unit 804 is configured to report the user behavior statistical result in association with context environment information.

[0162] In some embodiments of the present disclosure, the acquisition dimension includes the online duration of the user on the first page, and the preset trigger event includes a page visibility state change event of the first page; wherein, the trigger response unit 802 generates event data in response to the preset trigger event, including: generating page visibility pulse data in response to a change in the page visibility state of the first page; and generating page visibility pulse data at a specified period when the first page is in a visible state; the data processing unit 803 converts the event data into a user behavior statistical result, including: dynamically accumulating the online duration according to the first time difference between adjacent page visibility pulse data to generate a user behavior statistical result of the cumulative online duration.

[0163] In some embodiments of the present disclosure, the data processing unit 803 dynamically accumulates the online duration according to the first time difference between adjacent page visibility pulse data, including: accumulating the first time difference in response to the first time difference being less than or equal to the specified period; accumulating the duration of the specified period in response to the first time difference being greater than the specified period.

[0164] In some embodiments of the present disclosure, the collection dimension includes the active duration of the user on the second page, and the preset trigger event includes the interaction operation event of the user on the second page; wherein, the trigger response unit 802 generates event data in response to the preset trigger event, including: recording the timestamp of the event trigger in response to the occurrence of the interaction operation event on the second page; generating user active pulse data in response to the time interval between the timestamp and the last user active pulse data being greater than or equal to the specified window value; the data processing unit 803 converts the event data into user behavior statistical results, including: dynamically accumulating the active duration according to the second time difference between adjacent user active pulse data to generate the user behavior statistical result of the active duration.

[0165] In some embodiments of the present disclosure, the data processing unit 803 dynamically accumulates the active duration according to the second time difference between adjacent user active pulse data, including: accumulating the second time difference in response to the second time difference being less than or equal to the specified window value; accumulating the duration of the specified window value in response to the second time difference being greater than the specified window value.

[0166] In some embodiments of the present disclosure, the collection dimension includes page exposure data, and the preset trigger event includes a page routing change event; the event data includes the page routing data involved in the page routing change event; wherein, the data processing unit 803 converts the event data into user behavior statistical results, including: suppressing the page routing data with high-frequency changes through a debounce mechanism; and / or, ignoring the corresponding page routing change event in response to the page routing data satisfying the first ignoring condition.

[0167] In some embodiments of the present disclosure, the monitoring unit 801 monitors the page routing change event, including: rewriting the browser native routing change method, triggering a custom routing change event when the call to the rewritten method causes a page routing change; monitoring the custom routing change event to capture the routing change behavior; monitoring the historical state change event and the anchor change event of the browser.

[0168] In some embodiments of the present disclosure, the collection dimension includes user click behavior, and the preset trigger event includes a global click event; the event data includes the data of the element being operated in the global click event; wherein, the data processing unit 803 converts the event data into user behavior statistical results, including: ignoring the corresponding global click event in response to the data of the element being operated satisfying the second ignoring condition.

[0169] In some embodiments of the present disclosure, the context information is preset reporting information or custom reporting information injected by the user through a fifth parameter-passing function; wherein, the preset reporting information includes at least one of the following: user identity identifier, device parameters, page running environment data, business scenario tags.

[0170] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0171] Figure 9 FIG. 900 is a block diagram of a device 900 for collecting behavioral data according to some embodiments of the present disclosure. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0172] Referring to Figure 9 , the device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0173] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0174] The memory 904 is configured to store various types of data to support the operation of the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0175] Power component 906 provides power for various components of device 900. The power component 906 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 900.

[0176] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operations. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.

[0177] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive external audio signals when the device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.

[0178] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.

[0179] The sensor assembly 914 includes one or more sensors for providing a status assessment of various aspects of the device 900. For example, the sensor assembly 914 can detect the on / off state of the device 900, the relative positioning of components, such as the display and keypad of the device 900. The sensor assembly 914 can also detect a change in the position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0180] The communication component 916 is configured to facilitate communication between the device 900 and other devices in a wired or wireless manner. The device 900 can access a wireless network based on communication standards, such as WiFi, 3G, 4G, 5G, other communication standards, or a combination thereof. In some embodiments of the present disclosure, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In some embodiments of the present disclosure, the communication component 916 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0181] In some embodiments of the present disclosure, the device 900 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above method.

[0182] In some embodiments of the present disclosure, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the above instructions can be executed by the processor 920 of the device 900 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0183] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a behavior data collection method, the method comprising: monitoring a preset trigger event bound to a collection dimension; generating event data in response to the preset trigger event; converting the event data into a user behavior statistical result according to a data processing rule corresponding to the collection dimension; and associating and reporting the user behavior statistical result with context environment information.

[0184] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0185] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A method for collecting behavioral data, characterized in that, Including: Monitoring a preset trigger event bound to a collection dimension; Generating event data in response to the preset trigger event; Converting the event data into a user behavior statistical result according to a data processing rule corresponding to the collection dimension; Associating and reporting the user behavior statistical result with context environment information.

2. The method according to claim 1, characterized in that The collection dimension includes the online duration of the user on the first page, and the preset trigger event includes a page visibility status change event of the first page; Among them, generating event data in response to the preset trigger event includes: generating page visibility pulse data in response to a change in the page visibility status of the first page; and generating page visibility pulse data at a specified period when the first page is in a visible state; Converting the event data into a user behavior statistical result includes: dynamically accumulating the online duration according to a first time difference between adjacent page visibility pulse data to generate a user behavior statistical result of the accumulated online duration.

3. The method according to claim 2, wherein Dynamically accumulating the online duration according to a first time difference between adjacent page visibility pulse data includes: Responding to the first time difference being less than or equal to the specified period, and accumulating the first time difference; Responding to the first time difference being greater than the specified period, and accumulating the duration of the specified period.

4. The method according to claim 2, wherein The specified period is determined according to preset period information, or is determined according to custom period information injected by the user through a first parameter passing function.

5. The method according to claim 1, wherein The collection dimension includes the active duration of the user on the second page, and the preset trigger event includes an interaction operation event of the user on the second page; Among them, generating event data in response to the preset trigger event includes: recording a timestamp of the event trigger in response to an interaction operation event occurring on the second page; generating user active pulse data in response to the time interval between the timestamp and the previous user active pulse data being greater than or equal to a specified window value; Converting the event data into a user behavior statistical result includes: dynamically accumulating the active duration according to a second time difference between adjacent user active pulse data to generate a user behavior statistical result of the active duration.

6. The method according to claim 5, characterized in that, Dynamically accumulating the active duration according to a second time difference between adjacent user active pulse data includes: Responding to the second time difference being less than or equal to the specified window value, and accumulating the second time difference; Responding to the second time difference being greater than the specified window value, and accumulating the duration of the specified window value.

7. The method according to claim 5, wherein The specified window value is determined according to preset window duration information, or is determined according to custom window duration information injected by the user through a second parameter passing function.

8. The method according to claim 1, characterized in that, The collection dimension includes page exposure data, the preset trigger event includes a page routing change event; the event data includes page routing data involved in the page routing change event; Among them, converting the event data into a user behavior statistical result includes: suppressing page routing data with high-frequency changes through a debounce mechanism; and / or ignoring a corresponding page routing change event in response to the page routing data satisfying a first ignoring condition.

9. The method according to claim 8, characterized in that, Monitoring a page routing change event includes: Rewrite the native browser routing change method to trigger a custom routing change event when the rewritten method is called and causes a page routing change; monitor the custom routing change event to capture routing change behaviors; Monitor the browser's history state change event and anchor change event.

10. The method according to claim 8, wherein The first ignoring condition includes: dynamically determining to ignore reporting through the routing path field value in the first ignoring function; Wherein, the routing path field value includes: preset path information and / or custom path information injected by the user through the third parameter-passing function.

11. The method according to claim 1, wherein The collection dimension includes user click behaviors, and the preset trigger event includes a global click event; the event data includes the data of the element operated on by the global click event; Wherein, converting the event data into a user behavior statistical result includes: in response to the data of the element operated on satisfying the second ignoring condition, ignoring the corresponding global click event.

12. The method according to claim 11, characterized in that, The second ignoring condition includes at least one of the following: The document object model of the element contains an ignoring identifier; Dynamically determining to ignore reporting through the element attribute field value in the second ignoring function, wherein the element attribute field value includes: preset attribute information and / or custom attribute information injected by the user through the fourth parameter-passing function.

13. The method according to claim 1, characterized in that, The context environment information is preset reporting information or custom reporting information injected by the user through the fifth parameter-passing function; Wherein, the preset reporting information includes at least one of the following: user identity identifier, device parameters, page running environment data, business scenario label.

14. A behavior data acquisition device, characterized in that, Includes: A monitoring unit, configured to monitor a preset trigger event bound to the collection dimension; A trigger response unit, configured to generate event data in response to the preset trigger event; A data processing unit, configured to convert the event data into a user behavior statistical result according to the data processing rule corresponding to the collection dimension; A reporting unit, configured to report the user behavior statistical result in association with the context environment information.

15. An electronic device, characterized in that, Includes: A processor; A memory for storing instructions executable by the processor; Wherein, the processor is configured to implement the steps of the method according to any one of claims 1-13.

16. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile terminal, enabling the mobile terminal to execute the steps of the method according to any one of claims 1-13.

17. A computer program product, comprising a computer program, characterized in that, The computer program, when executed by the processor, implements the steps of the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Page stay duration acquisition method and device, computer equipment and storage medium

    CN116226578A

  • User online state detection method and device, computer equipment and storage medium

    CN117520125A