Data statistics method, device, server and storage medium
By obtaining and utilizing the dimensional metadata of the use case, the problem of cumbersome data of use case path data statistics in the existing technology is solved, and more detailed data statistics and application optimization are achieved.
Patent Information
- Application Number
- CN202110642875.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-09
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-06-09
AI Technical Summary
In the prior art, statistics on software use case path data require the development of code for each specific use case, and the operation is cumbersome and fine-grained data statistics cannot be performed.
By obtaining the dimensional metadata of the target use case, extracting the original data based on these metadata, obtaining the target dimensional data, and using the statistical model to perform fine-grained data statistics.
Detailed statistics of various dimension data in the target use cases are achieved, data statistics efficiency is improved, and application functions are expanded and optimized.
Smart Images

Figure CN113821545B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a data statistics method, device, server, and storage medium. Background Art
[0002] In software engineering or systems engineering, a use case describes how a system responds to external requests. It is a technique for capturing requirements through user scenarios. Each use case provides one or more scenarios that illustrate how the system interacts with end users or other systems to achieve a clear business goal.
[0003] Statistics on use case paths are a set of test inputs, execution conditions, and expected results compiled for a specific goal. They are used to verify whether the test results meet a specific software requirement or to analyze and improve the software based on the statistical results.
[0004] In related technologies, when it is necessary to analyze a specific requirement of software, it is necessary to develop a corresponding use case diagram and program for each specific use case, and then perform statistics on the path data in the use case to obtain the path data statistics results. Summary of the Invention
[0005] The embodiments of the present application provide a data statistics method, device, server, and storage medium, which can improve data statistics efficiency while obtaining more detailed statistical data. The technical solution is as follows:
[0006] In one aspect, an embodiment of the present application provides a data statistics method, the method comprising:
[0007] Obtaining dimension metadata of at least one dimension corresponding to a target use case, wherein the target use case is used to describe a target process in a process of using a target application, and the dimension metadata is used to describe data attributes of data under the corresponding dimension;
[0008] Extracting data from original data based on the dimension metadata of at least one dimension to obtain target dimension data corresponding to a target dimension, wherein the original data is data generated during use of the target application;
[0009] Statistics are performed on the target dimension data to obtain statistical data corresponding to the target dimension in the target use case.
[0010] On the other hand, an embodiment of the present application provides a data statistics device, the device comprising:
[0011] A metadata acquisition module is used to acquire dimension metadata of at least one dimension corresponding to a target use case, wherein the target use case is used to describe a target process in the process of using a target application, and the dimension metadata is used to describe data attributes of data under the corresponding dimension;
[0012] a data extraction module, configured to extract data from original data based on the dimension metadata of at least one dimension to obtain target dimension data corresponding to a target dimension, wherein the original data is data generated during the use of the target application;
[0013] The data statistics module is used to perform statistics on the target dimension data to obtain statistical data corresponding to the target dimension in the target use case.
[0014] The data extraction module includes:
[0015] a first extraction unit, configured to, in response to the target dimension being a first dimension, extract data from the original data based on the first dimension metadata to obtain first dimension data corresponding to the first dimension;
[0016] The second extraction unit is used to extract data from the original data based on the first dimension metadata to the nth dimension metadata in response to the target dimension being the nth dimension, so as to obtain the nth dimension data corresponding to the nth dimension, wherein there is an association relationship between the dimensional data corresponding to adjacent dimensions, and n is an integer greater than or equal to 2.
[0017] The second extraction unit is further configured to:
[0018] Extracting data from the original data based on the first-dimensional metadata to obtain first-dimensional data corresponding to the first dimension;
[0019] Data is extracted from the i-1th dimension data based on the i-th dimension metadata to obtain the i-th dimension data corresponding to the i-th dimension, where i is greater than 1 and i is less than or equal to n.
[0020] The dimensions corresponding to the target use case include event dimension, edge dimension and path dimension;
[0021] The first extraction unit is further configured to:
[0022] Extracting data from the original data based on the event metadata to obtain event data corresponding to the event dimension;
[0023] The second extraction unit is further configured to:
[0024] Extracting event data based on edge metadata to obtain edge data corresponding to the edge dimension; or
[0025] Data extraction is performed on the edge data based on the path metadata to obtain path data corresponding to the path dimension.
[0026] The first extraction unit is further configured to:
[0027] Based on the behavior name and behavior result code in the event metadata, data extraction is performed on the original data to obtain the event data, where the behavior name is the name of the target behavior that generates the target event in the event metadata, and the behavior result code is used to characterize the result generated by the target behavior.
[0028] The second extraction unit is further configured to:
[0029] Extracting edge starting point data from the event data based on the starting point event identifier in the edge metadata, the edge starting point data being event data of the event corresponding to the starting point event identifier;
[0030] Extracting edge endpoint data from the event data based on the endpoint event identifier in the edge metadata, the edge endpoint data being event data of an event corresponding to the endpoint event identifier;
[0031] The edge data is determined based on the edge start point data and the edge end point data, wherein the directed edge indicated by the edge data has the event indicated by the edge start point data as a start event and the event indicated by the edge end point data as an end event.
[0032] The second extraction unit is further configured to:
[0033] Extracting candidate edges from the edge data based on edge identifiers in the path metadata;
[0034] In response to the number of edges of the candidate edges having the same process identifier being consistent with the number of edges indicated by the path metadata, the path data is generated based on the edge data corresponding to the candidate edges.
[0035] The data statistics module includes:
[0036] The data statistics unit is used to perform statistics on the target dimension data through a target dimension statistical model corresponding to the target dimension, so as to obtain the statistical data corresponding to the target dimension in the target use case.
[0037] The dimensions corresponding to the target use case include event dimension, edge dimension and path dimension;
[0038] The data statistics unit is further used for:
[0039] The event data is counted using an event statistical model to obtain event statistical data corresponding to the event dimension, wherein the event statistical data includes at least one of the number of event triggering times, the event triggering time, and the number of people triggering the event;
[0040] Performing statistics on the edge data using an edge statistics model to obtain edge statistics corresponding to the edge dimension, the edge statistics including at least one of the number of edge triggering times, the edge triggering time, and the number of edge triggering people;
[0041] Path data is statistically analyzed using a path statistical model to obtain path statistical data corresponding to the path dimension, wherein the path statistical data includes at least one of the number of path triggering times, the path triggering time, and the number of people triggering the path. In another aspect, an embodiment of the present application provides a server comprising a processor and a memory, wherein the memory stores at least one program, and the processor loads and executes the at least one program to implement the data statistics method described in the above aspects.
[0042] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is used to be executed by a processor to implement the data statistics method described in the above aspect.
[0043] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a terminal reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data statistics method described in any of the above aspects.
[0044] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0045] In an embodiment of the present application, when the server needs to perform statistics and analysis on the original data in the database according to the target use case, the dimension metadata of at least one dimension is obtained according to the dimension information of the target dimension data as needed, and the original data generated by the target application is extracted through the dimension metadata to obtain the target dimension data of the target dimension, thereby realizing statistics on the target dimension data; by adopting the solution provided in the embodiment of the present application, the dimensional data under various dimensions in the target use case can be counted according to actual needs, and while obtaining more detailed statistical data, the data statistical efficiency is improved, which facilitates the functional expansion and optimization of the target application based on the statistical data. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic diagram showing an implementation environment provided by an embodiment of the present application is shown;
[0047] Figure 2 A flow chart of a data statistics method provided by an exemplary embodiment of the present application is shown;
[0048] Figure 3 is a use case diagram corresponding to a target use case provided by an exemplary embodiment of the present application;
[0049] Figure 4 is a use case diagram corresponding to a target use case provided by an exemplary embodiment of the present application;
[0050] Figure 5 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0051] Figure 6 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0052] Figure 7 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0053] Figure 8 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0054] Figure 9 is a flowchart of an algorithm for extracting raw data through event metadata provided by an exemplary embodiment of the present application;
[0055] Figure 10 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0056] Figure 11 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0057] Figure 12 is a flowchart of an algorithm for extracting event data through edge metadata provided by an exemplary embodiment of the present application;
[0058] Figure 13 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0059] Figure 14 A flow chart of a data statistics method provided by another exemplary embodiment of the present application is shown;
[0060] Figure 15 An algorithm flow chart of a data statistics method provided by one embodiment of the present application is shown;
[0061] Figure 16A structural block diagram of a data statistics device provided by an embodiment of the present application is shown;
[0062] Figure 17 A schematic diagram of the structure of a server provided in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0063] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0064] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0065] Metadata: Metadata, also known as intermediary data or relay data, is data used to describe data, mainly information describing data attributes, used to support functions such as indicating storage location, historical data, resource search, file records, etc.
[0066] Use Case: In software engineering or systems engineering, a use case describes how a system responds to external requests. It is a technique for capturing requirements through user scenarios. Each use case provides one or more scenarios that illustrate how the system interacts with end users or other systems—who can use the system and what—to achieve a clear business goal. In this application, a use case is a series of operational processes executed on an application, determined based on actual requirements.
[0067] Use Case Diagram: A use case diagram is the simplest representation of user-system interactions, showing the relationship between a user and their associated use cases. Typically, a use case diagram can contain multiple use cases. The use case diagram in this application is a detailed description of the operational flow indicated by a use case. Each node in the use case diagram represents an event indicated by a use case. Directed edges in the use case diagram represent each operational flow corresponding to a use case. A path in the use case diagram represents a complete operational flow corresponding to a use case.
[0068] In related technologies, when technicians need to analyze, test, or expand a specific function of an application, they must identify the corresponding use case from the use case diagram based on the specific requirements and develop corresponding code based on the specific use case to achieve path data statistics. When testing other functions, they need to redevelop the code for the corresponding use case based on the use case diagram to perform statistics, which is a cumbersome operation. Moreover, when using the use case diagram to calculate path data statistics, only the complete path data corresponding to the use case can be counted and analyzed, and more fine-grained data within the path cannot be counted, such as the data of any edge or event in the corresponding path in the use case diagram.
[0069] In order to achieve more fine-grained data statistics, in this embodiment, when it is necessary to perform statistics on path data based on a determined target use case, the original data generated by the target application is analyzed, and data statistics of different dimensions are implemented based on various dimensional information of the data. For example, each edge or event data of the corresponding path in the use case diagram is counted separately to obtain more detailed statistical data, which is convenient for technical personnel to analyze the data.
[0070] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment may include: a terminal 110 and a server 120.
[0071] Terminal 110 has an application installed. Terminal 110 can be an electronic device such as a mobile phone, desktop computer, tablet computer, multimedia player, or laptop computer. An application is any application that generates raw data based on user operations. For example, in a payment application, after a user selects a product, opens a face-scanning or fingerprint payment page, and completes payment through face or fingerprint recognition, the terminal 110 transmits various raw data generated during the operation to server 120.
[0072] The terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0073] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 provides background services for the application in the terminal 110. For example, the server 120 may be the background server of the application mentioned above. In the embodiment of the present application, the server 120 runs a database 121, which stores the raw data generated and uploaded by the user when operating the application. In addition, the server 120 is also used to receive data statistics requests, extract the raw data in the database 121, obtain dimensional data of the corresponding dimension, and provide feedback.
[0074] Those skilled in the art will appreciate that the number of the above-mentioned terminals may be more or less. For example, the above-mentioned terminal may be only one, or the above-mentioned terminals may be dozens or hundreds, or a larger number. The embodiments of the present application do not limit the number of terminals and device types.
[0075] Figure 2 This is a flow chart of a data statistics method provided by an exemplary embodiment of the present application. This embodiment uses this method to Figure 1 The method includes:
[0076] Step 201 : Acquire dimension metadata of at least one dimension corresponding to a target use case. The target use case is used to describe a target process in the process of using a target application, and the dimension metadata is used to describe data attributes of data under the corresponding dimension.
[0077] When it is necessary to test a specific function of the target application or analyze user usage, it is necessary to determine the corresponding target use case based on the specific function. The required target process and various dimensional metadata can be determined from the use case diagram corresponding to the target application.
[0078] Indicative, such as Figure 3 As shown, when it is necessary to test the product selection and payment functions of the target application, the process content contained in the target use case can be determined through the use case diagram corresponding to the application. From the diagram, it can be determined that the corresponding target use case includes the process from the home page to the product page (corresponding to process a), then from the product page to the purchase page (corresponding to process b), and finally from the purchase page to the payment page (corresponding to process c) to complete the entire target process of product selection and payment (process a→process b→process c). The steps from process a to process c are also the complete path corresponding to the target use case. Among them, each process node in the use case diagram corresponds to the event indicated by the target use case. Correspondingly, when it is necessary to test the recharge and payment functions of the target application, the target process during the use of the target application corresponding to the target use case is determined to be process d→process e→process f.
[0079] Because applications often include numerous functions and the corresponding use case diagrams for target applications are complex, target use cases often contain data in multiple dimensions. Each dimension of data has its own corresponding dimensional metadata. This metadata allows you to determine whether the data stored in the database belongs to the dimensional data indicated by the target use case. Therefore, when you need to perform statistics on data in one or more dimensions within a target use case, you must first obtain the dimensional metadata for the corresponding dimensions. Dimensional metadata describes the data attributes of the data within the corresponding dimension, such as the field name, field type, and field meaning for each data item.
[0080] Step 202 : extracting data from the original data based on the dimensional metadata of at least one dimension to obtain target dimensional data corresponding to the target dimension. The original data is data generated during the use of the target application.
[0081] When the user performs relevant operations on the target application, corresponding original data will be generated, and the terminal will upload the generated original data to the server. When the server performs data statistics, it determines the dimensional metadata required for statistics of the target dimension data based on the target dimension of the statistical data, and then extracts data from the original data based on the target dimension metadata to obtain the target dimension data corresponding to the target dimension.
[0082] In a possible implementation, when the target dimension data that the server needs to obtain can be extracted only through one dimension metadata, the required dimension metadata is determined according to the target dimension of the target dimension data, and then the original data is extracted based on the dimension metadata to obtain the target dimension data corresponding to the target dimension. Figure 4 As shown in the figure, taking facial payment as the target use case, the target processes corresponding to the facial payment process include the process from the start of facial payment to successful biopsy, the process from successful biopsy to successful recognition, and the process from successful recognition to successful payment. The server stores the various raw data generated by the user's facial payment. When the server needs to obtain the data for the start of facial payment, successful biopsy, successful recognition, and successful payment in the target use case, the target dimension is the event dimension corresponding to facial payment, and the corresponding metadata is the data included in the facial payment process.
[0083] In another possible implementation, when the target dimension data that the server needs to obtain needs to be extracted through multiple dimensional metadata, it is necessary to determine the required multiple dimensional metadata based on the target dimension data, and then extract the original data based on the determined multiple dimensional metadata to obtain the target dimension data corresponding to the target dimension. When it is necessary to obtain all the processes included in face-swiping payment, that is, it is necessary to obtain the data corresponding to the process from the start of face-swiping to successful biopsy, the process from successful biopsy to successful identification, and the process from successful identification to successful payment, the target dimension is the edge dimension corresponding to face-swiping payment, and the corresponding edge metadata is the data corresponding to each process included in face-swiping payment.
[0084] Step 203: Count the target dimension data to obtain statistical data corresponding to the target dimension in the target use case.
[0085] After the server determines the corresponding target dimension data based on the target dimension, it performs data statistics based on the various identification information of the target dimension data to obtain statistical data corresponding to the target dimension in the target use case. For example, during the face-scanning payment process, the number of people who triggered the corresponding events and the number of triggers were counted, or the number of people who triggered the corresponding events from successful recognition to successful payment were counted. By collecting statistics on the corresponding data, it is easier to analyze the usage of the target application. By analyzing the number and frequency of users triggering different functions, it is easier to improve and optimize the functions of the target application.
[0086] To sum up, in the embodiments of the present application, when the server needs to perform statistics and analysis on the original data in the database according to the target use case, the dimension metadata of at least one dimension is obtained according to the dimension information of the target dimension data as needed, and the original data generated by the target application is extracted through the dimension metadata to obtain the target dimension data of the target dimension, thereby realizing statistics on the target dimension data; by adopting the solution provided in the embodiments of the present application, the dimensional data under various dimensions in the target use case can be counted according to actual needs, and more detailed statistical data can be obtained, which is convenient for functional expansion and optimization of the target application based on the statistical data.
[0087] In one possible implementation, because the target application generates a large amount of raw data, when performing data statistics on the raw data based on the target use case, it is necessary to extract the raw data from multiple dimensions, and data from different dimensions may be correlated. Therefore, to better perform data statistics and analysis, when performing statistics on the target dimension, it is necessary to first obtain dimensional data from other dimensions, and then, based on the obtained dimensional data, further obtain the target dimension data for the target dimension.
[0088] Figure 5 This is a flow chart of a data statistics method provided by an exemplary embodiment of the present application. This embodiment uses this method to Figure 1 The method includes the following steps.
[0089] Step 501: Obtain dimension metadata of at least one dimension corresponding to a target use case. The target use case is used to describe a target process in the process of using a target application, and the dimension metadata is used to describe data attributes of data under the corresponding dimension.
[0090] The implementation of this step can refer to step 201, and this embodiment will not be described in detail here.
[0091] Step 502 : extracting data from the original data based on the dimensional metadata of at least one dimension to obtain target dimensional data corresponding to the target dimension. The original data is data generated during the use of the target application.
[0092] When the server needs to extract the original data stored in the database, it needs to count the target dimension information corresponding to the target dimension data and determine the dimension metadata required for counting the target dimension data. And when there may be an association relationship between different dimensions, such as the target use case contains n dimensions, each dimension corresponds to its own dimension metadata and dimension data, and the n dimension data are in a cascade relationship, that is, the second dimension data needs to be obtained by extracting the first dimension data, the third dimension data needs to be obtained by extracting the second dimension data, and so on. Therefore, when the server needs to count the data, it needs to select the dimension metadata according to the dimension information indicated by the target dimension. Therefore, if Figure 6 As shown, step 502 also includes the following steps.
[0093] Step 502A: In response to the target dimension being the first dimension, data extraction is performed on the original data based on the first dimension metadata to obtain first dimension data corresponding to the first dimension.
[0094] When the server determines that the target dimension is the first dimension, the server only needs to extract the original data through the first dimension metadata corresponding to the first dimension to obtain the corresponding first dimension data. When the server extracts the original data in the database, it filters the original data according to the data attributes indicated by the first dimension metadata to obtain the first dimension data corresponding to the first dimension.
[0095] For example, when a user pays by face swiping, when the user pays by face swiping through the target application, the corresponding raw data will be generated when the user operates the target application and uploaded to the server. When the server needs to count each event corresponding to the face swiping payment, the first dimension is the event dimension, and the first dimension metadata is the event metadata, which corresponds to the events of face swiping at the beginning of the face swiping payment process, successful biopsy, successful recognition, and successful payment. The first dimension data obtained after extracting the raw data is the event data corresponding to the face swiping payment process.
[0096] Step 502B, in response to the target dimension being the nth dimension, data extraction is performed on the original data based on the first dimension metadata to the nth dimension metadata to obtain the nth dimension data corresponding to the nth dimension, wherein there is an association relationship between the dimensional data corresponding to adjacent dimensions, and n is an integer greater than or equal to 2.
[0097] When the server determines that the target dimension is the nth dimension (n is an integer greater than or equal to 2), the server needs to extract data from the original data through the first dimension metadata to the nth dimension metadata to obtain the corresponding target dimension data. Since the dimension data of adjacent dimensions in the target use case are associated, such as when the data has a cascade relationship, it is necessary to obtain the dimension data of the corresponding dimension in order through the dimension metadata to obtain the dimension data of the target dimension. Therefore, if Figure 7 As shown, step 402B also includes the following steps.
[0098] Step 502B1: extract data from the original data based on the first dimension metadata to obtain first dimension data corresponding to the first dimension.
[0099] When the server needs to obtain the i-th dimension data corresponding to the i-th dimension, it first needs to extract the original data according to the first dimension metadata to obtain the first dimension data. The process of obtaining the first dimension data can be referred to step 502B, which will not be described in detail in this embodiment.
[0100] Step 502B2: extract the i-1th dimension data based on the i-th dimension metadata to obtain the i-th dimension data corresponding to the i-th dimension, where i is greater than 1 and i is less than or equal to n.
[0101] After the server determines the first dimension data through the first dimension metadata, it also needs to extract the first dimension data based on the second dimension metadata to obtain the second dimension data, and so on, extract the i-1th dimension data based on the i-th dimension metadata to obtain the i-th dimension data corresponding to the i-th dimension, until the target dimension data corresponding to the corresponding target dimension is obtained.
[0102] In principle, when the server needs to count the data of each process in the face-scanning payment process, that is, to count the data corresponding to the process from the start of face-scanning to successful biopsy, the process from successful biopsy to successful identification, and the process from successful identification to successful payment, it is necessary to extract the first-dimensional data according to the second-dimensional metadata after obtaining the event data corresponding to the first dimension. The second-dimensional metadata is the metadata corresponding to each process in the use case diagram. After extracting the first-dimensional data through the second-dimensional metadata, the second-dimensional data can be obtained, which corresponds to the edge data of each edge in the use case diagram.
[0103] By analogy, when the target dimension is the i-th dimension, it is necessary to first obtain the i-1th dimension data under the i-1th dimension and the i-th dimension metadata corresponding to the i-th dimension, and then extract the i-1th dimension data based on the i-th dimension metadata to obtain the i-th dimension data corresponding to the i-th dimension.
[0104] Step 503 : Using the target dimension statistical model corresponding to the target dimension, statistics are performed on the target dimension data to obtain statistical data corresponding to the target dimension in the target use case.
[0105] After the server determines the target dimension data based on the dimensional metadata, it uses the target dimension statistical model corresponding to the target dimension to perform statistics on the target dimension data. The target dimension statistical model specifies the attribute information and corresponding data content of various statistical data. For example, the target dimension statistical model can count the number of triggers for the target dimension data, the trigger time, and the trigger frequency. By analyzing the statistical results of the target dimension statistical model, the user's operation on the target application can be determined, facilitating optimization and improvement for the target user.
[0106] In the above embodiment, the server extracts the original data through the metadata corresponding to each dimension to obtain the target dimension data corresponding to the target dimension. In a possible implementation, when the target use case is the target process of the user entering the face recognition page through the homepage to perform face payment, the dimensions corresponding to the target use case include event dimension, edge dimension and path dimension. Figure 4 As shown, the event dimension indicates the dimension corresponding to the data of each process node in the use case diagram. The edge dimension corresponds to the dimension of each adjacent process node in the use case diagram, and the path dimension corresponds to the dimension of the complete path composed of all processes and process nodes in the use case diagram. The dimensional data corresponding to the event dimension is event data, the dimensional data corresponding to the edge dimension is edge data, and the dimensional data corresponding to the path dimension is path data.
[0107] Figure 8 This is a flow chart of a data statistics method provided by an exemplary embodiment of the present application. This embodiment uses this method to Figure 1 The method includes the following steps.
[0108] Step 801: Obtain event metadata corresponding to the target use case.
[0109] When the server needs to perform statistics on event data, it obtains the event metadata corresponding to the target use case, where the event metadata is determined based on the set event metadata model. After the target use case is determined, the specific content of the event metadata is determined based on the attributes of the event data specified by the event metadata.
[0110] Schematically, the event metadata model is shown in Table 1. The event metadata model specifies the field name, field type, and specific meaning of each field of the event data.
[0111] Table 1
[0112]
[0113] After the target use case is determined, the specific content of the event metadata is determined based on the events included in the target use case and the event metadata model.
[0114] Indicative, such as Figure 4 As shown in the figure, the target process indicated by the target use case includes the entire process from starting face scanning to successful biopsy (process a), then from successful biopsy to successful recognition (process b), and finally from successful recognition to successful payment (process c). The content of the event metadata can be determined based on the corresponding target use case.
[0115] Schematically, the content of the event metadata is shown in Table 2. The specific content of the event metadata is determined according to the target process indicated by the target use case.
[0116] Table 2
[0117]
[0118]
[0119] Step 802: Extract the original data based on the behavior name and behavior result code in the event metadata to obtain event data. The behavior name is the name of the target behavior that generates the target event in the event metadata, and the behavior result code is used to represent the result generated by the target behavior.
[0120] When the server needs to perform statistics on the target dimension data, it also needs to obtain the original data generated by the target application from the database according to actual needs, and extract the original data through event metadata.
[0121] In a possible implementation, during the process of extracting the original data, the server extracts the original data based on the action name and action result code contained in the event metadata. As shown in Table 2, action_name represents the action name, which is the name of the target action that generates the target event in the event metadata, that is, it represents the specific operation behavior of the user on the target application. The business error code bserrorcode and the system error code errorcode are the corresponding identification codes generated when the user operates the target application. Since each action_name is matched with a unique bserrorcode and errorcode, bserrorcode and errorcode can be used as action result codes to characterize the results generated by the target behavior. The original data can be extracted by matching the action name and the action result code. As can be seen from Table 2, event_id represents the corresponding identifier of each event, event_name represents the name of the event, business_process is used to represent the process of the user performing the event, page_name and page_position respectively represent the page name and page position of the target application.
[0122] When the server needs to extract, it also needs to obtain the original data generated by the target application from the database. Taking the above-mentioned target use case of user face payment as an example, the original data obtained by the server is shown in Table 3.
[0123] Table 3
[0124]
[0125]
[0126] As can be seen from the above Table 3, the original data obtained by the server includes the corresponding original data generation location happen_where, the corresponding event entity identifier event_entity_id, user information who_id, behavior name action_name, data protocol data_id, business error code bserrorcode and system error code errorcode. When the server filters the original data, it extracts event dimension data based on the behavior name and behavior result code of the original data. As can be seen from the event metadata content, the behavior result code corresponding to action_a in the first event metadata is 0; the behavior result code corresponding to action_b in the second event metadata is *, indicating that there is no restriction on the behavior result code of the corresponding event metadata, the behavior result code corresponding to action_c in the third event metadata is 200, and the behavior result code corresponding to action_d in the fourth event metadata is 500. It should be noted that when bserrorcode or errorcode is *, it means that the behavior result code can be any value and there is no restriction on the behavior result code of the corresponding event metadata. Tables 2 and 3 do not list the timestamps of the original data. When the data generation time needs to be extracted, the timestamp can be added to the corresponding event metadata to obtain the event data within the set time range.
[0127] After extracting the raw data based on the matching relationship between the behavior name and behavior result code, the event data corresponding to the target use case is obtained. The behavior name and behavior result code of the raw data for item 5 in Table 1 do not match the event metadata. The obtained event data is shown in Table 4.
[0128] Table 4
[0129] data_id report_entity_id happen_where event_entity_id who_id event_id event_name 16160 device_sn_a Front screen homepage session_id_a user_a 1005 Start face scanning 16160 device_sn_a Biopsy Page session_id_a user_a 1006 Biopsy successful 16160 device_sn_a Identify Page session_id_a user_a 1007 Successful identification 16160 device_sn_a Payment Home Page session_id_a user_a 1008 Payment successful 16160 device_sn_a Front screen homepage session_id_c user_a 1005 Start face scanning 16160 device_sn_a Front screen homepage session_id_d user_a 1005 Start face scanning 16160 device_sn_a Biopsy Page session_id_d user_a 1006 Biopsy successful 16160 device_sn_a Payment Home Page session_id_d user_a 1008 Payment successful
[0130] Figure 9 This is a flowchart of the algorithm for extracting raw data using event metadata. When the server needs to obtain event data corresponding to a target use case, it retrieves the corresponding event metadata and then extracts the raw data based on the event metadata. During the extraction process, the action name and action result code contained in each metadata item are matched with the action name and action result code in the corresponding event metadata. When a match is found, the corresponding raw data is extracted to obtain the event data corresponding to the target use case.
[0131] Taking the user's face-scanning payment as the target use case, when the server needs to extract the original data, it first needs to obtain the event metadata contained in the face-scanning payment process, including the face-scanning start event, biopsy success event, recognition success event, payment success event and the behavior result code corresponding to each event; then match the behavior result code of each event metadata with the corresponding behavior result code in the original data, extract the successfully matched original data one by one, and obtain the event data under the corresponding dimension.
[0132] Step 803: Count the event data using an event statistical model to obtain event statistical data corresponding to the event dimension, where the event statistical data includes at least one of the number of event triggering times and the number of people triggering the event.
[0133] After the server extracts event data from the raw data based on event metadata, it also needs to perform statistics on the event data, such as the number of times each event is triggered and the number of people who trigger it. When performing statistics on event data, the event statistics model can determine the content to be counted based on actual needs.
[0134] As shown in Table 4, when it is necessary to count the number of times each event is triggered, the event data with the same event identifier event_id from all extracted event data is counted. In Table 4, the event_id for the start of face scanning is 1005, and the corresponding event is triggered a total of 3 times. When it is necessary to count the number of people who triggered the start of face scanning, the user identifier who_id or event entity identifier event_entity_id is used for statistics. The user identifier in Table 4 indicates that there are a total of 4 users who triggered various events corresponding to face scanning payment, and the specific operation page of the user on the target application can be determined by the triggering event location happen_where for each event data.
[0135] When it is necessary to count the number of times and number of people for each triggering event, the corresponding event statistical model is shown in Table 5.
[0136] Table 5
[0137]
[0138]
[0139] The event statistics model shown in Table 5 shows that it is possible to count the number of people and the number of times each event in the target use case is triggered. For example, the number and number of times that the face recognition and biopsy success events are triggered can be used to determine whether the face recognition and biopsy functions of the target application need to be optimized and expanded. Optionally, for video or news applications, it is also possible to obtain statistics on the time users spend using the target application. That is, the timestamps can be counted in the event statistics model to determine the time period of user use, so as to facilitate the recommendation of high-quality news or video content to users within the appropriate time period.
[0140] In an embodiment of the present application, data extraction is performed on the original data by obtaining event metadata, thereby obtaining event data corresponding to the target use case, and the event data is counted through an event statistical model to obtain the number of triggering times and the number of triggering people for each event in the target use case, thereby realizing functional testing and analysis of the target application.
[0141] In one possible implementation, when it is necessary to perform statistics on edge data in a target use case, it is necessary to obtain edge metadata of the target use case, and extract event data based on the data content of the edge metadata to obtain edge data under the edge dimension.
[0142] Figure 10 This is a flow chart of a data statistics method provided by an exemplary embodiment of the present application. This embodiment uses this method to Figure 1 The method includes the following steps.
[0143] Step 1001: Obtain event metadata and edge metadata corresponding to the target use case.
[0144] When a server needs to collect edge metadata statistics, it first determines the event metadata and edge metadata it needs to obtain based on the edge data dimensions. Edge metadata describes the data attributes under the edge dimensions of the target use case. Edge metadata is determined based on the edge metadata model. Once the target use case is determined, the specific content of the edge metadata is determined based on the edge data attributes specified by the edge metadata.
[0145] Schematically, the edge metadata model is shown in Table 6. The edge metadata model specifies the field name, field type, and specific meaning of each field of the edge data.
[0146] Table 6
[0147]
[0148]
[0149] Schematically, the edge metadata content is shown in Table 7, and the specific content of the edge metadata is determined according to the target process indicated by the target use case.
[0150] Table 7
[0151] edge_id edge_name source_id target_id 1 From face recognition to successful biopsy 1005 1006 2 Biopsy to identification 1006 1007 3 Identify to pay 1007 1008
[0152] As shown in Table 7, the target use case indicates three edges in total, namely, the edge data corresponding to the start of face scanning to successful biopsy, the edge data corresponding to successful biopsy to recognition, and the edge data corresponding to recognition to payment.
[0153] It should be noted that the specific edge metadata content in Table 7 is based on Figure 7 When the target use case changes, the edge metadata content in Table 7 can be modified accordingly without redeveloping the program code according to the new target use case.
[0154] Step 1002: extract the original data based on the event metadata to obtain event data corresponding to the event dimension.
[0155] The implementation of this step can refer to step 802, and this embodiment will not be described in detail here.
[0156] Step 1003: extract data from the event data based on the edge metadata to obtain edge data corresponding to the edge dimension.
[0157] When the server only needs to obtain the triggering status of each event in the target use case, it can count each event through event data statistics. However, if it needs to obtain the conversion status of each step in the target use case, it is necessary to count each edge in the use case diagram to obtain the user's usage of each operation step in the target use case. For example, count the number of triggers from the start of face scanning to the successful biopsy in the target use case, and then determine the conversion rate from the start of face scanning to the successful biopsy (the ratio of the number of triggers from successful face scanning to successful biopsy to the number of successful face scanning triggers). At this time, based on the event data that has been obtained, it is necessary to determine the edge data under the edge dimension according to the edge metadata indicated by the target use case.
[0158] Since the edges in the target use case have directions, and the acquired event data cannot determine the flow direction of the event data, it is also necessary to determine the starting event and end event of each edge data based on the edge metadata. Figure 11 As shown, step 1003 also includes the following steps.
[0159] Step 1003A: extract edge starting point data from the event data based on the starting point event identifier in the edge metadata. The edge starting point data is event data of the event corresponding to the starting point event identifier.
[0160] It can be seen from the content of the edge metadata that the starting event identifier of each edge data corresponding to the target use case is specified in the edge metadata. The edge starting point data can be extracted from the event data through the starting event identifier. The edge starting point data is the event data of the event corresponding to the starting event identifier.
[0161] As shown in Table 7, for example, when the starting event identifier source_id is 1005, the event identifier corresponding to the starting point data of the edge to be extracted is 1005, and then the edge data with the event identifier event_id of 1005 is extracted from the event data, that is, the event name of the starting edge is the event data of starting face scanning.
[0162] Step 1003B: extract edge endpoint data from the event data based on the endpoint event identifier in the edge metadata. The edge endpoint data is event data of the event corresponding to the endpoint event identifier.
[0163] Correspondingly, according to the endpoint event identifier corresponding to the target use case, edge endpoint data is extracted from the event data. The edge endpoint data is the event data of the event corresponding to the endpoint event identifier.
[0164] As shown in Table 7, when the endpoint event identifier target_id is 1006, the event identifier corresponding to the edge endpoint data to be extracted is 1006, and then the edge data with the event identifier event_id of 1006 is extracted from the event data, that is, the event name of the endpoint edge is the event data of successful biopsy.
[0165] It should be noted that the first edge data in the target use case corresponds to the process from face scanning to successful biopsy. When extracting the second edge data, based on the same principle, it can be determined from the event data that the edge starting point data is the event data of successful biopsy, and the edge ending point data is the event data of successful identification. There is no strict order requirement for extracting the edge starting point data and the edge ending point data. The edge starting point data can be extracted first, the edge ending point data can be extracted first, or the edge starting point and edge ending point data can be obtained at the same time.
[0166] Taking facial recognition payment as an example, when the server needs to extract event data, it first needs to obtain the edge metadata included in the facial recognition payment process, including the edge start and end data from the start of facial recognition to successful biopsy, biopsy to recognition, and payment to recognition. Then, the event data is extracted based on the edge start and end data corresponding to the edge name.
[0167] Step 1003C: Based on the edge start data and the edge end data, determine the edge data, wherein the directed edge indicated by the edge data has the event indicated by the edge start data as the start event and the event indicated by the edge end data as the end event.
[0168] After the corresponding event data is determined based on the edge starting point data and edge ending point data in the edge metadata, the event data corresponding to the same edge are combined, and the directed edge indicated by the edge data is determined based on the edge starting point data and edge ending point data. That is, each directed edge in the target use case takes the event indicated by the edge starting point data as the starting event and the event indicated by the edge ending point data as the ending event. The direction of the directed edge is determined by the starting event and the ending event, and then the edge data corresponding to the target use case under the edge dimension is obtained.
[0169] Schematically, the edge data obtained by extracting event data through edge metadata is shown in Table 8.
[0170] Table 8
[0171]
[0172] As shown in Table 8, based on the start event identifier and end edge identifier of each edge indicated by the edge metadata, the edge data corresponding to the target use case is extracted from the event data. The first and second rows of event data in Table 7 are the edge start data and edge end data of the first edge indicated in the target use case, respectively. The edge name corresponding to the first edge is "Start Face Scanning to Successful Biopsy"; the second and third rows of event data are the edge start data and edge end data of the second edge indicated in the target use case, and the corresponding edge name is "Biopsy to Recognition"; the third and fourth rows of event data are the edge start data and edge end data of the third edge indicated in the target use case, and the corresponding edge name is "Biopsy to Recognition".
[0173] It should be noted that since event_entity_id contains multiple session identifiers (session_id), different session identifiers represent raw data generated by different users. Therefore, when extracting edge data, it is also necessary to determine whether the event data is based on the same session based on the session_id. Then, data extraction is performed on the event data with the same session identifier to obtain the corresponding edge data. The fifth event data in Table 7 can only serve as edge starting point data, and without the corresponding edge endpoint data to form a complete directed edge, data extraction cannot be performed. Based on the same logic, the eighth event data also cannot form a complete directed edge, and therefore data extraction cannot be performed.
[0174] Figure 12 This is a flowchart of the algorithm for extracting event data using edge metadata. When the server needs to obtain edge data corresponding to a target use case, it first determines the corresponding edge metadata based on the target use case. It then extracts the corresponding edge start and end data from the event data based on the corresponding start and end event identifiers in the edge metadata. After extraction, the obtained data is aggregated to form the node data for the directed edges in the use case diagram.
[0175] Since the session identifiers contained in the aggregated data may not be the same, and multiple event data under the same session identifier may not form a complete directed edge, it is also necessary to prune the edge data according to the session identifier, that is, obtain the event data under the same session identifier that can form a complete directed edge, and filter out the event data that cannot form a complete directed edge. For example, in Table 4, the event_id of the third event data is 1007, and the event_id of the eighth event data is 1008. Although the event_id of the third event and the event_id of the eighth event data can be the starting point and end point of an edge, since the session identifier of the third event data is session_id_a and the session identifier of the eighth event data is session_id_d, the two event data cannot form a directed edge. Even if the event data has the same session identifier, when the event identifiers of the two event data do not correspond to the starting event identifier and the end event of the same directed edge indicated by the edge metadata, they cannot form a directed edge. Therefore, in order to ensure that the aggregated event data can constitute complete edge data, it is also necessary to prune the event data, that is, match and confirm the event data through the session identifier and event identifier to ensure that the complete edge node of the directed edge can be obtained, that is, the complete directed edge can be formed through the edge start point data and edge end point data.
[0176] Because each directed edge corresponding to a process in a use case diagram has a specific direction, this direction represents the flow of the corresponding data, such as the data flow from successful identification to successful payment in the use case diagram. Therefore, after determining the complete edge node, the direction of the directed edge must be determined based on the edge start and end data. The edge start and end data must then be extracted again and integrated to obtain the complete edge data.
[0177] Taking face-scanning payment as an example, after the server obtains the edge starting point data and edge end point data, it first needs to match and classify the event data according to the session identifier and edge identifier in the event data to ensure that directed edges with the same session identifier are subsequently generated. For example, the source_id corresponding to biopsy to recognition is 1006, and the target_id is 1007, indicating that only successful biopsy events and successful recognition events can constitute the edge node of the corresponding target use case, while other event data are excluded. This process is repeated to obtain the complete edge node for each edge data contained in the event metadata. After obtaining the complete edge node, the direction of the directed edge is further determined based on the starting event and the end point event. For example, for the directed edge corresponding to biopsy to recognition, successful biopsy is the starting event of the directed edge, and successful recognition is the corresponding end point event. After determining the direction of the directed edge, the extracted event data can be integrated to obtain the edge data corresponding to biopsy to recognition.
[0178] Step 1004 , performing statistics on the edge data using an edge statistics model to obtain edge statistics corresponding to the edge dimension, where the edge statistics include at least one of edge triggering times, edge triggering time, and number of edge triggering people.
[0179] After the server extracts edge data from event data based on edge metadata, it also needs to perform statistics on the edge data, such as counting the number of times each edge is triggered and the number of people who trigger it. When performing statistics on edge data, the edge statistics model can determine the content to be counted based on actual needs.
[0180] As shown in Table 8, when it is necessary to count the number of times each edge is triggered, the edge data with the same edge starting point event identifier s_event_id in all the extracted event data are counted. In Table 8, the s_event_id from the start of face scanning to the successful biopsy is 1005, indicating that the corresponding edge is triggered twice in total. In addition, the number of times the corresponding edge is triggered can be determined by counting the end point edge event identifier e_event_id. When it is necessary to count the number of people who trigger each edge, statistics are performed using the user identifier who_id or the event entity identifier event_entity_id. The user identifier in Table 8 indicates that there are 2 users who triggered the edges corresponding to face scanning payment, and each triggered edge can determine the user's specific operation page for the target application through the triggering event location happen_where.
[0181] When it is necessary to count the number of times and people of each triggered edge, the corresponding edge statistics model is shown in Table 9.
[0182] Table 9
[0183]
[0184] The edge statistics model shown in Table 9 shows that we can count the number of people and times each edge in the target use case is triggered. For example, we can count the number of people and times the edge corresponding to the payment is identified.
[0185] In addition, based on the event statistical model, the successful conversion rate from identification to payment can be calculated, that is, the ratio of the number of people who successfully paid to the number of people who only completed the identification process but not the payment process can be calculated to determine whether the target application has functional abnormalities and whether functional optimization is needed.
[0186] In an embodiment of the present application, data extraction is performed on event data by obtaining edge metadata, thereby obtaining edge data corresponding to the target use case, and the edge data is counted through an edge statistical model to obtain the number of triggering times and the number of triggering people for each edge in the target use case, thereby realizing functional testing and analysis of the target application.
[0187] In one possible implementation, when it is necessary to perform statistics on the path data in the target use case, it is necessary to obtain the path metadata of the target use case, and extract the edge data according to the data content of the path metadata to obtain the path data under the path dimension.
[0188] Figure 13 This is a flow chart of a data statistics method provided by an exemplary embodiment of the present application. This embodiment uses this method to Figure 1 The method includes the following steps.
[0189] Step 1301: Obtain event metadata, edge metadata, and path metadata corresponding to the target use case.
[0190] When a server needs to perform path data statistics, it first determines the event metadata, edge metadata, and path metadata required based on the path data dimensions. Path metadata describes the data attributes within the path dimension of the target use case. Path metadata is determined based on a configured path metadata model. Once the target use case is determined, the specific content of the path metadata is determined based on the path metadata attributes specified by the path metadata.
[0191] Schematically, the path metadata model is shown in Table 10. The path metadata model specifies the field name, field type, and specific meaning of each field of the path data.
[0192] Table 10
[0193] Field English name Field Name Field Type Field meaning path_id Path ID int Path ID path_name Path name string Path name edge_id Edge ID int Edge ID
[0194] Schematically, the path metadata content is shown in Table 11, and the specific content of the path metadata is determined according to the target process indicated by the target use case.
[0195] Table 11
[0196] path_id path_name edge_id 1 Successful path to facial recognition payment 1 1 Successful path to facial recognition payment 2 1 Successful path to facial recognition payment 3
[0197] As can be seen from Table 11, the target use case indicates a total of one path, which corresponds to the path from face-scanning payment to success, and the path indicated by the target use case contains a total of 3 edges.
[0198] It should be noted that the specific edge metadata content in Table 11 is based on Figure 7 The target use case in the example is determined by the path metadata in Table 11. When the target use case changes, simply modify the path metadata in Table 11 accordingly. When the target use case contains multiple edges, simply add the path identifier path_id to the corresponding path metadata. When the second path is the path for successful fingerprint payment, the corresponding path_id is 2, and the number of edges in the path can be increased accordingly.
[0199] Step 1302: extract data from the original data based on the event metadata to obtain event data corresponding to the event dimension.
[0200] The implementation of this step can refer to step 802, and this embodiment will not be described in detail here.
[0201] Step 1303: extract the event data based on the edge metadata to obtain edge data corresponding to the edge dimension.
[0202] The implementation of this step can refer to step 1003, and this embodiment will not be described in detail here.
[0203] Step 1304 : extract edge data based on the path metadata to obtain path data corresponding to the path dimension.
[0204] In one possible implementation method, when the server needs to count the user's triggering of the path indicated by the target use case, that is, when the server needs to count the number of triggers and the number of people corresponding to the complete path from face scanning to payment completion, it is necessary to extract the edge data based on the path metadata on the basis of obtaining the edge data, so as to obtain the path data under the path dimension.
[0205] Since the path corresponding to the target use case consists of multiple directed edges, and the order of different edges in the path is different, and when the path is incomplete, the corresponding path data cannot be extracted. Therefore, when extracting edge data, it is also necessary to extract edge data based on the edge identifier and number of edges in the path metadata to obtain path data. Therefore, if Figure 14 As shown, step 1304 also includes the following steps.
[0206] Step 1304A: Extract candidate edges from the edge data based on the edge identifiers in the path metadata.
[0207] It can be seen from the path metadata content that the path metadata specifies the edge identifier edge_id of each edge in the target use case. When edge_id is 1, it means that the corresponding edge is the first edge in the path indicated by the target use case. When edge_id is 2, it corresponds to the second edge in the path. When edge_id is 3, it corresponds to the third edge in the path.
[0208] After determining the edge identifier of each edge in the path metadata, candidate edges are extracted from the edge data based on the edge identifier. When the target use case contains multiple paths, candidate edges need to be extracted from the edge data based on the path identifier and edge identifier.
[0209] Taking facial recognition payment as an example, after obtaining the edge data, the server matches the edge identifier of the successful facial recognition payment path with the edge identifier of the edge data obtained in the above step to find the candidate edge corresponding to the successful facial recognition payment path. Similarly, the edge identifiers of all path metadata are matched to find the candidate edges corresponding to all path metadata.
[0210] Step 1304B: in response to the number of edges of the candidate edges having the same process identifier being consistent with the number of edges indicated by the path metadata, generate path data based on the edge data corresponding to the candidate edges.
[0211] Because the extracted path data only contains data that satisfies the edge identifier or satisfies both the edge identifier and the path identifier, the extracted path data may not correspond to a complete path. Therefore, a match is required based on the process identifier and the number of edges indicated by the path metadata. Only when the number of edges of the candidate edge matches the number of edges indicated by the path metadata and they have the same process identifier (i.e., the session identifier in this embodiment) can the acquired data be guaranteed to correspond to the path data of the complete path.
[0212] Schematically, the path data generated based on the candidate edges is shown in Table 12.
[0213] Table 12
[0214]
[0215] It can be seen from Table 12 that the edge identifiers and edge quantities corresponding to the first three rows of edge data in Table 8 are consistent with the edge identifiers and edge quantities indicated by the path metadata, and have the same process identifier, that is, the three edge data are all session_id_a, so they can be extracted. Although the fourth row of data in Table 8 is consistent with the edge identifier indicated by the path metadata, the edge data belongs to another process identifier and only contains one edge data, which cannot form a complete path and cannot constitute path data.
[0216] Taking face-scanning payment as an example, the corresponding complete path contains three directed edges. Therefore, the complete path data obtained should be the path data corresponding to the three directed edges. After obtaining the candidate edges through the above steps, it is necessary to determine whether the session identifier of the candidate edge is consistent based on the session_id, and determine whether the candidate edge is the path corresponding to the target use case based on the path_id of the candidate edge. After obtaining the edge data corresponding to the session identifier, match the number of edges obtained with the number of edges in the path metadata. When the calculated number of edges is consistent with the number of edges indicated by the path metadata for face-scanning payment, it is determined to be the complete path data for face-scanning payment. If the calculated number of edges is inconsistent with the number of edges indicated by the path metadata for face-scanning payment, it means that the session identifier has not executed the complete process of face-scanning payment.
[0217] Step 1305 , statistics are performed on the path data using a path statistics model to obtain path statistics corresponding to the path dimension, where the path statistics include at least one of the number of path triggering times, the path triggering time, and the number of path triggering people.
[0218] After the server extracts path data from edge data based on path metadata, it also needs to perform statistics on the path data, such as the number of times the complete path is triggered and the number of people who trigger it. When performing statistics on path data, the path statistical model can determine the content to be counted based on actual needs.
[0219] As shown in Table 12, when it is necessary to count the number of times a path is triggered, the path data with the same path identifier path_id and user identifier who_id in all the extracted path data are counted. The path_id of the successful face payment path in Table 12 is 1, indicating the first path, and the user identifier of the corresponding path data is user_a, indicating that the first path is triggered by the user corresponding to user_a.
[0220] It should be noted that this embodiment only shows the data statistics for one path. When statistics are required for multiple path data, multiple paths can be added accordingly in the path metadata. For example, when path_id is 2, the corresponding path data for the second path is fingerprint payment, then the number of triggers and the number of triggers for different paths can be counted.
[0221] When it is necessary to count the number of triggers and the number of triggers for a complete path, the corresponding path statistical model is shown in Table 13.
[0222] Table 13
[0223]
[0224] Through the path statistics model shown in Table 13, we can count the number of triggers and the number of triggers corresponding to the complete path in the target use case. For example, we can count the number of triggers and the number of people in the entire process from face scanning to payment completion, which facilitates analysis of the functionality of the target application and user usage.
[0225] It should be noted that when statistics are collected on the path data of the target use case, statistics can also be collected on the event data and edge data included in the target use case to obtain more detailed statistical data.
[0226] In an embodiment of the present application, path data is extracted by obtaining path metadata to obtain the path data corresponding to the target use case, and the path data is counted by a path statistical model to obtain the number of triggering times and the number of triggering people of the corresponding path in the target use case, thereby realizing functional testing and analysis of the target application.
[0227] Figure 15 It is an algorithm flow chart of a data statistics method provided by an exemplary embodiment of the present application.
[0228] like Figure 15 As shown in the figure, when the server needs to collect statistics on event data under the event dimension based on raw data, it needs to obtain the raw data from the database and the event metadata corresponding to the target use case. The event metadata and raw data contain the data's behavior name and behavior result code. The process of extracting raw data based on event metadata is to match the behavior name and behavior result code. When the matching results are consistent, the raw data can be extracted to obtain the event data under the event dimension.
[0229] Furthermore, after acquiring the event data, the event data is counted according to the event statistical model. The specific content of the statistics can be set according to actual needs, such as counting the number of people who triggered each event and the number of times the event was triggered. In addition, the triggering time of each event can also be counted.
[0230] When the server needs to collect statistics on edge data in the edge dimension based on the target use case, it can first extract event data from the original data based on the event metadata. Furthermore, it obtains the edge metadata corresponding to the edge dimension and extracts the event data using the edge metadata to obtain the edge data in the edge dimension.
[0231] When extracting event data, the start and end event identifiers of the corresponding edge data are extracted from the event data based on the start and end event identifiers in the edge metadata. The start and end data are then aggregated and pruned to select event data that can form complete edge data. Finally, the direction of the directed edge is determined based on the start and end data, and the start and end data are integrated to obtain complete edge data.
[0232] Furthermore, after obtaining the edge data, statistics are performed on the edge data according to the edge statistical model, such as counting the number of triggers, the number of triggers, and the triggering time of each edge in the target use case.
[0233] When the server needs to count the path data under the path dimension according to the target use case, it can first extract event data from the original data based on the event metadata, and then extract the event data through the edge metadata to obtain the edge data. Then, based on the edge data, the edge data can be extracted again based on the path metadata to obtain the path data under the path dimension.
[0234] When extracting edge data, the edge data is extracted based on the edge identifier in the path metadata to obtain candidate edges. Then, the process identifier and edge quantity in the edge data corresponding to the candidate edge are matched with the process identifier and edge quantity in the path metadata. When the matching results are consistent, the path data under the path dimension is generated based on the edge data corresponding to the candidate edge.
[0235] Furthermore, after obtaining the path data, the path data is statistically analyzed according to the path statistical model, such as the number of people who are triggered, the number of times they are triggered, and the triggering time, etc., of each path indicated by the target use case.
[0236] It should be noted that when performing statistics on path data, you can also perform statistics on event data based on the event statistics model after obtaining event data, and similarly, perform statistics on edge data based on the edge statistics model after obtaining edge data. While performing statistics on path data, you can also perform statistics on event data and edge data, so as to achieve more fine-grained data statistics and improve the statistical efficiency of data statistics.
[0237] refer to Figure 16 , which shows a structural block diagram of a data statistics device provided by an embodiment of the present application.
[0238] The device comprises:
[0239] The metadata acquisition module 1601 is used to acquire dimension metadata of at least one dimension corresponding to a target use case, wherein the target use case is used to describe a target process in the process of using a target application, and the dimension metadata is used to describe data attributes of data under the corresponding dimension;
[0240] A data extraction module 1602 is configured to extract data from original data based on the dimension metadata of at least one dimension to obtain target dimension data corresponding to a target dimension, wherein the original data is data generated during the use of the target application;
[0241] The data statistics module 1603 is used to perform statistics on the target dimension data to obtain statistical data corresponding to the target dimension in the target use case.
[0242] Optionally, the data extraction module 1602 includes:
[0243] a first extraction unit, configured to, in response to the target dimension being a first dimension, extract data from the original data based on the first dimension metadata to obtain first dimension data corresponding to the first dimension;
[0244] The second extraction unit is used to extract data from the original data based on the first dimension metadata to the nth dimension metadata in response to the target dimension being the nth dimension, so as to obtain the nth dimension data corresponding to the nth dimension, wherein there is an association relationship between the dimensional data corresponding to adjacent dimensions, and n is an integer greater than or equal to 2.
[0245] Optionally, the second extraction unit is further configured to:
[0246] Extracting data from the original data based on the first-dimensional metadata to obtain first-dimensional data corresponding to the first dimension;
[0247] Data is extracted from the i-1th dimension data based on the i-th dimension metadata to obtain the i-th dimension data corresponding to the i-th dimension, where i is greater than 1 and i is less than or equal to n.
[0248] Optionally, the dimensions corresponding to the target use case include event dimension, edge dimension, and path dimension;
[0249] Optionally, the first extraction unit is further configured to:
[0250] Extracting data from the original data based on the event metadata to obtain event data corresponding to the event dimension;
[0251] Optionally, the second extraction unit is further configured to:
[0252] Extracting event data based on edge metadata to obtain edge data corresponding to the edge dimension; or
[0253] Data extraction is performed on the edge data based on the path metadata to obtain path data corresponding to the path dimension.
[0254] Optionally, the first extraction unit is further configured to:
[0255] Based on the behavior name and behavior result code in the event metadata, data extraction is performed on the original data to obtain the event data, where the behavior name is the name of the target behavior that generates the target event in the event metadata, and the behavior result code is used to characterize the result generated by the target behavior.
[0256] Optionally, the second extraction unit is further configured to:
[0257] Extracting edge starting point data from the event data based on the starting point event identifier in the edge metadata, the edge starting point data being event data of the event corresponding to the starting point event identifier;
[0258] Extracting edge endpoint data from the event data based on the endpoint event identifier in the edge metadata, the edge endpoint data being event data of an event corresponding to the endpoint event identifier;
[0259] The edge data is determined based on the edge start point data and the edge end point data, wherein the directed edge indicated by the edge data has the event indicated by the edge start point data as a start event and the event indicated by the edge end point data as an end event.
[0260] Optionally, the second extraction unit is further configured to:
[0261] extracting candidate edges from the edge data based on edge identifiers in the path metadata;
[0262] In response to the number of edges of the candidate edges having the same process identifier being consistent with the number of edges indicated by the path metadata, the path data is generated based on the edge data corresponding to the candidate edges.
[0263] Optionally, the data statistics module 1603 includes:
[0264] The data statistics unit is used to perform statistics on the target dimension data through a target dimension statistical model corresponding to the target dimension, so as to obtain the statistical data corresponding to the target dimension in the target use case.
[0265] Optionally, the dimensions corresponding to the target use case include event dimension, edge dimension, and path dimension;
[0266] The data statistics unit is further used for:
[0267] The event data is counted using an event statistical model to obtain event statistical data corresponding to the event dimension, wherein the event statistical data includes at least one of the number of event triggering times, the event triggering time, and the number of people triggering the event;
[0268] Performing statistics on the edge data using an edge statistics model to obtain edge statistics corresponding to the edge dimension, the edge statistics including at least one of the number of edge triggering times, the edge triggering time, and the number of edge triggering people;
[0269] The path data is counted using a path statistical model to obtain path statistical data corresponding to the path dimension, where the path statistical data includes at least one of the number of path triggering times, the path triggering time, and the number of people triggering the path.
[0270] Please refer to Figure 17, which shows a structural diagram of a server provided by an embodiment of the present application, which can be used to implement the data statistics method performed by the server provided in the above embodiment. The server 1700 includes a central processing unit (CPU) 1701, a system memory 1704 including a random access memory (RAM) 1702 and a read-only memory (ROM) 1703, and a system bus 1705 connecting the system memory 1704 and the central processing unit 1701. The server 1700 also includes a basic input / output system (I / O) 1706 that helps transmit information between various devices in the computer, and a large-capacity storage device 1707 for storing an operating system 1717, application programs 1716 and other program modules 1715.
[0271] The basic input / output system 1706 includes a display 1708 for displaying information and an input device 1709 such as a mouse and a keyboard for user input. The display 1708 and the input device 1709 are connected to the central processing unit 1701 via an input / output controller 1710 connected to the system bus 1705. The basic input / output system 1706 may also include an input / output controller 1710 for receiving and processing input from a variety of other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1710 also provides output to a display screen, printer, or other types of output devices.
[0272] The mass storage device 1707 is connected to the central processing unit 1701 via a mass storage controller (not shown) connected to the system bus 1705. The mass storage device 1707 and its associated computer-readable media provide non-volatile storage for the server 1700. In other words, the mass storage device 1707 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.
[0273] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1704 and mass storage device 1707 can be collectively referred to as memory.
[0274] According to various embodiments of the present application, the server 1700 may also be connected to a remote computer on a network such as the Internet for operation. That is, the server 1700 may be connected to a network 1712 via a network interface unit 1711 connected to the system bus 1705. Alternatively, the server 1700 may be connected to other types of networks or remote computer systems (not shown) using the network interface unit 1711.
[0275] The memory also includes one or more programs, which are stored in the memory and configured to be executed by the one or more central processing units 1701 .
[0276] The present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the data statistics method provided by any of the above exemplary embodiments.
[0277] The present application provides 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, causing the computer device to perform the data statistics method provided in the above-mentioned optional implementation.
[0278] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0279] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A data statistics method, characterized in that: The method comprises: Obtaining dimensional metadata of at least one dimension corresponding to a target use case, where the target use case is used to describe a target process in the process of using a target application, and the dimensional metadata is used to describe data attributes of data under the corresponding dimension. The target use case and the dimensional metadata are determined from a use case diagram corresponding to the target application. The dimensions corresponding to the target use case include an event dimension, an edge dimension, and a path dimension. The event dimension is a dimension corresponding to a process node in the use case diagram, the edge dimension is a dimension corresponding to a directed edge composed of adjacent process nodes in the use case diagram, and the path dimension is a dimension corresponding to a path composed of multiple directed edges in the use case diagram. The dimensional metadata includes event metadata, edge metadata, and path metadata. In response to the target dimension being the event dimension, extracting data from the original data based on the event metadata to obtain event data corresponding to the event dimension, the original data being data generated during use of the target application; In response to the target dimension being the edge dimension, extracting data from the event data based on the edge metadata to obtain edge data corresponding to the edge dimension; In response to the target dimension being the path dimension, extracting data from the edge data based on the path metadata to obtain path data corresponding to the path dimension; Statistics are performed on target dimension data to obtain statistical data corresponding to the target dimension in the target use case, where the target dimension data includes at least one of the event data, the edge data, and the path data.
2. The method according to claim 1, characterized in that The extracting the original data based on the event metadata to obtain event data corresponding to the event dimension includes: Based on the behavior name and behavior result code in the event metadata, data extraction is performed on the original data to obtain the event data, where the behavior name is the name of the target behavior that generates the target event in the event metadata, and the behavior result code is used to characterize the result generated by the target behavior.
3. The method according to claim 1, characterized in that The extracting the event data based on the edge metadata to obtain edge data corresponding to the edge dimension includes: Extracting edge starting point data from the event data based on the starting point event identifier in the edge metadata, the edge starting point data being event data of the event corresponding to the starting point event identifier; Extracting edge endpoint data from the event data based on the endpoint event identifier in the edge metadata, the edge endpoint data being event data of an event corresponding to the endpoint event identifier; The edge data is determined based on the edge start point data and the edge end point data, wherein the directed edge indicated by the edge data has the event indicated by the edge start point data as a start event and the event indicated by the edge end point data as an end event.
4. The method according to claim 1, wherein The extracting the edge data based on the path metadata to obtain the path data corresponding to the path dimension includes: Extracting candidate edges from the edge data based on edge identifiers in the path metadata; In response to the number of edges of the candidate edges having the same process identifier being consistent with the number of edges indicated by the path metadata, the path data is generated based on the edge data corresponding to the candidate edges.
5. The method according to any one of claims 1 to 4, characterized in that: The performing statistics on the target dimension data to obtain statistical data corresponding to the target dimension in the target use case includes: The target dimension data is statistically analyzed using a target dimension statistical model corresponding to the target dimension to obtain the statistical data corresponding to the target dimension in the target use case.
6. The method according to claim 5, characterized in that The performing statistics on the target dimension data by using a target dimension statistical model corresponding to the target dimension to obtain the statistical data corresponding to the target dimension in the target use case includes: The event data is counted using an event statistical model to obtain event statistical data corresponding to the event dimension, wherein the event statistical data includes at least one of the number of event triggering times, the event triggering time, and the number of people triggering the event; Performing statistics on the edge data using an edge statistics model to obtain edge statistics corresponding to the edge dimension, the edge statistics including at least one of the number of edge triggering times, the edge triggering time, and the number of edge triggering people; The path data is counted using a path statistical model to obtain path statistical data corresponding to the path dimension, where the path statistical data includes at least one of the number of path triggering times, the path triggering time, and the number of people triggering the path.
7. A data statistics device, characterized in that: The device comprises: A metadata acquisition module is configured to acquire dimensional metadata of at least one dimension corresponding to a target use case, wherein the target use case is used to describe a target process in the process of using a target application, and the dimensional metadata is used to describe data attributes of data under the corresponding dimension. The target use case and the dimensional metadata are determined from a use case diagram corresponding to the target application. The dimensions corresponding to the target use case include an event dimension, an edge dimension, and a path dimension. The event dimension is a dimension corresponding to a process node in the use case diagram, the edge dimension is a dimension corresponding to a directed edge composed of adjacent process nodes in the use case diagram, and the path dimension is a dimension corresponding to a path composed of multiple directed edges in the use case diagram. The dimensional metadata includes event metadata, edge metadata, and path metadata. a data extraction module configured to extract data from raw data based on the event metadata in response to the target dimension being the event dimension, to obtain event data corresponding to the event dimension, wherein the raw data is data generated during the use of the target application; In response to the target dimension being the edge dimension, extracting data from the event data based on the edge metadata to obtain edge data corresponding to the edge dimension; In response to the target dimension being the path dimension, extracting data from the edge data based on the path metadata to obtain path data corresponding to the path dimension; A data statistics module is used to perform statistics on target dimension data to obtain statistical data corresponding to the target dimension in the target use case, where the target dimension data includes at least one of the event data, the edge data, and the path data.
8. A server, characterized in that: The server includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data statistics method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data statistics method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and equipment for determining test coverage
CN107423222A