Method and apparatus for determining service scenario of event, device, and product

By generating event data features and using clustering algorithms to cluster them into clusters, the high cost and low efficiency problems caused by manual configuration in existing technologies are solved, and efficient and accurate business scenario identification and data management are achieved.

WO2026245872A1PCT designated stage Publication Date: 2026-11-26BYTEDANCE TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/SG2025/050343
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

In existing technologies, the allocation and code embedding of data flow identifiers or scene identifiers rely on manual configuration, resulting in high implementation costs, low efficiency, and a lack of refined automatic scene recognition capabilities. This fails to cover complete business scenarios and reduces the accuracy and traceability of data management.

Method used

By leveraging the characteristics of event data generated during application operation, clustering algorithms are used to group event data into clusters, and business scenarios are determined based on these clusters. This reduces the need for manually embedding scenario identifiers and improves the efficiency and accuracy of scenario identification.

Benefits of technology

It enables efficient and accurate automatic identification and labeling of business scenarios, improves the accuracy and traceability of data management and control, and reduces the need for manual configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SG2025050343_26112026_PF_FP_ABST
    Figure SG2025050343_26112026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and apparatus for determining a service scenario of an event, a device, and a product. The method comprises: on the basis of event data which is associated with an event and is generated during running of an application, generating features of the event data. The method further comprises: clustering the event data into clusters on the basis of the features. In addition, the method further comprises: determining a service scenario of the event on the basis of the clusters. In this way, the number of events in which a scenario identifier needs to be manually embedded in code can be reduced, thereby improving the efficiency of scenario identification, and events in different service scenarios can be automatically clustered into different clusters, thereby improving the accuracy of scenario identification.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Methods, apparatus, equipment, and products for determining the business context of an event.

[0002] Technical Field

[0003] This disclosure relates to the field of data security, and more specifically to methods, apparatus, devices, and products for determining business scenarios of events.

[0004] Background Technology

[0005] To protect data security, application analytics systems typically need to identify specific business scenarios to effectively manage data flows associated with target data. A business scenario refers to the functional context in which data is collected, processed, or transmitted within an application. Business scenarios can be associated with specific actions performed by users on the client side. For example, a business scenario might include a user clicking a button to share content to a third-party platform, or a user triggering a control to download data from the application to the client device. Accurate identification of these scenarios is a prerequisite for achieving precise data protection.

[0006] Summary of the Invention

[0007] In a first aspect of the embodiments of this disclosure, a method for determining the business context of an event is provided. The method includes generating features of event data based on event data associated with the event generated during the operation of an application. The method also includes clustering the event data into clusters based on the features. Furthermore, the method includes determining the business context of the event based on the clusters.

[0008] In a second aspect of the embodiments of this disclosure, an apparatus for determining the business context of an event is provided. The apparatus includes a feature generation module configured to generate features of event data based on event data associated with the event generated during the operation of an application. The apparatus also includes an event clustering module configured to cluster the event data into clusters based on the features. Furthermore, the apparatus includes a scenario determination module configured to determine the business context of the event based on the clusters.

[0009] In a third aspect of embodiments of this disclosure, an electronic device is provided. The electronic device includes one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a method for determining a business context of an event. The method includes generating features of event data based on event data associated with the event generated during the operation of an application. The method also includes clustering the event data into clusters based on the features. Furthermore, the method includes determining a business context of the event based on the clusters.

[0010] In a fourth aspect of embodiments of this disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-transitory computer-readable medium and includes machine-executable instructions that, when executed, cause a machine to implement a method for determining a business context of an event. The method includes generating features of event data based on event data associated with the event generated during the operation of an application. The method also includes clustering the event data into clusters based on the features. Furthermore, the method includes determining a business context of the event based on the clusters.

[0011] The summary section is provided to present the chosen concepts in a simplified form, which will be further described in the detailed description below. The summary section is not intended to identify key or principal features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter.

[0012] Attached Figure Description

[0013] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 shows a schematic diagram of an example environment in which various embodiments of this disclosure may be implemented; Figure 2 shows a flowchart of a method for determining an event in a business scenario according to some embodiments of this disclosure;

[0014] Figure 3 illustrates a schematic diagram of an example of a business scenario that utilizes a clustering algorithm to determine events according to some embodiments of the present disclosure;

[0015] Figure 4 illustrates another example of a business scenario that utilizes clustering algorithms to determine events according to some embodiments of this disclosure;

[0016] Figure 5 illustrates a schematic diagram of an example of training an encoder using a random deactivation strategy and supervised contrastive learning according to some embodiments of the present disclosure;

[0017] Figure 6 illustrates a schematic diagram of an example of a business scenario that utilizes a class model to determine events according to some embodiments of the present disclosure;

[0018] Figure 7 illustrates a schematic diagram of an example of a processing device interacting with a client according to some embodiments of the present disclosure;

[0019] Figure 8 shows a block diagram of an apparatus for determining a business scenario of an event according to some embodiments of the present disclosure; and

