Data processing method and device, computer equipment and storage medium

By setting multiple reporting methods and retry strategies for the client, the problems of repetitive configuration and single retry strategy of data tracking components are solved by dynamically selecting and sequentially trying different methods. This improves the stability and success rate of data reporting, adapts to complex network environments, and enhances the robustness of the system.

CN121644313APending Publication Date: 2026-03-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the independent data reporting components for business modules lead to code and configuration duplication, high maintenance costs, and a single retry strategy that cannot adapt to complex network environments, affecting the stability and success rate of data reporting, especially in financial business and big data processing scenarios.

Method used

The retry strategy allows for setting up multiple reporting methods and retry counts. It dynamically selects and attempts the reporting methods supported by the target client in sequence until the data is successfully reported or the retry count is reached, adapting to different network environments and abnormal situations.

Benefits of technology

It improves the stability and success rate of data reporting, enhances the robustness of the system, solves the problem that a single retry strategy cannot adapt to multiple clients and multiple reporting channels, and ensures the integrity and accuracy of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644313A_ABST
    Figure CN121644313A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, computer equipment and a storage medium, and the method comprises the steps: setting a retry strategy which comprises a plurality of reporting modes and retry times; each client corresponds to a plurality of reporting modes; when it is determined that reporting of the target data is abnormal, a query request is sent to a corresponding target client, and the query request is used for querying a reporting mode supported by the target client; receiving a query parameter returned by the target client in response to the query request, wherein the query parameter at least comprises identification information of a reporting mode supported by the target client; determining a plurality of candidate reporting modes matched with the target client from the retry strategy according to the identification information; determining an execution sequence of each candidate reporting mode; and according to the execution sequence, sequentially using each candidate reporting mode to re-report the target data until the target data is successfully reported or the number of retry times is reached. The stability and success rate of target data reporting are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a data processing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] In the business data reporting process, different business modules are equipped with their own independent data reporting components. In the actual reporting process, each data reporting component needs to be configured with its own reporting mechanism and retry strategy. This leads to code and configuration duplication, which not only increases maintenance costs but also limits the reusability of technical resources.

[0003] Furthermore, if an anomaly occurs after business data collection, the existing retry strategy often only allows resubmitting using the original reporting method. This single retry strategy becomes a significant weakness, lacking flexible and diverse reporting options. This not only limits the success rate of data reporting but also restricts its ability to cope with complex network environments. Consequently, the reporting process appears vulnerable and inadequate in the face of complex and ever-changing network environments. This limitation is particularly pronounced in scenarios such as high-frequency trading and large-scale data processing in financial businesses, posing a challenge to the stability and reliability of the reporting system. Summary of the Invention

[0004] To address at least one of the aforementioned technical problems, this disclosure provides a data processing method, apparatus, computer equipment, and storage medium.

[0005] According to some embodiments of this disclosure, a data processing method is provided, the method comprising:

[0006] A retry strategy is set, which includes multiple reporting methods and a number of retries; wherein, the multiple reporting methods are matched with different clients, and each client corresponds to multiple reporting methods;

[0007] If an anomaly is detected in the reporting of target data, a query request is sent to the corresponding target client. The query request is used to query the reporting methods supported by the target client.

[0008] The system receives query parameters returned by the target client in response to the query request, and the query parameters include at least: identification information of the reporting methods supported by the target client;

[0009] Based on the identification information, multiple candidate reporting methods matching the target client are determined from the retry strategy;

[0010] Determine the execution order of each candidate reporting method;

[0011] According to the execution order, the target data is re-reported using each candidate reporting method in turn until the target data is successfully reported or the number of retries is reached.

[0012] According to some other embodiments of this disclosure, a data processing apparatus is provided, the apparatus comprising:

[0013] The configuration module is used to configure retry strategies, which include multiple reporting methods and a number of retries; wherein, the multiple reporting methods are matched with different clients, and each client corresponds to multiple reporting methods;

[0014] The sending module is used to send a query request to the target client when it is determined that the target data reporting is abnormal. The query request is used to query the reporting methods supported by the target client.

[0015] The receiving module is configured to receive query parameters returned by the target client in response to the query request, wherein the query parameters include at least: identification information of the reporting methods supported by the target client;

[0016] The first determining module is used to determine, based on the identification information, multiple candidate reporting methods that match the target client from the retry strategy;

[0017] The second determining module is used to determine the execution order of each candidate reporting method;

[0018] The reporting module is used to re-report the target data using each candidate reporting method in the order of execution until the target data is successfully reported or the number of retries is reached.

[0019] According to some other embodiments of this disclosure, a computer device is provided, including: a memory and a processor; the memory stores one or more computer programs; the processor is configured to load the one or more computer programs to implement the data processing method described above.

[0020] According to some other embodiments of this disclosure, a computer-readable storage medium is provided, the storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded by a processing device and executing the data processing method described above.

[0021] According to some other embodiments of this disclosure, a computer program product is provided, the computer program product including a computer program, which, when executed by a processor, implements the above-described data processing method.

[0022] The data processing method of this disclosure, by setting a retry strategy adapted to different clients, can actively retry multiple candidate reporting methods matching the target client when the client's target data reporting is abnormal. By trying multiple reporting methods, it can better adapt to different network environments and abnormal situations, improve the robustness of the system, and improve the stability and success rate of the data reporting. It solves the problem that the retry strategy in related technologies can only be adapted to a single client, does not support multiple clients, and cannot provide multiple reporting paths for a single client.

[0023] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.

[0024] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0025] To more clearly illustrate the technical solutions and advantages in the embodiments or related technologies of this specification, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart illustrating a data processing method according to an embodiment of the present disclosure is shown;

[0027] Figure 2 A flowchart illustrating the process of determining the execution order of candidate reporting methods according to an embodiment of this disclosure is shown.

[0028] Figure 3 A flowchart illustrating another data processing method according to an embodiment of the present disclosure is shown;

[0029] Figure 4 A flowchart illustrating another data processing method according to an embodiment of the present disclosure is shown;

[0030] Figure 5 This diagram illustrates a network architecture provided according to this embodiment;

[0031] Figure 6 This diagram illustrates a swimlane plot of target data reporting according to an embodiment of the present disclosure;

[0032] Figure 7 This diagram illustrates an initialization flowchart provided according to this embodiment;

[0033] Figure 8A flowchart illustrating a first mode reporting process provided according to an embodiment of the present disclosure is shown.

[0034] Figure 9 A schematic flowchart of a second mode reporting process provided according to an embodiment of the present disclosure is shown;

[0035] Figure 10 A flowchart illustrating a re-reporting process according to an embodiment of the present disclosure is shown;

[0036] Figure 11 This diagram illustrates a data processing apparatus according to an embodiment of the present disclosure.

[0037] Figure 12 This diagram illustrates the structure of a computer device according to an embodiment of the present disclosure. Detailed Implementation

[0038] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0039] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention 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 server 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 devices.

[0040] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0041] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0042] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0043] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0044] In the field of data tracking and reporting in financial business, current practices exhibit significant fragmentation. Each business line independently develops and maintains its own independent data tracking and reporting components, leading to the dispersion and inefficient use of technical resources. This not only causes inconsistencies in the technology stack but also results in a high degree of code and configuration duplication, increasing the difficulty and cost of system maintenance. Furthermore, since data tracking and reporting typically uses GET requests, this method struggles with large data packets, leading to prolonged response times in business processes, increased data loss rates, and severely impacting data accuracy and integrity.

