A model training and online analysis processing method and device

By using the classification model to predict the dimension combinations to be queried by the user in MOLAP data analysis, the data cube is automatically constructed, which solves the flexibility and accuracy problems caused by manually setting 'pruning' rules in the existing technology, and achieves more efficient data Cube construction.

CN112598128BActive Publication Date: 2024-08-23BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011488545.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-16
Publication Date
2024-08-23
Estimated Expiration
2040-12-16

AI Technical Summary

Technical Problem

Data analysis based on MOLAP in the existing technology requires manual setting of 'pruning' rules, resulting in poor flexibility and low accuracy in building a data cube, as well as high labor costs and low efficiency.

Method used

By determining the dimension combinations that the user has queried and their similar combinations from the data cube, as training samples, use the classification model for training, and predict the dimension combinations that the user wants to query, so as to automatically build a data cube and improve the flexibility and accuracy of building a data cube. Spend.

Benefits of technology

It reduces the stress and complexity when building a data cube, improves the flexibility and accuracy of building a data cube, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112598128B
    Figure CN112598128B
Patent Text Reader

Abstract

This specification discloses a model training and online analysis and processing method and device, which can first determine the queried dimension combination and other similar dimension combinations as training samples. And mark them according to the query information in the first time period. Afterwards, determine the feature vector of each training sample according to the query information in the second time period. And for each training sample, input the feature vector of the training sample into the classification model to be trained to determine the dimension combination type output by the model. Finally, with the goal of minimizing the difference between the dimension combination type and the annotation of the training sample, adjust the model parameters to predict the dimension combination to be queried by the user through the classification model, and pre-build a data cube for online analysis and processing. Based on the dimension combinations that the user has queried and similar, the classification model is trained, and the dimension combination to be queried by the user is predicted through the classification model, which improves the flexibility and accuracy of building the data cube.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a model training and online analysis and processing method and device. Background Art

[0002] Online Analytical Process (OLAP) is a type of software technology that enables users to quickly, consistently, and interactively store information converted from raw data from multiple perspectives, thereby gaining a deeper understanding of the data. There are many implementation methods based on different storage methods, among which multidimensional OLAP (MOLAP) stored in multidimensional arrays is a major implementation method.

[0003] At present, when performing data analysis based on MOLAP, it is necessary to obtain the multidimensional data to be analyzed from the data warehouse, and pre-calculate based on different dimensional combinations and the metrics under different dimensional combinations, and store the pre-calculated results as a "cube" structure. When performing data query based on MOLAP later, the multidimensional data corresponding to each cube can be directly queried. n Different combinations of dimensions.

[0004] Furthermore, as the number of data dimensions increases, the number of dimension combinations also increases exponentially, and the time complexity of MOLAP cube construction increases. When users perform data analysis, they often only involve specific dimension combinations. Therefore, in order to reduce the time required to build a cube, the existing technology requires manual "pruning" of each dimension combination. Among them, the commonly used methods include: rule-based processing based on aggregation groups, required dimensions, hierarchical dimensions, and joint dimensions.

[0005] Take the example of setting the required dimensions for "pruning". Assuming that the data to be analyzed can be analyzed based on three different dimensions, A, B, and C, there are 8 ways to combine different dimensions, namely A, B, C, AB, AC, BC, ABC. A is a manually set required dimension. When performing the "pruning" process, the dimension combination containing the required dimension A can be selected from the determined 8 dimension combinations, that is, A, AB, AC, ABC, and build a data cube based on the combination of the screened dimensions. Summary of the invention

[0006] The embodiments of this specification provide a model training and online analysis and processing method and device, which solves the problem in the prior art that "pruning" rules need to be manually set to screen the combinations of dimensions, resulting in poor flexibility and low accuracy in constructing a data cube.

[0007] The embodiments of this specification adopt the following technical solutions:

[0008] This specification provides a model training method, including:

[0009] From the dimension combinations included in the data cube, determine a number of dimension combinations that the user has searched within a preset time period, and determine a number of other dimension combinations that are similar to the dimension combinations;

[0010] The determined dimension combination and other dimension combinations are used as training samples, and each training sample is labeled according to the query information of the user in the first time period of the preset time length, wherein the labeled information includes positive samples or negative samples;

[0011] Determine the characteristic value of each training sample in each preset characteristic dimension according to the query information of the user in the second time period of the preset time length, and determine the characteristic vector of each training sample according to the determined characteristic values, wherein the characteristic dimension at least includes the number of queries;

[0012] For each training sample, input the feature vector of the training sample into the classification model to be trained, and determine the dimension combination type output by the classification model;

[0013] With the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample, the model parameters in the classification model are adjusted. The classification model is used to predict the dimension combination to be queried by the user, so as to construct a data cube based on the predicted dimension combination in advance.

[0014] Optionally, several other dimension combinations similar to the dimension combination are determined, specifically including:

[0015] For each dimension combination queried within a preset time period, a dimension combination that differs from the dimension combination by a preset number of dimensions is determined from the dimension combinations that are not queried and are included in the data cube as another dimension combination that is similar to the dimension combination.

[0016] Optionally, the method further comprises:

[0017] Determine the number of dimension combinations that have been queried within a preset time period, and the number of other dimension combinations;

[0018] Determine whether the ratio of the number of the queried dimension combinations to the number of the other dimension combinations meets a preset ratio condition;

[0019] If so, the full amount of other dimensional combinations has been determined;

[0020] If not, increase the preset number of dimensions, and re-determine, for each queried dimension combination, a dimension combination that differs from the dimension combination by the preset number of dimensions from the dimension combination from the dimension combination included in the data cube, and update other dimension combinations similar to the dimension combination based on the re-determined dimension combination, until the ratio of the number of the queried dimension combinations to the number of the other dimension combinations meets the preset ratio condition.

[0021] Optionally, the second period is earlier than the first period;

[0022] Determining the feature value of each training sample in each preset feature dimension according to the query information of the user in the second time period of the preset duration specifically includes:

[0023] For each training sample, determining the number of times the training sample is queried in the second time period according to the query information of the user in the second time period of the preset duration; and / or

[0024] Determine the number of users who have queried the training sample during the second period; and / or

[0025] Determine whether other training samples similar to the training sample have been queried within the second period of time; and / or

[0026] Determine the relevance of the training sample to other training samples; and / or

[0027] Determine a difference between the data distribution of the training sample in the second time period and the data distribution in the first time period;