[0020] Figure 9 shows a block diagram of a device capable of implementing several embodiments of the present disclosure.

[0021] Detailed Implementation

[0022] It is understood that all user-related data involved in this technical solution should be obtained and used only after authorization from the user. This means that if it is necessary to use the user's personal information in this technical solution, the user's explicit consent and authorization are required before obtaining this data; otherwise, no related data collection and use will be carried out. It should also be understood that when implementing this technical solution, relevant laws and regulations should be strictly followed during the collection, use, and storage of data, and necessary technical measures should be taken to protect user data security and ensure the secure use of data.

[0023] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0024] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "an embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc., may refer to different or the same objects unless explicitly stated. Other explicit and implicit definitions may also be included below.

[0025] In application analytics systems, to identify and control the use of target data, data flows can be identified by embedding specific identifiers in the code. For example, developers can embed event tracking code in the application's code. When a specified event is triggered, the context information associated with that event can be saved (e.g., saved to a log). This context information can include a data flow identifier, which indicates whether the event called a target interface and the business scenario of the event. The business scenario is usually related to user actions in the application, such as clicking the "Share to a third-party platform" button or clicking the "Download" button. For multiple events (e.g., sharing to a third-party platform), these events occur from different page sources (e.g., clicking the "Share" button on a live streaming page, clicking the "Share" button on a news feed page, or clicking the "Share" button on a chat page), and their corresponding business scenarios are also different. Therefore, large applications contain a large number of business scenarios.

[0026] However, in some related technologies, the assignment and code embedding of data flow identifiers or scenario identifiers rely on manual configuration. This approach is not only costly and inefficient, but also lacks fine-grained automatic scenario recognition capabilities, typically failing to cover complete business scenarios, resulting in low coverage of business scenarios that the analysis system can track. Furthermore, in the example described above, multiple events correspond to the same user actions, but the pages from which these actions originate are different; therefore, these events should belong to different business scenarios. However, due to the lack of clear classification standards, the granularity of business scenario identification mainly relies on manual judgment, leading to these events being assigned the same data flow identifier or scenario identifier. This results in a coarse-grained identification of business scenarios, reducing the accuracy and traceability of data management.

[0027] Therefore, embodiments of this disclosure provide a scheme for determining the business context of an event. In this scheme, a processing device can generate features of event data based on event data associated with the event generated during the operation of an application. The processing device can then cluster the event data into clusters based on the generated features. Finally, the processing device can determine the business context of the event based on the clusters to which the event data is clustered.

[0028] In this way, the processing device can use clustering algorithms to group similar events into the same cluster and assign corresponding scene identifiers to events within that cluster. This reduces the number of events requiring manual embedding of scene identifiers in the code, thereby improving the efficiency of scene identification. Furthermore, it automatically clusters events from different business scenarios into different clusters, improving the accuracy of scene identification.

[0029] Figure 1 illustrates a schematic diagram of an example environment 100 in which various embodiments of the present disclosure may be implemented. As shown in Figure 1, environment 100 includes a processing device 102. The processing device 102 can be any device with processing or computing capabilities. For example, the processing device 102 can be a cloud server, a local server, a virtual server, a desktop computer, or a laptop computer, etc.

[0030] In environment 100, application 104 can trigger events 106-1, 106-2, ... during its runtime.

[0031] 106-N (collectively referred to as Event 106) o Application 104 can be any application running on the client, such as a content distribution application, a social application, an e-commerce application, etc. Event 106 can be an event triggered when a user performs a specific action within the application. For example, when Application 104 is a video distribution application, Event 106-1 could be a user clicking the "Share" button on a live stream page, Event 106-2 could be a user clicking the "Share" button on another live stream page, and Event 106-N could be a user clicking the "Share" button on a news feed page (e.g., a news feed displaying multiple videos uploaded by multiple creators).

[0032] Processing device 102 can acquire event data 108-1, 108-2, ... associated with event 106, and...

[0033] 108-N (collectively referred to as Event Data 108). As shown in Figure 1, Event Data 108-1 is associated with Event 106-1, Event Data 108-2 is associated with Event 106-2, and so on, and Event Data 108-N is associated with Event 106-N. Event Data 108 can be data from one or more data sources. For example, Event Data 108 can include one or more of the call stack, keyframes of the call stack, page information, or technical logs associated with Event 106.

[0034] A call stack is a data structure used to record function call relationships during application execution. An application calls a series of functions during runtime, and the order in which these functions are called is recorded in the call stack. For example, when an application navigates from page A to page B, a series of functions or events are triggered, and these can be recorded in the call stack. The information in the call stack can indicate the function call trajectory during program execution in a specific business scenario. A keyframe in the call stack refers to a call frame of a function that plays a crucial role in the business semantics or behavioral path; it can represent the core characteristics of the entire call stack. Page information refers to the environment of the page where the event occurred, such as the page path, page identifier, module location, etc. Page information helps identify the specific location of the event on the user interface and the functional context in which the user is situated. Technical logs can include runtime information automatically recorded by the system, such as timestamps, module names, parameter information, exceptions, etc. Technical logs can be used to analyze program behavior and assist in locating the system state at the time the event occurred.

