Data processing method, device and system
By referring to the buried point function component on the client, covering multiple target web pages of the target website and binding it to user operation events, the problem of strong invasiveness of buried point logic in the existing technology is solved, and the buried point function for specific web pages is realized, and the usability and scalability of the buried point system is improved.
Patent Information
- Application Number
- CN202411205497.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing buried point technology adds buried point logic at the web page code level, which is highly invasive and cannot perform buried point detection and data reporting on specific web pages.
By referring to the pre-written point function component on the client, it covers multiple target web pages of the target website and binds them to user operation events to generate and report the buried point collection data.
It realizes the implementation of the burying function for specific web pages while alleviating the intrusion of web page code, and improves the usability and scalability of the burying system.
Smart Images

Figure CN118709185B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device and system. Background Art
[0002] Tracking is a term for data collection scenarios, which refers to the relevant technologies and implementation processes for capturing, processing and sending specific user behaviors or events. In existing tracking technologies, tracking can only be achieved by adding tracking logic at the web page code level, which is highly invasive and cannot perform tracking detection and tracking data reporting for specific web pages in the website. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a data processing method, device and system, which can realize the tracking function while reducing the intrusion of web page code and realize the tracking function for specific web pages in the website.
[0004] To achieve the above objective, according to one aspect of the present invention, a data processing method is provided.
[0005] The data processing method of the present invention is executed on the client; the method includes: referencing a pre-written tracking point function component for a target website; using the tracking point function component to cover multiple target web pages of the target website, so that the tracking point function component is bound to the user operation event executed on each target web page; in response to monitoring the occurrence of a user operation event on each target web page, generating first tracking point collection data according to the tracking point function component, and forming second tracking point collection data based on the first tracking point collection data to be reported to a pre-established data collection server.
[0006] Optionally, the method also includes: in response to accessing the target website, receiving a configuration file issued by a website server that supports the target website; referencing a pre-written tracking function component for the target website, specifically including: declaring a reference to the tracking function component in the configuration file; and utilizing the tracking function component to cover multiple target web pages of the target website, specifically including: establishing a mapping relationship between the tracking function component and each target web page in the configuration file.
[0007] Optionally, the configuration file contains the specific information of the burying points of multiple web page elements of the target web page; the specific information of the burying point of each web page element includes: the identifier of the web page element, the type of operation event, the creation time of the specific information of the burying point, and one or more burying point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and the type of operation event is an exposure event or a click event; each burying point parameter includes: a burying point information name, a burying point information source, a feedback data positioning rule and a conversion function, and the burying point information source includes: an interface and a session storage; when the burying point information source is an interface, the burying point parameters also include: an interface request address and an interface input parameter.
[0008] Optionally, in response to monitoring the occurrence of user operation events on each target web page, generating first burying point collection data according to the burying point function component specifically includes: traversing the web page elements that appear in the visual interface of the current target web page, and using a change observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, and determining whether the identifier of the web page element appears in the configuration file and whether it corresponds to an exposure event; if the identifier of the web page element appears in the configuration file and corresponds to an exposure event, generating first burying point collection data according to the burying point information source of the web page element in the configuration file; when monitoring a click event occurring on a web page element of the target web page, determining whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to a click event, generating first burying point collection data according to the burying point information source of the web page element in the configuration file.
[0009] Optionally, the method also includes: when accessing the target website, intercepting all requests sent to the website server and all responses returned by the website server, and saving the intercepted request data and response data locally; generating the first burying point collection data according to the burying point information source of the web page element in the configuration file, specifically including: if the burying point information source of the web page element in the configuration file is an interface, matching the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determining the first burying point collection data based on the feedback data positioning rule of the web page element in the configuration file.
[0010] Optionally, generating the first burying point collection data according to the burying point information source of the web page element in the configuration file specifically includes: if the burying point information source of the web page element in the configuration file is session storage and corresponds to an exposure event, saving the identifier and current timestamp of the web page element in the session storage, and extracting the corresponding first burying point collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; if the burying point information source of the web page element in the configuration file is session storage and corresponds to a click event, detecting the number of identifiers of the web page element that are triggered; if the number is 1, saving the identifier and current timestamp of the web page element in the session storage, and extracting the corresponding first burying point collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; and the data in the session storage; if the embedding information source of the web page element in the configuration file is the session storage, and the number of identifiers of the corresponding click event and the triggered web page element is greater than 1, then obtain an index number corresponding to each web page element identifier, and the index number is used to indicate a tab inside the web page element; the identifier of the web page element, each obtained index number, and the timestamp corresponding to each index number are saved in the session storage; when the embedding reporting time is reached, determine the index number with the largest timestamp of the web page element from the session storage, and generate the corresponding first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file, the web page element identifier in the session storage, and the index number with the largest timestamp.
[0011] Optionally, during the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, adding a unique function identification code in the target website to the outer layer of the return result of the map function, and adding a storage implementation code to the outer layer of the return result of the map function; the storage implementation code is used for: during the web page loading process, when the client uses the map function to process an array as a web page element to render the web page, saving the key-value pair on the client; the key of the key-value pair is the function identification code of the map function, and the value is the string data formed by converting each option in the array; if the web page element is in the configuration file The embedding information source is an interface, and the first embedding collection data is determined based on the feedback data positioning rule of the web page element in the configuration file, including: judging whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element does not contain a map function, extracting the first embedding collection data from the response data corresponding to the pre-saved and matched request data based on the feedback data positioning rule of the web page element in the configuration file; when the ancestor element of the web page element contains a map function, determining the function identification code of the ancestor element, using the function identification code to search for the corresponding string data formed by the option conversion of the array from the key-value pair pre-saved by the client, and determining the first embedding collection data from the found string data according to the feedback data positioning rule of the web page element in the configuration file.
[0012] Optionally, the forming of second buried point collection data reported to a pre-established data collection server based on the first buried point collection data includes: processing the first buried point collection data according to the conversion function of the web page element in the configuration file to form second buried point collection data.
[0013] To achieve the above objective, according to another aspect of the present invention, a data processing device is provided.
[0014] The data processing device of the embodiment of the present invention is arranged on the client side; the device includes: a reference unit, which references a pre-written embedding function component for a target website; a binding unit, which utilizes the embedding function component to cover multiple target web pages of the target website so that the embedding function component is bound to the user operation event executed on each target web page; a embedding processing unit, which generates first embedding collection data according to the embedding function component in response to monitoring the occurrence of user operation events on each target web page, and forms second embedding collection data based on the first embedding collection data to be reported to a pre-established data collection server.
[0015] To achieve the above objective, according to another aspect of the present invention, a data processing system is provided.
[0016] The data processing system of an embodiment of the present invention includes: a client and a data collection server; the client references a pre-written embedding function component for a target website, and uses the embedding function component to cover multiple target web pages of the target website, so that the embedding function component is bound to the user operation event executed on each target web page; in response to monitoring the occurrence of a user operation event on each target web page, the client generates first embedding collection data according to the embedding function component, forms second embedding collection data based on the first embedding collection data, and reports the second embedding collection data to the data collection server.
[0017] To achieve the above objective, according to another aspect of the present invention, an electronic device is provided.
[0018] An electronic device of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method provided by the present invention.
[0019] To achieve the above objective, according to yet another aspect of the present invention, a non-transitory computer-readable storage medium is provided.
[0020] A non-transitory computer-readable storage medium of the present invention stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method provided by the present invention.
[0021] According to the technical solution of the present invention, one embodiment of the above invention has the following advantages or beneficial effects:
[0022] A pre-written tracking function component is referenced for the target website, and the tracking function component is used to cover multiple target web pages of the target website, so that the tracking function component is bound to the user operation event executed on each target web page; in response to monitoring the occurrence of user operation events on each target web page, a first tracking collection data is generated according to the tracking function component, and a second tracking collection data is formed based on the first tracking collection data and reported to a pre-established data collection server. According to the above steps, a website tracking function based on the tracking function component and for a specific web page can be implemented, reducing the intrusion into the web page code and improving the availability and scalability of the tracking system. Furthermore, the present invention provides a tracking data reporting solution for complex situations involving interface calls, loop iterations of web page elements, etc.
[0023] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0025] Figure 1 It is a schematic diagram of the main steps of the data processing method in an embodiment of the present invention;
[0026] Figure 2 is a schematic diagram of the structure of a data processing device in an embodiment of the present invention;
[0027] Figure 3 is a schematic diagram of the structure of a data processing system in an embodiment of the present invention;
[0028] Figure 4 It is a schematic diagram of the hardware structure of an electronic device used to implement the data processing method of an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0030] The present invention provides a data processing method, which is executed on the client side. Figure 1 The method comprises the following steps:
[0031] Step S11: refer to the pre-written tracking function component for the target website.
[0032] The above tracking point function component can be a software development kit SDK with tracking point data collection and upload functions. Specifically, in response to accessing the target website, the client receives a configuration file sent by a website server supporting the target website, and declares a reference to the tracking point function component in the configuration file, thereby realizing the reference of the tracking point function component.
[0033] Step S12: using the embedding function component to cover multiple target web pages of the target website, so that the embedding function component is bound to the user operation event executed on each target web page.
[0034] Specifically, the client establishes a mapping relationship between the burying point function component and each target web page in the configuration file, for example, establishes a mapping relationship between the name of the burying point function component and the identifier of each target web page (the identifier of the target web page can be pre-configured), so that the client can first match the target web page during the burying point reporting process.
[0035] The configuration file contains the specific information of the buried points of multiple web page elements (Html elements) of the target web page; the specific information of the buried points of each web page element includes: the identifier of the web page element (which can be configured through the ID attribute of the web page element), the type of operation event (the type of external event used to trigger the buried point), the creation time of the specific information of the buried point, and one or more buried point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and different web pages within the same website may have web page elements with the same identifier. The type of operation event is an exposure event (i.e., exposure event) or a click event (i.e., click event). Each buried point parameter includes: the buried point information name (e.g., user information, option information, etc.), the buried point information source (indicating where the buried point data is determined), the feedback data positioning rule (e.g., used to indicate which attribute of which data of which web page element is selected) and the conversion function, and the buried point information source includes: interface (i.e., API) and session storage (i.e., sessionStorage); when the buried point information source is an interface, the buried point parameter also includes: interface request address and interface input parameter.
[0036] Step S13: In response to monitoring the occurrence of user operation events on each target web page, first burying point collection data is generated according to the burying point function component, and second burying point collection data is formed based on the first burying point collection data and reported to a pre-established data collection server.
[0037] In this way, it is possible to implement a website tracking function based on tracking function components and targeting specific web pages, reduce the intrusion into web page codes, and implement flexible tracking data collection and reporting logic by modifying and adjusting the configuration file, thereby improving the availability and scalability of the tracking system. Since the web page element identifiers in the configuration file can be used in different target web pages, the configuration file can cover multiple target web pages through flexible configuration, and the same tracking data collection and reporting logic is executed for multiple target web pages without the need to repeatedly write configuration data for each target web page, thereby reducing the heavy workload of repeated configuration for each page.
[0038] The following describes how the first buried point collection data and the second buried point collection data are generated.
[0039] For an exposure event, the first embedding point collection data is generated by traversing the web page elements that appear in the visual interface (i.e., the visible area) of the current target web page, and using a mutation observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, and determining whether the identifier of the web page element appears in the configuration file and whether it corresponds to the exposure event; if the identifier of the web page element appears in the configuration file and corresponds to the exposure event, indicating that the web page element in the currently exposed target web page matches the configuration file, then the first embedding point collection data is generated according to the embedding point information source of the web page element in the configuration file.
[0040] For click events, when a click event occurring on a web page element of the target web page is monitored, it is determined whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to the click event, it means that the web page element in the target web page currently being clicked matches the configuration file, and then the first burying point collection data is generated according to the burying point information source of the web page element in the configuration file.
[0041] The following describes a specific method for generating the first embedding point collection data for exposure events and click events based on the embedding point information source of the web page element in the configuration file.
[0042] In the case where the embedding information source is an interface, when accessing the target website, the client intercepts all requests sent to the website server and all responses returned by the website server, and saves the intercepted request data and response data locally. If the embedding information source of the web page element in the configuration file is an interface, the embedding function component installed on the client matches the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determines the first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file.
[0043] When the source of the tracking point information is an interface, the data returned by the interface can generally be obtained by intercepting requests and responses, and then the first tracking point collection data can be determined from it. However, in actual applications, for interface calls involving map functions (i.e., mapping functions, which are used to process arrays and loop through the options in the array), it is difficult to capture the required data through traditional methods, and thus it is difficult to collect relevant tracking point data. The present invention attempts to solve this problem.
[0044] During the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, it means that the code for rendering the web page by looping through the options in the array is found, and at this time, the map function is added with a unique function identification code in the target website (for example, a prefix of func is added to the function identification code to distinguish it from the web page element identifier) in the outer layer of the return result of the map function, and a storage implementation code is added to the outer layer of the return result of the map function. Among them, the unique function identification code in the target website can be used to directly locate an element in a web page in the future, avoiding the use of the web page element identifier to accurately locate an element in a web page and thus generate data errors, and the function identification code will be used as the key to store related data in the future. The storage implementation code is used to: during the web page loading process, when the client uses the map function to process the array as the web page element to render the web page, the key-value pair is saved in the client; the key of the key-value pair is the function identification code of the map function, and the value is the string data converted from each option in the array (i.e., the element in the array).
[0045] If the tracking information source of the web page element in the configuration file is an interface, the specific steps for determining the first tracking collection data are as follows: the tracking function component determines whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element (generally the parent element) does not contain a map function, it indicates that it is a general, non-map function interface call. At this time, the tracking function component extracts the first tracking collection data from the response data corresponding to the pre-saved, matched request data based on the feedback data positioning rule of the web page element in the configuration file, that is, the tracking function component first obtains the above response data, and then determines the first tracking collection data from the response data according to the instructions of the above feedback data positioning rule.
[0046] When the ancestor element of the web page element contains a map function, it indicates that it is a special interface call situation involving the map function. At this time, the tracking function component first determines the function identification code of the ancestor element, and then uses the function identification code to query the corresponding string data converted from the key-value pair pre-saved by the client, and finally determines the first tracking collection data from the found string data according to the feedback data positioning rule of the web page element in the configuration file, that is, determines the first tracking collection data from the string data according to the instructions of the above feedback data positioning rule. In this way, the required data for the interface call scenario involving the map function is stored at an appropriate time by pre-writing the storage implementation code of the web page, and the relevant elements are accurately located and the corresponding pre-stored data are queried by the function identification code added during the website development process, so as to solve the aforementioned problem of difficulty in collecting data involving the map function, and finally realize the complex tracking function for the interface call tracking scenario and the map function.
[0047] In the case where the embedding information source is session storage, the specific method of generating the first embedding collection data according to the embedding information source of the web page element in the configuration file is as follows: if the embedding information source of the web page element in the configuration file is session storage and corresponds to an exposure event, there is no click event in this case, so there is no repeated iterative update between tabs. At this time, the embedding function component saves the identifier and current timestamp of the web page element in the session storage. When the embedding reporting opportunity is reached (for example, direct reporting when an event occurs or periodic reporting), the embedding function component extracts the corresponding first embedding collection data based on the feedback data positioning rules of the web page element in the configuration file and the data in the session storage (including the web page element identifier and timestamp).
[0048] If the embedding information source of the web page element in the configuration file is the session storage and corresponds to a click event, the embedding function component detects the number of identifiers of the web page element that are triggered; if the number is 1, it means that the user only clicks on the tab once and there is no repeated iterative update between the tabs. At this time, the embedding function component saves the identifier of the web page element and the current timestamp in the session storage. When the embedding reporting time is reached, the embedding function component extracts the corresponding first embedding collection data based on the feedback data positioning rules of the web page element in the configuration file and the data in the session storage (including the web page element identifier and timestamp).
[0049] If the tracking point information source of the web page element in the configuration file is the session storage, and the number of corresponding click events and the identifier of the triggered web page element is greater than 1, it means that the user clicks on multiple tabs and there are repeated iterative updates between the tabs. At this time, it is necessary to report the tab that the user clicked last. At this time, the tracking point function component obtains an index number corresponding to each web page element identifier, and the index number is used to indicate a tab inside the web page element; and the identifier of the web page element, each obtained index number, and the timestamp corresponding to each index number are saved in the session storage. When the time for tracking point reporting is reached, the tracking point function component determines the index number with the largest timestamp of the web page element from the session storage, and generates the corresponding first tracking point collection data based on the feedback data positioning rules of the web page element in the configuration file, the web page element identifier in the session storage, and the index number with the largest timestamp. Through the above steps, a complex tracking point data collection and reporting method for the scenario of repeated iterative updates of web page elements is realized.
[0050] After determining the first buried point collection data in the above manner, the buried point function component can process the first buried point collection data according to the conversion function of the web page element in the configuration file to form the second buried point collection data. Finally, the buried point function component reports the second buried point collection data to the data collection server.
[0051] Figure 2 is a schematic diagram of a main part of a data processing apparatus according to an embodiment of the present invention.
[0052] like Figure 2 As shown, the data processing device 20 of the embodiment of the present invention is set on the client; the device 20 includes: a reference unit 21, which references a pre-written tracking point function component for the target website; a binding unit 22, which uses the tracking point function component to cover multiple target web pages of the target website, so that the tracking point function component and the user operation event executed on each target web page are bound to each other; a tracking point processing unit 23, in response to monitoring the occurrence of user operation events on each target web page, generates first tracking point collection data according to the tracking point function component, and forms second tracking point collection data based on the first tracking point collection data to be reported to a pre-established data collection server.
[0053] Optionally, the reference unit 21 is used to: in response to accessing the target website, receive a configuration file issued by a website server supporting the target website, and declare a reference to the tracking point function component in the configuration file; the binding unit 22 is used to: establish a mapping relationship between the tracking point function component and each target web page in the configuration file.
[0054] Optionally, the configuration file contains the specific information of the burying points of multiple web page elements of the target web page; the specific information of the burying point of each web page element includes: the identifier of the web page element, the type of operation event, the creation time of the specific information of the burying point, and one or more burying point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and the type of operation event is an exposure event or a click event; each burying point parameter includes: a burying point information name, a burying point information source, a feedback data positioning rule and a conversion function, and the burying point information source includes: an interface and a session storage; when the burying point information source is an interface, the burying point parameters also include: an interface request address and an interface input parameter.
[0055] Optionally, the burying point processing unit 23 is used to: traverse the web page elements that appear in the visual interface of the current target web page, and use the change observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, and determine whether the identifier of the web page element appears in the configuration file and whether it corresponds to the exposure event; if the identifier of the web page element appears in the configuration file and corresponds to the exposure event, then generate the first burying point collection data according to the burying point information source of the web page element in the configuration file; when monitoring a click event occurring on the web page element of the target web page, determine whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to the click event, then generate the first burying point collection data according to the burying point information source of the web page element in the configuration file.
[0056] Optionally, the tracking point processing unit 23 is used to: when accessing the target website, intercept all requests sent to the website server and all responses returned by the website server, and save the intercepted request data and response data locally; if the tracking point information source of the web page element in the configuration file is an interface, match the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determine the first tracking point collection data based on the feedback data positioning rule of the web page element in the configuration file.
[0057] Optionally, the embedding processing unit 23 is used to: if the embedding information source of the web page element in the configuration file is the session storage and corresponds to the exposure event, save the identifier and current timestamp of the web page element in the session storage, and extract the corresponding first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; if the embedding information source of the web page element in the configuration file is the session storage and corresponds to the click event, detect the number of identifiers of the web page element that are triggered; if the number is 1, save the identifier and current timestamp of the web page element in the session storage, and extract the corresponding first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage. The first embedding point collects data; if the embedding point information source of the web page element in the configuration file is the session storage, and the number of identifiers corresponding to the click event and the triggered web page element is greater than 1, then obtain an index number corresponding to each web page element identifier, and the index number is used to indicate a tab inside the web page element; the identifier of the web page element, each obtained index number, and the timestamp corresponding to each index number are saved in the session storage; when the embedding point reporting time is reached, determine the index number with the largest timestamp of the web page element from the session storage, and generate the corresponding first embedding point collection data based on the feedback data positioning rule of the web page element in the configuration file, the web page element identifier in the session storage, and the index number with the largest timestamp.
[0058] Optionally, during the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, adding a unique function identification code within the target website to the outer layer of the return result of the map function, and adding a storage implementation code to the outer layer of the return result of the map function; the storage implementation code is used for: during the web page loading process, when the client uses the map function to process an array as a web page element to render the web page, saving the key-value pair on the client; the key of the key-value pair is the function identification code of the map function, and the value is the string data formed by converting each option in the array. ; If the tracking information source of the web page element in the configuration file is an interface, the tracking processing unit 23 is used to: determine whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element does not contain a map function, extract the first tracking collection data from the response data corresponding to the pre-saved and matched request data based on the feedback data positioning rule of the web page element in the configuration file; when the ancestor element of the web page element contains a map function, determine the function identification code of the ancestor element, use the function identification code to find the corresponding string data formed by the option conversion of the array from the key-value pair pre-saved by the client, and determine the first tracking collection data from the found string data according to the feedback data positioning rule of the web page element in the configuration file.
[0059] Optionally, the embedding point processing unit 23 is used to process the first embedding point collection data according to the conversion function of the web page element in the configuration file to form second embedding point collection data.
[0060] It should be noted that the data processing device according to the embodiment of the present invention is software and can be installed in devices such as computers and mobile terminals.
[0061] In the technical solution of the present invention, a website tracking function based on tracking function components and targeting specific web pages is implemented, reducing the intrusion into web page codes and improving the availability and scalability of the tracking system. Furthermore, the present invention provides a tracking data reporting solution for complex situations involving interface calls, web page element loop iterations, etc.
[0062] Figure 3 Schematic diagram of the structure of the data processing system in the embodiment of the present invention. Figure 3As shown. The data processing system includes: a client and a data collection server; the client references a pre-written embedding function component for a target website, uses the embedding function component to cover multiple target web pages of the target website, and binds the embedding function component to a user operation event executed on each target web page; in response to monitoring the occurrence of a user operation event on each target web page, the client generates first embedding collection data according to the embedding function component, forms second embedding collection data based on the first embedding collection data, and reports the second embedding collection data to the data collection server.
[0063] Optionally, in response to accessing the target website, the client receives a configuration file sent by a website server supporting the target website; declares a reference to the burying point function component in the configuration file; and establishes a mapping relationship between the burying point function component and each target web page in the configuration file.
[0064] Optionally, the configuration file contains the specific information of the burying points of multiple web page elements of the target web page; the specific information of the burying point of each web page element includes: the identifier of the web page element, the type of operation event, the creation time of the specific information of the burying point, and one or more burying point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and the type of operation event is an exposure event or a click event; each burying point parameter includes: a burying point information name, a burying point information source, a feedback data positioning rule and a conversion function, and the burying point information source includes: an interface and a session storage; when the burying point information source is an interface, the burying point parameters also include: an interface request address and an interface input parameter.
[0065] Optionally, the client traverses the web page elements that appear in the visual interface of the current target web page, and uses a change observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, to determine whether the identifier of the web page element appears in the configuration file and whether it corresponds to an exposure event; if the identifier of the web page element appears in the configuration file and corresponds to an exposure event, then the first embedding point collection data is generated according to the embedding point information source of the web page element in the configuration file; when the client monitors a click event occurring on a web page element of the target web page, it determines whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to a click event, then the first embedding point collection data is generated according to the embedding point information source of the web page element in the configuration file.
[0066] Optionally, when accessing the target website, the client intercepts all requests sent to the website server and all responses returned by the website server, and saves the intercepted request data and response data locally; if the embedding information source of the web page element in the configuration file is an interface, the client matches the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determines the first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file.
[0067] Optionally, if the embedding information source of the web page element in the configuration file is session storage and corresponds to an exposure event, the client saves the identifier and current timestamp of the web page element in the session storage, and extracts the corresponding first embedding collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; if the embedding information source of the web page element in the configuration file is session storage and corresponds to a click event, the client detects the number of identifiers of the web page element that are triggered; if the number is 1, the identifier and current timestamp of the web page element are saved in the session storage, and the corresponding first embedding collection data is extracted based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage. point collection data; if the tracking point information source of the web page element in the configuration file is the session storage, and the number of identifiers corresponding to the click event and the triggered web page element is greater than 1, the client obtains an index number corresponding to each web page element identifier, and the index number is used to indicate a tab inside the web page element; the identifier of the web page element, each obtained index number, and the timestamp corresponding to each index number are saved in the session storage; when the tracking point reporting time is reached, the index number with the largest timestamp of the web page element is determined from the session storage, and the corresponding first tracking point collection data is generated based on the feedback data positioning rule of the web page element in the configuration file, the web page element identifier in the session storage, and the index number with the largest timestamp.
[0068] Optionally, during the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, adding a unique function identification code in the target website to the outer layer of the return result of the map function, and adding a storage implementation code to the outer layer of the return result of the map function; the storage implementation code is used for: during the web page loading process, when the client uses the map function to process an array as a web page element to render the web page, saving the key-value pair on the client; the key of the key-value pair is the function identification code of the map function, and the value is the character formed by converting each option in the array. string data; if the tracking information source of the web page element in the configuration file is an interface, the client determines whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element does not contain a map function, based on the feedback data positioning rule of the web page element in the configuration file, the first tracking collection data is extracted from the response data corresponding to the pre-saved and matched request data; when the ancestor element of the web page element contains a map function, the function identification code of the ancestor element is determined, and the function identification code is used to find the corresponding string data formed by the option conversion of the array from the key-value pair pre-saved by the client, and the first tracking collection data is determined from the found string data according to the feedback data positioning rule of the web page element in the configuration file.
[0069] Optionally, the client processes the first buried point collection data according to the conversion function of the web page element in the configuration file to form second buried point collection data.
[0070] It should be noted that in the technical solution of the present invention, the collection, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken for user personal information to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. Once these user personal information data are no longer needed, the risk should be minimized by limiting or even prohibiting data collection and / or deleting data. When used, including in certain related applications, user privacy is protected by de-identifying the data, such as by removing specific identifiers (such as date of birth), controlling the amount or specificity of the stored data (such as collecting location data at the city level rather than at the specific address level), controlling how the data is stored, and / or other methods of de-identification.
[0071] According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.
[0072] The electronic device of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the data processing method provided by the present invention.
[0073] The non-transitory computer-readable storage medium of the present invention stores computer instructions, and the computer instructions are used to enable the computer to execute the data processing method provided by the present invention.
[0074] like Figure 4 , which is a schematic diagram of the hardware structure of an electronic device used to implement the method of an embodiment of the present invention. Figure 4 The electronic device includes: one or more processors 41 and a memory 42, Figure 4 A processor 41 is taken as an example. The memory 42 is a non-transitory computer-readable storage medium provided by the present invention.
[0075] The electronic device of the present invention may further include: an input device 43 and an output device 44 .
[0076] The processor 41, the memory 42, the input device 43 and the output device 44 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0077] The memory 42 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the data processing method in the embodiment of the present invention. The processor 41 executes various functional applications and data processing of the server by running the non-transitory software programs, instructions and modules stored in the memory 42, that is, implements the data processing method of the above method embodiment.
[0078] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 42 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 42 may optionally include a memory remotely arranged relative to the processor 41, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0079] The input device 43 can receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 44 can include display devices such as a display screen.
[0080] The above one or more modules are stored in the memory 42, and when executed by the one or more processors 41, the data processing method of any of the above method embodiments is executed.
[0081] The above product can execute the data processing method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the data processing method. For technical details not described in detail in this embodiment, please refer to the data processing method provided by the embodiment of the present invention.
[0082] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: Executed on the client side; the method comprises: Reference pre-written tracking function components for target websites; Using the tracking function component to cover multiple target web pages of the target website, the tracking function component is bound to the user operation event executed on each target web page; In response to monitoring the occurrence of a user operation event on each target web page, generating first burying point collection data according to the burying point function component, and forming second burying point collection data reported to a pre-established data collection server based on the first burying point collection data; The method further includes: in response to accessing the target website, receiving a configuration file sent by a website server supporting the target website; The configuration file contains the specific information of the buried points of multiple web page elements of the target web page; the specific information of the buried points of each web page element includes: the identifier of the web page element, the type of operation event, the creation time of the specific information of the buried points, and one or more buried point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and the type of operation event is an exposure event or a click event; each buried point parameter includes: a buried point information name, a buried point information source, a feedback data positioning rule and a conversion function, and the buried point information source includes: an interface and a session storage; when the buried point information source is an interface, the buried point parameters also include: an interface request address and an interface input parameter; The response to monitoring the occurrence of a user operation event on each target web page, generating the first burying point collection data according to the burying point function component, specifically includes: traversing the web page elements that appear in the visual interface of the current target web page, and using a change observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, and judging whether the identifier of the web page element appears in the configuration file and whether it corresponds to an exposure event; if the identifier of the web page element appears in the configuration file and corresponds to an exposure event, generating the first burying point collection data according to the burying point information source of the web page element in the configuration file; when monitoring a click event occurring on the web page element of the target web page, judging whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to the click event, generating the first burying point collection data according to the burying point information source of the web page element in the configuration file; The method further includes: when accessing the target website, intercepting all requests sent to the website server and all responses returned by the website server, and saving the intercepted request data and response data locally; generating the first burying point collection data according to the burying point information source of the web page element in the configuration file specifically includes: if the burying point information source of the web page element in the configuration file is an interface, matching the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determining the first burying point collection data based on the feedback data positioning rule of the web page element in the configuration file; During the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, adding a unique function identification code in the target website to the outer layer of the return result of the map function, and adding a storage implementation code to the outer layer of the return result of the map function; the storage implementation code is used for: during the web page loading process, when the client uses the map function to process an array as a web page element to render the web page, saving a key-value pair on the client; the key of the key-value pair is the function identification code of the map function, and the value is the string data formed by converting each option in the array; if the web page element is buried in the configuration file, The point information source is an interface, and the first buried point collection data is determined based on the feedback data positioning rule of the web page element in the configuration file, including: judging whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element does not contain a map function, extracting the first buried point collection data from the response data corresponding to the pre-saved and matched request data based on the feedback data positioning rule of the web page element in the configuration file; when the ancestor element of the web page element contains a map function, determining the function identification code of the ancestor element, using the function identification code to search for the corresponding string data formed by the option conversion of the array from the key-value pair pre-saved by the client, and determining the first buried point collection data from the found string data according to the feedback data positioning rule of the web page element in the configuration file.
2. The method according to claim 1, characterized in that The step of referencing a pre-written tracking function component for a target website specifically includes: declaring a reference to the tracking function component in the configuration file; The utilizing the tracking point function component to cover the multiple target web pages of the target website specifically includes: establishing a mapping relationship between the tracking point function component and each target web page in the configuration file.
3. The method according to claim 2, characterized in that The generating first burying point collection data according to the burying point information source of the web page element in the configuration file specifically includes: if the burying point information source of the web page element in the configuration file is session storage and corresponds to an exposure event, saving the identifier and current timestamp of the web page element in the session storage, and extracting the corresponding first burying point collection data based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; If the tracking point information source of the web page element in the configuration file is the session storage and corresponds to a click event, the number of identifiers of the triggered web page element is detected; if the number is 1, the identifier and the current timestamp of the web page element are saved in the session storage, and the corresponding first tracking point collection data is extracted based on the feedback data positioning rule of the web page element in the configuration file and the data in the session storage; If the tracking point information source of the web page element in the configuration file is the session storage, and the number of identifiers corresponding to click events and the triggered web page elements is greater than 1, then an index number corresponding to each web page element identifier is obtained, and the index number is used to indicate a tab inside the web page element; the identifier of the web page element, each obtained index number, and the timestamp corresponding to each index number are saved in the session storage; when the tracking point reporting time is reached, the index number with the largest timestamp of the web page element is determined from the session storage, and the corresponding first tracking point collection data is generated based on the feedback data positioning rule of the web page element in the configuration file, the web page element identifier in the session storage, and the index number with the largest timestamp.
4. The method according to claim 3, characterized in that The forming of second buried point collection data reported to a pre-established data collection server based on the first buried point collection data includes: The first buried point collection data is processed according to the conversion function of the web page element in the configuration file to form second buried point collection data.
5. A data processing device, characterized in that: Set on the client; the device includes: Reference unit, which references pre-written tracking function components for the target website; A binding unit, using the embedding function component to cover multiple target web pages of the target website, so that the embedding function component is bound to the user operation event executed on each target web page; A tracking point processing unit, in response to monitoring the occurrence of a user operation event on each target web page, generates first tracking point collection data according to the tracking point function component, and forms second tracking point collection data based on the first tracking point collection data to be reported to a pre-established data collection server; The reference unit is used for: in response to accessing the target website, receiving a configuration file sent by a website server supporting the target website; The configuration file contains the specific information of the buried points of multiple web page elements of the target web page; the specific information of the buried points of each web page element includes: the identifier of the web page element, the type of operation event, the creation time of the specific information of the buried points, and one or more buried point parameters; the identifier of the web page element is used to distinguish the web page element within the web page where the web page element is located, and the type of operation event is an exposure event or a click event; each buried point parameter includes: a buried point information name, a buried point information source, a feedback data positioning rule and a conversion function, and the buried point information source includes: an interface and a session storage; when the buried point information source is an interface, the buried point parameters also include: an interface request address and an interface input parameter; The burying point processing unit is used to: traverse the web page elements that appear in the visual interface of the current target web page, and use the change observer to monitor the web page elements that appear in the visual interface of the newly popped-up target web page, and determine whether the identifier of the web page element appears in the configuration file and whether it corresponds to the exposure event; if the identifier of the web page element appears in the configuration file and corresponds to the exposure event, then generate the first burying point collection data according to the burying point information source of the web page element in the configuration file; when monitoring a click event of the web page element occurring in the target web page, determine whether the identifier of the web page element appears in the configuration file and whether it corresponds to the click event; if the identifier of the web page element appears in the configuration file and corresponds to the click event, then generate the first burying point collection data according to the burying point information source of the web page element in the configuration file; The tracking point processing unit is used to: intercept all requests sent to the website server and all responses returned by the website server when accessing the target website, and save the intercepted request data and response data locally; if the tracking point information source of the web page element in the configuration file is an interface, match the intercepted request data according to the interface request address and interface input parameters of the web page element in the configuration file, and determine the first tracking point collection data based on the feedback data positioning rule of the web page element in the configuration file; During the development of the target website, the development end performs the following steps: converting the code of each target web page into an abstract syntax tree, searching for a mapping map function in the abstract syntax tree; determining whether the return result of the found map function is a web page element of the target web page; if so, adding a unique function identification code in the target website to the outer layer of the return result of the map function, and adding a storage implementation code to the outer layer of the return result of the map function; the storage implementation code is used for: during the web page loading process, when the client uses the map function to process an array as a web page element to render the web page, saving a key-value pair on the client; the key of the key-value pair is the function identification code of the map function, and the value is the string data formed by converting each option in the array; If the tracking information source of the web page element in the configuration file is an interface, the tracking processing unit is used to: determine whether the ancestor element of the web page element contains a map function; when the ancestor element of the web page element does not contain a map function, extract the first tracking collection data from the response data corresponding to the pre-saved and matched request data based on the feedback data positioning rule of the web page element in the configuration file; when the ancestor element of the web page element contains a map function, determine the function identification code of the ancestor element, use the function identification code to search for the corresponding string data formed by the option conversion of the array from the key-value pair pre-saved by the client, and determine the first tracking collection data from the found string data according to the feedback data positioning rule of the web page element in the configuration file.
Citation Information
Patent Citations
Buried point data processing method and system, computer equipment and readable storage medium
CN110674440A