[0045] Please refer to Figure 1 , Figure 1 A flowchart illustrating a data processing method according to an embodiment of this disclosure is shown; the data processing method includes:

[0046] S101: Set a retry policy, which includes multiple reporting methods and a number of retries; wherein, the multiple reporting methods are matched with different clients, and each client corresponds to multiple reporting methods;

[0047] Specifically, the client can be a standalone client or a non-standalone client; no specific limitation is made here.

[0048] Non-standalone clients are web application clients, such as clients using HTML5 technology (h5 for short) and embedded sub-clients integrated into a client, such as mini-programs. Standalone clients can be application clients (APPs), such as social clients, multimedia clients (e.g., video clients), entertainment clients (e.g., game clients), news feed clients, educational clients, live streaming clients, etc.

[0049] Specifically, the retry count can be the number of times the reporting operation is re-executed when the target data is reported abnormally, thus limiting the number of re-reports. In this way, by setting the retry count in the retry strategy, excessive or unlimited retries can avoid burdening the server and wasting resources.

[0050] For example, the number of retries can be set to a fixed value, which can be 4 times, 2 times or 5 times, and there is no specific limitation here.

[0051] For example, the number of retries can also be dynamically adjusted based on business needs, network conditions, or the type of target data points within the target data.

[0052] For example, when poor network conditions are detected, such as weak client network signal or frequent client disconnections, the number of retries can be increased. Similarly, when the target data type is an indication of user click events or sensitive data such as user personal information or payment information, the number of retries can be increased from 3 to 5. This ensures the timeliness of the target data. Dynamically adjusting the number of retries can optimize performance based on different business needs or external conditions, ensuring efficient and successful data reporting.

[0053] Specifically, the reporting method can be any method capable of reporting target data points. Examples include sending a beacon API, asynchronous JavaScript and XML (Ajax) requests, image requests, and network request APIs, such as wx.request.

[0054] It's understandable that each reporting method has specific applicable scenarios and advantages. For example, the send Beacon API is suitable for web applications and mobile applications, sending data asynchronously when the page is unloaded, without blocking the main thread, and is suitable for data transmission after the page is closed. Ajax requests are suitable for web applications and mobile applications, asynchronously transmitting data in dynamic web pages and when interaction with the server is required, and can handle scenarios such as file uploads that require a server response. Image requests are suitable for web applications and mobile applications, applied to scenarios requiring cross-domain data reporting, are simple to implement, and have good compatibility. Network requests are suitable for corresponding mini-programs, applied to data reporting scenarios, and support sending various types of requests.

[0055] S102: If it is determined that the target data reporting is abnormal, a query request is sent to the corresponding target client. The query request is used to query the reporting methods supported by the target client.

[0056] In one specific embodiment, whether the target data reporting is abnormal can be determined by whether a response is received from the server after the reporting operation is performed. For example, if no response is received from the server within a first preset time after the target data reporting request is completed, the reporting request is considered to have timed out. For example, if a response is received from the server after the target data reporting request is completed, it is determined whether the server response contains error information or a format error; if it does, the target data reporting is determined to be abnormal. In an optional embodiment, whether the target data reporting is abnormal can also be determined by analyzing the reporting logs generated during the reporting process; if error logs are found to exist, the target data reporting is determined to be abnormal.

[0057] Specifically, the corresponding target client is the client that is identified as having experienced a target data reporting anomaly; the target client can be one or more.

[0058] In one specific embodiment, when it is determined that there are multiple target clients with abnormal target data reporting, a query request is sent to the target client corresponding to each target client based on the client identifier of the target client to query the reporting methods supported by each target client.

[0059] Specifically, the client identifier is an identifier that uniquely represents the target client; optionally, the client identifier can be a device unique identifier; optionally, the client identifier can also be a user identifier registered by the user in the target client; optionally, the client identifier can also be a custom identifier, etc.

[0060] S103: Receive query parameters returned by the target client in response to the query request, wherein the query parameters include at least: identification information of the reporting methods supported by the target client;

[0061] Specifically, the identification information of the reporting method refers to a specific string used to uniquely identify the reporting methods supported by the target client; the identification information can be a fixed string, or a numerical identifier or a universally unique identifier set during initialization, etc.

[0062] S104: Based on the identification information, determine multiple candidate reporting methods that match the target client from the retry strategy;

[0063] Specifically, the target data refers to the collected data set of event tracking points, which includes information such as user account behavior, event triggers, and page visits; optionally, the event tracking data can be user ID, event type, event occurrence time, page URL, device information, etc.

[0064] Specifically, when it is determined that the target data reporting is abnormal, the reporting methods that the target client can support are determined from the set retry policy, and these reporting methods are determined as candidate reporting methods; here, there are multiple candidate reporting methods.

[0065] In an optional embodiment, the target client may only support one reporting method, i.e., one candidate reporting method. In this case, the candidate reporting method is used directly to re-report the target data.

[0066] S105: Determine the execution order of each candidate reporting method;

[0067] S106: According to the execution order, the target data is re-reported using each candidate reporting method in turn until the target data is successfully reported or the number of retries is reached.

[0068] In one specific embodiment, a retry strategy is set to illustrate the technical solution of this application, including retry strategies for four reporting methods: send Beacon API, Ajax request, Fetch API, image request, and network request API. Assuming the target client's candidate reporting methods are: send Beacon API, Ajax request, and image request, the execution order of the determined candidate reporting methods is: send Beacon API, Ajax request, and image request.

[0069] According to the execution order, the target data is re-reported using the send Beacon API to determine the target data reporting status. If the reporting is successful, the process ends. If the reporting fails and the retry count has not been reached, the target data is re-reported using an Ajax request to determine the target data reporting status. If the reporting is successful, the process ends. If the reporting fails and the retry count has not been reached, the target data is re-reported using an image request to determine the target data reporting status.

[0070] In an optional embodiment, if after re-reporting the target data using each candidate reporting method in the order of execution, the reporting still fails and the number of re-reports has not reached the number of retries, then the target data is re-reported again using each candidate reporting method in the order of execution until the target data is successfully reported or the number of retries is reached.

[0071] It should be noted that if the retry count is reached and the data is still not successfully reported, the report is considered to have failed, retrying stops, and the system waits for the next reporting operation. This prevents unlimited retrying from burdening the server and wasting resources.

[0072] In this embodiment, by setting a retry strategy adapted to different clients, when the client's target data reporting is abnormal, multiple candidate reporting methods matching the target client can be determined according to the retry strategy for active retry. By trying multiple reporting methods, the system can better adapt to different network environments and abnormal situations, improve the robustness of the system, and improve the stability and success rate of the data reporting. This solves the problem in related technologies that the retry strategy can only be adapted to a single client, does not support multiple clients, and cannot provide multiple reporting paths for a single client.

[0073] Please refer to Figure 2 , Figure 2 The diagram illustrates a flowchart of determining the execution order of candidate reporting methods according to an embodiment of this disclosure; the determination of the execution order of each candidate reporting method includes:

[0074] S201: Determine the execution order of each candidate reporting method according to the priority of each candidate reporting method in the retry strategy. The execution order of the candidate reporting methods is positively correlated with the priority of the candidate reporting methods.