[0035] Processing device 102 can generate features 110-1, 110-2, ..., and 110- based on event data 108.

[0036] N (collectively referred to as feature 110), where feature 110-1 corresponds to event 106-1, feature 110-2 corresponds to event 106-2, and so on, and feature 110-N corresponds to event 106-N. For example, processing device 102 can use an encoder to convert event data 108-2 into a high-dimensional feature vector (i.e., feature 110). Since event data 108 is usually unstructured or semi-structured sequence information, it is difficult to use it directly for modeling. The encoder can transform the raw...

[0037] Sequence data is converted into a unified vector representation so that these feature vectors can be clustered subsequently. Feature 110 may contain semantic information from event data 108.

[0038] In environment 100, processing device 102 can cluster event data 108 (or event 106) into clusters 112-1, 112-2, or 112-N (collectively referred to as cluster 112) based on feature 110. For example, processing device 102 can calculate the similarity between multiple features 110. Then, processing device 102 can cluster similar features 110 into one cluster and dissimilar features 110 into different clusters based on the similarity between features 110 and using a clustering algorithm. For example, in the example shown in environment 100, both event data 108-1 and event data 108-2 indicate that the user clicked the "share" button on the live broadcast page, so the similarity between feature 110-1 and feature 110-2 is high (e.g., the similarity meets a predetermined threshold). Therefore, event data 108-1 and event data 108-2 can be clustered into the same cluster (e.g., cluster 112-1). Furthermore, event data 108-N indicates that a user clicked the "Share" button on the news feed page, so feature 110-N has a low similarity to features 110-1 and 110-2 (e.g., the similarity does not meet a predetermined threshold). Therefore, event data 108-N is clustered into another cluster (e.g., cluster 112-2).

[0039] In environment 100, after clustering all event data 108 into the corresponding cluster 112, processing device 102 can determine the business scenarios 114-1, 114-2, ..., and 114-N (collectively referred to as business scenarios 114) of event 106 based on cluster 112. For example, cluster 112-1 corresponds to business scenario 114-1, cluster 112-2 corresponds to business scenario 114-2, ..., and cluster 112-N corresponds to business scenario 114-N. Business scenario 114 can be a scenario identifier, which can uniquely identify the corresponding business scenario. For example, processing device 102 can assign a corresponding scenario identifier to event 106-1 based on cluster 112-1. In the above example, this scenario identifier can indicate the business scenario of the user clicking the "Share" button on the live streaming page. In some embodiments, when determining business scenario 114-1 based on cluster 112-1, processing device 102 can identify event data 108 (e.g., event data 108-2) in cluster 112-1 whose business scenario is known. Then, the processing device can determine the business scenario of event data 108-2 as the business scenario 114-lo of all event data in cluster 112. In some embodiments, if there is no event data 108 in cluster 112-1 with a known business scenario, processing device 102 can determine the business scenario 114-lo of event data 108 in cluster 112-1 based on received user input.

[0040] In this way, the processing device 102 can use a clustering algorithm to cluster similar events 106 into the same cluster 112, and assign corresponding business scenario identifiers to the events in cluster 112. This reduces the number of events 106 that require manual embedding of scenario identifiers in the code, thereby improving the efficiency of scenario identification. Furthermore, it can automatically cluster events 106 from different business scenarios into different clusters 112, improving the accuracy of scenario identification.

[0041] Figure 2 illustrates a flowchart of a method 200 for determining a business scenario of an event according to some embodiments of the present disclosure. Method 200 can be executed by a processing device. For example, method 200 can be executed by processing device 102 in Figure 1. As shown in Figure 2, at block 202, the processing device can generate features of event data based on event data associated with the event generated during the operation of the application. For example, in environment 100 as shown in Figure 1, processing device 102 can acquire event data 108 associated with event 106. Event data 108 can be data from one or more data sources. For example, event data 108 can include one or more of the following: a call stack associated with event 106, keyframes of the call stack, page information, or technical logs. Processing device 102 can generate features 110 based on event data 108. For example, processing device 102 can use an encoder to convert event data 108-2 into high-dimensional feature vectors (i.e., features 110). Since event data 108 is typically unstructured or semi-structured sequence information, it is difficult to use it directly for modeling. The encoder can convert the raw sequence data into a unified vector representation so that these feature vectors can be clustered subsequently. Features 110 can contain semantic information from event data 108.