[0028] According to the determined feature values ​​of the training sample in each preset feature dimension, the feature vector of the training sample is determined.

[0029] This specification provides an online analysis processing method, including:

[0030] Acquire business data required for building a data cube, wherein the business data is multidimensional data including several different dimensions;

[0031] Determine a number of dimension combinations for the business data query by the user within a preset time period;

[0032] Determine, according to the query information of the user in the second period within the preset time period, the feature value of each dimensional combination on each preset feature dimension, and determine, according to the determined feature values, the feature vector of each dimensional combination;

[0033] Inputting the feature vectors of each dimensional combination into a pre-trained classification model respectively, and determining the classification results of each dimensional combination output by the classification model, wherein the classification model is trained based on the method described in any one of claims 1 to 4 above;

[0034] According to the acquired business data, the measurement values ​​of each dimension combination whose classification results belong to the positive samples are determined, and the data cube is constructed according to the dimension combinations and measurement values ​​of each determined dimension combination belonging to the positive samples;

[0035] When a query request sent by the user is received, a metric value corresponding to the dimension combination included in the query request is determined from the constructed data cube, and the determined metric value is returned to the user.

[0036] Optionally, the method further comprises:

[0037] The classification model is updated according to the dimension combination queried by the user after the data cube is constructed and the model parameters in the pre-trained classification model.

[0038] Optionally, the method further comprises:

[0039] Determine whether the number of dimension combinations belonging to positive samples in the classification result is greater than a preset value;

[0040] If so, according to the confidence level of each dimension combination belonging to the positive sample, determine the dimension combination that meets the preset value;

[0041] If not, according to the difference between the number of dimension combinations belonging to the positive sample and a preset value, a positive sample that meets the difference is determined from the most recently determined positive samples in history.

[0042] This specification provides a model training device, including:

[0043] A first determination module determines, from among the dimension combinations included in the data cube, a number of dimension combinations that have been queried by the user within a preset time period, and determines a number of other dimension combinations that are similar to the dimension combinations;

[0044] A labeling module, which uses the determined dimension combination and other dimension combinations as training samples, and labels each training sample according to the query information of the user in the first time period of the preset time length, wherein the labeling information includes positive samples or negative samples;

[0045] A second determination module determines, according to the query information of the user in the second time period of the preset duration, the feature value of each training sample in each preset feature dimension, and determines the feature vector of each training sample according to the determined feature value, wherein the feature dimension at least includes the number of queries;

[0046] An input module, for each training sample, inputs the feature vector of the training sample into the classification model to be trained, and determines the dimension combination type output by the classification model;

[0047] An adjustment module adjusts the model parameters in the classification model with the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample. The classification model is used to predict the dimension combination to be queried by the user, so as to construct a data cube based on the predicted dimension combination in advance.

[0048] This specification provides an online analytical processing device, including:

[0049] An acquisition module is used to acquire business data required for constructing a data cube, wherein the business data is multidimensional data including several different dimensions;

[0050] A dimension combination determination module determines a number of dimension combinations that a user queries for the business data within a preset time period;

[0051] A feature vector determination module determines the feature values ​​of each dimensional combination on each preset feature dimension according to the query information of the user in the second period within the preset time length, and determines the feature vector of each dimensional combination according to the determined feature values;

[0052] An input module, inputting the feature vectors of each dimensional combination into a pre-trained classification model, respectively, to determine the classification results of each dimensional combination output by the classification model, wherein the classification model is trained based on the method described in any one of claims 1 to 4 above;

[0053] A construction module determines the measurement values ​​of each dimension combination of the classification results belonging to the positive samples according to the acquired business data, and constructs a data cube according to the determined dimension combinations belonging to the positive samples and their measurement values;

[0054] The query module, when receiving a query request sent by the user, determines the measurement value corresponding to the dimension combination from the constructed data cube according to the dimension combination contained in the query request, and returns the determined measurement value to the user.

[0055] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned model training method or online analysis and processing method.

[0056] An electronic device provided in this specification includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned model training method or online analysis and processing method when executing the program.

[0057] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0058] In this specification, we can first determine several dimension combinations that the user has queried within a preset time period, as well as several other dimension combinations that are similar to the dimension combination, from the dimension combinations contained in the data cube. Secondly, the determined dimension combinations and other dimension combinations are used as training samples, and each training sample is labeled according to the query information of the user in the first time period of the preset time. After that, the feature vectors of each training sample on each preset feature dimension are determined according to the query information of the user in the second time period of the preset time. Then, for each training sample, the feature vector of the training sample is input into the classification model to be trained to determine the dimension combination type output by the classification model. Finally, with the goal of minimizing the difference between the dimension combination type output by the classification model and the label of the training sample, the model parameters in the classification model are adjusted to predict the dimension combination to be queried by the user through the classification model, and pre-build the data cube. Based on the dimension combinations that the user has queried within the preset time and other similar dimension combinations, the model training is performed as training samples to obtain a classification model, and the classification model is used to predict the dimension combinations that the user is going to query, so as to construct a data cube based on the predicted dimension combinations, thereby improving the flexibility and accuracy of constructing the data cube. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0060] Figure 1 A schematic diagram of the structure of a data cube provided in an embodiment of this specification;

[0061] Figure 2a A schematic diagram of a tree structure including combinations of dimensions provided in an embodiment of this specification;

[0062] Figure 2b A schematic diagram of a tree structure corresponding to aggregation group pruning provided in an embodiment of this specification;

[0063] Figure 3A schematic diagram of a tree structure corresponding to pruning based on required dimensions provided in an embodiment of this specification;

[0064] Figure 4 A schematic diagram of a tree structure corresponding to joint dimension pruning provided in an embodiment of this specification;

[0065] Figure 5 A flowchart of a model training method provided in an embodiment of this specification;

[0066] Figure 6 A flowchart of an online analytical processing method provided in an embodiment of this specification;

[0067] Figure 7 A schematic diagram of the structure of a model training device provided in an embodiment of this specification;

[0068] Figure 8 A schematic diagram of the structure of an online analytical processing device provided in an embodiment of this specification;

[0069] Fig. 9 Schematic diagram of an electronic device for implementing the model training and online analysis and processing method provided in the embodiments of this specification. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0071] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0072] OLAP is a technology that allows users to quickly analyze data from multiple perspectives. Based on the different data storage formats, it is mainly divided into multidimensional OLAP (MOLAP), relational OLAP (ROLAP) and hybrid OLAP (HOLAP).