[0075] Specifically, the retry strategy includes the priority corresponding to each of the reporting methods.

[0076] In one specific embodiment, the retry strategy includes the priority of each reporting method among all reporting methods, and the priority of each candidate reporting method is determined from the priority of each reporting method included in the retry strategy.

[0077] For example, the priority of each reporting method included in the retry strategy can be shown in Table 1.

[0078] Reporting method Priority send Beacon API 1 Ajax request 2 Fetch API 3 WebSocket 4 Image request 5 Network Request API 6

[0079] Table 1

[0080] It should be understood that Table 1 is only an example of the priority of each reporting method included in the retry strategy, and does not represent all the possibilities of the retry strategy in this technical solution.

[0081] In a specific embodiment, it is assumed that the candidate reporting methods of the target client are: send Beacon API, Ajax request, and image request; based on Table 1 above, the priority of send Beacon API among the candidate reporting methods is determined to be 1, the priority of Ajax request is 2, and the priority of image request is 5.

[0082] Furthermore, the execution order of the candidate reporting methods is determined according to the priority of each candidate reporting method.

[0083] Specifically, the higher the priority level of the candidate reporting method, the higher the priority of executing that candidate reporting method.

[0084] In a specific embodiment, among the three candidate reporting methods, send Beacon API has a priority of 1, which is the highest priority level; the Ajax request has a priority of 2, which is the second highest priority level; and the image request has a priority of 5, which is the lowest priority level. Therefore, the execution order of the candidate reporting methods is: send Beacon API — Ajax request — image request.

[0085] In this embodiment, higher-priority reporting methods are prioritized for resubmission, which improves the success rate of resubmission. Furthermore, when reporting anomalies are encountered, the most suitable reporting method can be automatically selected for retry, thereby ensuring the integrity and accuracy of the data and improving the overall performance and user experience of the system.

[0086] S202: Determine the execution order of each candidate reporting method according to the priority of each candidate reporting method in the query parameters. The execution order of the candidate reporting methods is positively correlated with the priority of the candidate reporting methods.

[0087] Specifically, the query parameters include the priority of each reporting method supported by the target client, as shown in Table 2:

[0088] Reporting methods supported by the target client Priority send Beacon API 1 Image request 2 Ajax request 3

[0089] Table 2

[0090] As shown in Table 2, the reporting methods supported by the target client are: send Beacon API, image request, and Ajax request. Among the reporting methods, send Beacon API has the highest priority of 1, image request has the highest priority of 2, and Ajax request has the highest priority of 3.

[0091] In a specific embodiment, if the multiple candidate reporting methods that match the target client are determined from the retry strategy based on the identification information included in the query parameters, namely: send Beacon API, Ajax request, and image request, then according to Table 2, send Beacon API has the highest priority of 1, image request has the highest priority of 2, and Ajax request has the highest priority of 3. The execution order of each candidate reporting method is: send Beacon API —— image request —— Ajax request.

[0092] In this embodiment, the system prioritizes the use of higher-priority reporting methods, which improves the success rate of re-reporting. Furthermore, when encountering reporting anomalies, it can automatically select the most suitable reporting method for retrying, thereby ensuring the integrity and accuracy of the data and improving the overall performance and user experience of the system.

[0093] In another embodiment, if the multiple candidate reporting methods that match the target client are determined from the retry strategy based on the identification information included in the query parameters, namely send Beacon API and Ajax request, that is, the retry strategy only includes two candidate reporting methods that match the target client: send Beacon API and Ajax request, then according to Table 2, the priority of send Beacon API is determined to be 1 and the priority of Ajax request is determined to be 3. The execution order of each candidate reporting method is: send Beacon API —— Ajax request.

[0094] In this way, not only can the priority of each candidate reporting method be determined by the query parameters returned by the target client, and the execution order of different candidate reporting methods be determined according to different target clients to adapt to the diversity of clients, but it also enables the priority to try the reporting method with higher priority, which improves the success rate of re-reporting. Furthermore, when encountering reporting anomalies, it can automatically select the most appropriate reporting method for retry, thereby ensuring the integrity and accuracy of data, while improving the overall performance of the system and the user experience.

[0095] Furthermore, the retry strategy also includes: different retry time intervals, with each retry time interval corresponding to a different data type of the data being tracked; such as... Figure 3 As shown, Figure 3 The diagram illustrates a flowchart of another data processing method according to an embodiment of the present disclosure; the method further includes:

[0096] S301: Determine the data type of the tracking points in the target data; the data type of the tracking points includes at least one of the following: user account behavior data type, device information data type, and business process data type;

[0097] Specifically, the user account behavior data refers to the operations and behaviors performed by users on applications or websites, such as clicking, swiping, and inputting.

[0098] For example, the user account behavior data may include: user ID, operation type, operation time, operation element, etc.

[0099] Specifically, the device information data refers to relevant information about the client device used by the user, such as operating system, browser version, screen resolution, etc.

[0100] For example, the device information data may include: device type, operating system, browser version, screen size, etc.

[0101] Specifically, the business process data refers to data related to the business process, such as order status, payment method, user feedback, etc.

[0102] For example, the business process data may include: business process stage, business process status, business process result, etc.

[0103] In one specific embodiment, the target data may include any one of the following types of data points: user account behavior data type, device information data type, and business process data type. In an optional embodiment, the target data may include multiple types of data points: user account behavior data type, device information data type, and business process data type.

[0104] It's important to note that before collecting event tracking data, the data types to be collected are pre-defined based on the needs of the business modules. This may include user account behavior data, device information data, and business process data. During the collection process, user account behavior, device information, and business process data are collected in a targeted manner according to the pre-defined event tracking data types. This means that when a user performs a specific action, such as clicking, swiping, or browsing a page, the event tracking code will be triggered according to preset rules and collect corresponding data, such as user ID, operation time, operation type, device model, operating system version, and business process status. This data will be collected and reported to the server for subsequent data analysis and business decision-making.

[0105] S302: Determine the retry time interval corresponding to the target data based on the data type of the embedded points and the retry strategy;

[0106] Specifically, the retry interval is the length of time required to wait before attempting to re-report data in the event of an anomaly. This interval can be measured in milliseconds, seconds, or minutes.

[0107] Specifically, the different retry time intervals corresponding to the data types of the event tracking can be preset. For example, different retry time intervals can be determined for the data types of the event tracking based on their relevance or importance to business requirements.

[0108] For example, when collecting business decision data, click events in user account behavior data are crucial to business decisions. In this case, click event tracking data in the user account behavior data type can be set with a shorter retry interval, such as 5 seconds. Browsing behavior is important for user experience analysis, so browsing behavior tracking data in the user account behavior data type can be set with a medium retry interval, such as 10 seconds.

[0109] When collecting data for business decisions, if click event data from user account behavior is crucial to business decisions, a shorter retry interval, such as 5 seconds, can be set. This is because click events are often key points of user interaction with the product, and are essential for analyzing user account behavior and optimizing product features.

[0110] For example, if browsing behavior data from user account behavior data is important for user experience analysis, such as page view time and page dwell time, then a moderate retry interval, such as 10 seconds, can be set. This data helps to understand users' browsing habits and experiences, which is crucial for improving product design and enhancing user satisfaction.

