Data reporting method and device, electronic equipment and storage medium
By decoupling the backend service hierarchy and the layered collection method, the performance waste caused by unpacking and repacking in traditional data reporting is solved, and the integrity and efficiency of data reporting are improved.
Patent Information
- Application Number
- CN202110530428.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-14
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2041-05-14
AI Technical Summary
In the traditional event tracking and reporting process, the backend service needs to unpack and repackage the data, resulting in unnecessary coupling and performance waste.
By decoupling the backend service layers and using a layered data collection approach, we respond to user operation events and collect the reported data of the target elements, thus avoiding the process of unpacking and repackaging data from the frontend layers by the backend layers.
While ensuring the integrity of data reporting, it avoids the additional performance overhead caused by unpacking and repackaging data, reduces the size of data packets, and improves data integrity.
Smart Images

Figure CN115426351B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of data processing of network media, and more particularly, to a data reporting method and device, an electronic device, and a storage medium. BACKGROUND
[0002] In a conventional embedded point reporting process, if the exposure / click behavior of an element needs to be collected, and the reporting data needs to be delivered to the terminal through the background service, the complete reporting data required by the element is usually delivered through a field in the front-end and back-end protocol and stored in the terminal, and then the data is taken out and reported to the server through the relevant data channel when the corresponding behavior occurs. Since the background service often has multiple layers, the service corresponding to the post level needs to understand the protocol of the service of the pre level to unpack the data delivered by the pre level and splice its own reporting data into the existing data, so as to generate complete reporting data. This unpacking and repacking process will cause unnecessary coupling and performance waste and lead to larger data packets. SUMMARY
[0003] The present application provides a data reporting method and device, an electronic device, and a storage medium, which can avoid the unpacking and repacking process of the data delivered by the service of the pre level by the service corresponding to the post level on the basis of ensuring the integrity of data reporting, thereby avoiding the additional performance overhead caused by the unpacking and repacking process.
[0004] In one aspect, the present application provides a data reporting method, comprising:
[0005] receiving a user operation event on a user interface of a page;
[0006] wherein the view structure of the page comprises a first element corresponding to a first background service and at least one element layer corresponding to at least one second background service, the first element being a parent element of a second element in the at least one element layer, the first element being associated with parameters of the first element, and the second element being associated with parameters of the second element;
[0007] in response to the user operation event, collecting reporting data of a target element based on a position of the target element in the view structure corresponding to the user operation event;
[0008] reporting the reporting data of the target element.
[0009] In another aspect, the present application provides a data reporting device, comprising:
[0010] a receiving unit configured to receive a user operation event on a user interface of a page;
[0011] The view structure of the page includes a first element corresponding to the first background service and at least one element layer corresponding to at least one second background service, the first element is a parent element of a second element in the at least one element layer, the first element is associated with parameters of the first element, and the second element is associated with parameters of the second element;
[0012] The collection unit collects the reporting data of the target element based on a position of the target element in the view structure in response to the user operation event;
[0013] The reporting unit reports the reporting data of the target element.
[0014] In another aspect, an electronic device is provided, including:
[0015] A processor adapted to execute a computer program;
[0016] A computer readable storage medium having a computer program stored therein, the computer program being executed by the processor to implement the data reporting method.
[0017] In another aspect, a computer readable storage medium is provided, the computer readable storage medium storing computer instructions, the computer instructions being read and executed by a processor of a computer device to cause the computer device to execute the data reporting method.
[0018] Based on the above scheme, by decoupling background services of different levels between backgrounds, the first element in the view structure is associated with parameters of the first element, and the second element in the at least one element layer in the view structure is associated with parameters of the second element, so that the service corresponding to the post-level avoids unpacking the data issued by the service of the pre-level, thereby avoiding the additional performance overhead caused by data unpacking and repacking. In addition, by using the hierarchical collection method, in response to the user operation event, the reporting data of the target element is collected based on the position of the target element in the view structure, which can still ensure that complete or even more rich parameters are collected for reporting, and provides support for subsequent data analysis. That is, the data reporting method provided by the present application can avoid the process of unpacking and repacking the data issued by the service of the pre-level by the service corresponding to the post-level on the basis of ensuring the integrity of the data reporting, thereby avoiding the additional performance overhead caused by the data unpacking and repacking process and reducing the size of the data packet. BRIEF DESCRIPTION OF DRAWINGS
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an example of the system framework provided in the embodiments of this application.
[0021] Figure 2 This is an example of obtaining reported data by first unpacking and then repackaging, as provided in the embodiments of this application.
[0022] Figure 3 This application provides an illustrative flowchart of a data reporting method.
[0023] Figure 4 This is an example of the parameters associated with each element in the view structure provided in this application embodiment.
[0024] Figure 5 This is an example of the view structure provided in the embodiments of this application.
[0025] Figure 6 Based on Figure 5 The image shows an example of a view structure that collects reported data from target elements.
[0026] Figure 7 This is a schematic block diagram of the data reporting device provided in the embodiments of this application.
[0027] Figure 8 This is a schematic block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application. With the research and progress of artificial intelligence technology, artificial intelligence technology is being researched and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0029] The solutions provided in this application also relate to data processing technology in the field of network media. Network media differs from traditional audio and video equipment in its operation; it relies on technologies and equipment provided by information technology (IT) equipment developers to transmit, store, and process audio and video signals. Traditional Serial Digital Induction (SDI) transmission lacks true network switching capabilities. Significant work is required to utilize SDI to create some of the network functions provided by Ethernet and Internet Protocol (IP). Therefore, network media technology in the video industry has emerged. Furthermore, data processing technology for network media can include the transmission, storage, and processing of audio and video signals.
[0030] Figure 1 This is an example of the system framework 100 provided in the embodiments of this application.
[0031] The system framework 100 can be an application system, and this application embodiment does not limit the specific type of the application. The system framework 100 includes: terminal 131, terminal 132, and server cluster 110. Both terminal 131 and terminal 132 can be connected to server cluster 110 via wireless or wired network 120.
[0032] Terminals 131 and 132 can be at least one of a smartphone, game console, desktop computer, tablet computer, e-book reader, MP4 player, and laptop computer. Terminals 131 and 132 have an application installed and running. This application can be any one of the following: online video application, short video application, image sharing application, audio social application, animation application, wallpaper application, news push application, supply and demand information push application, academic exchange application, technical exchange application, policy exchange application, application with a comment mechanism, application with an opinion posting mechanism, or knowledge sharing application. Terminals 131 and 132 can be terminals used by users 141 and 142 respectively, and user accounts are logged into the applications running on terminals 131 and 132.
[0033] Server cluster 110 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server cluster 110 provides background services for applications (e.g., applications on terminals 131 and 132). Optionally, server cluster 110 undertakes the primary computing task, while terminals 131 and 132 undertake secondary computing tasks; or, server cluster 110 undertakes secondary computing tasks, while terminals 131 and 132 undertake the primary computing tasks; or, terminals 131 and 132 collaborate with server cluster 110 using a distributed computing architecture.
[0034] Optionally, taking a web browsing system as an example, the server cluster 110 includes: an access server 112, a web server 111, and a data server 113. There can be one or more access servers 112, which can be deployed in different cities nearby. Access servers 112 receive service requests from terminals 131 and 132 and forward them to the corresponding servers for processing. Web server 111 provides web pages to terminals 131 and 132, which integrate embedded tracking code. Data server 113 receives data (user behavior data, business data, etc.) reported by terminals 131 and 132.
[0035] In the event tracking and reporting process, if it's necessary to collect the exposure / click behavior of an element, and the reported data needs to be sent to the terminal via a backend service, the complete reporting data required for that element is typically sent through a field in the frontend / backend protocol and stored on the terminal. Then, when the corresponding behavior occurs, the data is retrieved and reported to the server through the relevant data channel. Since backend services often have multiple layers, the services at the backend levels need to understand the protocols of the frontend services to unpack the data they send and concatenate their own reporting data into the existing data to generate complete reporting data. This process of unpacking and then repackaging leads to unnecessary coupling and performance waste.
[0036] Figure 2 This is an example of obtaining reported data by first unpacking and then repackaging, as provided in the embodiments of this application.
[0037] like Figure 2 As shown, suppose there is a page containing six elements: A1-A2 and B1-B4. B1-B2 are children of A1, and B1-B4 are children of A2. When elements A1-A2 need to report their actions, they need to carry their major position parameter in the list, named `big_pos`. When elements B1-B4 need to report their actions, they need to carry their major and minor position parameters in the list, named `big_pos` and `small_pos` respectively. A1 and A2 only have major position parameters, named `major_position_1` and `major_position_2`. B1-B4, in addition to their major position parameter (which matches the major position of their parent element), also have their own minor position parameter within their parent element. The complete reporting data required for elements A1-A2 and B1-B4 can be found in [link to documentation]. Figure 2 The parameters on the right.
[0038] against Figure 2The page shown typically has two backend services, S1 and S2. S2 is responsible for returning parameters for elements B1-B4 and is unaware of the existence of S1. S1, on the other hand, interacts directly with the terminal, arranging and combining the parameters returned by S2 to form two groups, A1-A2, and returning them to the terminal for display.
[0039] Specifically, when the backend service S2 returns B1-B2, it is known that the minor positional parameters of B1 and B2 are 1 and 2 respectively, and the same applies to B3-B4. Therefore, S2 can write the minor positional parameters into the corresponding fields of the frontend-backend interaction protocol. However, since S2 is unaware of S1's existence, it cannot determine the value of the major positional parameter on its own. After receiving the parameters returned by S2, S1 groups the data. On the one hand, it fills the major positional parameters into A1-A2 respectively. On the other hand, it needs to unpack the data of B1-B4 and append the corresponding major positional parameter values to the corresponding fields of B1-B4. Only then is the complete reported data required for B1-B4 filled.
[0040] Since each element has its own complete reporting data, the terminal can directly bind the reporting data to the corresponding element after receiving the reporting data returned by the backend service. When a click / exposure event occurs and a report is needed, only the reporting data associated with the element where the click / exposure event occurred needs to be reported to the server, which is highly efficient. On the other hand, the page ID (page_home) is not included in the element reporting data and needs to be reported separately.
[0041] As shown above, obtaining reported data by unpacking and then repackaging means that each element that generates a reporting action needs to bind all the necessary reported data to itself so that it can collect the reported information when a report occurs. While this unpacking and repackaging process improves the efficiency of the subsequent terminal's data collection, it also introduces unnecessary coupling and performance waste into the backend service. Specifically, S1 is responsible not only for filling in the parameters of its managed elements A1-A2, but also for perfecting the parameters of elements B1-B4. Therefore, S1 needs to understand the specific protocol of the interaction between service S2 and the terminal (otherwise, it cannot fill in the parameters of A1-A2 to the required positions), causing unnecessary coupling. On the other hand, in order to fill in the parameters, it may also be necessary to unpack and then repack the data, which incurs performance overhead. In addition, the parameters of the page and the parameters of the elements are separate; the parameters of the page need to be reported as separate fields and cannot form a strong association with the element information.
[0042] This application provides a data reporting method, apparatus, electronic device, and storage medium that, while ensuring the integrity of the reported data, avoids the process of unpacking and repackaging data sent by front-end services to back-end services, thus avoiding the additional performance overhead caused by data unpacking and repackaging. Specifically, in the interaction between the front-end and back-end provided by this application, each back-end service only needs to send the parameters of the element, without needing to understand or interfere with the data sent by other back-end services. After the terminal receives the parameters sent by these back-end services, it binds them to different elements. In the subsequent collection process, each element, in addition to collecting its own bound parameters, also needs to search upwards for the parameters bound to its parent element and up to the parameters bound to the page, and automatically carries the parameters bound to the parent element and up to the parameters bound to the page, improving data completeness.
[0043] To facilitate understanding of the solutions in this application, the relevant terms used in this application will be explained below.
[0044] Element: A view in an application (App) that can be used to present content or generate interactive behavior. For example, in the Android system, an element can be a view or its subclass, while in the Apple operating system (iOS), an element can be a user interface view (UIView) or its subclass. When a corresponding action (such as a click or exposure) is generated for each element, an information reporting process is triggered, i.e., element information is reported.
[0045] Parent / Child Element: When the view corresponding to an element A is a child view of the view corresponding to another element B (a direct parent-child relationship is not required, and there can be several levels of separation), then A is a child element of B, and B is a parent element of A.
[0046] Sibling elements: When the view corresponding to element A is a view alongside the view corresponding to another element C, then A is a sibling element of C, and C is a sibling element of A. In other words, C is a direct child element of A; or C is within the same element level as A.
[0047] Page: A relatively complete and independent module within an app. It can be a regular view or a container class (such as an Activity in Android or a ViewController in iOS). Activities are responsible for a large amount of display and interaction work; in a sense, an application can be understood as a combination of multiple Activities. Each page can contain several elements. Pages can also store their own reporting information.
[0048] Client: Refers to a program that provides local services to clients in contrast to a server. It is typically installed on a regular user's computer and needs to work in conjunction with the server. With the development of the internet, commonly used clients include web browsers used for the World Wide Web, email clients for sending and receiving emails, and real-time communication client software.
[0049] Figure 3 This application provides a schematic flowchart of a data reporting method 200. This method 200 can be executed by a terminal, for example... Figure 1 The terminal shown.
[0050] like Figure 3 As shown, the method 200 may include some or all of the following:
[0051] S210, receives user operation events on the user interface of the page;
[0052] The view structure of the page includes a first element corresponding to a first backend service and at least one element layer corresponding to at least one second backend service. The first element is the parent element of the second element in the at least one element layer. The first element is associated with the parameters of the first element, and the second element is associated with the parameters of the second element.
[0053] S220, in response to the user operation event, based on the position of the target element corresponding to the user operation event in the view structure, collect the reported data of the target element;
[0054] S230, Report the data to be reported for this target element.
[0055] As an example, after receiving a user operation event on the user interface of the page, the terminal responds to the user operation event by collecting the reported data of the target element based on the position of the target element corresponding to the user operation event in the view structure. After collecting the reported data of the target element, the terminal reports the reported data of the target element to the server. Optionally, the terminal can upload the reported data of the target element to the server through the configuration interface between the terminal and the server. Optionally, the terminal can report the reported data of the target element to the server through the field corresponding to the target element in the configuration file. Optionally, the configuration file is a file issued to the terminal by the server when configuring the terminal.
[0056] Based on the above solution, by decoupling backend services at different levels, associating the first element in the view structure with its parameters, and associating the second element in at least one element layer of the view structure with its parameters, it is possible to avoid the additional performance overhead caused by data unpacking and repackaging by services at lower levels. Furthermore, by using a layered data collection approach, in response to user operation events, and by collecting the reported data of the target element based on its position in the view structure, it is still possible to collect complete or even richer parameters for reporting, providing support for subsequent data analysis. In other words, the data reporting method provided in this application, while ensuring the integrity of data reporting, avoids the process of unpacking and repackaging data from services at lower levels, thereby avoiding the additional performance overhead caused by data unpacking and repackaging and reducing the size of data packets.
[0057] In other words, the data reporting method provided in this application effectively reduces the coupling between services by distributing and binding parameters in layers. Furthermore, since the parameters bound to each element are incomplete relative to the reported data, additional data collection methods can ensure the integrity of the reported data. In short, in the data reporting method provided in this application, each backend service only needs to ensure its own data distribution without interfering with the data of other backend services. On the other hand, designing the view structure so that each element is associated only with its own parameters and collects the reported data ensures the integrity of the reported data while avoiding the process of unpacking and repackaging the data distributed by the frontend services, thus avoiding the additional performance overhead caused by the data unpacking and repackaging process and reducing the size of the data packets.
[0058] In other words, the data reporting method provided in this application can bring beneficial effects to both the front-end and back-end. For back-end services: Thanks to the layered distribution approach, each back-end service only needs to ensure the completeness and accuracy of the reported data it provides, without needing to understand the protocols and data of other back-end services, thus reducing coupling between services; at the same time, the process of unpacking and then adding data for packaging is eliminated, reducing unnecessary performance overhead. For the front-end (i.e., the terminal), the layered binding and automated layered collection functions can automatically add contextual information of elements, making the reported data more complete.
[0059] As an example, the target element is the most basic element in the user interface that organizes the interface. The target element includes, but is not limited to, at least one of the following: date / time elements, tree elements, list box elements, multi-format text box elements, upload control elements, text input box control elements, button control elements, drop-down selection box control elements, or other control elements.
[0060] As an example, this user action event includes exposure events and click events. An exposure event refers to the exposure of content displayed in the user interface (the actual display of the corresponding user interface for the user to view); a click event refers to the event when a user clicks on an element in the user interface. A click event is triggered when a user clicks on an element in the user interface; or, an exposure event is triggered when the user swipes the user interface to a certain position (the position containing the tracking point) and stops. For example, assuming element 1 is an image, when the image's position triggers an exposure event, the parameters corresponding to the image are extracted and encapsulated into the element's reported data. Similarly, assuming element 2 is a button, when the button's position triggers a click event, the parameters corresponding to the button are extracted and encapsulated into the element's reported data.
[0061] As an example, the first background service and the at least one second background service may be background services provided for the page or the application corresponding to the page. For instance, the terminal may upload the reporting data of the target element to the server through a configuration interface between the terminal and the server, and the first background service and the at least one second background service may be background services provided by the server for the page or the application corresponding to the page.
[0062] In some embodiments, the view structure includes a third element, which is a sibling element of the first element; the view structure includes a fourth element in the at least one element layer, where the third element is the parent element of the fourth element.
[0063] Of course, the view structure may also include sibling elements of the first element other than the third element. In other words, the first element may have one or more sibling elements, and the first element may not have any sibling elements. This application does not make any specific limitations on this.
[0064] In some embodiments, S220 may include:
[0065] If the target element is the first element, the parameters of the first element are collected as data in the reported data of the target element.
[0066] As an example, the reported data of the first element may also include parameters of the page. Optionally, the parameters of the page may be data from the reported data collected for the first element, or data obtained through other means.
[0067] In some embodiments, S220 may include:
[0068] If the target element is the second element, collect the parameters of the second element and the parameters of the parent element of the second element as the data in the reported data of the target element.
[0069] As an example, the reported data of the second element may also include parameters from this page. Optionally, the parameters of this page may be data from the reported data collected for the second element, or data obtained through other means.
[0070] In some embodiments, the view structure is a tree structure.
[0071] In other words, the view structure can be described by a tree structure. Optionally, this tree structure can be used not only to describe the parent-child relationship between the page and its elements, but also to describe the parent-child relationship between elements within the page. Of course, in other alternative embodiments of this application, the view structure can also be described by other structures, such as data structures or arrays.
[0072] In some embodiments, the root node of the tree structure includes the page or the first element.
[0073] In some embodiments, the root node of the tree structure is the page; wherein, S220 may include:
[0074] Collect the parameters from this page as data in the reported data of this target element.
[0075] In this embodiment, compared to the scheme that requires additional reporting of page parameters, by collecting the page parameters as data in the reporting data of the target element, that is, searching upwards to the parameters associated with its parent element and up to the parameters associated with the page, the parameters associated with the target element and the parameters associated with the page can be strongly correlated, thereby automatically carrying the parameters associated with the parent element and the parameters associated with the page, improving the completeness of the data.
[0076] In some embodiments, prior to S220, the method 200 may further include:
[0077] Receive the parameters of the first element sent by the first backend service;
[0078] The first backend service receives parameters from the at least one element layer issued by the at least one second backend service.
[0079] The parameters of the first element are associated with the first element in the view structure, and the parameters of the at least one element layer are respectively associated with at least one element layer in the view structure.
[0080] As an example, the terminal receives the parameters of the first element from the first background service (i.e., the background service corresponding to the element layer where the first element is located) from the client, and receives the parameters of the at least one element layer from at least one second background service (i.e., the background services corresponding to at least one element layer respectively) through the first background service. That is, the parameters of the at least one element layer issued by the at least one second background service are issued to the terminal through the first background service. Based on this, the terminal can associate the parameters of the first element issued by the first background service with the first element in the view structure, and associate the parameters of the at least one element layer issued by the at least one second background service with at least one element layer in the view structure respectively.
[0081] It should be noted that in this application, the parameters of all elements can be sent to the terminal through a certain backend service. However, the certain backend service will also request parameters generated by other backend services, and finally send the parameters generated by itself and the parameters requested from other backend services to the terminal together.
[0082] It should be noted that although a certain backend service needs to send its own generated parameters and parameters requested from other backend services to the terminal, it does not require the backend service (i.e., the specific backend service) to unpack and repack the data sent by the frontend service (i.e., other backend services). Here, unpacking and repacking refers to the process where the backend service appends or fills the parameters generated by it into the data sent by the frontend service. This avoids the additional performance overhead caused by the data unpacking and repacking process and reduces the size of the data packet. In the following description, this application refers to this parameter sending method, which does not require unpacking and repacking the data sent by the frontend service, as a layered parameter sending method; or, this application refers to this packaging and sending method, where the parameters generated by the backend service do not need to be appended or filled into the parameters generated by the frontend service, as a layered parameter sending method.
[0083] As an example, the first backend service is responsible for generating the first element parameter, and the at least one second backend service is responsible for generating the parameters of the at least one element layer. The first backend service obtains the parameters of the at least one element layer from the at least one second backend service and finally packages them together and returns them to the terminal.
[0084] Based on the above solution, by distributing parameters in a layered manner, the backend services at different levels are decoupled. This allows the first element in the view structure to be associated with the parameters of that first element, and the second element in at least one element layer in the view structure to be associated with the parameters of that second element. This avoids the need for the services at the back level to unpack the data distributed by the services at the front level, thereby avoiding the additional performance overhead caused by unpacking and repackaging the data.
[0085] The following is combined Figures 4 to 6 The view structure and data collection of this application are described.
[0086] Figure 4 This is an example of the parameters associated with each element in the view structure provided in this application embodiment.
[0087] like Figure 4 As shown, suppose there is a page containing six elements: A1-A2 and B1-B4. B1-B2 are children of A1, and B1-B4 are children of A2. When elements A1-A2 need to report their actions, they need to carry their large position parameter in the list, named `big_pos`. When elements B1-B4 need to report their actions, they need to carry their large and small position parameters in the list, named `big_pos` and `small_pos` respectively. However, each element is only associated with its own parameter. For example, A1 and A2 are only associated with their large position parameters, designated as large position parameter 1 and large position parameter 2 respectively. B1-B4 are only associated with their small position parameters, i.e., their own small position parameters within their parent elements. See [link to parameter association details for elements A1-A2 and B1-B4]. Figure 4 The parameters on the right. Of course, in other alternative embodiments, each element may also be associated with page parameters, which is not specifically limited in this application. For example, elements A1-A2 and B1-B4 may also be associated with Figure 4 The parameters on the right and the parameters on the page.
[0088] In other words, targeting Figure 4 As shown on the page, the first backend service provided by this application may include backend service S1, and at least one second backend service may include backend service S2. S2 is responsible for returning parameters for elements B1-B4, and it does not understand the existence of S1. S1 is responsible for returning parameters for elements A1 and A2, and it does not understand the existence of S2. That is, S1 does not need to understand the data returned by service S2 and add large positional parameters internally. This reduces the coupling between backend services S1 and S2. After the terminal receives the parameters returned by the hierarchical backend services, it binds the parameters returned by the different levels of backend services to different elements according to the page's view structure.
[0089] Figure 5 This is an example of the view structure provided in the embodiments of this application.
[0090] like Figure 5 As shown, specifically, A1-A2 are bound to the large position parameters returned by S1, which is all the data that the element needs to report except for the page parameters; while B1-B4 are only bound to the small position parameters returned by S2. For B1-B4, the parameters they are bound to are incomplete. Based on this, the terminal also needs to collect the parameters of its parent element based on the view structure of the page in order to obtain its report data.
[0091] Figure 6 Based on Figure 5 The image shows an example of a view structure that collects reported data from target elements.
[0092] like Figure 6 As shown, when collecting the reported data of an element for each element in the view structure, in addition to collecting the parameters bound to the element itself, it is also necessary to search upwards along the view structure for the parameters bound to the parent element and so on up to the parameters bound to the page. All parameters in this chain are then packaged and used as the reported data for this element. For example, assuming the target element is B1, the terminal, in addition to collecting the parameters bound to B1, needs to search upwards along the view structure for the parameters bound to the parent element A1 and so on up to the parameters bound to the page. All parameters in this chain (i.e., the parameters bound to B1, A1, and the page) are then packaged and used as the reported data for element B1. Similarly, assuming the target element is A1, the terminal, in addition to collecting the parameters bound to A1, needs to search upwards along the view structure for the parameters bound to the page. All parameters in this chain (i.e., the parameters bound to A1 and the page) are then packaged and used as the reported data for element A1.
[0093] Using the above data collection method, even when the parameters associated with each element are incomplete or only include the parameters associated with itself, it is still possible to collect all the parameters required for element reporting, and even more. This is because the process automatically collects parameters from all parent elements and the page, without requiring the backend service to concatenate and package the parameters.
[0094] In some embodiments, the method 200 may further include:
[0095] If the parameters of the fifth element in the view structure change, then update the parameters associated with that fifth element.
[0096] In other words, when the parameters of an element in this view structure change, the parameters associated with the corresponding element in the view structure can also be updated to reflect this in the element's reported data.
[0097] In some embodiments, the view structure is a tree structure with the page as the root node, and the method 200 may further include:
[0098] If the parameters on this page change, then update the parameters of the root node.
[0099] In other words, when the parameters of a page in this view structure change, the parameters associated with that page can also be updated to reflect this in the reported data of the elements.
[0100] The preferred embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this application, various simple modifications can be made to the technical solutions of this application, and these simple modifications all fall within the protection scope of this application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this application will not describe the various possible combinations separately. Furthermore, various different embodiments of this application can also be arbitrarily combined, as long as they do not violate the spirit of this application, they should also be considered as the content disclosed in this application.
[0101] It should also be understood that, in the various method embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0102] The method provided in the embodiments of this application has been described above. The data reporting device provided in the embodiments of this application will be described below.
[0103] Figure 7 This is a schematic block diagram of the data reporting device 300 provided in the embodiments of this application.
[0104] like Figure 7 As shown, the data reporting device 300 includes:
[0105] The receiving unit 310 is used to receive user operation events on the user interface of the page;
[0106] The view structure of the page includes a first element corresponding to a first backend service and at least one element layer corresponding to at least one second backend service. The first element is the parent element of the second element in the at least one element layer. The first element is associated with the parameters of the first element, and the second element is associated with the parameters of the second element.
[0107] The acquisition unit 320 is used to respond to the user operation event and, based on the position of the target element corresponding to the user operation event in the view structure, acquire the reported data of the target element.
[0108] The reporting unit 330 is used to report the reporting data of the target element.
[0109] In some embodiments, the view structure includes a third element, which is a sibling element of the first element; the view structure includes a fourth element in the at least one element layer, where the third element is the parent element of the fourth element.
[0110] In some embodiments, the acquisition unit 320 is specifically used for:
[0111] If the target element is the first element, the parameters of the first element are collected as data in the reported data of the target element.
[0112] In some embodiments, the acquisition unit 320 is specifically used for:
[0113] If the target element is the second element, collect the parameters of the second element and the parameters of the parent element of the second element as the data in the reported data of the target element.
[0114] In some embodiments, the view structure is a tree structure.
[0115] In some embodiments, the root node of the tree structure includes the page or the first element.
[0116] In some embodiments, the root node of the tree structure is the page; wherein, the acquisition unit 320 is specifically used for:
[0117] Collect the parameters from this page as data in the reported data of this target element.
[0118] In some embodiments, before the acquisition unit 320 acquires the reported data of the target element based on the position of the target element corresponding to the user operation event in the view structure, the acquisition unit 320 is further configured to:
[0119] Receive the parameters of the first element sent by the first backend service;
[0120] The first backend service receives parameters from the at least one element layer issued by the at least one second backend service.
[0121] The parameters of the first element are associated with the first element in the view structure, and the parameters of the at least one element layer are respectively associated with at least one element layer in the view structure.
[0122] In some embodiments, the acquisition unit 320 is further configured to:
[0123] If the parameters of the fifth element in the view structure change, then update the parameters associated with that fifth element.
[0124] In some embodiments, the view structure is a tree structure with the page as the root node, and the acquisition unit 320 is further configured to:
[0125] If the parameters on this page change, then update the parameters of the root node.
[0126] It should be understood that the device embodiments and method embodiments can correspond to each other, and similar descriptions can be referred to the method embodiments. To avoid repetition, further details are omitted here. Specifically, the data reporting device 300 can correspond to the corresponding subject executing the method 200 of this application embodiment, and the aforementioned and other operations and / or functions of each module in the data reporting device 300 are respectively for implementing… Figure 3 For the sake of brevity, the corresponding processes in the method shown will not be elaborated here.
[0127] It should also be understood that the various units in the data reporting device 300 involved in the embodiments of this application can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This can achieve the same operation without affecting the technical effect of the embodiments of this application. The above-mentioned units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the data reporting device 300 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by multiple units working together. According to another embodiment of this application, the data reporting device 300 involved in the embodiments of this application and the data reporting method of the embodiments of this application can be constructed by running a computer program (including program code) capable of performing the steps involved in the corresponding method on a general-purpose computing device including processing elements and storage elements such as a central processing unit (CPU), random access storage medium (RAM), and read-only storage medium (ROM). The computer program may be recorded on, for example, a computer-readable storage medium, loaded into an electronic device through the computer-readable storage medium, and run therein to implement the corresponding methods of the embodiments of this application.
[0128] In other words, the units mentioned above can be implemented in hardware, in software instructions, or in a combination of hardware and software. Specifically, the steps of the method embodiments in this application can be completed by the integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software in the decoding processor. Optionally, the software can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. This storage medium is located in memory, and the processor reads the information in the memory and completes the steps in the above method embodiments in conjunction with its hardware.
[0129] Figure 8 This is a schematic structural diagram of the electronic device 400 provided in the embodiments of this application.
[0130] like Figure 8 As shown, the electronic device 400 includes at least a processor 410 and a computer-readable storage medium 420. The processor 410 and the computer-readable storage medium 420 can be connected via a bus or other means. The computer-readable storage medium 420 stores a computer program 421, which includes computer instructions. The processor 410 executes the computer instructions stored in the computer-readable storage medium 420. The processor 410 is the computing and control core of the electronic device 400, and is adapted to implement one or more computer instructions, specifically to load and execute one or more computer instructions to achieve a corresponding method flow or function.
[0131] As an example, processor 410 may also be referred to as a central processing unit (CPU). Processor 410 may include, but is not limited to: general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0132] As an example, the computer-readable storage medium 420 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage device; optionally, it may also be at least one computer-readable storage medium located remotely from the aforementioned processor 410. Specifically, the computer-readable storage medium 420 includes, but is not limited to, volatile memory and / or non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).
[0133] In one implementation, the electronic device 400 may be Figure 7 The data reporting device 300 shown contains computer instructions stored in a computer-readable storage medium 420. The processor 410 loads and executes the computer instructions stored in the computer-readable storage medium 420 to achieve... Figure 3 The corresponding steps in the method embodiment shown are as follows; in specific implementation, the computer instructions in the computer-readable storage medium 420 are loaded and executed by the processor 410, and will not be described again here to avoid repetition.
[0134] According to another aspect of this application, embodiments of this application also provide a computer-readable storage medium (Memory), which is a memory device in electronic device 400 for storing programs and data. For example, computer-readable storage medium 420. It is understood that computer-readable storage medium 420 here may include both built-in storage media in electronic device 400 and extended storage media supported by electronic device 400. The computer-readable storage medium provides storage space that stores the operating system of electronic device 400. Furthermore, the storage space also stores one or more computer instructions suitable for loading and execution by processor 410, which may be one or more computer programs 421 (including program code).
[0135] According to another aspect of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. For example, computer program 421. In this case, electronic device 400 may be a computer, and processor 410 reads the computer instructions from computer-readable storage medium 420, and processor 410 executes the computer instructions, causing the computer to perform the data reporting methods provided in the various alternative methods described above.
[0136] In other words, when implemented using software, it can be implemented entirely or partially in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes of the embodiments of this application are run or the functions of the embodiments of this application are implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0137] Those skilled in the art will recognize that the units and process steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0138] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data reporting method, characterized in that, include: Receive user interaction events on the page's user interface; The view structure of the page includes a first element corresponding to a first backend service and at least one element layer corresponding to at least one second backend service. The first element is the parent element of the second element in the at least one element layer. The first element is associated with the parameters of the first element, and the second element is associated with the parameters of the second element. In response to the user operation event, based on the position of the target element corresponding to the user operation event in the view structure, the reported data of the target element is collected; Report the data reported by the target element; Before collecting the reported data of the target element based on its position in the view structure corresponding to the user operation event, the method further includes: Receive the parameters of the first element sent by the first backend service; The first backend service receives parameters of at least one element layer respectively issued by at least one second backend service; The parameters of the first element are associated with the first element in the view structure, and the parameters of the at least one element layer are respectively associated with at least one element layer in the view structure.
2. The method according to claim 1, characterized in that, The view structure includes a third element, which is a sibling element of the first element; the view structure includes a fourth element in the at least one element layer, where the third element is the parent element of the fourth element.
3. The method according to claim 1, characterized in that, The step of collecting the reported data of the target element based on the position of the target element corresponding to the user operation event in the view structure includes: If the target element is the first element, the parameters of the first element are collected as data in the reported data of the target element.
4. The method according to claim 1, characterized in that, The step of collecting the reported data of the target element based on the position of the target element corresponding to the user operation event in the view structure includes: If the target element is the second element, the parameters of the second element and the parameters of the parent element of the second element are collected as data in the reported data of the target element.
5. The method according to claim 1, characterized in that, The view structure is a tree structure.
6. The method according to claim 5, characterized in that, The root node of the tree structure includes the page or the first element.
7. The method according to claim 5, characterized in that, The root node of the tree structure is the page; wherein, the step of collecting the reported data of the target element based on the position of the target element corresponding to the user operation event in the view structure includes: The page parameters are collected as data in the reported data of the target element.
8. The method according to claim 1, characterized in that, The method further includes: If the parameters of the fifth element in the view structure change, then the parameters associated with the fifth element are updated.
9. The method according to claim 1, characterized in that, The view structure is a tree structure with the page as the root node, and the method further includes: If the parameters of the page change, then the parameters of the root node are updated.
10. A data reporting device, characterized in that, include: The receiving unit is used to receive user operation events on the user interface of the page; The view structure of the page includes a first element corresponding to a first backend service and at least one element layer corresponding to at least one second backend service. The first element is the parent element of the second element in the at least one element layer. The first element is associated with the parameters of the first element, and the second element is associated with the parameters of the second element. The acquisition unit is used to respond to the user operation event and, based on the position of the target element corresponding to the user operation event in the view structure, acquire the reported data of the target element. The reporting unit is used to report the reported data of the target element; Before collecting the reported data of the target element based on its position in the view structure corresponding to the user operation event, the method further includes: Receive the parameters of the first element sent by the first backend service; The first backend service receives parameters of at least one element layer respectively issued by at least one second backend service; The parameters of the first element are associated with the first element in the view structure, and the parameters of the at least one element layer are respectively associated with at least one element layer in the view structure.
11. An electronic device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, Used to store a computer program that causes a computer to perform the method as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Page event collection method and device
CN107633019A