Method and device for sending burying point data of terminal equipment, storage medium and computer program product

By generating multi-level data structured embedded data and combining it with dynamic upload strategies based on device type and network conditions, the problem of repetitive work and unreliability in the development of link tracking services for heterogeneous terminal devices is solved. This achieves efficient and reliable data transmission and parsing, improving the performance of tracking systems in smart home and IoT environments.

CN121968034APending Publication Date: 2026-05-01HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In smart home and IoT technologies, the development of link tracking services for heterogeneous terminal devices suffers from repetitive work and unreliability, resulting in complex and unreliable data collection and reporting.

Method used

The event tracking code generates multi-level data structured event tracking data, stores it in a cache queue, and sends it to the backend server according to a preset sending strategy. The upload strategy is dynamically adjusted based on device type and network conditions to achieve efficient and reliable data transmission.

Benefits of technology

It improves the flexibility and maintainability of the link tracing system, ensures a balance between data real-time performance and resource consumption, reduces repetitive work for developers, optimizes data processing workflows, and enhances the efficiency and reliability of the tracing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968034A_ABST
    Figure CN121968034A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for sending buried point data of terminal equipment, a storage medium and a computer program product, and relates to the field of computers.The method comprises the steps that under the condition that it is determined that the terminal equipment triggers a buried point code, buried point data corresponding to a target service event is generated through the buried point code, the burying point data is used for indicating service event information generated when the terminal equipment executes the target service event; storing the burying point data into a cache queue; and sending the buried point data in the cache queue to a back-end server according to a preset sending strategy so as to indicate the back-end server to analyze a service operation path of the target service event according to the buried point data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for transmitting embedded data of a terminal device, a storage medium, and a computer program product. Background Technology

[0002] In the fields of smart home and IoT technology, a complete user interaction is typically accomplished through the collaborative invocation of multiple heterogeneous terminal devices (such as mobile apps, smart speakers, and various IoT sensors and actuators). To ensure user experience and operational efficiency, end-to-end tracing of these distributed interactions has become a critical requirement. However, due to the significant differences in hardware architecture, operating systems, communication protocols, and computing resources among these terminal devices, developing a unified tracing service on them becomes exceptionally complex.

[0003] Currently, due to the differences in terminal devices, each type of device (such as the device end and the App end) mostly develops and integrates its own chain tracking logic to achieve data collection and reporting.

[0004] Regarding the issue of how to overcome the duplication of effort and unreliability in the development of link tracing services using heterogeneous terminal devices, no effective solution has yet been proposed. Summary of the Invention

[0005] This application provides a method and apparatus for sending embedded data of a terminal device, a storage medium, and a computer program product, so as to at least solve the problem of how to overcome the repetitive work and unreliability in the development of link tracing services for heterogeneous terminal devices in the prior art.

[0006] According to one embodiment of this application, a method for sending event tracking data of a terminal device is provided, comprising: when it is determined that the terminal device triggers event tracking code, generating event tracking data corresponding to a target business event through the event tracking code, wherein the event tracking data is used to instruct the terminal device to execute business event information generated by the target business event; storing the event tracking data in a cache queue; and sending the event tracking data in the cache queue to a backend server according to a preset sending strategy, so as to instruct the backend server to parse the business operation path of the target business event based on the event tracking data.

[0007] In an exemplary embodiment, generating tracking data corresponding to a target business event through the tracking code includes: collecting business event information through the tracking code, wherein the business event information includes: global tracking information of the target business event, application tracking information of the target business event in the target application, node execution information of multiple execution nodes within the terminal device, custom business events, and supplementary technical details; the supplementary technical details are used to indicate the operating environment of the terminal device; and generating the tracking data based on a multi-level data structure using Protobuf according to the business event information.