[0042] In box 204, the processing device can cluster event data into clusters based on features. For example, in environment 100 as shown in Figure 1, processing device 102 can cluster event data 108 (or event 106) into cluster 112 based on feature 110. For example, processing device 102 can calculate the similarity between multiple features 110. Then, processing device 102 can cluster similar features 110 into one cluster and dissimilar features 110 into different clusters based on the similarity between features 110 and using a clustering algorithm. For example, in the example shown in environment 100, both event data 108-1 and event data 108-2 indicate that a user clicked the "share" button on the live stream page, so the similarity between feature 110-1 and feature 110-2 is high (e.g., the similarity meets a predetermined threshold). Therefore, event data 108-1 and event data 108-2 can be clustered into the same cluster (e.g., cluster 112-1). Furthermore, event data 108-N indicates that a user clicked the "Share" button on the news feed page, so feature 110-N has a low similarity to features 110-1 and 110-2 (e.g., the similarity does not meet a predetermined threshold). Therefore, event data 108-N is clustered into another cluster (e.g., cluster 112-2).

[0043] In box 206, the processing device can determine the business scenario of an event based on a cluster. For example, in environment 100 as shown in FIG1, processing device 102 can determine the business scenario 114 of event 106 based on cluster 112. Business scenario 114 can be a scenario identifier, which can uniquely identify the corresponding business scenario. For example, processing device 102 can assign a corresponding scenario identifier to event 106-1 based on cluster 112-1. In the above example, the scenario identifier can indicate the business scenario of a user clicking the "share" button on the live broadcast page. In some embodiments, when determining business scenario 114-1 based on cluster 112-1, processing device 102 can determine event data 108 (e.g., event data 108-2) in cluster 112-1 whose business scenario is known. Then, the processing device can determine the business scenario of event data 108-2 as the business scenario 114-K of all event data in cluster 112. In some embodiments, if there is no event data 108 in cluster 112-1 with a known business scenario, the processing device 102 can determine the business scenario 114-1 of event data 108 in cluster 112-1 based on the received user input.

[0044] In some embodiments, the event data includes at least one of the following: a call stack, keyframes of the call stack, page information, or technical logs. In some embodiments, the processing device may generate a second feature based on a first feature using an encoder, the second feature indicating semantic information of the event. The processing device may then cluster the event data into clusters based on the second feature. In some embodiments, the processing device may determine a semantic distance between a second feature of the first event data and a third feature of the second event data, the semantic distance indicating semantic similarity between the second and third features. The processing device may then cluster the first event data into clusters based on the semantic distance. By generating the second feature, semantic information in the event data can be further extracted, thereby improving the effectiveness of the feature representation of the event data.

[0045] In some embodiments, the processing device can use a density-based clustering algorithm based on semantic distance to cluster the first event data into clusters. Some business scenarios (e.g., login, sharing, etc.) may have large and dense data volumes, while other business scenarios (e.g., clicks on less popular buttons) may have small data volumes but still maintain consistency. In this way, density-based clustering algorithms allow for multiple clusters with different densities in the data, which better reflects the complex structure of real business data. Furthermore, since the types of business scenarios for event data are unknown and dynamically changing, density-based clustering algorithms can automatically discover potential clusters, improving the adaptability of business scenario identification.

[0046] Figure 3 illustrates a schematic diagram of example 300 of a business scenario using clustering algorithms to determine events according to some embodiments of the present disclosure. As shown in Figure 3, example 300 includes event data 302-1, 302-2, and 302-N (collectively referred to as event data 302). Event data 302 can be, for example, event data 108 in Figure 1. In example 300, the processing device can clean the event data 302 to remove redundant and invalid data and extract key content. For example, the processing device can delete duplicate call frames and duplicate reported logs from the event data 302. In addition, the processing device can also extract key content that is helpful for subsequent processing from the raw data. This key content may include, for example, keyframes of the call stack, core event parameters, or page context. In this way, the consistency and quality of the processed event data 302 can be improved. The processing device can then use an encoder (not shown in Figure 3) to convert the processed event data 302 into high-dimensional features 304-1, 304-2, ..., 304-N (collectively referred to as features 304). Features 304 can be, for example, feature 110 in Figure 1.

[0047] In Example 300, to further extract semantic information from event data 302 and improve the feature representation of event data 302, the processing device can use encoder 306 to further encode feature 304 to generate features 308-1, 308-2, ..., 308-N (collectively referred to as features 308). Feature 308-1 contains the semantic information of event data 302-1, feature 308-2 contains the semantic information of event data 302-2, and feature 308-N contains the semantic information of event data 302-N. Then, the processing device can cluster multiple event data 302 into multiple clusters 310-1, 310-2, ..., 310-N (collectively referred to as cluster 310) based on multiple features 308.

[0048] In Example 300, the processing device can determine the semantic distance between feature 308-1 of event data 302-1 and feature 308-2 of event data 302-2, which indicates the semantic similarity between feature 308-1 and feature 308-2. For example, feature 308 is a data structure represented by vectors, and the processing device can calculate the cosine similarity between feature 308-1 and feature 308-2, which measures the semantic distance between different feature vectors. Furthermore, the processing device can also determine the semantic distance between feature 308-1 and features of other event data (e.g., feature 308-N, etc.). The processing device can then cluster event data 302 into cluster 310 based on the semantic distance between features 308 using a density-based clustering algorithm. For example, in Example 300, event data 302-1 and event data 302-2 have high similarity, so they are clustered into the same cluster (e.g., cluster 310-1). In addition, event data 302-N was clustered into another cluster (e.g., cluster 310-2).