[0111] In practical applications, the retry interval can be adjusted based on the importance of the data, business needs, and the potential impact of data loss. For example, for high-priority data, a shorter retry interval can be set to reduce the risk of data loss; while for low-priority data, a longer retry interval can be set to reduce the consumption of system resources.

[0112] Therefore, by setting an appropriate retry interval based on the importance of the data type of the data point, it is possible to ensure that critical data can be reported in a timely manner, while avoiding unnecessary occupation of system resources.

[0113] In one specific embodiment, the target data may contain the same type of event tracking data. In this case, the retry time interval corresponding to the target data can be directly determined based on the different retry time intervals corresponding to the pre-set event tracking data types.

[0114] In one optional embodiment, the target data may contain different types of embedded data; optionally, the retry time interval corresponding to the most important embedded data in the target data can be determined as the retry time interval corresponding to the target data; optionally, the retry time interval corresponding to each type of embedded data contained in the target data can also be determined, and the average value of all determined retry time intervals can be determined as the retry time interval corresponding to the target data.

[0115] S303: Based on the retry time interval, and in accordance with the execution order, re-report the target data using each candidate reporting method in sequence until the target data is successfully reported or the number of retry attempts is reached.

[0116] Specifically, based on the execution order of the candidate reporting methods, the higher-priority candidate reporting method is used first to re-report the target data, while the lower-priority candidate reporting methods are used as backups. Following the execution order, each candidate reporting method is used sequentially to attempt to report the target data. If a candidate reporting method fails before the retry count has been reached, the process waits for the retry interval and then uses the next candidate reporting method to re-report the target data. This process is repeated until the retry count is reached or the data is successfully reported.

[0117] In this embodiment, by setting different retry intervals for different data types of data points, rapid response to critical data and reasonable resource allocation for non-critical data are achieved. The retry strategy is dynamically adjusted according to the importance of the data, thereby improving the success rate of data reporting, ensuring data integrity and accuracy, and simultaneously enhancing the stability and reliability of the system.

[0118] Figure 4 A flowchart illustrating another data processing method according to an embodiment of this disclosure is shown, such as... Figure 4 As shown; prior to step S102 above, the method further includes:

[0119] S401: Determine the reporting mode;

[0120] Specifically, the reporting mode is preset during initialization. The reporting mode can be a first mode or a second mode. The first mode is a mode for reporting the target data points in batches, and the second mode is a mode for reporting the target data points one by one.

[0121] Specifically, when an anomaly is detected in the target data reporting, the server determines the reporting mode of the target client. This is done by sending a configuration information query to the target client and determining the reporting mode from the returned configuration information. If the reporting mode is determined to be the first mode, steps S402 to S405 and S407 are executed; if the reporting mode is determined to be the second mode, steps S406 to S407 are executed.

[0122] It should be noted that if the configuration information returned by the target client does not show a reporting mode, the server's default reporting mode will be used for reporting.

[0123] S402: If the reporting mode is the first mode, store the target data points in the cache queue;

[0124] Specifically, the target data points are the data points that need to be reported; the cache queue is used to temporarily store the target data points before the data is reported, and the cache queue can be located in memory.

[0125] Specifically, before collecting event tracking data, the data types to be collected are pre-defined according to the needs of the business modules. This may include user account behavior data, device information data, and business process data. During the collection process, user account behavior, device information, and business process data are collected in a targeted manner according to the pre-defined event tracking data types to generate target event tracking data, which is then stored in a cache queue.

[0126] S403: If the number of target data points in the cache queue reaches a preset value, determine to trigger a reporting operation;

[0127] Specifically, the preset value can be the same as the length of the cache queue, or it can be half the length of the cache queue; optionally, the preset value can also be any other positive integer value, such as 100 entries or 100MB, etc., without specific limitations here.

[0128] For example, by determining the number of target tracking data stored in the cache queue, when the number reaches 100, the reporting operation is triggered. Based on the first-in, first-out principle, the 100 target tracking data in the cache queue are transmitted to the upload queue. In this way, the reporting operation is automatically triggered according to preset reporting conditions, avoiding excessive consumption of system resources by frequent reporting, while ensuring that data can be reported regularly to meet the needs of business analysis.

[0129] Furthermore, the method further includes: determining to trigger the reporting operation when a page operation that changes the page state is detected, or when the time difference between the current time and the reporting time of the last reporting operation reaches a preset time interval.

[0130] In an optional embodiment, the method further includes: determining whether there is a page operation that changes the page state; if a page operation that changes the page state is detected, determining to trigger the reporting operation.

[0131] Specifically, the page operations include at least one of the following: page navigation; page closing; page refresh. Optionally, the page operations may also be page scrolling, page zooming, etc.

[0132] For example, the page navigation operation can be: clicking a link, entering a URL, using a bookmark, or using the forward or back buttons, etc., switching from one page to another, also known as a route switching operation; for example, the page relationship operation can be: the user closing a browser window, tab, or using the "back" button, etc.; for example, the page refresh operation can be: the user manually refreshing the page or the page automatically refreshing after performing certain operations, such as form submission, etc.

[0133] Specifically, upon detecting a page operation that changes the page state, the reporting operation is triggered. If the reporting mode is determined to be the first mode, and the target tracking data is found in the cache queue, the cached target tracking data is transferred to the upload queue based on a first-in, first-out (FIFO) principle. If the reporting mode is determined to be the second mode, and the target tracking data is collected, the tracking data is directly identified as the target data, and the reporting operation is executed. This achieves automatic triggering of reporting operations based on user account behavior, avoiding excessive consumption of system resources due to frequent reporting, while ensuring timely reporting of critical page operation data to meet business analysis needs.

[0134] In an optional embodiment, the method further includes: setting a preset time interval for performing a reporting operation; determining the time difference between the current time and the reporting time of the previous reporting operation; and determining to trigger the reporting operation when the time difference between the current time and the reporting time of the previous reporting operation reaches the preset time interval.

[0135] Specifically, the preset time interval is pre-set; the preset time interval can be in seconds, minutes or hours; for example, the preset time interval can be 40 seconds, 1 minute or 3 minutes, etc., without specific limitation here.

[0136] Specifically, when the time difference between the current moment and the last reporting time reaches the preset time interval, the reporting operation is triggered. If the reporting mode is determined to be the first mode, and the target tracking data is stored in the cache queue, the target tracking data cached in the cache queue is transferred to the upload queue based on the first-in, first-out principle. If the reporting mode is determined to be the second mode, and the target tracking data is collected, the tracking data is directly identified as the target data and the reporting operation is performed. In this way, the reporting operation is automatically triggered according to the preset time interval, avoiding excessive consumption of system resources due to frequent reporting, while ensuring that tracking data can be reported regularly to meet the needs of business analysis.

[0137] S404: Obtain the target data entry point from the cache queue and upload it to the upload queue;

[0138] Specifically, the upload queue can be an in-memory queue used to store target tracking data retrieved from the cache queue.

[0139] Specifically, when it is determined that an uploading operation has been triggered, following the first-in-first-out principle, the client retrieves the target data points from the cache queue and stores them in the upload queue.

[0140] In this way, by setting up a dual-queue structure of cache queue and upload queue, parameters such as queue size and upload frequency can be adjusted according to actual needs. By storing the data points in the cache queue first and then uploading them to the upload queue when the reporting operation is performed, the user waiting time is reduced and the user experience is improved.