[0008] In an exemplary embodiment, after storing the event tracking data in a cache queue, the method further includes: aggregating multiple event tracking data in the cache queue according to the global tracking information of the event tracking data to obtain multiple sets of aggregated event tracking data, wherein each set of aggregated event tracking data includes at least one event tracking data with the same global tracking information; serializing the multiple sets of aggregated event tracking data according to a first time period to obtain multiple first serialized data, wherein the multiple sets of aggregated event tracking data correspond one-to-one with the multiple first serialized data; and sending the multiple first serialized data in the cache queue to the backend server according to the preset sending strategy.

[0009] In an exemplary embodiment, sending the plurality of first serialized data in the cache queue to the backend server according to the preset sending strategy includes: determining the device type of the terminal device; if the terminal device is a low-resource device, sending the plurality of first serialized data to the backend server according to the first sending strategy; if the terminal device is a high-resource device, sending the plurality of first serialized data to the backend server according to the second sending strategy, wherein the preset sending strategy includes the first sending strategy and the second sending strategy.

[0010] In an exemplary embodiment, sending the plurality of first serialized data to the backend server according to a first sending strategy includes: detecting whether the memory usage of the cache queue exceeds a preset threshold according to a second time period; if it is determined that the memory usage does not exceed the preset threshold, continuously serializing the newly added data points in the cache queue to obtain second serialized data; if it is determined that the memory usage exceeds the preset threshold, sending the third serialized data in the cache queue in batches to the backend server, wherein the third serialized data includes the plurality of first serialized data and the second serialized data.

[0011] In an exemplary embodiment, sending the plurality of first serialized data to the backend server according to a second sending strategy includes: sending the plurality of first serialized data to the backend server at a first moment, wherein the time difference between the first moment and the second moment is less than a preset time threshold, and the second moment is the generation moment of the plurality of first serialized data.

[0012] In an exemplary embodiment, after sending the event tracking data in the cache queue to the backend server according to a preset sending strategy, the method further includes: determining whether the event tracking data in the cache queue was successfully sent; and if the sending fails, retransmitting the event tracking data in the cache queue.

[0013] According to another embodiment of this application, a device for sending event tracking data of a terminal device is also provided, comprising: a generation module, configured to generate event tracking data corresponding to a target business event through the event tracking code when it is determined that the terminal device triggers event tracking code, wherein the event tracking data is used to instruct the terminal device to execute the business event generated by the target business event; a storage module, configured to store the event tracking data in a cache queue; and a sending module, configured to send the event tracking data in the cache queue to a backend server according to a preset sending strategy, so as to instruct the backend server to parse the business operation path of the target business event based on the event tracking data.

[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described method for sending embedded data of the terminal device when it is run.

[0015] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the methods described in various embodiments of this application.

[0016] Through this application, when a business operation on a terminal device triggers a preset tracking code, the system will automatically generate tracking data corresponding to the target business event. The generated tracking data is first stored in a local cache queue. Finally, the system will use a preset sending strategy to determine when and how to upload the tracking data in the cache queue to the backend server. This allows the backend server to parse the complete business operation path, providing detailed data support for performance monitoring, troubleshooting, and user experience optimization. By implementing the above solution, this application effectively solves the contradiction between data real-time performance and resource consumption by implementing cache management and batch blocking of tracking data at the system layer, combined with a dynamic upload strategy based on device type and network conditions. This achieves efficient and reliable transmission and backend parsing of business event information, greatly enhancing the flexibility and maintainability of the tracking system. Thus, it solves the problem of how to overcome the repetitive work and unreliability in the development of link tracking services for heterogeneous terminal devices in related technologies. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a hardware structure block diagram of a computer terminal for a method of sending embedded data of a terminal device according to an embodiment of this application;

[0020] Figure 2 This is a flowchart of a method for sending embedded data of a terminal device according to an embodiment of this application;

[0021] Figure 3 This is a system architecture diagram of a chain tracking system according to an embodiment of this application;

[0022] Figure 4 This is a flowchart illustrating a method for organizing and sending embedded data points according to an embodiment of this application.

[0023] Figure 5 This is a structural block diagram of a terminal device for transmitting embedded data according to an embodiment of this application. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] The methods and embodiments provided in this application can be executed on a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal for a method of sending embedded data of a terminal device according to an embodiment of this application. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor (MCU) or a field-programmable gate array (FPGA)) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0027] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the terminal device's data transmission method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0028] The computer terminal uses a wireless network provided by a communications provider. In one example, transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0029] This embodiment provides a method for sending embedded data from a terminal device. Figure 2 This is a flowchart of a method for sending embedded data of a terminal device according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps S202-S206:

[0030] Step S202: When it is determined that the terminal device triggers the tracking code, the tracking data corresponding to the target business event is generated through the tracking code, wherein the tracking data is used to indicate the business event information generated by the terminal device executing the target business event;

[0031] Step S204: Store the embedded data in a cache queue;

[0032] Step S206: Send the embedded data in the cache queue to the backend server according to the preset sending strategy, so as to instruct the backend server to parse the business operation path of the target business event based on the embedded data.

[0033] Through the above steps, when a business operation on the terminal device triggers the preset tracking code, the system will automatically generate tracking data corresponding to the target business event. The generated tracking data is first stored in a local cache queue. Finally, the system will use a preset sending strategy to determine when and how to upload the tracking data in the cache queue to the backend server. This allows the backend server to parse the complete business operation path, providing detailed data support for performance monitoring, troubleshooting, and user experience optimization. By implementing the above solution, this application effectively solves the contradiction between data real-time performance and resource consumption by implementing cache management and batch blocking of tracking data at the system layer, combined with a dynamic upload strategy based on device type and network conditions. This achieves efficient and reliable transmission and backend parsing of business event information, greatly enhancing the flexibility and maintainability of the tracking system. Thus, it solves the problem of how to overcome the repetitive work and unreliability in the development of link tracking services for heterogeneous terminal devices in related technologies.

[0034] Optionally, generating the tracking data corresponding to the target business event through the tracking code includes: collecting the business event information through the tracking code, wherein the business event information includes: global tracking information of the target business event, application tracking information of the target business event in the target application, node execution information of multiple execution nodes within the terminal device, custom business events, and supplementary technical details; the supplementary technical details are used to indicate the operating environment of the terminal device; and generating the tracking data based on a multi-level data structure of Protobuf according to the business event information.

[0035] When a business event is triggered, the event tracking code automatically collects global tracking information, including unique identifiers and timestamps, to ensure that all actions in a single interaction can be associated. Simultaneously, it acquires application tracking information from the target application, recording application-level execution details such as request processing time. It also delves into the terminal device, collecting node execution information from multiple execution nodes, covering call sequences and state changes. Furthermore, it includes custom business events, recording specific user operations or business logic turning points, and supplementary technical details such as network conditions, configuration parameters, and module operation details—information crucial for understanding the device's operating environment.

[0036] The collected business event information is organized into a multi-layered data structure based on Protobuf to ensure efficient data transmission and parsing. This structure starts from the top-level UTraceMain, which encapsulates the global tracing context; then UTraceApp, which describes the tracing span of a single application; next to UTraceNode, which refines the node details in the chain; then UTraceBusiness, which focuses on business-defined events; and finally to the bottom-level UTraceNet, UTraceConfig, etc., which provide supplementary technical details. Through this structure, information from a single interaction, from macro to micro, is systematically recorded, providing a comprehensive perspective for later analysis.

[0037] This embodiment significantly improves the integrity and parsing efficiency of the tracked data through detailed data collection and hierarchical data organization. Even on resource-constrained devices, it ensures the reliable transmission of critical tracking information, providing a solid data foundation for performance monitoring, fault diagnosis, and user experience optimization in smart home and IoT environments. This method not only reduces repetitive work for developers but also optimizes the data processing flow, making the tracking system more flexible, efficient, and easier to maintain and expand.