[0073] Among them, MOLAP is an OLAP method that stores data in the form of multidimensional arrays. It can perform aggregation calculations on the multidimensional data to be analyzed in advance according to the data dimensions and measurement values ​​defined by the user, and store the results of the pre-aggregation calculations as data cubes in the form of multidimensional arrays. When users need to query, they can directly search for the results of the pre-aggregation calculations in the data cube. By pre-calculating and storing the data cube, space is exchanged for time, the duration of real-time calculations is reduced, and data query efficiency can be accelerated.

[0074] Furthermore, when constructing a data cube in this specification, specifically, the business data to be analyzed can be obtained from the data warehouse first, wherein the business data is multidimensional data containing several different dimensions. Then, according to the data dimensions predefined by the user, the data dimensions are combined to determine the dimension combinations, wherein n data dimensions correspond to 2 n Then, based on the predefined metrics and the business data to be analyzed, aggregate calculations are performed on each dimensional combination to determine the metric value under each dimensional combination, where each dimensional combination and its metric is called a sub-cube cuboid. Finally, based on the determined cuboids, the cube corresponding to the business data is constructed.

[0075] Take the data analysis of user consumption as an example. Assume that the user defines the three dimensions of region, time and consumption type for data analysis of user consumption data, and defines the measurement as the user's consumption amount. When performing data analysis, eight dimension combinations can be combined, namely: Region, time, consumption type, region + time, region + consumption type, time + consumption type, region + time + consumption type.

[0076] Before data analysis, you can perform aggregate calculations based on the business data of user consumption, determine the consumption amounts under different dimensional combinations, and generate various cuboids based on the consumption amounts under each dimensional combination to build a data cube. Figure 1 As shown, Figure 1 The predefined data dimensions in the data cube include consumption type, region and time. The dimension members under the predefined region dimension include Beijing, Shanghai and Guangzhou, the dimension members under the time dimension include the first quarter of 2019, the second quarter of 2019 and the third quarter of 2019, and the dimension members under the consumption type include electronic goods consumption, daily necessities consumption and food consumption. When constructing a data cube, you can first determine the cuboid corresponding to each dimension combination through precalculation to further construct the cube.

[0077] However, as the number of data dimensions increases, the number of dimension combinations also grows exponentially, and the amount of calculation increases, resulting in increasing complexity in building a cube and increasing the time required for building. Since users often only analyze specific data dimension combinations when performing data analysis, in order to reduce the complexity of building a cube, it is often necessary to manually set "pruning" rules to screen the dimensional combinations, determine specific dimensional combinations, and generate cuboids to further build a data cube.

[0078] Common "pruning" rules mainly include aggregation groups, required dimensions, hierarchical dimensions, and joint dimensions.

[0079] Aggregation groups refer to the grouping of dimension combinations divided by users according to the dimension combinations they are concerned about. When building a data cube, you can only determine the cuboids under each aggregation group to reduce the pressure of building the cube. For example, assuming that the data to be analyzed contains three dimensions, ABC, and based on these three different dimensions, 2 dimensions can be determined. 3 = 8 combinations of dimensions, the corresponding tree structure is as follows Figure 2a As shown in the figure, if the user sets the aggregation group of interest to dimension combination AB during data analysis, there are 5 dimension combinations determined based on aggregation group AB, and the corresponding tree structure is as follows: Figure 2b As shown, it can be seen that the number of dimension combinations is reduced from 8 to 5, so the number of generated cuboids is reduced and the pressure of building the data cube is reduced.

[0080] Required dimensions refer to one or more data dimensions that users are interested in. Continuing with the example of data analysis of multidimensional data containing three dimensions ABC, assuming that the required dimension that users are interested in is a data dimension A, when "pruning" based on required dimension A, the dimension combinations containing required dimension A can be filtered out from various dimension combinations. The tree structure composed of the filtered dimension combinations is as follows: Figure 3 As shown, it can be seen that the number of dimension combinations increases by 2 3 =8, reduced to 5, so the number of cuboids generated is reduced, and the pressure of building data cube is reduced.

[0081] Hierarchical dimensions refer to predefined data dimensions with hierarchical relationships when performing data analysis. For example, for data dimensions with hierarchical relationships such as country, province, and city, since there is a one-to-many relationship between country and province and between province and city, when the province is determined, the country is also uniquely determined. Similarly, when the city is determined, the province and country are also uniquely determined. In other words, for the dimension combination composed of these three data dimensions, the region corresponding to country + province has the same meaning as the region corresponding to province, and the region corresponding to province + city, country + city, and country + province + city has the same meaning as the region corresponding to city. Therefore, the dimension combination with the same regional meaning can be "pruned" to reduce the number of generated cuboids and the pressure of building data cubes.

[0082] A joint dimension is a data dimension that combines several data dimensions as a whole. When building a data cube, users can set joint dimensions based on their needs and determine the combination of each dimension as a whole to reduce the number of generated cuboids and the pressure of building a data cube. For example, if data analysis is performed on multidimensional data containing three dimensions ABC, and the user defines the dimension combination AB as a joint dimension, the dimension combination AB can be taken as a whole to determine the dimension combinations of ABC, AB, C, and C to generate cuboids. like Figure 4 As shown, it can be seen that the number of dimension combinations increases by 2 3 =8, reduced to 4, the number of cuboids generated is smaller, and the pressure of building data cube is further reduced.

[0083] In summary, the existing technologies reduce the pressure and time of building data cubes by further screening the combinations of various dimensions through some pre-set "pruning" rules to reduce the number of generated cuboids, thereby reducing the pressure and time of building data cubes.

[0084] However, the above-mentioned method of setting "pruning" rules often requires manual participation, which has high labor costs and low efficiency. Furthermore, screening dimension combinations through fixed rules does not fully meet the needs of data analysis and has poor flexibility.

[0085] Based on the above problems existing in the prior art, this specification provides a model training and online analytical processing method, which performs model training based on the dimension combinations that users have queried in the past to obtain a classification model. When building a data cube, the classification model can be used to predict the data dimensions that the user will query, and based on the predicted dimension combinations, cuboids are pre-generated and cubes are built, thereby reducing the number of cuboids generated and the pressure of building cubes, and improving the flexibility and accuracy of construction.