[0141] S405: Batch encapsulate the target data points in the upload queue to generate the target data;

[0142] Specifically, the target tracking data in the upload queue is encapsulated based on the order in which it enters the queue, and combined into a complete data packet. Optionally, the data packet can be in JSON or XML format.

[0143] In this way, the data is packaged into target data before the reporting operation is performed. If the reporting fails, the data can be retrieved directly from the upload queue for retry, without having to collect the data from the source again.

[0144] S406: If the reporting mode is the second mode, and the target embedding data is collected, the target embedding data is determined as the target data;

[0145] Specifically, if the reporting mode is to indicate that the target embedding data is reported one by one, then when the target embedding data is collected, the target embedding data is determined as the target data, and step S407 is executed to report the target data to the server.

[0146] S407: Execute the reporting operation, which is used to report the target data to the server.

[0147] Specifically, a reporting mode is pre-set for the target client. When the reporting operation is performed, the target data is reported to the server according to the preset reporting mode. In the first reporting mode, which involves reporting multiple target data points, storing the data in a cache queue before uploading reduces user waiting time and improves user experience. When the number of target data points in the cache queue reaches a preset value, the data is retrieved from the cache queue, packaged, and reported in batches. This achieves batch uploading of data points through dual queues, reducing the number of communications with the server and improving data processing efficiency. It also enables automatic triggering of reporting operations based on preset reporting conditions, avoiding excessive system resource consumption from frequent reporting and ensuring regular data reporting to meet business analysis needs.

[0148] When the reporting mode is the second mode, which is the mode of reporting target data point data one by one, the collected target data point data is reported directly. This ensures the real-time performance and accuracy of the data, helps to quickly locate and analyze problems, and improves data processing efficiency.

[0149] Furthermore, prior to step S401 above, the method further includes: collecting business tracking data; encrypting the business tracking data based on a preset encryption algorithm according to an encryption key to generate the target tracking data.

[0150] Specifically, the encryption algorithm can be a symmetric encryption algorithm, such as the Advanced Encryption Standard (AES) encryption algorithm or the Data Encryption Standard (DES) encryption algorithm; or it can be an asymmetric encryption algorithm.

[0151] In one optional embodiment, business tracking data is collected on the client side. Based on a preset encryption key, the business tracking data is encrypted using the AES symmetric encryption algorithm to generate target tracking data. After encryption, the server decrypts the encrypted target tracking data using the same encryption key.

[0152] In this way, encryption algorithms can protect user privacy and ensure that data is not modified during transmission and storage, thereby improving the security of data transmission.

[0153] In this embodiment, by setting a retry strategy adapted to different clients, when the client's target data reporting is abnormal, multiple candidate reporting methods matching the target client can be determined according to the retry strategy for active retry. By trying multiple reporting methods, the system can better adapt to different network environments and abnormal situations, improve the robustness of the system, and improve the stability and success rate of the data reporting. This solves the problem in related technologies that the retry strategy can only be adapted to a single client, does not support multiple clients, and cannot provide multiple reporting paths for a single client.

[0154] The following is a specific example illustrating the data processing of an embodiment of the present invention:

[0155] By abstracting the event tracking service model, the event tracking reporting and retry strategies of each client in the business module are extracted and separated from the event tracking data collection in the client. That is, the event tracking data collection and reporting are separated for each client. Each client in the business module is responsible for event tracking data collection. An event tracking reporting component and retry strategy are set up to handle the reporting and retries of the event tracking data collected by each client. The event tracking reporting component replaces the original GET request reporting of each client, and a retry strategy adaptable to different clients is configured for this replacement.

[0156] Please refer to Figure 5 , Figure 5 This diagram illustrates a network architecture according to this embodiment; the network architecture may include a server 200 and a client cluster 100, the client cluster may include one or more clients, and the number of terminal devices is not limited here. Figure 5 As shown, this client cluster can be front-end application clients such as mini-programs, H5, and apps. Client cluster 100 can be divided into two main categories: independent clients and non-independent clients. Non-independent clients are web application clients, such as clients using HTML5 technology (h5 for short) and embedded sub-clients integrated into a client, such as mini-programs. Independent clients can include apps, such as social clients, multimedia clients (e.g., video clients), entertainment clients (e.g., game clients), news feed clients, educational clients, live streaming clients, etc., without further limitation.

[0157] Among them, server 200 can be an independent proxy server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0158] Among them, such as Figure 5 As shown, target client 100 can establish a network connection with server 200 to facilitate data interaction between each target client and server 200. A data collection component and a data reporting component are configured between the target client and server. The data collection component collects data that meets business requirements and sends it to the data reporting component. Data is reported through the configured data reporting component and retry strategy. Specifically, target data is reported to server 200 through backend services such as data reporting API, queue management stack, batch data encapsulation, target data reporting, and retry strategy. Various components within server 200 process the received target data. Specifically, the Nginx server acts as a reverse proxy, receiving and processing log data sent by the target client, and forwarding the log data to the Java program on the server backend for processing. The Nginx server can implement high-performance HTTP and reverse proxy services, and uses the Java programming language controller to process and respond to data and requests sent by the client. The tube-raw log is responsible for receiving raw log data and transmitting it to the log middleware layer. The data in the log middleware layer is used for business analysis and real-time data verification, and is also used to send data to the database for storage.

[0159] It should be noted that the execution process during target data collection and reporting is as follows: Figure 6 As shown, Figure 6 This diagram illustrates a swimlane diagram for target data reporting according to an embodiment of this disclosure. When a user enters a business page of a target client, the target client's front-end event tracking service detects this time. Upon user account actions, such as clicking a button or entering information, or performing page operations that change the page state, such as page refresh or page redirection, the service initiates a page view (PV) and target data reporting request by calling the target client's default reporting method interface, such as the beacon API. The Nginx server receives the business event tracking data sent by the target client and sends it to the event tracking reporting component, which processes and reports the data. In this process, for page redirection operations, a jitter mechanism is added to the front-end underlying routing of the current page. If another page redirection operation is detected within 300 milliseconds of the last one, the page redirection is not performed; instead, it waits 300 milliseconds before proceeding.

[0160] like Figure 5As shown, real-time event stream data in the log middleware layer is processed by the Flink stream processing framework and then transmitted to a Microsoft Database Engine (MDB) for storage. Data in the log middleware layer that does not require real-time response is processed offline using Hive tools. After data processing, various charts are generated for business analysis and decision support. These charts can be in the form of bar charts, line charts, pie charts, scatter plots, etc., to display and interpret data trends, distributions, proportions, etc.

[0161] Understandable, Figure 5 This is merely an illustrative representation of a possible network architecture for the technical solution of this application, and does not limit the specific architecture of the technical solution of this application. That is, the technical solution of this application may also provide other forms of network architecture.

[0162] The specific reporting process in this embodiment is as follows:

[0163] Step 1: Configure the initial parameters for each business module;

[0164] Step 1.1: Initial parameter configuration for the target client;

[0165] Step 1.1.1: Initialize the reporting methods supported by each target client and the priority of each reporting method.

[0166] Taking a target client as an example, the various reporting methods supported by the target client and the corresponding priorities of each reporting method are shown in Table 3:

[0167]

[0168]

[0169] Table 3

[0170] Step 1.1.2: Initialize the reporting mode of each target client;