[0038] Optionally, after storing the event tracking data in a cache queue, the method further includes: aggregating multiple event tracking data in the cache queue according to the global tracking information of the event tracking data to obtain multiple sets of aggregated event tracking data, wherein each set of aggregated event tracking data includes at least one event tracking data with the same global tracking information; serializing the multiple sets of aggregated event tracking data according to a first time period to obtain multiple first serialized data, wherein the multiple sets of aggregated event tracking data correspond one-to-one with the multiple first serialized data; and sending the multiple first serialized data in the cache queue to the backend server according to the preset sending strategy.

[0039] The event tracking data in the cache queue is grouped according to global tracking information, aggregating multiple event tracking data generated from the same interaction to form multiple datasets containing the same global tracking information. This strategy effectively integrates data, reduces redundancy during transmission, and improves the overall efficiency of data transmission. The aggregated event tracking data is further converted into a serialized format, with each aggregated data set corresponding to a serialized data set, facilitating network transmission while preserving data integrity and hierarchical structure. Serialization processing based on the Protobuf protocol simplifies and optimizes the data format, making it particularly suitable for resource-constrained terminal devices. The serialized data is transmitted according to a preset sending strategy based on device type and network conditions. Resource-constrained devices employ a batch and timed upload strategy, balancing data timeliness and network resource utilization; while resource-rich devices can upload immediately, ensuring data real-time performance.

[0040] This embodiment significantly improves the transmission efficiency and reliability of tracking data by accurately aggregating and efficiently serializing the embedded data, combined with a dynamic transmission strategy based on the characteristics of smart devices. This provides higher-quality data input to the backend server, effectively supporting the refined analysis and maintenance of distributed interactions in smart home and IoT environments, and improving the overall system's operational efficiency and user experience.

[0041] Optionally, sending the plurality of first serialized data in the cache queue to the backend server according to the preset sending strategy includes: determining the device type of the terminal device; if the terminal device is a low-resource device, sending the plurality of first serialized data to the backend server according to the first sending strategy; if the terminal device is a high-resource device, sending the plurality of first serialized data to the backend server according to the second sending strategy, wherein the preset sending strategy includes the first sending strategy and the second sending strategy.

[0042] First, the system identifies the type of terminal device, which serves as the basis for strategy selection. For low-resource devices, given their limited computing and storage capabilities, the implementation example recommends using a first sending strategy: this strategy combines batch sending with scheduled tasks. Specifically, after caching sufficient data locally, the system selects a time when network conditions are good and the device is idle, and uploads multiple sets of serialized data to the backend server at once according to a set time period. This method effectively alleviates network pressure and saves device resources, making it particularly suitable for low-power devices that are frequently offline or have unstable network connections.

[0043] Conversely, high-resource devices such as smart TVs or high-performance routers utilize a second sending strategy: instant upload. Once data is ready, whether it's a single event or an aggregated data packet, it's rapidly sent to the backend server without waiting. This ensures real-time data transmission, allowing the backend to respond instantly to the user's latest actions, suitable for environments with stable networks and high computing power.

[0044] By employing a differentiated transmission strategy, this embodiment achieves reasonable resource allocation, ensuring that data tracking can be uploaded in the optimal way from low-power devices to high-performance devices. This not only reduces network overhead but also guarantees the real-time performance and integrity of the data, significantly improving the overall efficiency and user experience of the chain tracking system in smart home and IoT environments.

[0045] Optionally, sending the plurality of first serialized data to the backend server according to the first sending strategy includes: detecting whether the memory usage of the cache queue exceeds a preset threshold according to a second time period; if it is determined that the memory usage does not exceed the preset threshold, continuously serializing the newly added data points in the cache queue to obtain second serialized data; if it is determined that the memory usage exceeds the preset threshold, sending the third serialized data in the cache queue in batches to the backend server, wherein the third serialized data includes the plurality of first serialized data and the second serialized data.

[0046] Specifically, under the first transmission strategy, the embodiment optimizes the caching and transmission process of the embedded data for low-resource devices to ensure efficient and reliable data transmission under limited resource conditions.