[0049] Then, the processing device can determine the business scenarios 312-1, 312-2, ..., 312-N (collectively referred to as business scenarios 312) corresponding to cluster 310, and determine the business scenario of event data 302 based on the business scenarios 312 of cluster 310. For example, in example 300, cluster 310-1 corresponds to business scenario 312-1, cluster 310-2 corresponds to business scenario 312-2, and cluster 310-N corresponds to business scenario 312-N. Since event data 302-1 and 302-2 are clustered into cluster 310-1, the processing device can assign the scenario identifier of business scenario 312-1 to event data 302-1 and 302-2. Furthermore, since event data 30-2-N is clustered into cluster 310-2, the processing device can assign a scenario identifier of business scenario 312-2 to event data 302-N.

[0050] In some embodiments, the second feature includes multiple sub-features from multiple data sources. When determining the semantic distance between the second feature of the first event data and the third feature of the second event data, the processing device can obtain multiple weights corresponding to the multiple sub-features. The processing device can then generate a weighted second feature based on the multiple sub-features and the multiple weights. The processing device can then determine the distance between the weighted second feature and the weighted third feature as the semantic distance. By configuring the weights of the sub-features, the processing device can adjust the contribution of each sub-feature according to business needs or historical experience, thereby helping to improve the performance of downstream tasks such as scene recognition, clustering, and classification.

[0051] In some embodiments, the multiple sub-features include a first sub-feature and a second sub-feature. The first sub-feature is generated based on the call stack, and the second sub-feature is generated based on another data source. The weight corresponding to the first sub-feature is greater than the weight corresponding to the second sub-feature. Because the call stack more directly reflects the business logic path of an event, it has higher scene recognition value compared to other data sources. By assigning higher weights to the call stack, the processing device can focus on more critical features in semantic distance calculation, thereby improving the accuracy of the clustering algorithm.

[0052] Figure 4 illustrates another example 400 of a business scenario using clustering algorithms to determine events according to some embodiments of the present disclosure. As shown in Figure 4, example 400 includes event data 402-1, 402-2, and 402-N (collectively referred to as event data 402). In example 400, event data 402 may include data from multiple data sources. For example, event data 402 may include two or more items from a call stack associated with a specific event, keyframes of the call stack, page information, or technical logs.

[0053] In Example 400, the processing device can clean the event data 402 to remove redundant and invalid data and extract key content. Then, the processing device can use an encoder (not shown in Figure 4) to transform the processed event data 402 into high-dimensional features 404-1, 404-2, ..., 404-N (collectively referred to as features 404). To further extract semantic information from the event data 402, the processing device can use an encoder 406 (e.g., encoder 306 in Figure 3) to further encode the features 404 to generate features 408-1, 408-2, ..., 408-N (collectively referred to as features 408), where feature 408-1 contains the semantic information of event data 402-1, feature 408-2 contains the semantic information of event data 402-2, and feature 408-N contains the semantic information of event data 402-N.

[0054] Since event data 402 includes data from multiple data sources, the generated feature 408 can have multiple sub-features (or sub-vectors), where one of the sub-features corresponds to one of the multiple data sources. For example, event data 402 can include the event's call stack and page information. Therefore, feature 408 can include sub-features generated based on the call stack and sub-features generated based on the page information. The processing device can obtain multiple weights corresponding to these sub-features. The processing device can then weight feature 408 based on the weights of the sub-features to generate weighted features 410-1, 410-2, ..., 410-N (collectively referred to as weighted features 410). In some embodiments, the corresponding weights can be set according to the validity of the data source. In some embodiments, the weight of the call stack can be greater than the weight of the keyframe of the call stack, the weight of the keyframe of the call stack can be greater than the weight of the page information, and the weight of the page information can be greater than the weight of the technical log. In this way, higher weights can be assigned to data sources with higher validity, which helps processing devices focus on more critical features in semantic distance calculation, thereby improving the accuracy of clustering algorithms.

[0055] In Example 400, the processing device can determine the semantic similarity between weighted features 410. For example, the processing device can calculate the cosine similarity between the weighted features 410, which measures the semantic distance between different feature vectors. Then, based on the semantic distance between the weighted features 410, the processing device can use a density-based clustering algorithm to cluster the event data 402 into clusters 412-1, 412-2, ..., 412-N (collectively referred to as cluster 412). For example, in Example 400, event data 402-1 and event data 402-2 are clustered into the same cluster (e.g., cluster 412-1). Furthermore, event data 402-N is clustered into another cluster (e.g., cluster 412-2).

