A method and system for collecting network television user operation data
By introducing plug-in to monitor DOM loading and generating unique identifiers in the IPTV system, dynamically collecting user operation data, solving the fine granularity problem of the data acquisition system, improving the accuracy of data analysis and version iteration efficiency.
Patent Information
- Application Number
- CN202510549517.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2045-04-29
AI Technical Summary
The granularity of the existing IPTV user operation data acquisition system is too detailed, resulting in high pressure on data analysis, deviation in results and high cost of version iteration, making it difficult to effectively screen user behavior data.
The network TV user operation data acquisition method based on dynamic granularity is adopted. The plug-in monitors the DOM loading situation, generates a unique identifier of the recommended bit, and carries the identifier when the user behaves, assembles the JSON string and reports it to the server, and judges whether to report data based on the life cycle to reduce code dispersion.
It realizes filtering effective information in user behavior data, reduces the pressure on the data analysis system, reduces the number of version iteration code modifications, shortens the iteration cycle, and improves the accuracy and efficiency of data analysis.
Smart Images

Figure CN120075536B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet TV data processing, and specifically to a method for collecting Internet TV user operation data based on dynamic granularity. Background Art
[0002] The products of IPTV services will further develop in the aspects of diversification of service content, diversification of video forms, and multi-screen interaction in the future. At present, the end-users of IPTV services mainly receive live broadcasts and film and television programs. However, the demands of household users for audio-visual products are far more than just live TV and film and television programs. With the gradual saturation of the number of users, the IPTV content operation department will further explore the potential of users and provide more vertical segmented content and local characteristic content on IPTV content, including education and training, healthcare and wellness, tourism and leisure, local services, etc. Based on the large number of IPTV users, the data generated by users using IPTV is increasing continuously. How to screen effective data from these large amounts of data has become the top priority for predicting user preferences and behaviors and delivering appropriate video content, related services, and products to users.
[0003] At present, the granularity of some user information collection systems is too detailed. For example, which page the user enters, what element browsing operations are performed on the page, the posters displayed in the page recommendation positions, the playback in the small window, etc., and all the data is reported to the server, which increases the pressure on the data analysis system, and the analysis results may also be deviated, thereby causing the content operation department to introduce and deliver inappropriate video content, related services, and products, and reducing the viewing experience of users. Therefore, collecting data according to an appropriate granularity is a problem that needs to be solved.
[0004] In addition, in the EPG page environment, collecting user operation data, the specific scenarios include: page jump, content playback, product ordering, etc. How to collect effective information and solve the problem of scattered code and reduce the version iteration cost in the process is also a problem that needs to be solved.
[0005] Therefore, there is an urgent need for a method for collecting Internet TV user operation data based on dynamic granularity to solve the above problems. Summary of the Invention
[0006] The purpose of the present invention is to provide a method for collecting Internet TV user operation data based on dynamic granularity, which realizes screening effective data of effective scenarios among many reported scenarios of user behaviors, solves the problem of scattered code in the process of information reporting, and at the same time reduces the amount of code modification for version iteration and shortens the iteration cycle.
[0007] To achieve the above object, the present invention is realized through the following technical solutions:
[0008] On the one hand, a method for collecting network TV user operation data is provided, including the following steps:
[0009] Step S1: Create a new page, introduce the encapsulated plugin in the page, use addEventListener to add a DOMContentLoaded event to monitor the DOM loading situation, and encapsulate this operation in the plugin. Generate a unique identifier for the recommended position according to the encapsulated plugin.
[0010] Step S2: Carry the identifier in step S1 when the user browses, jumps, or clicks on the recommended position on the page.
[0011] Step S3: When the plugin in step S1 detects the identifier in step S2, it will automatically obtain the processed set-top box and user account information, assemble them with the pit position identifier, and convert them into a JSON string.
[0012] Step S4: The plugin reports the assembled JSON string to the server through a network request.
[0013] Preferably, in step S1, generating the unique identifier for the recommended position is specifically:
[0014] Create a new page, perform plugin encapsulation in the page, and generate a unique identifier for the recommended position according to the page identifier of the new page and the position of the recommended position. The identifier is used for subsequent tracking and analysis of the user's interaction with the recommended position.
[0015] Preferably, in step S1, monitoring the DOM loading situation is specifically:
[0016] If the DOM loading is completed, continue with the subsequent reporting operation;
[0017] If the DOM is not loaded completely, but it is detected that the user stays on the current page for more than 3 seconds, continue with the subsequent reporting operation and end the monitoring;
[0018] If it is detected that the user leaves the current page before the DOM loading is completed, it indicates that the page life cycle ends and no data is reported.
[0019] Preferably, after the DOM loading is completed, it is determined whether to report according to the user behavior and the page life cycle, including:
[0020] Execute data reporting 2 seconds after the DOM loading is completed without waiting for the loading of other resources of the page to be completed;
[0021] If the user does not stay on the page for another 2 seconds after the DOM loading is completed, it is regarded as invalid data and no data reporting is performed.
[0022] Preferably, step S2 is specifically as follows: Set a parameter in the URL, where the parameter is used to represent the data that needs to be reported for user behavior, and the value of the parameter represents the generated recommendation position identifier. Set a probe object, and when the above parameter is monitored, the object performs a reporting action.
[0023] Preferably, in step S3, the assembly with the pit position identifier is specifically as follows:
[0024] Define a unique and non-repeating identifier for each reporting scenario to determine the parameter name corresponding to each scenario behavior parameter;
[0025] When the page is initialized, define a selection container. Each item in the container corresponds to a reporting scenario, that is, key-value, where the key represents the scenario identifier and the value represents the assembled JSON string;
[0026] When the object performs a reporting action, after traversing the selection container and obtaining the corresponding reporting information, a subsequent network request is made.
[0027] Preferably, step S4 is specifically as follows:
[0028] Report the obtained reporting information to the server through a network request and perform a callback after the reporting.
[0029] On the other hand, provide a data collection system based on the above network TV user operation data collection method, characterized by including:
[0030] An identifier generation module, which creates a new page, introduces a packaged plugin in the page, uses addEventListener to add a DOMContentLoaded event to monitor the DOM loading situation, and at the same time encapsulates this operation in the plugin, and generates a unique identifier for the recommendation position according to the packaged plugin;
[0031] An identifier recording module, which is used to: carry the identifier when the user browses, jumps, or clicks on the recommendation position on the page;
[0032] A JSON string conversion module, which is used to: when the plugin detects the identifier, automatically obtain the processed set-top box and user account information, assemble them with the pit position identifier, and convert them into a JSON string;
[0033] A data reporting module, which is used to: the plugin reports the assembled JSON string to the server through a network request.
[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0035] The present invention encapsulates a probe data reporting proxy plugin that integrates event listening, data assembly, data reporting, and heartbeat in combination with the web page life cycle. Users only need to introduce this plugin when developing a page, and the page probe ID will be automatically generated, and data reporting will be automatically completed when the page jumps, reducing code dispersion during the reporting process of each page and avoiding code injection problems; the present invention adopts a lightweight data collection strategy to collect and filter valid information among numerous user behaviors; at the same time, the present invention adopts a listening callback mechanism to avoid data underreporting. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is the flowchart of the method of the present invention;
[0037] Figure 2 is the timing diagram of the method flow of the present invention;
[0038] Figure 3 is the schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by this application.
[0040] In the present invention, terms such as "upper", "lower", "left", "right", "front", "rear", "vertical", "horizontal", "side", "bottom", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only relationship words determined for the convenience of describing the structural relationship of each component or element of the present invention, and do not specifically refer to any component or element of the present invention, and should not be construed as a limitation to the present invention.
[0041] Embodiment:
[0042] As Figure 1-2 shown, this embodiment provides a method for collecting network TV user operation data, including the following steps:
[0043] S1: Create a new page and perform plugin encapsulation in the page. The plugin is used to combine the web page life cycle, listen for callbacks, identify valid behavior data, then process and assemble the corresponding behavior data according to the data collection specification, and finally report it. According to the encapsulated plugin, generate a unique identifier for the recommended position;
[0044] S2: Carry the identifier in step S1 when the user browses, jumps, or clicks on the recommended position of the page;
[0045] S3: Use addEventListener to add a DOMContentLoaded event to monitor the DOM loading situation, and encapsulate this operation in the plugin in step S1;
[0046] S4: When the plugin in step S3 detects the identifier in step S2, it will automatically obtain the processed set-top box and user account information, assemble them with the pit identifier, and convert them into a JSON string;
[0047] S5: The plugin reports the assembled JSON string to the server via a network request.
[0048] Among them, the method for creating a new page and automatically generating a unique identifier for the recommended position according to the encapsulated method in step S1 is:
[0049] Automatically number according to the page identifier of the new page and the position of the recommended position (i.e., the row and column where it is located) to generate a unique identifier for the recommended position, which is used to track and analyze the interaction between the user and the recommended position subsequently.
[0050] In step S2, the method of carrying this identifier when the user browses, jumps, or clicks on the recommended position is:
[0051] Agree on a URL parameter to represent that this behavior needs to report data, and the parameter value is the previously generated recommended position identifier. When the user browses the page, jumps to other pages, or clicks on the recommended position, it is necessary to ensure that these operations contain the previously generated recommended position identifier, which is achieved through the URL parameter method. Instantiate a probe object, and when this parameter is detected, the instance object performs the reporting action.
[0052] Step S3 is specifically:
[0053] “FUNCTION domReady():
[0054] / / Define the actual fn() to be executed
[0055] fn = FUNCTION:
[0056] SET timeout for 2000ms:
[0057] CALL probeInit()
[0058] IF browser supports addEventListener THEN
[0059] / / Modern browser handling
[0060] ADD event listener for "DOMContentLoaded":
[0061] WHEN event triggers:
[0062] REMOVE this event listener
[0063] SET initDoFlag = TRUE
[0064] EXECUTE fn() / / Here, probeInit() will be executed 2 seconds after startup
[0065] / / 3-second timeout fallback solution set in parallel
[0066] SET timeout for 3000ms:
[0067] IF initDoFlag is NOT TRUE THEN
[0068] CALL probeInit() / / Call directly (without the 2-second delay of fn)
[0069] ELSE IF browser supports attachEvent THEN
[0070] / / IE browser handling
[0071] ATTACH event handler for "onreadystatechange":
[0072] WHEN readyState becomes "complete":[[ID=ID=37]]
[0073] DETACH this event handler
[0074] EXECUTE fn() / / Start probeInit() 2 seconds after startup
[0075] / / IE-specific doScroll detection method
[0076] IF document supports doScroll AND not in iframe THEN
[0077] TRY:
[0078] PERFORM doScroll('left')
[0079] EXECUTE fn() / / Execute probeInit() 2 seconds after startup
[0080] CATCH error:
[0081] WAIT 20ms THEN RETRY this check”
[0082] The above pseudocode indicates that:
[0083] If the DOM is loaded, continue with the subsequent reporting operations;
[0084] If the DOM is not loaded, but it is detected that the user stays on the current page for more than 3 seconds, continue with the subsequent reporting operations and end the monitoring;
[0085] If it is detected that the user leaves the current page before the DOM is loaded, it indicates the end of the page life cycle and no data is reported;
[0086] After the DOM is loaded, determine whether to report based on user behavior and page life cycle, including:
[0087] 2 seconds after the DOM is loaded, without waiting for the loading of other resources on the page, perform data reporting;
[0088] If the user does not stay on the page for 2 seconds after the DOM is loaded, it is regarded as invalid data and no data reporting is performed.
[0089] In step S4, the specific assembly with the pit position identifier is as follows:
[0090] Define a unique and non-repeating identifier for each reporting scenario to determine the parameter names corresponding to the parameter values of each scenario behavior;
[0091] When initializing the page, define a selection container. Each item in the container corresponds to a reporting scenario, that is, key-value, where the key represents the scenario identifier and the value represents the assembled JSON string;
[0092] When the object performs the reporting action, traverse the selection container, obtain the corresponding reporting information, and then perform subsequent network requests;
[0093] Report the obtained reporting information to the server through a network request and perform a callback after reporting.
[0094] As Figure 3 shown, this embodiment also provides a data collection system based on the above-mentioned data collection method for network TV user operation data, including:
[0095] An identification generation module, configured to: create a new page, encapsulate plugins in the page, and generate a unique identifier for the recommended position according to the encapsulated plugins;
[0096] An identification recording module, configured to: carry the identifier when the user browses, jumps, or clicks on the recommended position of the page;
[0097] A DOM loading condition monitoring module, configured to: use addEventListener to add a DOMContentLoaded event to monitor the DOM loading condition, and encapsulate this operation in the plugin;
[0098] A JSON string conversion module, configured to: when the plugin detects the identifier, automatically obtain the processed set-top box and user account information, assemble them with the pit identifier, and convert them into a JSON string;
[0099] A data reporting module, configured to: report the assembled JSON string to the server through a network request by the plugin.
[0100] The above has made a specific description of the preferred embodiment of the present invention, but the present invention is not limited to the described embodiment. Those skilled in the art can make various equivalent deformations or replacements without departing from the spirit of the present invention, and these equivalent deformations or replacements are all included in the scope defined by the claims of this application.
Claims
1. A method for collecting network TV user operation data, characterized in that, Including the following steps: Step S1: Create a new page, introduce the encapsulated plugin in the page, use addEventListener to add a DOMContentLoaded event to monitor the DOM loading situation, and encapsulate this operation in the plugin. Generate a unique identifier for the recommended position according to the encapsulated plugin, and this identifier is used to track and analyze the interaction between the user and the recommended position later; Step S2: Carry the identifier in step S1 when the user browses, jumps, or clicks on the recommended position on the page; Step S3: When the plugin in step S1 detects the identifier in step S2, it will automatically obtain the processed set-top box and user account information, assemble them with the pit identifier, and convert them into a JSON string; Step S4: The plugin reports the assembled JSON string to the server through a network request; In step S1, monitoring the DOM loading situation specifically means: If the DOM loading is completed, continue with the subsequent reporting operations; If the DOM is not loaded completely, but it is detected that the user stays on the current page for more than 3 seconds, continue with the subsequent reporting operations and end the monitoring; If it is detected that the user leaves the current page before the DOM loading is completed, it indicates that the page life cycle ends and no data is reported; Step S2 is specifically: Set a parameter in the URL, and this parameter is used to represent the data that needs to be reported for the user behavior. The value of this parameter represents the generated recommended position identifier. Set a probe object, and when the above parameter is detected, the object executes the reporting action.
2. The method for collecting network television user operation data according to claim 1, wherein, After the DOM is loaded completely, determine whether to report according to the user behavior and the page life cycle, including: Execute data reporting 2 seconds after the DOM is loaded completely without waiting for the loading of other resources on the page to be completed; If the user does not stay on the page for another 2 seconds after the DOM is loaded completely, it is regarded as invalid data and no data reporting is executed.
3. The method for collecting network television user operation data according to claim 1, characterized in that, In step S3, the assembly with the pit identifier specifically means: Define a unique and non-repeating identifier for each reporting scenario to determine the parameter name corresponding to the parameter of each scenario behavior; When the page is initialized, define a selection container, and each item in the container corresponds to a reporting scenario, that is, key-value, where the key represents the scenario identifier and the value represents the assembled JSON string; When the object executes the reporting action, traverse the selection container and obtain the corresponding reporting information, and then perform subsequent network requests.
4. The method for collecting network television user operation data according to claim 1, wherein Step S4 is specifically: Report the obtained reporting information to the server through a network request and perform a callback after the reporting; 5. A data acquisition system based on the network TV user operation data acquisition method as described in claim 1, characterized in that, Including: An identifier generation module that creates a new page, introduces the encapsulated plugin in the page, uses addEventListener to add a DOMContentLoaded event to monitor the DOM loading situation, and encapsulates this operation in the plugin, and generates a unique identifier for the recommended position according to the encapsulated plugin; An identifier recording module, which is used to: Carry the identifier when the user browses, jumps, or clicks on the recommended position on the page; The JSON string conversion module is used to: when the plugin detects the identifier, automatically obtain the processed set-top box and user account information, assemble them with the pit identifier, and convert them into a JSON string; The data reporting module is used to: the plugin reports the assembled JSON string to the server through a network request.
Citation Information
Patent Citations
Method for detecting keywords of probe system by IPTV
CN112130854A
Non-intrusive burying point data collection method and system based on web terminal
CN115328781A