[0086] Figure 5 A flow chart of a model training method provided in an embodiment of this specification may specifically include the following steps:

[0087] S100: Determine, from among the dimension combinations included in the data cube, a number of dimension combinations that have been queried by the user within a preset time period, and determine a number of other dimension combinations that are similar to the dimension combinations.

[0088] Based on the above analysis, the model training method provided in this specification is used to train a classification model so as to predict the dimension combination to be queried by the user through the classification model and the dimension combination that the user has queried. Therefore, when performing model training, the dimension combination that the user has queried within a period of time can be obtained first as training samples for model training.

[0089] It should be noted that the model training method provided in this specification can be specifically executed by a server that executes the model training process. The server can be a single server or a system composed of multiple servers, such as a distributed server, etc. This specification does not impose any restrictions on this and can be set according to specific needs.

[0090] Specifically, when there are many data dimensions, the number of dimension combinations also increases exponentially. In order to reduce the amount of calculation in the model training process and ensure the model training effect, the server can first determine the number of dimension combinations that the user has queried within a preset time from the various dimension combinations contained in the data cube to be queried.

[0091] Afterwards, in order to increase the sample richness, the server can determine several other dimension combinations similar to the dimension combination determined to have been queried, so as to extract feature information that the user has not queried from the other similar dimension combinations, and perform subsequent model training. The preset time can be set as needed, for example, to one year, and this manual does not limit this.

[0092] Further, when determining several other dimension combinations that are similar to the queried dimension combination, the server can determine, for each queried dimension combination, from the dimension combinations that are not queried by the user and are included in the data cube to be constructed, a dimension combination that differs from the dimension combination by a preset number of dimensions as another dimension combination that is similar to the dimension combination. The preset number of dimensions can be set as needed, and is usually set to differ by 1 dimension, which is not limited in this specification.

[0093] For example, assuming that the data cube contains three data dimensions A, B, and C, and the preset number of dimensions is 1, when it is determined that one of the queried dimension combinations is AB, it can be determined that the dimension combinations that differ from this dimension combination by 1 dimension are: A, B, and ABC.

[0094] Furthermore, based on the experience of model training, when the ratio of the number of dimension combinations that the user has queried in the training sample to the number of other similar dimension combinations meets certain ratio conditions, the model training effect is better. Therefore, in this specification, after determining other dimension combinations, the server can also determine the number of queried dimension combinations and the number of other dimension combinations, and judge whether the ratio of the number of queried dimension combinations to the number of other dimension combinations meets the preset ratio conditions. When the ratio conditions are met, it means that the full amount of other dimension combinations has been determined. When the ratio conditions are not met, in order to achieve better model training effects, the number of other dimension combinations is expanded. The server can also increase the preset number of dimensions, that is, the number of dimensions that differs from the queried dimension combinations, so as to determine a larger number of other dimension combinations.

[0095] When the number of preset dimensions increases, the server can re-determine, for each queried dimension combination, a dimension combination that differs from the dimension combination by the preset number of dimensions from the dimension combination from the dimension combinations contained in the data cube, and update other dimension combinations similar to the dimension combination according to the re-determined dimension combination, until the ratio of the number of queried dimension combinations to the number of other similar dimension combinations meets the preset ratio condition. The preset ratio condition can be set as needed, for example, it can be set to a ratio less than 4, and this specification does not limit this.

[0096] For example: Assume that the data dimensions to be analyzed include four dimension combinations of A, B, C, and D, and the dimension combination that the user has queried is AB. The initial preset number of dimensions is 1, and the similar dimension combinations that can be determined are A, B, and ABC. When the number of the queried dimension combinations determined does not meet the preset ratio condition with the number of other dimension combinations, the preset number of dimensions can be increased to 2. At this time, the similar dimension combinations that can be determined are ABCD, and the number of the queried dimension combination and the number of other dimension combinations do not meet the preset ratio condition. Therefore, it can be determined that the dimension combinations similar to the queried dimension combination are: A, B, ABC, ABCD.

[0097] S102: Using the determined dimension combination and other dimension combinations as training samples, and labeling each training sample according to the query information of the user within the first time period of the preset time length.

[0098] In one or more embodiments of the present specification, after determining the dimension combinations that the user has queried within a preset time period and other similar dimension combinations through step S100, training samples and their annotations can be determined based on the determined dimension combinations to perform model training.

[0099] Specifically, the server may use the determined dimension combinations that have been queried by the user, and other similar dimension combinations, as training samples.

[0100] Due to the continuous updating of business data, the data cube is also periodically rebuilt for user query. Therefore, when training the model, it should also be trained with sample data within a construction cycle. Therefore, after determining the training sample, the server can use the dimension combination that the user has queried in the first period of time as a positive sample and the dimension combination that the user has not queried in the first period of time as a negative sample based on the user's query information in the first period of time of the preset duration. Among them, the first period is the same as the duration of the construction cycle to ensure a good model prediction effect.

[0101] S104: Determine the characteristic value of each training sample in each preset characteristic dimension according to the query information of the user in the second time period of the preset duration, and determine the characteristic vector of each training sample according to the determined characteristic values.

[0102] In one or more embodiments of the present specification, after the training samples and their annotations are determined, feature information of the training samples can be determined to train the classification model based on the feature information of the training samples.

[0103] Specifically, the server may first determine, for each dimension combination used as a training sample, the number of times the dimension combination is queried in the second time period of a preset duration based on the query information of the user in the second time period as the feature value of the dimension combination in a preset feature dimension.

[0104] According to the query information of the users in the second time period of preset duration, the number of users who have queried the dimension combination in the second time period is determined as the feature value of the dimension combination in a preset feature dimension.

[0105] According to the query information of the user in the second time period of preset duration, it is determined whether other dimension combinations similar to the dimension combination are queried in the second time period as the feature value of the dimension combination in a preset feature dimension.

[0106] According to the query information of the user in the second period of the preset time, the dimension combinations as training samples are clustered to determine the clustering results. And according to the clustering results, the correlation between the dimension combination and other dimension combinations is determined as the feature value of the dimension combination on a preset feature dimension. Among them, the dimension combinations with similar query times belong to the same cluster.

[0107] According to the query information of the user in the second time period of preset duration and the query information in the adjacent third time period, the difference between the data distribution of the dimension combination in the second time period and the data distribution in the third time period is determined as the feature value of the dimension combination in a preset feature dimension. The third time period is earlier than the second time period and has the same duration as the construction period.