[0047] In this embodiment, the system continuously monitors the memory usage of the cache queue at a second time period. This period is set by considering network fluctuation frequency and device performance characteristics, aiming to balance data collection and device resource utilization. If the memory usage is within a preset threshold, the system allows continued collection and serialization of newly added data points to form second serialized data, thereby accumulating more valuable information until the threshold is reached. When the memory usage exceeds the preset threshold, the system will automatically trigger a data sending mechanism to batch compress and send the third serialized data, including existing first serialized data and newly generated second serialized data, to the backend server.

[0048] It should be noted that the preset threshold is set based on the device's memory capacity and the memory requirements of normal business operations, ensuring that the memory space is used to the maximum extent possible to store the data tracking information without affecting the device's main functions. The batch sending mechanism is activated when memory pressure reaches a certain level. By packaging multiple data entries, it reduces the number of network communications and saves transmission costs.

[0049] This embodiment manages the memory usage of low-resource devices in a refined manner. By dynamically adjusting the caching strategy and batch sending mechanism, it effectively prevents memory overflow while ensuring the integrity and timeliness of the data tracking points. This significantly improves the operating efficiency and data reliability of low-resource devices in chain tracking services in smart home and IoT environments.

[0050] Optionally, sending the plurality of first serialized data to the backend server according to the second sending strategy includes: sending the plurality of first serialized data to the backend server at a first moment, wherein the time difference between the first moment and the second moment is less than a preset time threshold, and the second moment is the generation moment of the plurality of first serialized data.

[0051] Under the second transmission strategy, the system rapidly sends the first serialized data to the backend server the instant the data is generated, close to the second moment. The time difference between the first transmission moment and the second data generation moment is strictly controlled within a preset time threshold. This aims to maximize the real-time nature of the data, instantly reflecting changes in user behavior or system status, and providing the fastest and most direct feedback for backend analysis. This real-time upload strategy is particularly effective on devices with excellent network conditions and sufficient computing power.

[0052] By employing an instant upload strategy, the implementation successfully reduced the transmission latency of data tracking on high-resource devices, significantly improving data real-time performance. This is particularly important for application scenarios requiring immediate response, such as online game experience monitoring and real-time health data analysis. It ensures that the backend server can promptly receive and process the latest user behavior or device status information, thereby enhancing the system's interactivity and intelligence.

[0053] Based on the above steps, after sending the data points in the cache queue to the backend server according to the preset sending strategy, the method further includes: determining whether the data points in the cache queue have been successfully sent; and retransmitting the data points in the cache queue if the sending fails.

[0054] After data is sent, the system immediately checks the transmission feedback of the tracking data in the cache queue. This feedback mechanism can quickly assess whether the data transmission was successful. If any data transmission failure is detected, the system will automatically trigger a retransmission mechanism to resend the data that failed to be transmitted until all tracking data is correctly received by the backend server. This process reflects the system's strict requirements for data integrity and consistency. Especially for tracking data of critical business events, the importance of the retransmission mechanism is self-evident.

[0055] By implementing a feedback and automatic retransmission mechanism, this embodiment significantly enhances the reliability of data transmission at the tracking points. Even under poor network conditions or high server load, it ensures the accurate delivery of critical tracking information, thereby improving the stability and operational efficiency of the entire smart home and IoT tracking system. This mechanism is invaluable for ensuring consistent user experience and timely diagnosis of system-level faults.

[0056] Obviously, the embodiments described above are only some embodiments of this application, and not all embodiments. To better understand the above method for sending embedded data of the terminal device, the process is described below in conjunction with embodiments, but this is not intended to limit the technical solutions of the embodiments of this application. Specifically:

[0057] In related technologies, due to the heterogeneity of devices, developers need to integrate and adapt different tracking SDKs or implement their own chained tracking logic for different platforms such as mobile apps (Android / iOS), embedded devices (RTOS), and gateways (Linux). This results in a large amount of repetitive, business-irrelevant integration and development work. Furthermore, self-designed and developed code often couples the construction of business tracking data with the transmission of tracking data, leading to difficulties in maintaining and expanding tracking services and high development costs. On resource-constrained devices, self-implemented tracking reporting logic is often simplistic and crude, potentially lacking retry mechanisms, data caching strategies, and reasonable batch processing functions when the network is unstable. This easily leads to the loss of tracking data during transmission. The collected link data is incomplete and unreliable, and the analysis and diagnostic results based on this data may be distorted, making the tracking system itself unreliable.

[0058] To address the aforementioned shortcomings, this application proposes a novel chain-based tracking system, the overall architecture of which is as follows: Figure 3 As shown, the system comprises a System layer, a Service layer, and an Application layer. The following provides a detailed description of each layer:

[0059] 1. System layer (tracking point sending management): used to provide a general tracking point sending interface, manage tracking point sending, cache tracking point FIFO, organize tracking points in batches, and send tracking points (combining batch sending and scheduled sending).

[0060] The process of organizing and sending event tracking points is as follows: Figure 4 As shown, Figure 4 In this context, tp represents the event tracking object built by the business logic, and tm represents the event tracking object after batch organization.

[0061] The process begins at the business trigger stage. When a specific operation or event is identified at the application layer, the event tracking code starts randomly, collecting relevant business tracking information. Subsequently, the data flows into the input_fifo (cache queue), a temporary storage area used to store raw, unprocessed event tracking information. Next, the System layer takes over, performing preliminary processing on the data in the input_fifo, including but not limited to data validation, formatting, and necessary preprocessing, before storing it in the report_fifo (a buffer for event tracking data to be sent).

[0062] 2. Service layer: Based on the system's data entry sending interface, it encapsulates and provides data entry interfaces for various services (simple to use and easy to extend).

[0063] The business event tracking interface is responsible for constructing event tracking data according to the standardized event tracking data definition, and calling the system layer sending interface to complete the sending of event tracking data.

[0064] The structure of the tracking data adopts the Protobuf architecture, which, compared to JSON, can effectively reduce the amount of chained tracking data and improve sending efficiency.

[0065] The data tracking points specifically include the following hierarchical structure:

[0066] 2.1 Top level: UTraceMain: Global tracing context, which is the root node and container of the entire distributed tracing.

[0067] 2.2 Second layer: UTraceApp: The tracing span of a single application, which represents the complete processing of a request within a certain service.

[0068] 2.3 Third layer: UTraceNode: Node details in the chain, usually a further refinement of the call chain.

[0069] 2.4 Fourth layer: UTraceBusiness: Business-defined events, usually business logic and business events.

[0070] 2.5 Fifth Layer: UTraceNet, UTraceConfig, UTraceModuleOp, etc.: Supplementary technical details.

[0071] This structure of event tracking data allows for the clear recording of the entire lifecycle of a distributed request, from macro-level business flow to micro-level technical details, providing robust data support for performance monitoring, troubleshooting, and business analysis.

[0072] 3. Application layer: Call the corresponding business event tracking interface in the Service layer to send event tracking data.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0074] This embodiment also provides a device for transmitting embedded data of a terminal device. This device is used to implement the above embodiments and preferred embodiments, and will not be repeated for details already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0075] Figure 5 This is a structural block diagram of an optional terminal device's embedded data transmission apparatus according to an embodiment of this application; as shown... Figure 5 As shown, it includes:

[0076] The generation module 52 is used to generate the tracking data corresponding to the target business event through the tracking code when it is determined that the terminal device triggers the tracking code. The tracking data is used to indicate the business event information generated by the terminal device executing the target business event.

[0077] Storage module 54 is used to store the embedded data into a cache queue;

[0078] The sending module 56 is used to send the embedded data in the cache queue to the backend server according to a preset sending strategy, so as to instruct the backend server to parse the business operation path of the target business event based on the embedded data.