[0171] Specifically, the reporting mode is initialized in the software development kit (SDK) of the target client. The reporting mode can be a first mode, which is used to report the target data points in batches; or a second mode, which is used to report the target data points one by one.

[0172] Step 1.2: Initialize the initial parameters of the data collection component and the data reporting component, and set the process as follows: Figure 7 As shown;

[0173] Step 1.2.1: Initialize configuration information using the software development kit;

[0174] Specifically, the configuration information of the event tracking and event reporting components is initialized through the SDK.

[0175] Step 1.2.2: Set the data reporting address and queue capacity;

[0176] Specifically, the type of the event tracking data to be collected is set to the data corresponding to user click operations and exposure operations, the event tracking data cache address is configured for each target client, and the length of the cache queue and upload queue corresponding to the cache address is set.

[0177] Step 1.2.3: Set the retry policy;

[0178] Specifically, the retry strategy includes multiple reporting methods such as send Beacon API, Ajax request, image request and network request API. Among them, the priority of send Beacon API is 1, the priority of Ajax request is 2, the priority of image request is 3, and the priority of network request API is 4.

[0179] Step 1.2.4: Set the default reporting mode;

[0180] Specifically, if the reporting mode is the first mode, which indicates that the target data points are reported in batches, the dual-queue upload service is invoked; if the reporting mode is the second mode, which indicates that the target data points are reported one by one, the target data points are reported directly when they are collected.

[0181] Step 1.2.5: Set the trigger conditions for the event tracking upload component to perform the reporting operation;

[0182] The reporting operation can be triggered in two ways: condition-triggered and timed-triggered. Condition-triggered operation is triggered when a specific condition is met, such as when the amount of data in the cache queue exceeds a preset value. Timed-triggered operation is automatically executed at a preset time point, such as executing a reporting operation once every preset time interval.

[0183] Specifically, the triggering condition for the reporting operation shall be determined to be at least one of the following:

[0184] If the number of target data points in the cache queue reaches a preset value, the reporting operation will be triggered.

[0185] If a page operation that changes the page state is detected, the reporting operation is triggered.

[0186] If the time difference between the current moment and the reporting time of the last reporting operation reaches a preset time interval, the reporting operation is triggered.

[0187] Step 2: Collect business event tracking data from the target client;

[0188] Specifically, based on a preset encryption key, the AES symmetric encryption algorithm is used to encrypt the business tracking data to generate the target tracking data.

[0189] Step 3: Determine the reporting mode of the target client;

[0190] Specifically, when the target client's reporting mode is determined to be the first mode, step 3 is executed; when the target client's reporting mode is determined to be the second mode, step 4 is executed.

[0191] Specifically, you can either use the default reporting mode as the target client's reporting mode directly, or send a reporting mode confirmation request to the target client to use the reporting mode set by the target client.

[0192] It should be noted that when the reporting mode is the first mode, the reporting process is as follows: Figure 8 As shown; when the reporting mode is the second mode, the reporting process is as follows: Figure 9 As shown.

[0193] Step 4: Determine the target data point as the target data and proceed to step 8.

[0194] Step 5: Store the target data points into the cache queue at the corresponding address;

[0195] Specifically, the client collects the corresponding data when it detects that the user has performed a click or exposure operation, and stores it in a cache queue.

[0196] Step 6: Determine whether a reporting operation has been triggered. If it is determined that a reporting operation has been triggered, proceed to Step 7.

[0197] Specifically, the triggering condition for the reporting operation is the condition set in step 1.3 above.

[0198] Specifically, the reporting operation is triggered when the number of target tracking data items stored in the cache queue reaches 100. The reporting operation is also triggered when a page operation that changes the page state is detected. Finally, the reporting operation is triggered when the time difference between the current time and the last reporting time reaches the preset time interval.

[0199] Step 7: Upload the data tracking information in the cache queue to the upload queue and generate the target data;

[0200] Specifically, following a first-in, first-out (FIFO) strategy, the event tracking data in the cache queue is sequentially transferred to the upload queue. The event tracking data in the upload queue is then batch-packaged and concatenated to generate the target data.

[0201] It should be noted that after uploading the event tracking data in the cache queue to the upload queue, the data status in the cache queue will be updated.

[0202] Step 8: Perform the reporting operation to report the target data to the server.

[0203] Specifically, the target data is uploaded to the server according to the default upload method preset by the target client. For example, the default upload method is: send Beacon API.

[0204] Step 9: Determine if the report is abnormal; if the report is abnormal, proceed to step 10; if the report is successful, then end.

[0205] Step 10: Re-upload the target data according to the retry policy;

[0206] Step 10.1: Determine the candidate reporting method based on the retry strategy;

[0207] Specifically, a query request is sent to the target client to query the reporting methods supported by the target client, and query parameters are received from the target client in response to the query request. The query parameters include identification information of the reporting methods supported by the target client. Based on the identification information, multiple candidate reporting methods that match the target client are determined from the retry strategy.

[0208] For example, the candidate reporting methods for the target client are: send Beacon API, Ajax request, and image request.

[0209] Step 10.2: Determine the execution order of candidate reporting methods;

[0210] Step 10.2.1: Determine the execution order of each candidate reporting method according to the priority of each candidate reporting method in the query parameters.

[0211] Specifically, assuming that the priorities of each reporting method supported by the target client in the query parameters are as shown in Table 2, the execution order of the candidate reporting methods is determined according to the priorities of each reporting party in Table 2 as send BeaconAPI, image request, and finally Ajax request.

[0212] Step 10.2.2: Determine the execution order of each candidate reporting method according to the priority of each candidate reporting method in the retry strategy. The execution order of the candidate reporting methods is positively correlated with the priority of the candidate reporting methods.

[0213] Specifically, based on the retry strategy set in step 1.2.3, the priority of the candidate reporting methods is determined to be 1 for send BeaconAPI, 2 for Ajax requests, and 3 for image requests. Therefore, the execution order of the candidate reporting methods is determined to be send BeaconAPI, Ajax requests, and finally image requests.

[0214] Step 10.3: Based on the execution order, re-report the target data using each candidate reporting method in sequence until the target data is successfully reported or the number of retries is reached.

[0215] Specifically, taking the execution order of the candidate reporting methods determined in step 10.2.2 as an example, the re-reporting process in step 10.3 is as follows: Figure 10 As shown.

[0216] Step 10.3.1: Prioritize using the send Beacon API method to resubmit the target data;

[0217] Step 10.3.2: Determine whether the report was successfully submitted and whether the number of retries has been reached;

[0218] If the report is successful or the number of retries is reached, the re-reporting process ends; if the report is abnormal and the number of retries is not reached, proceed to step 10.3.3.

[0219] Step 10.3.3: Use an Ajax request to resubmit the target data;

[0220] Step 10.3.4: Determine whether the report was successfully submitted and whether the number of retries has been reached;

[0221] If the report is successful or the number of retries is reached, the reporting process ends and resumes; if the report is abnormal and the number of retries is not reached, proceed to step 10.3.5.

[0222] Step 10.3.5: Use an image request to resubmit the target data;

[0223] Step 10.3.6: Determine whether the report was successfully submitted and whether the number of retries has been reached;

[0224] If the report is successful or the number of retries is reached, the re-reporting process ends; if the report is still abnormal and the number of retries is not reached, proceed to step 10.3.1.