[0108] Finally, according to the determined feature value of the dimension combination in at least one preset feature dimension, the feature vector of the dimension combination is determined. The second time period is a time period adjacent to the first time period, which is before the first time period, and the second time period is the same as the third time period, which is the construction period of the data cube.

[0109] It should be noted that when determining whether other dimension combinations similar to the dimension combination are queried within the second time period, other dimension combinations similar to the dimension combination can be determined based on the method in the above step S100, and this specification will not go into details.

[0110] Furthermore, when determining the correlation between the dimension combination and other dimension combinations, clustering can be performed based on the number of queries of each dimension combination as a training sample through a density-based clustering algorithm (Density-Based Spatial Clustering of Applications with, DBSCAN), and clusters with similar query times can be determined. Among them, the correlation between dimension combinations belonging to the same cluster is relatively high. The clustering algorithm can also use other clustering algorithms, which can be set as needed.

[0111] Furthermore, when determining the difference between the data distribution of the dimension combination in the second time period and the data distribution in the third time period, specifically, the server may first determine the data distribution of the dimension combination in the second time period, that is, the measurement value of the combination between the dimension members corresponding to the dimension combination. And determine the data distribution of the dimension combination in the third time period. Then, calculate the JS divergence of the two data distributions to determine the difference in data distribution of the dimension combination in the two time periods.

[0112] For example, assuming that the preset time period is the past year, the second period is November, and the third period is October, the dimension combination used as the training sample is (region, consumption type), where the dimension members of the region include Beijing and Shanghai, the dimension members of the consumption type include food consumption and daily necessities consumption, and the measurement value is the consumption amount. The data distribution in the second period and the data distribution in the third period are shown in Table 1 below.

[0113]

[0114]

[0115] Table 1

[0116] According to Table 1, it can be determined that the consumption amount of this dimension combination (Beijing, food consumption) in October accounts for 300 / (300+200+400+500)=3 / 14 of the total consumption amount, and the consumption amount in November accounts for 350 / (350+300+850+900)=7 / 48 of the total consumption amount. The JS divergence of the dimension member combination can be determined based on the probability values ​​of the dimension member combination in different time periods, and the data distribution difference of the dimension combination in different time periods can be determined based on the JS divergence of each dimension member combination.

[0117] In addition, in other embodiments of this specification, when determining the characteristic value of each dimension combination, the dimension combination can also be used in a certain period within the second period, and the characteristic value of each characteristic dimension can be preset. For example, when the second period is November, the number of queries by users in the last week of November can be determined as the characteristic value of the dimension combination in a preset characteristic dimension. The duration corresponding to each preset characteristic dimension can also be different, which can be set as needed, and this specification does not limit this.

[0118] S106: For each training sample, input the feature vector of the training sample into the classification model to be trained, and determine the dimension combination type output by the classification model.

[0119] S108: Adjusting model parameters in the classification model with the goal of minimizing the difference between the dimension combination type output by the classification model and the annotations of the training samples.

[0120] In one or more embodiments of the present specification, after the feature information of the training samples is determined, the classification model can be trained based on the feature information and labeling information of the training samples.

[0121] Specifically, for each training sample, the server may first input the feature vector of the training sample into the classification model to be trained to determine the dimension combination type output by the classification model. The dimension combination type includes positive samples and negative samples, and the positive sample is the type of the dimension combination predicted to be queried by the user.

[0122] Afterwards, the model parameters in the classification model are adjusted with the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample. The classification model is used to predict the dimension combination to be queried by the user, so as to pre-build a data cube based on the predicted dimension combination. The classification model can be a logistic regression, a decision tree, a multi-layer perceptron, etc., which can achieve the classification of the type to which the dimension combination belongs. The specific setting can be as needed, and this manual does not limit this.

[0123] based on Figure 1 The model training method shown can first determine, from the various dimension combinations contained in the data cube, several dimension combinations that the user has queried within a preset time period, as well as several other dimension combinations that are similar to the dimension combination. Secondly, the determined dimension combinations and other dimension combinations are used as training samples, and each training sample is labeled according to the query information of the user in the first period of the preset time period. After that, the feature vectors of each training sample on each preset feature dimension are determined according to the query information of the user in the second period of the preset time period. Then, for each training sample, the feature vector of the training sample is input into the classification model to be trained to determine the dimension combination type output by the classification model. Finally, with the goal of minimizing the difference between the dimension combination type output by the classification model and the label of the training sample, the model parameters in the classification model are adjusted to predict the dimension combination to be queried by the user through the classification model, and pre-construct the data cube. Based on the dimension combinations that the user has queried within the preset time and other similar dimension combinations, the model is trained as training samples to obtain a classification model, and the classification model is used to predict the dimension combinations to be queried by the user, so as to build a data cube based on the predicted dimension combinations, reducing the number of constructed cuboids and further reducing the cube construction time.

[0124] In addition, in step S100 of this specification, in order to further reduce the computing resources for model training, when it is determined that the number of dimension combinations that the user has queried within the preset time is large, the server can divide each dimension combination into several groups according to the frequency of each dimension combination being queried within the preset time, and extract the dimension combination that meets the preset threshold from each group. Different groups correspond to different frequency ranges. The preset threshold can be set as needed, and this specification does not limit this.

[0125] When determining the correlation between each dimension combination and other dimension combinations in step S104 of the present specification, since the correlation calculation is complicated and the characteristic value changes little in a short period of time, it can be updated periodically to reduce the number of calculations.

[0126] The model training method provided in this specification can be trained to obtain a classification model, which can predict whether each dimension combination belongs to a positive sample or a negative sample based on the feature vector of each dimension combination input within a certain period of time. Among them, the positive sample refers to the dimension combination queried by the user in the next period of time.

[0127] This specification also provides an online analytical processing method. Before building a data cube, the above-mentioned trained classification model can be applied to predict the dimension combinations that users may query, and generate cuboids to build data cubes by aggregating metric values ​​based on the predicted dimension combinations. By predicting whether each dimension combination will be queried by users and building a cube based on the predicted dimension combination, the number of generated cuboids is reduced, further reducing the pressure and time of building the cube.

[0128] Figure 6 A schematic diagram of an online analytical processing method flow provided in an embodiment of this specification, wherein the classification model used can adopt the above Figure 5 The model training method is used for training. Specifically, the following steps may be included:

[0129] S200: Acquire business data required for building a data cube.

[0130] The MOLAP method provided in this specification is a method of generating several cuboids through pre-calculation and building a data cube based on the business data to be analyzed and the combinations of dimensions before data analysis. Therefore, when performing data analysis based on the combinations of dimensions that the user is interested in, the metric values ​​of the combinations of dimensions that the user is interested in can be conveniently and quickly queried from the cuboids contained in the cube.

[0131] Therefore, in this specification, the business data required for building the cube can be obtained first, so as to build the cube through subsequent steps. When performing data analysis, it is usually analyzed from a combination of multiple dimensions that users are concerned about, so the business data to be analyzed is multidimensional data containing several different data dimensions.

[0132] It should be noted that the online analytical processing method provided in this specification can be specifically executed by a server that executes MOLAP. The server can be a single server or a system composed of multiple servers, such as a distributed server. This specification does not impose any restrictions on this and can be specifically set according to needs.

[0133] S202: Determine several dimension combinations that the user queries for the business data within a preset time period.

[0134] In one or more embodiments of the present specification, after the business data to be analyzed is obtained, the dimension combinations of multiple dimensions corresponding to the business data can be determined to distinguish the target dimension combination and other dimension combinations through a classification model.

[0135] However, since the classification model is trained based on the dimension combinations that the user has queried within the preset time period, when the classification model is applied to classify the dimension combinations, the server also needs to determine the dimension combinations that the user has queried for the business data within the preset time period based on the current time. The preset time period is the time period set when the model is trained.

[0136] S204: Determine the feature value of each dimensional combination in each preset feature dimension according to the query information of the user in the second time period within the preset time length, and determine the feature vector of each dimensional combination according to the determined feature values.

[0137] In one or more embodiments of the present specification, after determining the several dimension combinations that have been queried, it is also necessary to determine the feature vector of each dimension combination as an input of a classification model for predicting the dimension combination to be queried by the user.

[0138] Specifically, the server may determine the characteristic values ​​of each dimensional combination on each preset characteristic dimension according to the query information of the user in the second time period of the preset duration, and determine the characteristic vector of each dimensional combination according to the determined characteristic values.

[0139] For example, if the preset time is one year, when it is necessary to predict the dimension combinations that users may query in May, the dimension combinations that users have queried within one year from the current time can be determined, and the feature vectors of the queried dimension combinations in April on each feature dimension can be determined. Based on the feature vectors of each dimension combination in April, the classification model can be used to predict the dimension combinations that users may query in May.

[0140] The specific process of determining the feature vector of each dimensional combination has been described in detail in the above step S104, and will not be repeated in this specification.

[0141] S206: Input the feature vectors of each dimensional combination into the pre-trained classification model respectively, and determine the classification results of each dimensional combination output by the classification model.

[0142] In one or more embodiments of the present specification, after determining the feature vectors of each dimensional combination, the classification results of each dimensional combination can be determined based on a pre-trained classification model, and subsequently a data cube can be constructed based on the dimensional combinations that belong to positive samples in the classification results.

[0143] Specifically, for each determined dimension combination, the feature vector of the dimension combination is input into a pre-trained classification model to determine the classification result of the dimension combination output by the classification model. When the classification result is a positive sample, it indicates that the dimension combination is predicted to be queried by the user.

[0144] S208: Determine the measurement values ​​of each dimension combination whose classification result belongs to the positive sample according to the acquired business data, and construct a data cube according to the determined dimension combinations belonging to the positive sample and their measurement values.

[0145] In one or more embodiments of the present specification, after the positive samples to be queried by the user are predicted through the classification model, a data cube can be constructed based on the predicted dimension combination belonging to the positive samples.

[0146] Specifically, the server can determine the metric values ​​of each dimension combination of the classification result belonging to the positive sample based on the acquired business data. The metric is a business indicator predefined by the user. The classification model is trained by the above-mentioned model training method, and this specification will not be repeated here.

[0147] Afterwards, several cuboids are generated according to the determined dimension combinations and measurement values ​​of each positive sample, and a data cube is constructed based on the generated cuboids.

[0148] S210: When a query request sent by a user is received, a metric value of the dimension combination is determined from the constructed data cube according to the dimension combination included in the query request, and the determined metric value of the dimension combination is returned to the user.

[0149] In one or more embodiments of the present specification, when the data cube is constructed, the pre-calculated cuboid can be directly found from the constructed cube during data analysis.

[0150] Specifically, when receiving a query request sent by a user, the server can determine the cuboid corresponding to the dimension combination from the constructed data cube based on the dimension combination contained in the query request, determine the measurement value of the dimension combination from the cuboid, and return the determined measurement value of the dimension combination to the user.

[0151] based on Figure 6 The online analytical processing method shown can first obtain the business data required for building a data cube, and determine several dimension combinations that the user has queried for the business data within a preset time period. Afterwards, according to the query information of the user in the second period within the preset time period, the feature vectors of each dimension combination on each preset feature dimension are determined. Then, the feature vectors of each dimension combination are respectively input into the pre-trained classification model to determine the classification results of each dimension combination, and according to the acquired business data, the metric values ​​of each dimension combination whose classification results belong to positive samples are determined to build a data cube. Finally, when a query request is received, the metric value of the dimension combination in the corresponding query information is determined from the constructed data cube and returned to the user. Based on the dimension combinations that the user has queried within the preset time period and their feature vectors in the historical period, the dimension combinations to be queried by the user are predicted through the trained classification model, so as to build a data cube based on the predicted dimension combinations, thereby improving the flexibility and accuracy of the construction.

[0152] In addition, since users continue to query new dimension combinations and perform data analysis, in order to ensure the accuracy and real-time performance of model predictions, it is also possible to periodically re-determine training samples and re-train the model.

[0153] Alternatively, in order to save model training time and cost while ensuring the real-time performance of the model, the above classification model can also be updated according to the user's new query data, so as to predict the dimension combination of the user's next query based on the updated classification model and pre-build the data cube.

[0154] Specifically, the server can perform incremental learning based on the dimension combination of the user's new query and the model parameters of the trained classification model to update the trained classification model. The classification model can be updated by using an integrated learning method. Model training by using an integrated learning method is a mature existing technology and will not be described in detail in this specification.