[0056] Then, the processing device can determine the business scenarios 414-1, 414-2, ..., 414-N (collectively referred to as business scenarios 414) corresponding to cluster 412, and determine the business scenario of event data 402 based on the business scenarios 414 of cluster 412. For example, in example 400, cluster 412-1 corresponds to business scenario 414-1, cluster 412-2 corresponds to business scenario 414-2, and cluster 412-N corresponds to business scenario 414-N. Since event data 402-1 and 402-2 are clustered into cluster 412-1, the processing device can assign the scenario identifier of business scenario 414-1 to event data 402-1 and 402-2. Furthermore, since event data 40-2-N is clustered into cluster 412-2, the processing device can assign a scenario identifier of business scenario 414-2 to event data 402-N.

[0057] In some embodiments, during the training phase of encoder 406, the processing device can perform multi-view training on encoder 406 by adding different dropout strategies and utilizing supervised contrastive learning. By introducing different dropout strategies during the encoder training phase, the changes in input data under different perturbation conditions can be simulated, enabling the encoder to learn to remain stable even with slight feature loss or noise, thereby improving the robustness of feature representation. Furthermore, by combining a supervised contrastive learning mechanism, labeled data can be effectively utilized, making samples of the same category closer in the representation space and samples of different categories more separated, thereby improving the semantic discriminativeness of the features generated by the encoder, which is helpful for subsequent clustering tasks.

[0058] Figure 5 illustrates a schematic diagram of Example 500, which utilizes a random deactivation strategy and supervised contrastive learning to train an encoder according to some embodiments of the present disclosure. As shown in Figure 5, Example 500 includes preliminary data extracted from event data.

[0059] Feature 502. Feature 502 can be, for example, feature 404 in Figure 4. Example 500 also includes encoder 504, which can be, for example, encoder 306 in Figure 3 or encoder 406 in Figure 4. As shown in Figure 5, during the training phase of encoder 504, the processing device can use different random inactivation parameters 506-1, 506-2, ..., and 506-N (collectively referred to as random inactivation parameters 506) to randomly inactivate some neurons in encoder 504, thereby generating multiple features 508-1, 508-2, ..., and 508-N under multiple views. For example, random inactivation parameter 506-1 can be 0, indicating that all neurons in encoder 504 are activated. Random inactivation parameter 506-2 can be, for example, 0.1, indicating that each neuron in encoder 504 has a 10% probability of being randomly inactivated. The random inactivation parameter 506-N can be, for example, 0.5, meaning that each neuron of encoder 504 has a 50% probability of being randomly inactivated.

[0060] In Example 500, feature 508 is input into supervised contrastive learning module 510 for performing supervised contrastive learning on encoder 504. During supervised contrastive learning, the processing device can utilize real-world scene labels of events (e.g., real-world scene identifiers) as supervisory signals to construct positive and negative sample pairs. For example, samples from the same scene (including multiple views of the sample itself) are used as positive sample pairs, and samples from different scenes are used as negative sample pairs. The processing device can then adjust the parameters of encoder 504 to minimize the distance between positive sample pairs and maximize the distance between negative sample pairs.

[0061] Through the above training strategy, the encoder can not only learn scene-level semantic features, but also be robust to input perturbations (e.g., feature changes, loss, order changes, etc.), thereby improving the generalization ability and stability of the feature vectors generated by the trained encoder 504.

[0062] In some embodiments, the processing device can classify events into target business scenarios among multiple business scenarios based on the characteristics of event data and using a neural network-based classification model. If the classification is successful, the processing device can identify the target business scenario as the event's business scenario. By prioritizing the use of a neural network-based classification model to identify event data, events with known patterns can be quickly and accurately assigned to corresponding business scenarios, improving the efficiency and accuracy of identification.

[0063] In some embodiments, if classification fails, the processing device can cluster event data into clusters based on features. In this way, when the classification model cannot determine the business scenario, the introduction of a clustering mechanism can perform unsupervised grouping of event data, thereby identifying possible new scenarios or samples with ambiguous classification boundaries, and improving the system's applicability to complex or changing scenarios.

[0064] In some embodiments, if classification fails, the processing device can adjust the neural network-based classification model using the business scenario determined by the clusters. By using the clustering results as supplementary supervision signals to update and adjust the neural network classification model, the model's generalization ability and adaptability can be continuously improved, maintaining high performance in the face of changes in data distribution or new business scenarios. The dual-path identification strategy, which combines classification and clustering mechanisms, not only reduces the dependence on the performance of a single model but also provides a backup processing path when classification fails, thereby improving the stability and continuity of business scenario identification.

[0065] Figure 6 illustrates a schematic diagram of example 600, which utilizes a classification model to determine the business scenario of an event according to some embodiments of the present disclosure. In example 600, classification model 604 may be a neural network model trained based on event data and corresponding scenario labels. Classification model 604 can classify event data into corresponding business scenarios. As shown in Figure 6, event data 602 can be input into the trained classification model 604. If the classification is successful, classification model 604 can generate a business scenario 606 based on event data 602. For example, event data 602 may include data such as call stacks and page information, and the generated business scenario 606 (e.g., a scenario identifier) ​​may instruct the user to click the "share" button on the live streaming page.