[0225] It should be noted that after a successful report, the data that has been reported will be automatically cleared and destroyed in the upload queue. This improves memory performance and resource utilization efficiency, reduces storage and maintenance costs, and ensures the reusability of batch reporting and retry strategies.

[0226] In this embodiment, the business abstraction of the event tracking service is independently split into a task flow separation processing service injection, and the business event tracking process is understood and split into event tracking data collection and event tracking data reporting. The business module can customize rich initialization conditions. Furthermore, dual-queue management is used to report event tracking data in batches, and retry policies applicable to multiple clients are set. Thus, by setting retry policies adapted to different clients, in the event of abnormal target data reporting by a client, multiple candidate reporting methods matching the target client can be determined according to the retry policy for proactive retries. By trying multiple reporting methods, the system can better adapt to different network environments and abnormal situations, improving system robustness, stability, and success rate of event tracking data reporting. This solves the problem in related technologies where retry policies can only adapt to a single client, do not support multiple clients, and cannot provide multiple reporting paths for a single client.

[0227] Please refer to Figure 11 This diagram illustrates a block diagram of a data processing apparatus provided according to an embodiment of the present disclosure. The apparatus includes:

[0228] The setting module 1101 is used to set a retry strategy, which includes multiple reporting methods and a number of retries; wherein, the multiple reporting methods are matched with different clients, and each client corresponds to multiple reporting methods;

[0229] The sending module 1102 is used to send a query request to the target client when it is determined that the target data reporting is abnormal. The query request is used to query the reporting methods supported by the target client.

[0230] The receiving module 1103 is used to receive query parameters returned by the target client in response to the query request, wherein the query parameters include at least: identification information of the reporting methods supported by the target client;

[0231] The first determining module 1104 is used to determine, based on the identification information, multiple candidate reporting methods matching the target client from the retry strategy; and determine the execution order of each candidate reporting method.

[0232] The reporting module 1105 is used to re-report the target data using each candidate reporting method in the order of execution until the target data is successfully reported or the number of retries is reached.

[0233] In an alternative embodiment, the apparatus further includes:

[0234] The third determining module 1106 is used to determine the reporting mode; if the reporting mode is the first mode, the target tracking data is stored in the cache queue; the first mode is the mode of reporting the target tracking data in batches; if the number of target tracking data in the cache queue reaches a preset value, the reporting operation is triggered.

[0235] Upload module 1107 is used to retrieve the target embedding data from the cache queue and upload it to the upload queue;

[0236] The first generation module 1108 is used to batch encapsulate the target embedding data in the upload queue to generate the target data.

[0237] The execution module 1109 is used to perform the reporting operation, which is used to report the target data to the server.

[0238] In an optional implementation, the third determining module 1106 is specifically used for:

[0239] If the reporting mode is the second mode, when the target embedding data is collected, the target embedding data is determined as the target data; the second mode is the mode of reporting the target embedding data one by one.

[0240] In an optional implementation, the retry strategy includes the priority corresponding to each of the reporting methods, and the query parameters also include the priority of each reporting method supported by the target client. The first determining module 1104 is further configured to:

[0241] The execution order of each candidate reporting method is determined based on the priority of each candidate reporting method in the retry strategy, or the priority of each candidate reporting method in the query parameters. The execution order of the candidate reporting methods is positively correlated with the priority of the candidate reporting methods.

[0242] In an optional implementation, the retry strategy further includes: different retry time intervals, wherein the different retry time intervals correspond to different data types of data points;

[0243] The device further includes:

[0244] The fourth determining module 1110 is used to determine the data type of the tracking points in the target data; the data type of the tracking points includes at least one of the following: user account behavior data type, device information data type, and business process data type; and determines the retry time interval corresponding to the target data based on the data type of the tracking points and the retry strategy.

[0245] The reporting module 1105 is also specifically used for:

[0246] Based on the retry time interval, the target data is re-reported using each candidate reporting method in the order of execution until the target data is successfully reported or the number of retry attempts is reached.

[0247] In an alternative implementation, the method further includes:

[0248] The data acquisition module 1111 is used to collect business data.

[0249] The second generation module 1112 is used to encrypt the business data embedding based on the encryption key and a preset encryption algorithm to generate the target data embedding.

[0250] In an optional implementation, the third determining module 1106 is further configured to:

[0251] If a page operation that changes the page state is detected, or if the time difference between the current time and the reporting time of the last reporting operation reaches a preset time interval, the reporting operation is determined to be triggered.

[0252] This application also provides a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or at least one program is loaded and executed by a processor to implement any of the vehicle control methods described above.

[0253] Figure 12 This diagram illustrates the structure of a computer device according to an embodiment of the present disclosure. The computer device 1200 is used to execute the steps performed by the computer device in the aforementioned method embodiments. The computer device 1200 may include one or more independent devices (e.g., a server, node, terminal, etc.) or components within independent devices (e.g., chips, software modules, or hardware modules). The computer device may include at least one processor 1201 and a communication interface 1202. Further optionally, the computer device may also include at least one memory 1203 and a bus 1204. Additionally, the processor 1201, communication interface 1202, and memory 1203 are connected via the bus 1204.

[0254] 1) Processor 1201 is a module that performs arithmetic and / or logical operations. Specifically, it may be one or a combination of processing modules such as a central processing unit (CPU), graphics processing unit (GPU), microprocessor unit (MPU), application specific integrated circuit (ASIC), field programmable gate array (FPGA), complex programmable logic device (CPLD), coprocessor (to assist the central processing unit in completing corresponding processing and applications), and micro controller unit (MCU).

[0255] 2) Communication interface 1202 can be used to provide information input or output to at least one processor 1201. And / or, communication interface 1202 can be used to receive externally transmitted data and / or transmit data externally, and can be a wired link interface including Ethernet cables, or a wireless link interface (Wi-Fi, Bluetooth, general wireless transmission, vehicular short-range communication technology, and other short-range wireless communication technologies, etc.). Communication interface 1202 can serve as a network interface.

[0256] 3) The memory 1203 provides storage space, in which data such as the operating system and computer programs can be stored. The memory 1203 can be one or a combination of multiple types of random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM).

[0257] Specifically, processor 1201 calls the program instructions stored in memory 1203 to perform the following operations:

[0258] A retry strategy is set, which includes multiple reporting methods and a number of retries; wherein, the multiple reporting methods are matched with different clients, and each client corresponds to multiple reporting methods;

[0259] If an anomaly is detected in the reporting of target data, a query request is sent to the corresponding target client. The query request is used to query the reporting methods supported by the target client.

[0260] The system receives query parameters returned by the target client in response to the query request, and the query parameters include at least: identification information of the reporting methods supported by the target client;

[0261] Based on the identification information, multiple candidate reporting methods matching the target client are determined from the retry strategy;

[0262] Determine the execution order of each candidate reporting method;

[0263] According to the execution order, the target data is re-reported using each candidate reporting method in turn until the target data is successfully reported or the number of retries is reached.

[0264] In one possible implementation, processor 1201 is also used to perform the following operations:

[0265] Determine the reporting mode;

[0266] If the reporting mode is the first mode, the target data point data is stored in the cache queue; the first mode is the mode of reporting the target data point data in batches.

[0267] If the number of target data points in the cache queue reaches a preset value, a reporting operation is triggered.