[0155] In step S202 of this specification, in order to avoid too many dimensional combinations belonging to positive samples obtained through the classification model, the amount of calculation is large when constructing the cube, and to avoid too few dimensional combinations belonging to positive samples, resulting in insufficient data in the constructed cube.

[0156] Therefore, in this specification, after the dimension combinations belonging to the positive samples are determined through the classification model, it can be determined whether the number of dimension combinations belonging to the positive samples exceeds the preset threshold. When it is determined that the number exceeds, the confidence of each dimension combination output by the classification model that it belongs to the positive sample can be used to determine the dimension combination that meets the preset threshold from each dimension combination. For example, assuming that the number of dimension combinations determined to belong to the positive sample is 100 and the preset threshold is 50, 50 dimension combinations with higher confidence can be selected according to the confidence level. When it is determined that the number is insufficient, the difference between the number of dimension combinations belonging to the positive sample and the preset threshold can also be determined, and the positive sample that meets the difference can be determined from the dimension combination that was most recently determined to belong to the positive sample in history.

[0157] based on Figure 5 The model training method shown in the embodiment of this specification also provides a structural schematic diagram of a model training device, such as Figure 7 shown.

[0158] Figure 7 A schematic diagram of the structure of a model training device provided in an embodiment of this specification, the device comprising:

[0159] The first determination module 300 determines, from the dimension combinations included in the data cube, a number of dimension combinations that the user has searched within a preset time period, and determines a number of other dimension combinations that are similar to the dimension combinations;

[0160] The labeling module 302 uses the determined dimension combination and other dimension combinations as training samples, and labels each training sample according to the query information of the user in the first period of the preset time, wherein the labeling information includes positive samples or negative samples;

[0161] The second determination module 304 determines the feature value of each training sample in each preset feature dimension according to the query information of the user in the second time period of the preset time length, and determines the feature vector of each training sample according to the determined feature value, wherein the feature dimension at least includes the number of queries;

[0162] An input module 306, for each training sample, inputs the feature vector of the training sample into the classification model to be trained, and determines the dimension combination type output by the classification model;

[0163] The adjustment module 308 adjusts the model parameters in the classification model with the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample. The classification model is used to predict the dimension combination to be queried by the user, so as to construct a data cube in advance based on the predicted dimension combination.

[0164] Optionally, the first determination module 300 is specifically used to determine, for each dimension combination queried within a preset time length, from the dimension combinations that are not included in the queried dimension combination and are contained in the data cube, a dimension combination that differs from the dimension combination by a preset number of dimensions as other dimension combinations similar to the dimension combination.

[0165] Optionally, the first determination module 300 is also used to determine the number of dimension combinations that have been queried within a preset time length, and the number of other dimension combinations, and to determine whether the ratio of the number of dimension combinations that have been queried to the number of other dimension combinations meets a preset ratio condition. If so, the full amount of other dimension combinations has been determined; if not, the preset number of dimensions is increased, and for each queried dimension combination, the dimension combination that differs from the dimension combination by a preset number of dimensions is determined from the dimension combinations included in the data cube, and other dimension combinations that are close to the dimension combination are updated based on the re-determined dimension combination, until the ratio of the number of queried dimension combinations to the number of other dimension combinations meets the preset ratio condition.

[0166] Optionally, the second time period is earlier than the first time period, and the second determination module 304 is specifically used to determine, for each training sample, based on the query information of the user in the second time period of the preset duration, the number of times the training sample is queried in the second time period, and / or the number of users who have queried the training sample in the second time period, and / or whether other training samples similar to the training sample are queried in the second time period, and / or determine the correlation between the training sample and other training samples, and / or determine the difference between the data distribution of the training sample in the second time period and the data distribution in the first time period, and determine the feature vector of the training sample based on the feature values ​​of the training sample in each preset feature dimension.

[0167] based on Figure 6 The embodiment of the specification also provides a structural schematic diagram of an online analysis processing device, such as Figure 8 shown.

[0168] Figure 8 A schematic diagram of the structure of an online analytical processing device provided in an embodiment of this specification, the device includes:

[0169] An acquisition module 400 acquires business data required for constructing a data cube, wherein the business data is multidimensional data including several different dimensions;

[0170] A dimension combination determination module 402 determines a number of dimension combinations that a user queries for the business data within a preset time period;

[0171] The feature vector determination module 404 determines the feature values ​​of each dimensional combination on each preset feature dimension according to the query information of the user in the second period within the preset time length, and determines the feature vector of each dimensional combination according to the determined feature values;

[0172] An input module 406, inputs the feature vectors of each dimensional combination into a pre-trained classification model, respectively, to determine the classification results of each dimensional combination output by the classification model, wherein the classification model is trained based on the method described in any one of claims 1 to 4 above;

[0173] The construction module 408 determines the measurement values ​​of each dimension combination of the classification result belonging to the positive sample according to the acquired business data, and constructs a data cube according to the determined dimension combinations belonging to the positive sample and their measurement values;

[0174] When receiving a query request sent by the user, the query module 410 determines the metric value corresponding to the dimension combination from the constructed data cube according to the dimension combination included in the query request, and returns the determined metric value to the user.

[0175] Optionally, the input module 406 is further used to update the classification model according to the dimension combination queried by the user after the data cube is constructed, and the model parameters in the pre-trained classification model.

[0176] Optionally, the construction module 408 is also used to determine whether the number of dimension combinations belonging to positive samples in the classification results is greater than a preset value. If so, according to the confidence that each dimension combination belongs to the positive sample, the dimension combination that meets the preset value is determined; if not, according to the difference between the number of dimension combinations belonging to the positive sample and the preset value, the positive sample that meets the difference is determined from the most recently determined positive samples in history.

[0177] The present specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 5 The model training method provided or Figure 6 Provided online analytical processing method.

[0178] based on Figure 5 The model training method shown in FIG6 and the online analysis and processing method shown in FIG6 , the embodiment of this specification also proposes Fig. 9 The schematic structure diagram of the electronic device shown in FIG. Fig. 9At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 5 The model training method shown or Figure 6 The online analytical processing method shown.