[0066] In Example 600, if the classification model 604 fails to effectively classify the event data 602 (e.g., because the event data 602 belongs to a new business scenario and cannot be classified into a known business scenario), the event data 602 can be input to the scenario determination module 608. The scenario determination module 608 can use a clustering algorithm such as that described in Figure 3 or Figure 4 to cluster the event data 602 into cluster 610. In Example 600, the event data in cluster 610 may all have unknown business scenarios. Therefore, the processing device can receive user input 612, which may include a manual identification by an engineer of the business scenario corresponding to the event data in cluster 610. For example, user input 612 may include business scenario 6140 of cluster 610.

[0067] After receiving user input 612, the processing device can determine the business scenario 614 as a real-world scenario label for multiple event data in cluster 610. Then, the processing device can use the event data in cluster 610 and the business scenario 614 to continue training or fine-tuning the classification model 604 to improve the classification capability of the classification model 604.

[0068] Figure 7 illustrates a schematic diagram of an example 700 of a processing device interacting with a client according to some embodiments of the present disclosure. As shown in Figure 7, example 700 includes a processing device 702 (e.g., processing device 102 in Figure 1) and a client 704. A user (e.g., a developer, analytics engineer, etc.) wishes to analyze a business scenario of target data. Therefore, the user can send a scenario identification request 708 to the processing device 702 through the client 704. In some embodiments, the scenario identification request 708 may include event data 710 to be analyzed (e.g., call stack, page information, etc.). In some embodiments, the scenario identification request 708 may include information associated with the event data 710 to enable the processing device 702 to obtain the event data 710 from other locations (e.g., the processing device 702's own storage device, or a cloud server, etc.).

[0069] In Example 700, after receiving a scene recognition request 708 from client 704, processing device 702 can acquire event data 710 associated with the scene recognition request 708. Then, processing device 702 can use a clustering algorithm or classification model to determine the business scenario 712 of the event data 710. Processing device 702 can then send the identifier of business scenario 712 to client 704. Upon receiving the identifier of business scenario 712, client 704 can provide the user with the information associated with business scenario 712 through display 706. In this way, the efficiency and accuracy of scene identification can be improved, thereby enhancing the user experience.

[0070] Figure 8 shows a block diagram of an apparatus 800 for determining the business context of an event according to some embodiments of the present disclosure. As shown in Figure 8, the apparatus 800 includes a feature generation module 802 configured to generate features of event data based on event data associated with the event generated during the operation of an application. The apparatus 800 also includes an event clustering module 804 configured to cluster the event data into clusters based on the features. Furthermore, the apparatus 800 includes a scenario determination module 806 configured to determine the business context of the event based on the clusters.

[0071] In some embodiments, the event data includes at least one of the following: a call stack, keyframes of the call stack, page information, or a technical log.

[0072] In some embodiments, the feature is a first feature, and the event clustering module 804 includes: a second feature generation module configured to generate a second feature based on the first feature using an encoder, the second feature containing semantic information of the event; and a second feature usage module configured to cluster event data into clusters based on the second feature.

[0073] In some embodiments, the event data is first event data, and the second feature using module includes: a first semantic distance determining module configured to determine a semantic distance between a second feature of the first event data and a third feature of the second event data, the semantic distance indicating the semantic similarity between the second feature and the third feature; and a first semantic distance using module configured to cluster the first event data into clusters based on the semantic distance.

[0074] In some embodiments, the first semantic distance using module includes a clustering algorithm using module configured to cluster the first event data into clusters based on the semantic distance using a density-based clustering algorithm.

[0075] In some embodiments, the second feature includes multiple sub-features from multiple data sources, and the first semantic distance determination module includes: a weight acquisition module configured to acquire multiple weights corresponding to the multiple sub-features; a weight usage module configured to generate a weighted second feature based on the multiple sub-features and the multiple weights; and a weighted feature usage module configured to determine the distance between the weighted second feature and the weighted third feature as the semantic distance.

[0076] In some embodiments, the plurality of sub-features include a first sub-feature and a second sub-feature, the first sub-feature being generated based on a call stack, the second sub-feature being generated based on another data source, and the weight corresponding to the first sub-feature being greater than the weight corresponding to the second sub-feature.

[0077] In some embodiments, the apparatus 800 further includes an encoder training module configured to perform multi-view training on the encoder during the encoder training phase by adding different random deactivation strategies and utilizing supervised contrastive learning.

[0078] In some embodiments, the event clustering module 804 includes: a classification module configured to classify events into target business scenarios among multiple business scenarios based on features and using a neural network-based classification model; and a classification failure handling module configured to cluster event data into clusters based on features in response to classification failure. In some embodiments, the apparatus 800 further includes: a classification success handling module configured to determine the target business scenario as the business scenario of the event in response to classification success.

[0079] In some embodiments, the apparatus 800 further includes a classification model training module configured to adjust a neural network-based classification model in response to classification failure, using a business scenario determined based on a cluster.

[0080] It is understood that by utilizing the apparatus 800 of this disclosure, at least one of the many advantages achievable by the methods or processes described above can be realized. For example, the processing device can utilize a clustering algorithm to cluster similar events into the same cluster and assign corresponding scene identifiers to events in that cluster. In this way, the scheme can reduce the number of events that need to be manually embedded in the code, thereby improving the efficiency of scene identification, and can automatically cluster events of different business scenarios into different clusters, thereby improving the accuracy of scene identification. Figure 9 shows a block diagram of an apparatus 900 that can implement several embodiments of this disclosure. The apparatus 900 can be, for example, the processing device 102 shown in Figure 1. As shown in Figure 9, the apparatus 900 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 901, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 902 or computer program instructions loaded from storage unit 908 into random access memory (RAM) 903. The RAM 903 can also store various programs and data required for the operation of the device 900. The CPU / GPU 901, ROM 902, and RAM 903 are interconnected via bus 904. The input / output (I / O) interface 905 is also connected to bus 904. Although not shown in Figure 9, the device 900 may also include a coprocessor.

[0081] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0082] The various methods or processes described above can be executed by CPU / GPU 901. For example, in some embodiments, the methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by CPU / GPU 901, one or more steps or actions in the methods or processes described above can be performed.