[0079] This device enables the automatic generation of tracking data corresponding to the target business event when a business operation on the terminal device triggers a preset tracking code. The generated tracking data is first stored in a local cache queue. Finally, the system uses a preset sending strategy to determine when and how to upload the tracking data from the cache queue to the backend server. This allows the backend server to parse the complete business operation path, providing detailed data support for performance monitoring, troubleshooting, and user experience optimization. By implementing cache management and batch blocking of tracking data at the system layer, combined with a dynamic upload strategy based on device type and network conditions, this application effectively resolves the contradiction between data real-time performance and resource consumption. It achieves efficient and reliable transmission and backend parsing of business event information, greatly enhancing the flexibility and maintainability of the tracking system. This solves the problem of repetitive work and unreliability in the development of link tracking services using heterogeneous terminal devices in related technologies.

[0080] Optionally, the above-mentioned generation module 52 is further configured to collect the business event information through the embedded code, wherein the business event information includes: global tracking information of the target business event, application tracking information of the target business event in the target application, node execution information of multiple execution nodes inside the terminal device, business-defined events, and supplementary technical details; the supplementary technical details are used to indicate the operating environment of the terminal device; and the embedded data based on a multi-level data structure of Protobuf is generated according to the business event information.

[0081] Optionally, the storage module 54 is further configured to aggregate multiple sets of event tracking data in the cache queue according to the global tracking information of the event tracking data to obtain multiple sets of aggregated event tracking data, wherein each set of aggregated event tracking data includes at least one event tracking data with the same global tracking information; serialize the multiple sets of aggregated event tracking data according to a first time period to obtain multiple first serialized data, wherein the multiple sets of aggregated event tracking data correspond one-to-one with the multiple first serialized data; and send the multiple first serialized data in the cache queue to the backend server according to the preset sending strategy.

[0082] Optionally, the sending module 56 is further configured to determine the device type of the terminal device; when the terminal device is a low-resource device, send the plurality of first serialized data to the backend server according to a first sending strategy; when the terminal device is a high-resource device, send the plurality of first serialized data to the backend server according to a second sending strategy, wherein the preset sending strategy includes the first sending strategy and the second sending strategy.

[0083] Optionally, the sending module 56 is further configured to detect whether the memory usage of the cache queue exceeds a preset threshold according to a second time period; if the memory usage does not exceed the preset threshold, continuously serialize the newly added data points in the cache queue to obtain second serialized data; if the memory usage exceeds the preset threshold, send the third serialized data in the cache queue in batches to the backend server, wherein the third serialized data includes the plurality of first serialized data and the second serialized data.

[0084] Optionally, the sending module 56 is further configured to send the plurality of first serialized data to the backend server at a first moment, wherein the time difference between the first moment and the second moment is less than a preset time threshold, and the second moment is the generation moment of the plurality of first serialized data.

[0085] Optionally, the sending module 56 is further configured to determine whether the data in the cache queue has been successfully sent; if the sending fails, the data in the cache queue is retransmitted.

[0086] Embodiments of this application also provide a storage medium including a stored program, wherein the program executes any of the methods described above when it is run.

[0087] Optionally, in this embodiment, the storage medium may be configured to store program code for performing the following steps:

[0088] S1, when it is determined that the terminal device triggers the tracking code, the tracking data corresponding to the target business event is generated through the tracking code, wherein the tracking data is used to indicate the business event information generated by the terminal device executing the target business event;

[0089] S2, store the embedded data in a cache queue;

[0090] S3, according to the preset sending strategy, send the embedded data in the cache queue to the backend server, so as to instruct the backend server to parse the business operation path of the target business event based on the embedded data.

[0091] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0092] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium storing the computer program product, wherein the computer program, when executed by a processor, implements the steps of the methods described in various embodiments of this application.

[0093] Optionally, in this embodiment, the computer program described above can be configured to perform the following steps when executed by the processor:

[0094] S1, when it is determined that the terminal device triggers the tracking code, the tracking data corresponding to the target business event is generated through the tracking code, wherein the tracking data is used to indicate the business event information generated by the terminal device executing the target business event;

