CN109522340B - Data statistical method, device and equipment - Google Patents

Data statistical method, device and equipment Download PDF

Info

Publication number
CN109522340B
CN109522340B CN201811390454.9A CN201811390454A CN109522340B CN 109522340 B CN109522340 B CN 109522340B CN 201811390454 A CN201811390454 A CN 201811390454A CN 109522340 B CN109522340 B CN 109522340B
Authority
CN
China
Prior art keywords
parameter
statistical
data
statistical model
index
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811390454.9A
Other languages
Chinese (zh)
Other versions
CN109522340A (en
Inventor
赵亚丽
穆帅
樊恒阳
陆文婷
郑维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Nsfocus Technologies Inc
Beijing NSFocus Information Security Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nsfocus Technologies Inc, Beijing NSFocus Information Security Technology Co Ltd filed Critical Nsfocus Technologies Inc
Priority to CN201811390454.9A priority Critical patent/CN109522340B/en
Publication of CN109522340A publication Critical patent/CN109522340A/en
Application granted granted Critical
Publication of CN109522340B publication Critical patent/CN109522340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data statistical method, a data statistical device and data statistical equipment, which are used for reducing the cost of a statistical system. The data statistical method comprises the following steps: obtaining a first parameter configured by a user, wherein the first parameter comprises a measurement scale parameter and/or a measurement index parameter; determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein one statistical model in the at least one preset statistical model is used for realizing a statistical method; and carrying out statistical analysis on the data in the database according to the first statistical model to obtain a statistical result.

Description

Data statistical method, device and equipment
Technical Field
The application relates to the field of software application, in particular to a data statistical method, a device and equipment.
Background
With the development of big data technology, the demands of calculating the data concentration trend, the discrete degree, the relevant strength and the like through a data statistical device are more and more.
At present, a data statistical device is mainly customized and developed by adopting a description statistical method according to statistical requirements of users, different description statistical methods need to be customized and developed according to different user requirements, and when the statistical requirements of later-stage users are increased, corresponding statistical grammars need to be added in the data statistical device to realize the purpose, so that the development cost of the statistical device is higher.
Disclosure of Invention
The embodiment of the application provides a data statistical method, a data statistical device and data statistical equipment, which are used for reducing the cost of a statistical system.
The embodiment of the application provides the following specific technical scheme:
in a first aspect, a data statistics method is provided, which is applied to a data statistics apparatus, and the method includes:
obtaining a first parameter configured by a user, wherein the first parameter comprises a measurement scale parameter and/or a measurement index parameter;
determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein one statistical model in the at least one preset statistical model is used for realizing a statistical method;
and carrying out statistical analysis on the data in the database according to the first statistical model to obtain a statistical result.
In the embodiment of the application, directly model corresponding statistical method, reduce the degree of coupling of data statistics device function, the user is when using simultaneously, only need dispose first parameter, confirm the statistics module that matches with first parameter from corresponding model according to first parameter, directly call statistical model and realize statistical method, compare in current statistical device, when the user has new statistical demand, only need dispose corresponding parameter can, convenience of customers uses, the expansibility of statistical device function has been improved, and statistical device's development cost has been reduced.
Furthermore, when a new statistical method is added to the existing statistical device, a technician needs to add a corresponding grammar to implement the statistical method, and the similarity between the added statistical method and the statistical method in the existing data statistical device is higher, so that the similarity between the grammar corresponding to the added statistical method and the grammar in the existing data statistical device is higher, and thus the grammar redundancy of the data statistical device can be increased.
Optionally, before obtaining the first parameter configured by the user, the method further includes:
extracting multiple groups of statistical features of multiple built-in events in the data statistical device, wherein the multiple built-in events refer to multiple statistical methods for data statistics stored by the data statistical device, and one group of statistical features in the multiple groups of statistical features is used for representing statistical scales and statistical indexes adopted by the statistical method;
obtaining at least one second parameter according to the plurality of groups of statistical characteristics, wherein one second parameter of the at least one second parameter comprises at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter corresponds to the statistical scale one by one, and the measurement index parameter corresponds to the statistical index one by one;
and obtaining at least one preset statistical model according to the at least one second parameter.
The data statistical device can generate a preset statistical model according to the built-in event, and the built-in event corresponds to a statistical method used by the user before, so that the statistical model generated according to the built-in event can meet the general requirements of the user.
Optionally, the obtaining at least one preset statistical model according to the at least one second parameter includes:
establishing a one-to-one correspondence relationship between the at least one measurement scale parameter and the at least one measurement index parameter, and acquiring at least one preset statistical model based on the one-to-one correspondence relationship; and/or the presence of a gas in the gas,
establishing a cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter, and acquiring at least one preset statistical model based on the cascade relation and the at least one measurement index parameter, wherein the cascade relation represents that after data in the database is counted according to one measurement scale parameter, the counted data is counted again according to the measurement scale parameter which is in the cascade relation with the one measurement scale parameter.
In the embodiment of the application, two methods for establishing a preset statistical model are provided, and the data statistical device can directly obtain the statistical model from the corresponding relation between at least one measurement scale parameter and at least one measurement index parameter, or obtain the statistical model from the cascade relation and the measurement index parameter, so that more requirements of user statistical data are met.
Optionally, determining a first statistical model matching the first parameter from at least one preset statistical model according to the first parameter includes:
determining whether the first parameter belongs to a parameter of the at least one second parameter;
if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein the first statistical model uses the first parameter to perform statistics on data.
After the user inputs the first parameter, the first parameter is verified, so that the accuracy of the determined first statistical model is guaranteed, and the accuracy of the statistical data is improved.
Optionally, after determining, according to the first parameter, a first statistical model matching the first parameter from at least one preset statistical model, the method further includes:
parsing the first statistical model into a statistical grammar adapted to the database.
The data statistical device can convert the first statistical model into the statistical grammar which is suitable for the data of the database according to the statistical grammar of the data of the database which needs to be counted, so that the data statistical model can be suitable for various different data, and the processing efficiency of the data statistical device can be improved. In addition, the first statistical model is a statistical grammar which is adaptive to the current database, so that the data adaptability of the first statistical model and the current database is better, and the efficiency of the first statistical model for processing the data in the database is improved.
Optionally, obtaining the first parameter configured by the user includes:
acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter;
and acquiring a first parameter according to the unique identifier.
The user can directly input the unique identifier corresponding to the first parameter, and the data statistical device obtains the corresponding first parameter according to the corresponding unique identifier, so that the operation of the user is simplified.
Optionally, the at least one measurement scale parameter includes one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter;
the time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are divided according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sequenced according to a preset sequence, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
The at least one measurement scale parameter may comprise a plurality of types, and different measurement scale parameters represent different division statistics for the data, so as to meet the statistical requirements of different users.
Optionally, the at least one metric index parameter includes one or more of a total index parameter, an average index parameter, a maximum index parameter, a minimum index parameter, a quantity index parameter, and a unique quantity index parameter;
the quantity index parameter is used for counting the number of data, the unique quantity index parameter is used for deleting repeated data, and the number of the remaining data after deletion is counted.
The at least one measurement index parameter can comprise multiple types, and different measurement index parameters represent different indexes for counting data, so that multiple statistical results can be obtained, and the statistical requirements of different users can be met.
Optionally, the first parameter further includes a filtering parameter;
performing statistical analysis on the data in the database according to the first statistical model, including:
screening data in the database according to the filtering parameters to obtain data needing to be counted;
and carrying out statistical analysis on the data needing to be counted according to the first statistical model to obtain a statistical result.
The data statistical device also supports screening data according to the filtering parameters input by the user, so that the personalized statistical requirements of different users are met.
In a second aspect, a data statistics apparatus is provided, including:
a receiving module: the first parameter is used for obtaining a user configuration, wherein the first parameter comprises a measurement scale parameter and/or a measurement index parameter;
a processing module: and determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein one statistical model of the at least one preset statistical model is used for realizing a statistical method, and performing statistical analysis on data in a database according to the first statistical model to obtain a statistical result.
Optionally, the processing module is further configured to:
extracting multiple groups of statistical features of multiple built-in events in the data statistical device, wherein the multiple built-in events refer to multiple statistical methods for data statistics stored by the data statistical device, and one group of statistical features in the multiple groups of statistical features is used for representing statistical scales and statistical indexes adopted by the statistical method;
obtaining at least one second parameter according to the plurality of groups of statistical characteristics, wherein one second parameter of the at least one second parameter comprises at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter corresponds to the statistical scale one by one, and the measurement index parameter corresponds to the statistical index one by one;
and obtaining at least one preset statistical model according to the at least one second parameter.
Optionally, the processing module is specifically configured to:
establishing a one-to-one correspondence relationship between the at least one measurement scale parameter and the at least one measurement index parameter, and acquiring at least one preset statistical model based on the one-to-one correspondence relationship; and/or the presence of a gas in the gas,
establishing a cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter, and acquiring at least one preset statistical model based on the cascade relation and the at least one measurement index parameter, wherein the cascade relation represents that after data in the database is counted according to one measurement scale parameter, the counted data is counted again according to the measurement scale parameter which is in the cascade relation with the one measurement scale parameter.
Optionally, the processing module is specifically configured to:
determining whether the first parameter belongs to a parameter of the at least one second parameter;
if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein the first statistical model uses the first parameter to perform statistics on data.
Optionally, the processing module is further configured to:
after a first statistical model matching the first parameter is determined from at least one preset statistical model according to the first parameter, the first statistical model is analyzed into a statistical grammar matched with the database.
Optionally, the receiving module is specifically configured to:
acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter;
and acquiring a first parameter according to the unique identifier.
Optionally, the at least one measurement scale parameter includes one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter;
the time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are divided according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sequenced according to a preset sequence, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
Optionally, the at least one metric index parameter includes one or more of a total index parameter, an average index parameter, a maximum index parameter, a minimum index parameter, a quantity index parameter, and a unique quantity index parameter;
the quantity index parameter is used for counting the number of data, the unique quantity index parameter is used for deleting repeated data, and the number of the remaining data after deletion is counted.
Optionally, the first parameter further includes a filtering parameter, and the processing module is specifically configured to:
performing statistical analysis on the data in the database according to the first statistical model, including:
screening data in the database according to the filtering parameters to obtain data needing to be counted;
and carrying out statistical analysis on the data needing to be counted according to the first statistical model to obtain a statistical result.
In a third aspect, a data statistics apparatus is provided, including:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of the first aspect by executing the instructions stored by the memory.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon computer instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects.
Drawings
Fig. 1 is a flowchart of a data statistics method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a visualization of various pre-stored metrology scale parameters and various metrology index parameters displayed in accordance with an embodiment of the present application;
fig. 3 is a flowchart of a data statistics method according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a data statistics process according to an embodiment of the present application;
FIG. 5 is a diagram illustrating a data statistics process according to an embodiment of the present application;
FIG. 6 is a block diagram of a data statistics apparatus according to an embodiment of the present application;
fig. 7 is a structural diagram of a data statistics apparatus according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solutions provided by the embodiments of the present application, the following detailed description will be made with reference to the drawings and specific embodiments.
The data is the core of the big data era, and information can be acquired from the data by counting the data, and the acquired information is used for better serving users. For example, if the administrator of the website video needs to obtain the rule of the access data of the video website, the administrator can use the data statistics device to perform statistics on the access data of the video website, and further obtain information about which videos have the highest attention and which time periods have larger user access amount. Then, the manager of the video website can take corresponding measures according to the information, for example, the number of videos with high attention is increased, the visit amount of the video website is increased, and the like.
At present, a data statistics device is generally developed according to the needs of a user, the development cost of personalized customization is high, and when a new statistics need to be added later by the user, the data statistics device needs to add a corresponding statistical grammar to meet the new statistics need of the user, for example, the data statistics device can realize the function of the maximum value of the statistical data, if the user wants the data statistics device to realize the function of the average value of the statistical data, a technician needs to add a corresponding grammar for realizing the average value function in the data statistics device, so that more human resources need to be invested, the use cost of the data statistics device needs to be increased, and in conclusion, the cost of the existing data statistics device is high.
In view of this, the present disclosure provides a data statistics method, which is executed by a data statistics apparatus, where the data statistics apparatus may be implemented by a server, and the server may be a virtual server or a physical server, and the virtual server is, for example, a cloud server. The data statistics apparatus may also be implemented by a software module installed in a server or other electronic devices, and the software module may be an application program or the like, and the implementation form of the data statistics apparatus is not particularly limited herein.
The following describes in detail a flow of the data statistics method provided in the embodiment of the present application with reference to fig. 1.
S101, obtaining a first parameter configured by a user, wherein the first parameter comprises a measurement scale parameter and/or a measurement index parameter;
s102, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein one statistical model in the at least one preset statistical model is used for realizing a statistical method;
s103, carrying out statistical analysis on the data in the database according to the first statistical model to obtain a statistical result.
In the embodiment of the present application, there are various specific implementation manners of step 101, and the following three specific manners are specifically described as examples.
The first acquisition mode is as follows: the user directly inputs the first parameter in the data statistics device, and after the user inputs the first parameter, the data statistics device obtains the first parameter, specifically, the data statistics device improves the corresponding input device for the user, and the user only needs to input the first parameter in the data statistics device.
For example, the data statistics apparatus may have a display screen, and the display screen may include an input box, and a user may input the first parameter to the data statistics apparatus through the input box, so that the data statistics apparatus obtains the first parameter, and when the user inputs the first parameter, the user may directly input the first parameter in a text form, and the data statistics apparatus parses and identifies the first parameter to obtain the corresponding measurement scale parameter and/or measurement index parameter. The metric scale parameter may be a time equidistant parameter or the like, and the metric index parameter may be an average index parameter or the like.
The second acquisition mode is as follows: acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter, and acquiring a first parameter according to the unique identifier.
Specifically, the data statistics apparatus stores in advance unique identifiers corresponding to a plurality of first parameters, for example, the time equidistant parameter is stored as a unique identifier 1, the average index parameter is stored as a unique identifier 2, and the user inputs 1, so that the data statistics apparatus can analyze that "1" corresponds to the time equidistant parameter according to "1" input by the user, thereby obtaining the first parameter input by the user. That is, in this case, the user only needs to input the required measurement scale parameter and/or the unique identifier corresponding to the measurement index parameter. Or, for example, to reduce the memory space consumed by the data statistics apparatus to store the unique identifier, one metric scale parameter and one metric index parameter may correspond to one unique identifier. For example, the combination of the time-equidistant parameter and the average index parameter stores the identifier as 1, and when the user inputs "1", the user only needs to input "1" to indicate that the first parameter input by the user is "the time-equidistant parameter and the average index parameter". Of course, when the first parameter is obtained in this way, the user needs to know the parameter represented by each unique identifier in advance, for example, the data statistics apparatus may display the stored corresponding relationship between the plurality of parameters and the unique identifier on the display screen of the data statistics apparatus, or may use other ways, which is not limited herein.
The third acquisition mode is as follows: in order to simplify the operation of the user, the data statistics device may display, on the display screen, the corresponding measurement scale parameter and/or measurement index parameter that is pre-stored in the data statistics device, and the user may select the corresponding first parameter directly in the data statistics device.
For example, referring to fig. 2, a visual diagram of a plurality of pre-stored measurement scale parameters and measurement index parameters is displayed for the data statistics apparatus, a user may select a corresponding measurement scale parameter and/or measurement index parameter through a click operation, and the data statistics apparatus may obtain the measurement scale parameter and/or measurement index parameter configured by the user according to a position where the click operation of the user is detected. Fig. 2 is a schematic diagram of a visualization of various pre-stored measurement scale parameters and measurement index parameters displayed by the data statistics apparatus, and actually does not limit the concrete form of the visualization of the various pre-stored measurement scale parameters and measurement index parameters displayed by the data statistics apparatus.
It should be noted that the first parameter input by the user may include a metric scale parameter and a metric index parameter, or may include only a metric scale parameter or only a metric index parameter. The metric scale parameter may be set by the statistics apparatus in advance by default when the user selects only the metric scale parameter, or may be set by the statistics apparatus in advance by default when the user selects only the metric scale parameter.
After obtaining the first parameter, the method in this embodiment of the application performs step 102, that is, determines a first statistical model matching the first parameter from at least one preset statistical model according to the first parameter.
In the embodiment of the present application, the at least one preset statistical model may be preset by a technician before the data statistical apparatus leaves a factory, or may be obtained by the data statistical apparatus according to historical usage data, which is not limited herein. The following illustrates an example of a method for the data statistics apparatus to obtain at least one preset statistical model according to historical usage data.
A method for obtaining at least one preset statistical model comprises the steps of extracting multiple groups of statistical characteristics of multiple built-in events in a data statistical device, obtaining at least one second parameter according to the statistical characteristics, and obtaining at least one preset statistical model according to the at least one second parameter.
First, the built-in events and the statistical features are explained. Specifically, the data statistics device generates a corresponding statistical method in the data statistics process, the corresponding statistical method can be understood as a built-in event, that is, a built-in event can be understood as a statistical method that has been used in a data statistical apparatus, the specific form of the built-in event can be syntax, characters or numbers, the specific form of the built-in event is not limited herein, a built-in event corresponds to a corresponding statistical characteristic, a built-in event generally corresponds to a group of statistical characteristics, a group of statistical characteristics is a statistical scale and a statistical index used for representing the statistical method, a group of statistical characteristics includes at least one statistical scale and at least one statistical index, the statistical scale can be understood as a statistical method that is required by statistical analysis, the statistical index may be understood as a parameter indicating a difference or variation in the amount or size of data, as a parameter for dividing data. Because the specific forms of the built-in events are different, the statistical features obtained by extracting the built-in events may correspond to various forms, and the specific forms of the statistical features are not limited herein. The statistical features may also be manually configurable by the user, providing an alternative way of obtaining statistical features, which is advantageous for improving the flexibility of the user in using the data statistics apparatus.
For example, the built-in event a in the data statistics apparatus is in the form of Structured Query Language (SQL), and the built-in event a is specifically as follows:
“select count(1),max(field)from table where time between’2018-01-0100:00:00and’2018-02-01 00:00:00’group by time order by time”;
the 'between' 2018-01-0100: 00:00and '2018-02-0100: 00: 00' represent specific sources of data, the 'group by and order by' represent data division and correspond to statistical scales, and the 'max' represents that the maximum value is taken for the data and corresponds to a statistical index.
In the embodiment of the present application, the data statistics apparatus may extract the statistical features of the built-in events in many ways.
In the first extraction mode, the data statistics device can extract keywords of the built-in event, the keywords can be understood as character strings with specific functions, the extraction method is suitable for the case that the form of the built-in event is grammar, and when the built-in event is in the grammar form, the keywords of the grammar for realizing the statistics operation in the grammar corresponding to the built-in event are obviously the key information for realizing the statistics method, so the data statistics device can extract the keywords of the built-in event, and the obtained keywords are the statistical characteristics corresponding to the built-in event. Continuing to take the built-in event A in the SQL form as an example, the data statistical device extracts the keywords of the built-in event A, and the obtained group of statistical features of the built-in event A is 'group by-max'. The first extraction method is simple, so that the workload of a user can be simplified.
In the second extraction method, it is possible that some systems of the built-in events include more statistical features, and the data statistics device cannot determine which statistical features should be specifically selected as a group of statistical features of the built-in events.
That is, the statistical characteristics of the built-in event may include a plurality of statistical scales or a plurality of statistical indexes, and the data statistics apparatus extracts a part of the statistical scales and a part of the statistical indexes from the plurality of statistical scales and the plurality of statistical indexes as the statistical characteristics of the built-in event according to a preset rule input by a user, so that the processing amount of the data statistics apparatus in extracting the statistical characteristics of the built-in event can be reduced. For example, the preset rule of the user is to use the statistical scale and the statistical index obtained by first extracting the built-in event as a set of statistical features of the built-in event. Or, the data statistics device may select two statistical scales and two statistical indexes thereof as two sets of statistical features of the built-in event according to a preset rule of the user. In the embodiment of the present application, the number of the statistical features of each built-in event extracted by the data statistics apparatus is not limited.
In addition, the present embodiment does not limit the statistical order in which the statistics device extracts the statistical features of the built-in events. For example, the data statistics apparatus may extract multiple sets of statistical features of multiple built-in events from the history of the data statistics apparatus when the statistical model needs to be obtained. Or, for example, after each built-in event is generated, the data statistics apparatus may extract the statistical features of the corresponding built-in event, and store the extracted statistical features in a preset storage space, so that the data statistics apparatus may directly call multiple sets of statistical features of multiple built-in events from the storage space. In this way, the processing procedure of extracting the statistical characteristics by the data statistical device is decentralized, so that the efficiency of the data statistical device is improved, and the problem that the resource of the data statistical device is consumed by simultaneously extracting a plurality of built-in events is also avoided.
After obtaining the corresponding statistical characteristics, the data statistics apparatus may obtain at least one second parameter according to the statistical characteristics.
In the embodiment of the present application, the at least one second parameter includes at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter may be understood as a statistical scale in the foregoing, the measurement index parameter may be understood as a statistical index in the foregoing, and the at least one second parameter may be one second parameter or a plurality of second parameters, where the type and the number of the second parameters are not specifically limited herein.
One way to obtain the at least one second parameter is to classify the plurality of sets of statistical features to obtain the at least one second parameter.
Specifically, since the plurality of statistical scales in the plurality of groups of statistical features may belong to the same category, the plurality of index scales in the plurality of groups of statistical features may belong to the same category, and the same category may be understood as that the plurality of statistical features have the same attribute, the plurality of groups of statistical features are classified, so as to obtain the second parameter.
The manner of classifying the sets of statistical features may include:
the first classification method is that the data statistical device prestores a plurality of attributes, and the data statistical device identifies statistical scales in a plurality of statistical features and the attributes of statistical indexes, so as to obtain the second parameters after classification.
Specifically, the data statistics device stores the corresponding statistical features and the attributes corresponding to the statistical features in advance, and the corresponding statistical features are screened out according to the attributes during classification.
For example, the data statistics apparatus may query the corresponding statistical features by means of value enumeration, so as to look up statistical scales belonging to the same attribute and statistical indexes belonging to the same category. The first classification mode is suitable for the condition that the number of the statistical features is small, and the value enumeration improves the efficiency of the data statistical device for inquiring the statistical features of the built-in events. Value enumeration may be understood as a retrieval method that indexes associated statistical features according to relationships between the statistical features. Or for example, the data statistics device enumerates the extracted statistical scales and statistical indexes, and then classifies the corresponding statistical scales and statistical indexes according to the attributes. However, when the number of the statistical indexes corresponding to the built-in event is large, the direct reference speed is slow, and therefore a direct value enumeration mode needs to be adopted more directly and quickly.
For example, the pre-stored attributes include time, number, and the like, the statistical scales in the statistical features of the obtained data include "order by, limit, and group by", the data statistics apparatus may perform enumeration query in SQL, divide "order by and limit" into value enumeration parameters according to other attributes, and divide "group by" into time equidistant parameters according to time attributes.
The at least one measurement scale parameter includes one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter, and the at least one measurement scale parameter may include others in addition to the listed ones, and the measurement scale parameter is not specifically limited herein. The time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are counted according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sorted according to a preset sequence, the preset sequence refers to a sequence for arranging the data, the preset sequence can be various, such as a sequence from large to small, or such as a sequence from small to large, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
The at least one metric parameter includes one or more of a total metric parameter, an average metric parameter, a maximum metric parameter, a minimum metric parameter, a number metric parameter, and a unique number metric parameter, and the at least one metric parameter may include other types than the listed ones, and the metric parameters are not specifically limited herein. It should be noted that the at least one metric parameter processes the unit data according to the metric scale parameter, that is, the at least one metric parameter is a statistic of the data after the data is divided according to the at least one metric scale parameter. For example, the measurement scale parameter is a time equidistant parameter, the time equidistant parameter is every day, at least one measurement index parameter is a total index parameter, and the total index parameter represents the total amount of data calculation for every day.
Specifically, the total index parameter is to count the total amount of data, the average index parameter is to count the average value of the data, the maximum index parameter is to count the maximum value of the data, the minimum index parameter is to count the minimum value of the data, the quantity index parameter is to count the number of the data, the unique quantity index parameter is to delete duplicate data, and count the number of the data remaining after the deletion operation, and delete duplicate data is to delete one of two identical data, that is, in some cases, for example, when a database acquires data with an error, duplicate data may exist in the database, and the unique quantity index parameter can more accurately represent the number of the data than the quantity index parameter.
After obtaining the at least one second parameter, at least one predetermined statistical model may be obtained based on the second parameter. In the embodiment of the present application, a statistical model represents a statistical method. Specifically, there are various ways to obtain at least one preset statistical model based on at least one second parameter, which are described in the following three ways.
In the first mode, a one-to-one correspondence relationship between at least one measurement scale parameter and at least one measurement index parameter is established, and at least one preset statistical model is obtained based on the one-to-one correspondence relationship. Specifically, the corresponding relationship is that a measurement scale parameter corresponds to a measurement index parameter, and a corresponding relationship corresponds to a preset statistical model. The first way is simpler to obtain a preset statistical model.
The method includes obtaining a preset statistical model according to a first method, dividing data once according to a measurement scale parameter, and then obtaining a value corresponding to a measurement index parameter for the divided data, so as to obtain a result of statistical data. The method comprises the steps of establishing a corresponding relation between one measurement scale parameter of at least one measurement scale parameter and two or more measurement index parameters of at least one measurement index parameter, and obtaining at least one preset statistical model based on the corresponding relation, namely the relation between one measurement scale parameter and various measurement index parameters.
For example, a preset statistical model has a metric scale parameter corresponding to a time equidistant parameter, a metric index parameter corresponding to a maximum value index parameter, and a minimum value index parameter, and a statistical model is obtained according to the metric scale parameter, and after the statistical model processes data, a maximum value corresponding to the data and a minimum value corresponding to the data can be obtained.
However, in some cases, the statistical result obtained by dividing the data once according to the measurement scale parameter may still not meet the requirement of the user statistical data, for example, the user needs to count the total data amount of each day and also needs to obtain the data amount of a specified time period of each day, and if the data is divided once according to the measurement scale parameter, only the total data amount of each day or only the data amount of the specified time period of each day can be obtained. Therefore, in order to meet the requirements of users and expand the application range of the data statistical device, a third method for obtaining a preset statistical model is provided in the embodiment of the present application.
And in the third mode, the cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter is established, and at least one preset statistical model is obtained based on the cascade relation and the at least one measurement index parameter.
Specifically, a cascade relationship of each of the at least one metrological scale parameter with the at least one metrological scale parameter is established. The cascade relation represents that after the data in the database are counted according to a measurement scale parameter, the counted data are counted again according to the measurement scale parameter which is in cascade relation with the measurement scale parameter. Further understanding, the cascade relation can represent two-stage cascade, that is, after data in the database is subjected to first statistics, the counted data is subjected to second statistics according to a measurement scale parameter which is in cascade relation with a measurement scale parameter; the cascade relation may also represent more stages of cascade, that is, after performing the second statistics on the data, the nth statistics may be performed on the data after the second statistics according to a metric scale parameter that is in the cascade relation with one metric scale parameter, where N is a positive integer greater than or equal to 3. After determining the cascade relation of the measurement scale parameters, the data statistical device obtains a corresponding statistical model based on the cascade relation and the corresponding at least one measurement index parameter.
The data statistical apparatus may obtain the predetermined statistical models in the three manners, that is, the statistical model of a part of the at least one predetermined statistical model may be obtained in a first manner, the statistical model of a part of the at least one predetermined statistical model may be obtained in a second manner, and the statistical model of a part of the at least one predetermined statistical model may be obtained in a third manner. The specific obtaining manner has been introduced in the foregoing, and is not described herein again.
When data is counted, the data is counted according to at least one measurement scale parameter and at least one measurement scale parameter, which does not necessarily meet the personalized requirements of the user, for example, if the user only wants to obtain data in a specific time period, the data counting device does not need to count all the data, and only needs to count the data in the specific time period selected by the user.
On the basis of the first three types of obtaining preset statistical models, filtering parameters can be added to the preset statistical models. Before the statistical model carries out statistics on the data, the statistical model firstly screens the data according to the filtering parameters and then carries out statistics on the screened data according to the statistical model. The filtering parameter may be understood as a rule for filtering data customized by a user, where the filtering parameter is, for example, a temporal filtering parameter and a specific filtering parameter, the temporal filtering parameter refers to filtering data according to a set generation time and/or end time, the specific filtering parameter refers to filtering data according to a set rule other than the processing temporal filtering parameter, for example, data generated by a terminal device whose IP address is 1.1.1.1 that the user needs to obtain, and the filtering rule may be expressed as sip 1.1.1.1.
Of course, the data statistics apparatus may also obtain at least one preset statistical model in other manners, which is not limited herein.
In this embodiment, when the data statistics apparatus performs step 102, a first statistical model matching the first parameter is determined according to at least one preset statistical model. The specific implementation of step 102 is as follows:
determining whether the first parameter belongs to a parameter of the at least one second parameter;
and if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter.
In particular, since the first parameter is user-configured, the first parameter may not be a parameter used by the data statistics apparatus to build the preset statistical model. For example, if the first parameter configured by the user is a parameter other than the second parameter, the data statistics apparatus cannot identify the first parameter, and thus cannot perform statistics on the data. Therefore, when the data statistics apparatus determines the statistical model used by the user according to the first parameter, the data statistics apparatus first needs to determine the first parameter, determine whether the first parameter belongs to a parameter of at least one second parameter, and if the first parameter does not belong to a parameter of the second parameter, it indicates that the statistical model corresponding to the first parameter does not exist in the data statistics apparatus, that is, a corresponding statistical method required by the user does not exist in the data statistics apparatus, the data statistics apparatus stops executing the subsequent steps, or the data statistics apparatus may send a prompt to the user to prompt the user to define the corresponding statistical model, and the data statistics apparatus may complete data statistics by using the statistical model defined by the user.
If the first parameter belongs to the second parameters, the data statistical device determines a first statistical model matched with the first parameter from at least one preset statistical model. The first statistical model matched with the first parameter may be understood that the measurement scale parameter and the measurement index parameter corresponding to the first statistical model include the first parameter, for example, the first parameter includes a time equidistant parameter and an average index parameter, and the measurement scale parameter and the measurement index parameter in the at least one preset statistical model include a statistical model of the time equidistant parameter and the average index parameter. As long as these models contain the first parameter, they can be considered as models matching the first parameter. That is, there may be a plurality of statistical models matching the first parameter, and one of the plurality of statistical models may be designated as the first statistical model by the user, or one of the plurality of statistical models may be selected as the first statistical model by the data statistical apparatus. The first statistical model matched with the first parameter may also understand that the metric scale parameter and the metric index parameter corresponding to the first statistical model are completely the same as the first parameter, that is, the model in which the metric scale parameter and the metric index parameter corresponding to the at least one preset statistical model are completely the same as the first parameter, so as to directly obtain the first statistical model matched with the first parameter.
It should be noted that the first statistical model may be any one of at least one preset statistical model, and the "first" in the first statistical model is only for distinguishing a plurality of preset statistical models, and does not limit the order of the statistical models in the at least one preset statistical model, and the like.
In the embodiment of the present application, after the step 102 is executed, please refer to fig. 3, the method further includes a step 104 of parsing the first statistical model into a statistical grammar adapted to the database.
Since the data statistics apparatus may be used for processing different types of databases, and the types of statistical methods adopted for data in the different types of databases may be different, the first statistical model also needs to be parsed into statistical grammars adapted to the databases before the data statistics apparatus determines to process the data in the databases using the first statistical model.
In particular, adaptation may be understood as the statistical grammar of the first statistical model being of the same type as the corresponding statistical grammar of the database, i.e. the first statistical model is parsed into a statistical grammar that can directly identify the corresponding data in the database. One way of parsing is to parse the parameters corresponding to the first statistical model into a statistical grammar recognizable by the database, for example, the statistical device uses SQL statistical grammar, and the current database corresponds to HQL statistical grammar in the hive database, which requires conversion of the statistical language in the statistical device. Specifically, for example, the first parameter configured by the user includes a measurement scale parameter and a measurement index parameter, the measurement scale parameter is specifically a time equidistant parameter, the measurement index parameter is specifically an average index parameter and a total amount index parameter, and a first statistical model matched with the first parameter is determined in at least one preset statistical model according to the first parameter. When the first statistical model is used for counting data in the hive statistical database, the hive statistical database is realized BY the HQL statistical grammar, parameters and the like in the data statistical device are all converted into standard HQL statistical grammar, so that the parameters in the first statistical model are correspondingly analyzed into the statistical grammar corresponding to the hive statistical database, and the analyzed first statistical model is FROM _ unoxtime (time, 'yyyyy-MM-dd') as timeedFROM 'table name' where 'filter parameter' GRP BY time ORDER.
Then, the value of the parameter corresponding to the first statistical model is converted into a unit used for recording the data in the database, for example, the specific value of the set time in the time equidistant parameter is 10:00-11:00, and when the data is acquired in the database: dividing into: the recording mode of the second records time, in this case, the data statistics device needs to convert the set time 10:00-11:00 in the time equidistant parameter into 10:00:00-11:00:00, so as to complete the process of converting the first statistical model into the statistical grammar adapted to the database, that is, the analysis mode is to convert the specific values and the like of the metric scale parameter, the metric index parameter and each parameter in the first statistical model into the standard statistical grammar corresponding to the database, so as to realize the conversion and analysis process of the first statistical model. Of course, the above is merely an example of one analysis method, and the analysis method is not limited to this.
It should be noted that if the statistical grammar of the first statistical model is adapted to the statistical grammar of the database, step 104 need not be performed. That is, step 104 is an optional step and need not be performed.
The first statistical model can directly process the data in the database, that is, when the data statistical device is used for statistically processing the data of different databases, the data statistical device only needs to analyze the first statistical model into corresponding statistical grammar matched with the data of the database, so that the requirements of users are met, and the application range of the data statistical device is widened.
In this embodiment of the present application, after the first statistical model is analyzed, step 103 is executed, that is, statistical analysis is performed on data in the database according to the first statistical model, so as to obtain a statistical result.
Specifically, for example, the first statistical model is obtained by the first method described above, referring to fig. 4, where data in the database is a, when the first statistical model processes the data a, the data a is first divided into a1, a2, a3, and a4 according to the metric scale parameters, then the a1, a2, a3, and a4 are statistically calculated according to the metric scale index parameters, and finally corresponding statistical results b1, b2, b3, and b4 are obtained; or for example, referring to fig. 5, when the first statistical model processes the data a, the first statistical model first performs a first-stage division on the data a according to the metric scale parameters to obtain a1 and a2, then performs a second-stage division on the data a1 and a2 according to the metric scale parameters to obtain a1, a2, A3, and a4, and performs a statistical division on the divided data a1, a2, a1, a2, A3, and a4 according to the metric scale index parameters to obtain statistical results B1, B2, B1, B2, B3, and B4.
If the first parameter input by the user further includes a filtering parameter, the filtering parameter module will filter the data in the database first, and then obtain the data that needs to be statistically analyzed, and of course, the user may not input the filtering parameter, which is not limited herein.
It should be noted that there are many forms of statistical results, such as reports, graphs, etc., and what form a specific statistical result is, may be the form of the statistical result selected by the user, or may be displayed directly by the data statistics apparatus in a default manner. After obtaining the statistical result, the statistical data device may return the packaged statistical result to a database or a terminal device, so that the user can view the statistical result, and packaging the statistical result may be understood as that the statistical data device returns the statistical result in a specific form.
Based on the above data statistics method, please refer to fig. 6, an embodiment of the present application further provides a data statistics apparatus, which corresponds to the data statistics apparatus described above, and the data statistics apparatus includes a receiving module 601 and a processing module 602.
Specifically, the receiving module 601 is configured to obtain a first parameter configured by a user, where the first parameter includes a metric scale parameter and/or a metric index parameter;
the processing module 602 determines, according to the first parameter, a first statistical model matching the first parameter from at least one preset statistical model, and performs statistical analysis on data in the database according to the first statistical model to obtain a statistical result, where one statistical model of the at least one preset statistical model is used to implement a statistical method.
Optionally, the processing module 602 is further configured to:
extracting multiple groups of statistical characteristics of multiple built-in events in the data statistical device, wherein the multiple built-in events refer to multiple statistical methods for data statistics stored by the data statistical device, and one group of statistical characteristics in the multiple groups of statistical characteristics is used for representing statistical scales and statistical indexes adopted by one statistical method;
obtaining at least one second parameter according to the multiple groups of statistical characteristics, wherein one second parameter in the at least one second parameter comprises at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter corresponds to the statistical scale one by one, and the measurement index parameter corresponds to the statistical index one by one;
and obtaining at least one preset statistical model according to the at least one second parameter.
Optionally, the processing module 602 is specifically configured to:
establishing a one-to-one correspondence relationship between at least one measurement scale parameter and at least one measurement index parameter, and acquiring at least one preset statistical model based on the one-to-one correspondence relationship; and/or the presence of a gas in the gas,
establishing a cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter, acquiring at least one preset statistical model based on the cascade relation and the at least one measurement index parameter, wherein the cascade relation represents that after data in the database is counted according to one measurement scale parameter, the counted data is counted again according to the measurement scale parameter which is in the cascade relation with the one measurement scale parameter.
Optionally, the processing module 602 is specifically configured to:
determining whether the first parameter belongs to at least one second parameter;
if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein the first statistical model uses the first parameter to perform statistics on data.
Optionally, the processing module 602 is further configured to:
after determining a first statistical model matching the first parameter from at least one preset statistical model according to the first parameter, the first statistical model is parsed into a statistical grammar adapted to the database.
Optionally, the receiving module 601 is specifically configured to:
acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter;
the first parameter is obtained from the unique identifier.
Optionally, the at least one measurement scale parameter includes one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter;
the time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are divided according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sequenced according to a preset sequence, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
Optionally, the at least one metric index parameter includes one or more of a total index parameter, an average index parameter, a maximum index parameter, a minimum index parameter, a quantity index parameter, and a unique quantity index parameter;
the quantity index parameter is used for counting the number of data, the unique quantity index parameter is used for deleting repeated data, and the number of the remaining data after deletion operation is counted.
Optionally, the first parameter further includes a filtering parameter, and the processing module 602 is specifically configured to:
performing statistical analysis on the data in the database according to a first statistical model, including:
screening data in the database according to the filtering parameters to obtain data needing to be counted;
and carrying out statistical analysis on the data needing to be counted according to the first statistical model to obtain a statistical result.
Based on the foregoing data statistics method, please refer to fig. 7, an embodiment of the present application provides a data statistics apparatus, including:
at least one processor 701, and
a memory 702 communicatively coupled to the at least one processor 701;
wherein the memory 702 stores instructions executable by the at least one processor 701, and the at least one processor 702 implements any one of the data statistics methods shown in fig. 1 by executing the instructions stored in the memory 701.
As an embodiment, the processing module 602 in the foregoing data statistics apparatus may be implemented by the processor 701 in the embodiment of the present application.
Fig. 7 illustrates an example of one processor 701, but the number of processors 701 is not limited in practice.
Based on the foregoing data statistics method, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions that, when executed on a computer, cause the computer to perform the method according to any one of the data statistics methods shown in fig. 1 or fig. 3.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program syntax embodied in the storage media.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (18)

1. A data statistical method is applied to a data statistical device, and the method comprises the following steps:
extracting multiple groups of statistical features of multiple built-in events in the data statistical device, wherein the multiple built-in events refer to multiple statistical methods for data statistics stored by the data statistical device, and one group of statistical features in the multiple groups of statistical features is used for representing statistical scales and statistical indexes adopted by the statistical method;
obtaining at least one second parameter according to the multiple groups of statistical characteristics, wherein one second parameter of the at least one second parameter comprises at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter corresponds to the statistical scale one by one, and the measurement index parameter corresponds to the statistical index one by one;
obtaining at least one preset statistical model according to the at least one second parameter;
obtaining a first parameter configured by a user, wherein the first parameter comprises a measurement scale parameter and/or a measurement index parameter;
determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein one statistical model in the at least one preset statistical model is used for realizing a statistical method;
and carrying out statistical analysis on the data in the database according to the first statistical model to obtain a statistical result.
2. The method of claim 1, wherein obtaining at least one predetermined statistical model based on the at least one second parameter comprises:
establishing a one-to-one correspondence relationship between the at least one measurement scale parameter and the at least one measurement index parameter, and acquiring at least one preset statistical model based on the one-to-one correspondence relationship; and/or the presence of a gas in the gas,
establishing a cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter, and acquiring at least one preset statistical model based on the cascade relation and the at least one measurement index parameter, wherein the cascade relation represents that after data in the database is counted according to one measurement scale parameter, the counted data is counted again according to the measurement scale parameter which is in the cascade relation with the one measurement scale parameter.
3. The method of claim 1, wherein determining a first statistical model matching the first parameter from at least one preset statistical model based on the first parameter comprises:
determining whether the first parameter belongs to a parameter of the at least one second parameter;
if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein the first statistical model uses the first parameter to perform statistics on data.
4. The method of claim 1, after determining a first statistical model matching the first parameter from at least one preset statistical model according to the first parameter, further comprising:
parsing the first statistical model into a statistical grammar adapted to the database.
5. The method of any of claims 1-4, wherein obtaining the first parameter configured by the user comprises:
acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter;
and acquiring a first parameter according to the unique identifier.
6. The method of any of claims 1-4, wherein the at least one metrological scale parameter comprises one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter;
the time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are divided according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sequenced according to a preset sequence, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
7. The method of claim 6, wherein the at least one metric index parameter comprises one or more of a total index parameter, an average index parameter, a maximum index parameter, a minimum index parameter, a quantity index parameter, and a unique quantity index parameter;
the quantity index parameter is used for counting the number of data, the unique quantity index parameter is used for deleting repeated data, and the number of the remaining data after deletion is counted.
8. The method of any of claims 1-4, wherein the first parameters further comprise a filtering parameter;
performing statistical analysis on the data in the database according to the first statistical model, including:
screening data in the database according to the filtering parameters to obtain data needing to be counted;
and carrying out statistical analysis on the data needing to be counted according to the first statistical model to obtain a statistical result.
9. A data statistics apparatus, comprising:
the device comprises a receiving module, a calculating module and a processing module, wherein the receiving module is used for obtaining a first parameter configured by a user, and the first parameter comprises a measurement scale parameter and/or a measurement index parameter;
the processing module is used for extracting multiple groups of statistical characteristics of multiple built-in events in the data statistical device, wherein the multiple built-in events refer to multiple statistical methods which are stored by the data statistical device and used for performing statistics on data, and one group of statistical characteristics in the multiple groups of statistical characteristics is used for representing statistical scales and statistical indexes which are used by one statistical method; obtaining at least one second parameter according to the multiple groups of statistical characteristics, wherein one second parameter of the at least one second parameter comprises at least one measurement scale parameter and at least one measurement index parameter, the measurement scale parameter corresponds to the statistical scale one by one, and the measurement index parameter corresponds to the statistical index one by one; obtaining at least one preset statistical model according to the at least one second parameter, determining a first statistical model matched with the first parameter from the at least one preset statistical model according to the first parameter, and performing statistical analysis on data in a database according to the first statistical model to obtain a statistical result, wherein one statistical model of the at least one preset statistical model is used for realizing a statistical method.
10. The apparatus of claim 9, wherein the processing module is specifically configured to:
establishing a one-to-one correspondence relationship between the at least one measurement scale parameter and the at least one measurement index parameter, and acquiring at least one preset statistical model based on the one-to-one correspondence relationship; and/or the presence of a gas in the gas,
establishing a cascade relation between each measurement scale parameter in the at least one measurement scale parameter and the at least one measurement scale parameter, and acquiring at least one preset statistical model based on the cascade relation and the at least one measurement index parameter, wherein the cascade relation represents that after data in the database is counted according to one measurement scale parameter, the counted data is counted again according to the measurement scale parameter which is in the cascade relation with the one measurement scale parameter.
11. The apparatus of claim 9, wherein the processing module is specifically configured to:
determining whether the first parameter belongs to a parameter of the at least one second parameter;
if the first parameter belongs to the parameters in the at least one second parameter, determining a first statistical model matched with the first parameter from at least one preset statistical model according to the first parameter, wherein the first statistical model uses the first parameter to perform statistics on data.
12. The apparatus of claim 9, wherein the processing module is further to:
after a first statistical model matching the first parameter is determined from at least one preset statistical model according to the first parameter, the first statistical model is analyzed into a statistical grammar matched with the database.
13. The apparatus of any of claims 9-12, wherein the receiving module is specifically configured to:
acquiring a unique identifier input by a user, wherein the unique identifier is used for representing a corresponding measurement scale parameter and/or measurement index parameter;
and acquiring a first parameter according to the unique identifier.
14. The apparatus of any of claims 9-12, wherein the at least one metrological scale parameter comprises one or more of a time equidistant parameter, a number equidistant parameter, a time range parameter, a number range parameter, a value enumeration parameter, and a value enumeration filtering parameter;
the time equidistant parameter represents that statistical data are divided according to a set time interval, the digital equidistant parameter represents that the statistical data are divided according to a set digital interval, the time range parameter represents that the statistical data are divided according to a set time range, the digital range parameter represents that the statistical data are divided according to a set digital range, the value enumeration parameter represents that the statistical data with a set number are counted after the data are sequenced according to a preset sequence, and the value enumeration filtering parameter represents that the statistical data are counted according to a preset screening rule.
15. The apparatus of claim 14, wherein the at least one metric index parameter comprises one or more of a total index parameter, an average index parameter, a maximum index parameter, a minimum index parameter, a quantity index parameter, and a unique quantity index parameter;
the quantity index parameter is used for counting the number of data, the unique quantity index parameter is used for deleting repeated data, and the number of the remaining data after deletion is counted.
16. The apparatus of any of claims 9-12, wherein the first parameters further comprise filtering parameters, and wherein the processing module is specifically configured to:
performing statistical analysis on the data in the database according to the first statistical model, including:
screening data in the database according to the filtering parameters to obtain data needing to be counted;
and carrying out statistical analysis on the data needing to be counted according to the first statistical model to obtain a statistical result.
17. A data statistics device, comprising:
at least one processor, and
a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the at least one processor implementing the method of any one of claims 1-8 by executing the instructions stored by the memory.
18. A computer-readable storage medium having stored thereon computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-8.
CN201811390454.9A 2018-11-21 2018-11-21 Data statistical method, device and equipment Active CN109522340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811390454.9A CN109522340B (en) 2018-11-21 2018-11-21 Data statistical method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811390454.9A CN109522340B (en) 2018-11-21 2018-11-21 Data statistical method, device and equipment

Publications (2)

Publication Number Publication Date
CN109522340A CN109522340A (en) 2019-03-26
CN109522340B true CN109522340B (en) 2020-12-25

Family

ID=65778073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811390454.9A Active CN109522340B (en) 2018-11-21 2018-11-21 Data statistical method, device and equipment

Country Status (1)

Country Link
CN (1) CN109522340B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1921752B1 (en) * 2006-11-13 2012-12-19 Google, Inc. Adaptive arithmetic encoding and decoding of digital data

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008014089A2 (en) * 2006-06-30 2008-01-31 First American Corelogic, Inc. Method and apparatus for predicting outcomes of a home equity line of credit
CN103744646B (en) * 2013-04-01 2017-04-05 山东鲁能软件技术有限公司 Support the system and its operation method of User Defined filtercondition and statistic algorithm
CN105893525B (en) * 2016-03-30 2019-06-21 努比亚技术有限公司 Data statistics device and method
CN105975500A (en) * 2016-04-27 2016-09-28 努比亚技术有限公司 Data processing method, data statistical system and backstage management system
CN106201848A (en) * 2016-06-30 2016-12-07 北京奇虎科技有限公司 The log processing method of a kind of real-time calculating platform and device
CN107103064B (en) * 2017-04-17 2021-06-01 北京五八信息技术有限公司 Data statistical method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1921752B1 (en) * 2006-11-13 2012-12-19 Google, Inc. Adaptive arithmetic encoding and decoding of digital data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于模糊理论的医院人事档案信息推荐系统";徐竞;《微型电脑应用》;20180620(第6期);第74-79页 *

Also Published As

Publication number Publication date
CN109522340A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN106682097B (en) Method and device for processing log data
CN106649831B (en) Data filtering method and device
CN109376069B (en) Method and device for generating test report
US11042525B2 (en) Extracting and labeling custom information from log messages
CN106293891B (en) Multidimensional investment index monitoring method
JPWO2017115458A1 (en) Log analysis system, method and program
US9037552B2 (en) Methods for analyzing a database and devices thereof
CN111008707A (en) Automatic modeling method and device and electronic equipment
CN106708965A (en) Data processing method and apparatus
WO2017104119A1 (en) Log analysis system, method, and program
CN106681808A (en) Task scheduling method and device
US8543552B2 (en) Detecting statistical variation from unclassified process log
CN111723515A (en) Method, device and system for operating operator
CN114791927A (en) Data analysis method and device
CN109522340B (en) Data statistical method, device and equipment
CN110781211B (en) Data analysis method and device
CN109558403B (en) Data aggregation method and device, computer device and computer readable storage medium
CN114579660A (en) Data visualization display method and related equipment
CN114398226A (en) Network asset report generation method and device
CN113868141A (en) Data testing method and device, electronic equipment and storage medium
US20100169291A1 (en) System and method for prompting an end user with a preferred sequence of commands which performs an activity in a least number of inputs
JP2019053763A (en) Text visualization system, text visualization method and program
CN114691837B (en) Insurance business data processing method and processing system based on big data
CN117131031A (en) Service data quality inspection method and equipment
CN117371880A (en) Service data analysis method, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100089 Beijing city Haidian District Road No. 4 North wa Yitai three storey building

Patentee after: NSFOCUS Technologies Group Co.,Ltd.

Patentee after: NSFOCUS TECHNOLOGIES Inc.

Address before: 100089 Beijing city Haidian District Road No. 4 North wa Yitai three storey building

Patentee before: NSFOCUS INFORMATION TECHNOLOGY Co.,Ltd.

Patentee before: NSFOCUS TECHNOLOGIES Inc.