[0083] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0084] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0085] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, a local area network (LAN), a wide area network (WAN), and / or a wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, etc.

[0086] Walls, switches, gateway computers, and / or edge servers. Each computing / processing device's network adapter card or network interface receives computer-readable program instructions from the network and forwards those instructions to computer-readable storage media within the respective computing / processing device.

[0087] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​and conventional procedural programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of this disclosure.

[0088] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.

[0089] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0091] 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 applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

Claims 1. A method for determining the business scenario of an event, comprising: The event data is generated based on the event data associated with the event generated during the operation of the application. The event data is clustered into clusters based on the aforementioned features; as well as The business scenario of the event is determined based on the cluster.

2. The method of claim 1, wherein the event data includes at least one of the following: a call stack, keyframes of the call stack, page information, or a technical log.

3. The method of claim 1, wherein the feature is a first feature, and clustering the event data into the cluster based on the feature comprises: Based on the first feature, an encoder is used to generate a second feature, which contains semantic information about the event; as well as The event data is clustered into the cluster based on the second feature.

4. The method of claim 3, wherein the event data is first event data, and clustering the event data into the cluster based on the second feature comprises: Determine the semantic distance between the second feature of the first event data and the third feature of the second event data, the semantic distance indicating the semantic similarity between the second feature and the third feature; and cluster the first event data into the cluster based on the semantic distance.

5. The method of claim 4, wherein clustering the first event data into the cluster based on the semantic distance comprises: Based on the semantic distance, a density-based clustering algorithm is used to cluster the first event data into the cluster.

6. The method of claim 4, wherein the second feature comprises a plurality of sub-features from a plurality of data sources, and determining the semantic distance between the second feature of the first event data and the third feature of the second event data comprises: Obtain multiple weights corresponding to the multiple sub-features; The weighted second feature is generated based on the plurality of sub-features and the plurality of weights; And the distance between the weighted second feature and the weighted third feature is determined as the semantic distance.

7. The method of claim 6, wherein the plurality of sub-features includes a first sub-feature and a second sub-feature, the first sub-feature being generated based on a call stack, the second sub-feature being generated based on another data source, and the weight corresponding to the first sub-feature being greater than the weight corresponding to the second sub-feature.

8. The method according to claim 3, further comprising: During the training phase of the encoder, multi-view training is performed on the encoder by adding different random inactivation techniques and utilizing supervised contrastive learning.

9. The method of claim 1, wherein clustering the event data into the cluster based on the feature comprises: Based on the aforementioned features, a neural network-based classification model is used to classify the event into target business scenarios within multiple business scenarios. as well as In response to classification failure, the event data is clustered into the cluster based on the features.

10. The method of claim 9, further comprising: In response to successful classification, the target business scenario is identified as the business scenario of the event.

11. The method of claim 9, further comprising: In response to classification failure, the neural network-based classification model is adjusted using the business scenario determined based on the cluster.

12. An apparatus for determining the business scenario of an event, comprising: The feature generation module is configured to generate features of the event data based on event data associated with the event generated during the operation of the application; An event clustering module is configured to cluster the event data into clusters based on the features; And a scenario determination module, configured to determine the business scenario of the event based on the cluster.

13. An electronic device, comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, which, when executed by the processor, cause the electronic device to perform the method according to any one of claims 1 to 11.

14. A computer program product tangibly stored on a non-transitory computer-readable medium and comprising machine-executable instructions that, when executed, cause a machine to perform the method according to any one of claims 1 to 11.