[0268] Retrieve the target data points from the cache queue to the upload queue;

[0269] The target data points in the upload queue are batch-encapsulated to generate the target data.

[0270] The reporting operation is performed to report the target data to the server.

[0271] In one possible implementation, processor 1201 is also used to perform the following operations:

[0272] If the reporting mode is the second mode, when the target embedding data is collected, the target embedding data is determined as the target data; the second mode is the mode of reporting the target embedding data one by one;

[0273] Perform the reporting operation.

[0274] In one possible implementation, the retry strategy includes the priority corresponding to each of the reporting methods, and the query parameters also include the priorities of each reporting method supported by the target client. The processor 1201 determines the execution order of each candidate reporting method and performs the following operations:

[0275] The execution order of each candidate reporting method is determined based on the priority of each candidate reporting method in the retry strategy, or the priority of each candidate reporting method in the query parameters. The execution order of the candidate reporting methods is positively correlated with the priority of the candidate reporting methods.

[0276] In one possible implementation, the retry strategy further includes: different retry time intervals, which correspond to different data types of data points.

[0277] Processor 1201 is also used to perform the following operations:

[0278] Determine the data type of the tracking points in the target data; the data type of the tracking points includes at least one of the following: user account behavior data type, device information data type, and business process data type;

[0279] Based on the data type of the data points and the retry strategy, determine the retry time interval corresponding to the target data;

[0280] Processor 1201 re-reports the target data sequentially using each candidate reporting method according to the execution order, until the target data is successfully reported or the retry count is reached, for the purpose of performing the following operations:

[0281] Based on the retry time interval, the target data is re-reported using each candidate reporting method in the order of execution until the target data is successfully reported or the number of retry attempts is reached.

[0282] In one possible implementation, processor 1201 is also used to perform the following operations:

[0283] If a page operation that changes the page state is detected, or if the time difference between the current time and the reporting time of the last reporting operation reaches a preset time interval, the reporting operation is determined to be triggered.

[0284] This application provides a data processing method that, by setting retry strategies adapted to different clients, can actively retry multiple candidate reporting methods matching the target client when the client's target data reporting is abnormal. By trying multiple reporting methods, the method can better adapt to different network environments and abnormal situations, improve the robustness of the system, and enhance the stability and success rate of data reporting. This solves the problem in related technologies that retry strategies can only be adapted to a single client, do not support multiple clients, and cannot provide multiple reporting paths for a single client.

[0285] According to one aspect of this application, embodiments of this application also provide a computer storage medium storing a computer program, the computer program including program instructions. When a processor executes the program instructions, it can perform the methods described in the preceding embodiments; therefore, further details will not be repeated here. For technical details not disclosed in the embodiments of the computer storage medium involved in this application, please refer to the description of the method embodiments of this application. As an example, the program instructions can be deployed on a computer device, executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network.

[0286] According to one aspect of this application, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, enabling the computer device to perform the methods described in the preceding embodiments; therefore, further details will not be provided here.

[0287] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. 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 or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data processing device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0288] In this application, the use of singular pronouns to denote "one or more" rather than "one and only one," unless otherwise specified. In this application, unless otherwise specified, "at least one" is intended to mean "one or more," and "more than" is intended to mean "two or more."

[0289] 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.

[0290] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0291] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and server embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0292] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0293] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A data processing method, characterized by, The method comprises: setting a retry strategy, the retry strategy comprising a plurality of reporting modes and a retry number; wherein the plurality of reporting modes match different clients, and each client corresponds to a plurality of reporting modes; in a case where it is determined that target data reporting is abnormal, sending a query request to a corresponding target client, the query request being used to query a reporting mode supported by the target client; receiving query parameters returned by the target client in response to the query request, the query parameters at least comprising identification information of a reporting mode supported by the target client; determining, according to the identification information, a plurality of candidate reporting modes matched with the target client from the retry strategy; determining an execution order of each candidate reporting mode; re-reporting the target data using each candidate reporting mode in turn according to the execution order until the target data is successfully reported or the retry number is reached.

2. The method of claim 1, wherein, Before the method comprises: determining a reporting mode; if the reporting mode is a first mode, storing target tracking data into a cache queue; the first mode is a mode of batch reporting of the target tracking data; in a case where the number of target tracking data in the cache queue reaches a preset value, determining that a reporting operation is triggered; obtaining the target tracking data from the cache queue to an upload queue; batch packaging target tracking data in the upload queue to generate the target data; executing the reporting operation for reporting the target data to a server.

3. The method of claim 2, wherein, The method further comprises: if the reporting mode is a second mode, in a case where the target tracking data is collected, determining the target tracking data as the target data; the second mode is a mode of single reporting of the target tracking data; executing the reporting operation.

4. The method of claim 1, wherein, The retry strategy comprises a priority corresponding to each reporting mode, the query parameters further comprise a priority of each reporting mode supported by the target client, and the determination of the execution order of each candidate reporting mode comprises: determining the execution order of each candidate reporting mode according to the priority corresponding to each candidate reporting mode in the retry strategy or the priority corresponding to each candidate reporting mode in the query parameters, wherein the execution order of the candidate reporting mode is positively correlated with the priority of the candidate reporting mode.

5. The method of claim 1, wherein, The retry strategy further comprises different retry time intervals corresponding to different tracking data types. The method further comprises: determining a tracking data type in the target data; the tracking data type comprises at least one of a user account behavior data type, a device information data type and a business process data type; determining a retry time interval corresponding to the target data according to the tracking data type and the retry strategy; the re-reporting of the target data using each candidate reporting mode in turn according to the execution order until the target data is successfully reported or the retry number is reached comprises: According to the execution order, the target data is re-reported using each candidate reporting mode in turn based on the retry time interval until the target data is successfully reported or the retry number is reached.

6. The method according to claim 2 or 3, characterized in that, The method further includes: Collecting business burying point data; According to the encryption key, the business burying point data is encrypted based on a preset encryption algorithm to generate the target burying point data.

7. The method of claim 2 or 3, wherein, The method further includes: In a case where it is detected that there is a page operation that changes the page state, or in a case where a time difference between a current time and a reporting time of a last reporting operation reaches a preset time interval, it is determined that the reporting operation is triggered.

8. A data processing apparatus, characterized by, The device includes: A setting module configured to set a retry strategy, the retry strategy including multiple reporting modes and a retry number; wherein the multiple reporting modes are matched with different clients, and each client corresponds to multiple reporting modes; A sending module configured to send a query request to a target client in a case where it is determined that target data reporting is abnormal, the query request being used to query reporting modes supported by the target client; A receiving module configured to receive query parameters returned by the target client in response to the query request, the query parameters including at least identification information of reporting modes supported by the target client; A first determining module configured to determine multiple candidate reporting modes matched with the target client from the retry strategy according to the identification information; A second determining module configured to determine an execution order of each candidate reporting mode; A reporting module configured to re-report the target data using each candidate reporting mode in turn according to the execution order until the target data is successfully reported or the retry number is reached.

9. A computer device, comprising: It includes: A memory and a processor; the memory stores one or more computer programs; the processor is used to load the one or more computer programs to realize the data processing method in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by a processing device to realize the data processing method in any one of claims 1 to 7.

11. A computer program, characterized in that, The computer program product includes a computer program, and the computer program is executed by a processor to realize the data processing method in any one of claims 1 to 7.