[0179] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0180] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0181] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0182] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0183] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0186] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0188] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0189] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0190] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0191] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0192] It will be appreciated by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0193] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0194] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0195] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A model training method, It is characterized in that include: From the dimension combinations included in the data cube, determine a number of dimension combinations that the user has searched within a preset time period, and determine a number of other dimension combinations that are similar to the dimension combinations; The determined dimension combination and other dimension combinations are used as training samples, and each training sample is labeled according to the query information of the user in the first time period of the preset time length, wherein the labeled information includes positive samples or negative samples; Determine the characteristic value of each training sample in each preset characteristic dimension according to the query information of the user in the second time period of the preset time length, and determine the characteristic vector of each training sample according to the determined characteristic values, wherein the characteristic dimension at least includes the number of queries; For each training sample, input the feature vector of the training sample into the classification model to be trained, and determine the dimension combination type output by the classification model; With the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample, the model parameters in the classification model are adjusted. The classification model is used to predict the dimension combination to be queried by the user, so as to construct a data cube based on the predicted dimension combination in advance.

2. The method according to claim 1, It is characterized in that Determine several other dimension combinations similar to the dimension combination, specifically including: For each dimension combination queried within a preset time period, a dimension combination that differs from the dimension combination by a preset number of dimensions is determined from the dimension combinations that are not queried and are included in the data cube as another dimension combination that is similar to the dimension combination.

3. The method according to claim 2, It is characterized in that The method further comprises: Determine the number of dimension combinations that have been queried within a preset time period, and the number of other dimension combinations; Determine whether the ratio of the number of the queried dimension combinations to the number of the other dimension combinations meets a preset ratio condition; If so, the full amount of other dimensional combinations has been determined; If not, increase the preset number of dimensions, and re-determine, for each queried dimension combination, a dimension combination that differs from the dimension combination by the preset number of dimensions from the dimension combination from the dimension combination included in the data cube, and update other dimension combinations similar to the dimension combination based on the re-determined dimension combination, until the ratio of the number of the queried dimension combinations to the number of the other dimension combinations meets the preset ratio condition.

4. The method according to claim 1, It is characterized in that The second period is earlier than the first period; Determining the feature value of each training sample in each preset feature dimension according to the query information of the user in the second time period of the preset duration specifically includes: For each training sample, determining the number of times the training sample is queried in the second time period according to the query information of the user in the second time period of the preset duration; and / or Determine the number of users who have queried the training sample during the second period; and / or Determine whether other training samples similar to the training sample have been queried within the second period of time; and / or Determine the relevance of the training sample to other training samples; and / or Determine a difference between the data distribution of the training sample in the second time period and the data distribution in the first time period; According to the determined feature values ​​of the training sample in each preset feature dimension, the feature vector of the training sample is determined.

5. An online analytical processing method, It is characterized in that include: Acquire business data required for building a data cube, wherein the business data is multidimensional data including several different dimensions; Determine a number of dimension combinations for the business data query by the user within a preset time period; Determine, according to the query information of the user in the second period within the preset time period, the feature value of each dimensional combination on each preset feature dimension, and determine, according to the determined feature values, the feature vector of each dimensional combination; Inputting the feature vectors of each dimensional combination into a pre-trained classification model respectively, and determining the classification results of each dimensional combination output by the classification model, wherein the classification model is trained based on the method described in any one of claims 1 to 4 above; According to the acquired business data, the measurement values ​​of each dimension combination whose classification results belong to the positive samples are determined, and the data cube is constructed according to the dimension combinations and measurement values ​​of each determined dimension combination belonging to the positive samples; When a query request sent by the user is received, a metric value corresponding to the dimension combination included in the query request is determined from the constructed data cube, and the determined metric value is returned to the user.

6. The method according to claim 5, It is characterized in that The method further comprises: The classification model is updated according to the dimension combination queried by the user after the data cube is constructed and the model parameters in the pre-trained classification model.

7. The method according to claim 5, It is characterized in that The method further comprises: Determine whether the number of dimension combinations belonging to positive samples in the classification result is greater than a preset value; If so, according to the confidence level of each dimension combination belonging to the positive sample, determine the dimension combination that meets the preset value; If not, according to the difference between the number of dimension combinations belonging to the positive sample and a preset value, a positive sample that meets the difference is determined from the most recently determined positive samples in history.

8. A model training device, It is characterized in that Specifically include: A first determination module determines, from among the dimension combinations included in the data cube, a number of dimension combinations that have been queried by the user within a preset time period, and determines a number of other dimension combinations that are similar to the dimension combinations; A labeling module, which uses the determined dimension combination and other dimension combinations as training samples, and labels each training sample according to the query information of the user in the first time period of the preset time length, wherein the labeling information includes positive samples or negative samples; A second determination module determines, according to the query information of the user in the second time period of the preset duration, the feature value of each training sample in each preset feature dimension, and determines the feature vector of each training sample according to the determined feature value, wherein the feature dimension at least includes the number of queries; An input module, for each training sample, inputs the feature vector of the training sample into the classification model to be trained, and determines the dimension combination type output by the classification model; An adjustment module adjusts the model parameters in the classification model with the goal of minimizing the difference between the dimension combination type output by the classification model and the annotation of the training sample. The classification model is used to predict the dimension combination to be queried by the user, so as to construct a data cube based on the predicted dimension combination in advance.

9. An online analytical processing device, It is characterized in that Specifically include: An acquisition module is used to acquire business data required for constructing a data cube, wherein the business data is multidimensional data including several different dimensions; A dimension combination determination module determines a number of dimension combinations that a user queries for the business data within a preset time period; A feature vector determination module determines the feature values ​​of each dimensional combination on each preset feature dimension according to the query information of the user in the second period within the preset time length, and determines the feature vector of each dimensional combination according to the determined feature values; An input module, inputting the feature vectors of each dimensional combination into a pre-trained classification model, respectively, to determine the classification results of each dimensional combination output by the classification model, wherein the classification model is trained based on the method described in any one of claims 1 to 4 above; A construction module determines the measurement values ​​of each dimension combination of the classification results belonging to the positive samples according to the acquired business data, and constructs a data cube according to the determined dimension combinations belonging to the positive samples and their measurement values; The query module, when receiving a query request sent by the user, determines the measurement value corresponding to the dimension combination from the constructed data cube according to the dimension combination contained in the query request, and returns the determined measurement value to the user.

10. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 4 or claims 5 to 7 is implemented.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method described in any one of claims 1 to 4 or claims 5 to 7 is implemented.

Citation Information

Patent Citations

  • Data dimension processing method

    CN104965886A

  • Method and device for optimizing multidimensional cube model

    CN106600067A

  • OLAP pre-calculation model, automatic modeling method, and automatic modeling system

    US20180285439A1