[0095] S2, store the embedded data in a cache queue;

[0096] S3, according to the preset sending strategy, send the embedded data in the cache queue to the backend server, so as to instruct the backend server to parse the business operation path of the target business event based on the embedded data.

[0097] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0098] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0099] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for transmitting embedded data from a terminal device, characterized in that, include: When it is determined that the terminal device triggers the event tracking code, the event tracking data corresponding to the target business event is generated through the event tracking code, wherein the event tracking data is used to indicate the business event information generated by the terminal device executing the target business event; The embedded data is stored in a cache queue; According to the preset sending strategy, the data points in the cache queue are sent to the backend server to instruct the backend server to parse the business operation path of the target business event based on the data points.

2. The method for sending embedded data of a terminal device according to claim 1, characterized in that, The event tracking data corresponding to the target business event is generated through the tracking code, including: The business event information is collected through the embedded code, wherein the business event information includes: global tracking information of the target business event, application tracking information of the target business event in the target application, node execution information of multiple execution nodes inside the terminal device, custom business events, and supplementary technical details; the supplementary technical details are used to indicate the operating environment of the terminal device. The event tracking data is generated based on the business event information and uses a multi-level data structure based on Protobuf.

3. The method for sending embedded data of a terminal device according to claim 1, characterized in that, After storing the data points in a cache queue, the method further includes: Based on the global tracking information of the event tracking data, multiple event tracking data in the cache queue are aggregated to obtain multiple sets of aggregated event tracking data. Each set of aggregated event tracking data includes at least one event tracking data with the same global tracking information. The aggregated data points are serialized according to the first time period to obtain multiple first serialized data points, wherein the aggregated data points correspond one-to-one with the multiple first serialized data points. The plurality of first serialized data in the cache queue are sent to the backend server according to the preset sending strategy.

4. The method for sending embedded data of a terminal device according to claim 3, characterized in that, Sending the plurality of first serialized data in the cache queue to the backend server according to the preset sending strategy includes: Determine the device type of the terminal device; When the terminal device is a low-resource device, the plurality of first serialized data are sent to the backend server according to the first sending strategy; When the terminal device is a high-resource device, the plurality of first serialized data are sent to the backend server according to the second sending strategy, wherein the preset sending strategy includes the first sending strategy and the second sending strategy.

5. The method for sending embedded data of a terminal device according to claim 4, characterized in that, Sending the plurality of first serialized data to the backend server according to the first sending strategy includes: The memory usage of the cache queue is checked according to the second time period to see if it exceeds a preset threshold. If it is determined that the memory usage does not exceed the preset threshold, the newly added data points in the cache queue are continuously serialized to obtain the second serialized data. If the memory usage exceeds the preset threshold, the third serialized data in the cache queue is sent in batches to the backend server, wherein the third serialized data includes the plurality of first serialized data and the second serialized data.

6. The method for sending embedded data of a terminal device according to claim 4, characterized in that, Sending the plurality of first serialized data to the backend server according to the second sending strategy includes: The plurality of first serialized data are sent to the backend server at a first moment, wherein the time difference between the first moment and the second moment is less than a preset time threshold, and the second moment is the generation moment of the plurality of first serialized data.

7. The method for sending embedded data of a terminal device according to claim 1, characterized in that, After sending the embedded data in the cache queue to the backend server according to the preset sending strategy, the method further includes: Determine whether the embedded data in the cache queue has been successfully sent; If the transmission fails, the embedded data in the cache queue will be retransmitted.

8. A device for transmitting embedded data of a terminal device, characterized in that, include: The generation module is used to generate tracking data corresponding to a target business event through the tracking code when it is determined that the terminal device triggers the tracking code. The tracking data is used to indicate the business event information generated by the terminal device executing the target business event. The storage module is used to store the embedded data into a cache queue; The sending module is used to send the embedded data in the cache queue to the backend server according to a preset sending strategy, so as to instruct the backend server to parse the business operation path of the target business event based on the embedded data.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.