CN113918623A - Method and device for calculating times of wind control related behaviors - Google Patents

Method and device for calculating times of wind control related behaviors Download PDF

Info

Publication number
CN113918623A
CN113918623A CN202111391676.4A CN202111391676A CN113918623A CN 113918623 A CN113918623 A CN 113918623A CN 202111391676 A CN202111391676 A CN 202111391676A CN 113918623 A CN113918623 A CN 113918623A
Authority
CN
China
Prior art keywords
behavior
time period
control related
categories
specified
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.)
Granted
Application number
CN202111391676.4A
Other languages
Chinese (zh)
Other versions
CN113918623B (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.)
Zhongyuan Bank Co ltd
Original Assignee
Zhongyuan Bank 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 Zhongyuan Bank Co ltd filed Critical Zhongyuan Bank Co ltd
Priority to CN202111391676.4A priority Critical patent/CN113918623B/en
Publication of CN113918623A publication Critical patent/CN113918623A/en
Application granted granted Critical
Publication of CN113918623B publication Critical patent/CN113918623B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries

Abstract

The disclosure relates to a method and a device for calculating the times of wind control related behaviors. The method for calculating the times of the wind control related behaviors comprises the following steps: storing, with a primary key-value storage system, each of the anemometry-related behavior records as members in an ordered set type of value such that entry elements of each member include at least a system name, a behavior category, and a timestamp containing at least date and hour information; receiving, by a processor, an operation of a user specifying a time period and a behavior category for which a representative number of times of the wind-control-related behaviors are to be calculated; obtaining, by the processor, a set of specified behavior categories over a specified time period based on a timestamp; and calculating, by the processor, a representative number of times the wind-control-related behavior based on the acquired set of specified behavior categories over the specified time period.

Description

Method and device for calculating times of wind control related behaviors
Technical Field
The disclosure relates to the technical field of financial security, and more particularly, to a method and an apparatus for calculating the number of times of a wind-control related behavior.
Background
In industries such as finance, government affairs and security, for purposes of risk control, etc., there is often a need to quickly and accurately calculate the times of occurrence of a certain event or behavior, and the accumulation of the times generally includes various operation forms such as counting, summing, maximum value solving, minimum value solving and average value solving, and under some scenes requiring real-time risk judgment of business events, the calculation delay of the times of wind control related behaviors has a high requirement, generally in the order of milliseconds or tens of milliseconds.
The currently common methods for calculating the times of the wind control related behaviors comprise a calculation scheme based on a database SQL (structured query language), a calculation scheme based on event driving, a calculation scheme based on a fact calculation framework and the like. The calculation scheme based on the database SQL is not flexible enough, the response time cannot be guaranteed, when the calculation logic needs to be adjusted, the implementation code often needs to be modified and online deployment is carried out, and especially under the condition that calculation of a large data volume needs to be dealt with, the time consumed by the calculation scheme may be unacceptable for the system. The event-driven computing scheme requires separate logic development for different event scenarios, and needs to be issued each time, and a large amount of computing resources need to be consumed for pre-computation in the running process. The computing scheme based on the fact computing framework also needs to occupy a large amount of computing resources when the system runs, for example, thousands of indexes need thousands of Flink tasks to run all the time, frames for computing Flink and the like often need message queues as data pipelines, and the combined use of various large data components often increases computing time consumption. Therefore, no method for calculating the number of times of the wind control related behaviors, which can effectively overcome the defects of the various schemes, is provided at present.
Disclosure of Invention
The present disclosure is provided to solve the above-mentioned problems occurring in the prior art.
There is a need for a method and apparatus for calculating the number of times of a wind control related behavior, in which a master key-value storage system is utilized, and each wind control related behavior record is stored as a member by a value of an ordered set type, entry elements of each member include at least a system name, a behavior category, and a timestamp, and when a user specifies that the number of times of a wind control related behavior of a specific time period and behavior category is to be calculated, a set of specified behavior categories within the specified time period may be acquired based on timestamp information of the member, and a representative number of times of the wind control related behavior may be further calculated based on the acquired set of specified behavior categories within the specified time period. According to the method and the device for calculating the times of the wind control related behaviors, the reasonable design of the main key-value storage system and the members in the ordered set thereof can accommodate larger-capacity recorded data, the system has higher reliability and expandability, and the requirements of a user on calculating the times of the wind control related behaviors in various modes such as a single-system single-line mode as a category, a single-system multi-row mode as a category, a multi-system single-line mode as a category, a multi-system multi-behavior category and the like can be responded with lower operation resource cost, higher flexibility and higher real-time performance.
According to a first aspect of the present disclosure, there is provided a method for calculating the number of times of a wind-control related behavior, including storing, with a primary key-value storage system, each wind-control related behavior record as a member with an ordered set type of value, such that entry elements of each member include at least a system name, a behavior category, and a timestamp containing at least date and hour information; receiving, by a processor, an operation of a user specifying a time period and a behavior category for which a representative number of times of the wind-control-related behaviors are to be calculated; obtaining, by the processor, a set of specified behavior categories over a specified time period based on a timestamp; and calculating, by the processor, a representative number of times the wind-control-related behavior based on the acquired set of specified behavior categories over the specified time period.
According to a second aspect of the present disclosure, there is provided another device for calculating the number of times of a wind-control related behavior, including a primary key-value storage system that stores each wind-control related behavior record as a member in an ordered set type of value such that entry elements of each member include at least a system name, a behavior category, and a time stamp containing at least date and hour information; and a processor configured to receive a user operation specifying a time period and a behavior category for which a representative number of the wind-control-related behaviors are to be calculated; acquiring a set of specified behavior categories within a specified time period based on the timestamp; and calculating a representative number of the wind control related behaviors based on the acquired set of specified behavior classes within the specified time period.
According to the number-of-times calculation method for the wind control related behaviors and the number-of-times calculation device for the wind control related behaviors of the embodiments of the present disclosure, each wind control related behavior record is stored as a member by using the primary key-value storage system and by using the value of the ordered set type, the entry element of each member at least includes a system name, a behavior category, and a time stamp, and when the user specifies that the number of times of the wind control related behaviors of a specific time period and the behavior category are to be calculated, a set of specified behavior categories in the specified time period may be acquired based on the time stamp information of the member, and the representative number of times of the wind control related behaviors may be further calculated based on the acquired set of specified behavior categories in the specified time period. According to the method and the device for calculating the times of the wind control related behaviors, the reasonable design of the main key-value storage system and the members in the ordered set thereof can accommodate larger-capacity recorded data, the system has higher reliability and expandability, and the requirements of a user on calculating the times of the wind control related behaviors in various modes such as a single-system single-line mode as a category, a single-system multi-row mode as a category, a multi-system single-line mode as a category, a multi-system multi-behavior category and the like can be responded with lower operation resource cost, higher flexibility and higher real-time performance.
Drawings
In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views. The drawings illustrate various embodiments generally by way of example and not by way of limitation, and together with the description and claims serve to explain the disclosed embodiments. The same reference numbers will be used throughout the drawings to refer to the same or like parts, where appropriate. Such embodiments are illustrative, and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
FIG. 1 illustrates an example of the naming of primary keys in a primary key-value storage system according to an embodiment of the present disclosure.
FIG. 2 illustrates an example of a member being a member of an ordered set of values in a primary key-value storage system according to an embodiment of the disclosure.
Fig. 3 shows a flowchart of a method for counting the number of times of a wind control related behavior according to an embodiment of the present disclosure.
FIG. 4 illustrates a schematic diagram of calculating the number of times a wind-related behavior is calculated according to requirements of different patterns of a user according to an embodiment of the present disclosure.
Fig. 5 illustrates a specific example of a primary key-value storage system according to an embodiment of the present disclosure.
Fig. 6 shows a block diagram of a device for counting the number of times of a wind-control related behavior according to an embodiment of the present disclosure.
Detailed Description
For a better understanding of the technical aspects of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings. Embodiments of the present disclosure are described in further detail below with reference to the figures and the detailed description, but the present disclosure is not limited thereto. The order in which the various steps described herein are described as examples should not be construed as a limitation if there is no requirement for a context relationship between each other, and one skilled in the art would know that sequential adjustments may be made without destroying the logical relationship between each other, rendering the overall process impractical.
FIG. 1 illustrates an example of the naming of primary keys in a primary key-value storage system according to an embodiment of the present disclosure.
In some embodiments, the primary key-value storage system may be implemented via a cross-platform non-relational database. In some embodiments, the primary key-value store may be implemented, for example, based on Redis, with values (values) in the primary key-values employing sorted sets (sorted sets) type based data. In particular, an ordered set type is a set of elements of a string type, and there are no duplicate set members. In some embodiments, each string type element is associated with a score (score) of double type, and members in the set are sorted from small to large by score. Members of the ordered set are unique, but the scores corresponding to the members' elements may be repeated. In other embodiments, the primary key-value storage system may also be implemented based on other tools besides Redis or a self-designed method, as long as the wind control related behavior record can be stored in the manner described in each embodiment of the present disclosure and the method for calculating the number of times of the wind control related behavior according to the present disclosure is supported, and the specific implementation manner is not limited.
In the example of fig. 1, the name of the primary key 100 includes a system name 11, a behavior category 12, a date 13, an hour 14, and the like, wherein the behavior category 12 may be defined according to at least one of an operation type, an execution subject, a medium, and an execution object of the wind control related behavior, for example. In some embodiments, the anemometry-related activities include, but are not limited to, registration, login, transaction, password entry, password error, and password modification activities. In some embodiments, the behavior category 12 may further include a plurality of subcategories, such as subcategory 121 through subcategory 12n, wherein subcategory 121 may represent, for example, cell phone registration behavior, and the like, to name but a few. In other embodiments, the name of the primary key may also include any other information associated with the wind control related action, such as the geographical location of the occurrence of the record, which may be identified and recorded as a sub-category in the action category. In addition, in addition to the date 13 and hour 14, the name of the primary key 100 may also include a higher time unit, and the higher the time resolution, the higher the time resolution of the record included in a single primary key when subsequently performing a query based on the primary key and calculating the number of times of the wind control related behavior.
FIG. 2 illustrates an example of a member being a member of an ordered set of values in a primary key-value storage system according to an embodiment of the disclosure.
In FIG. 2, the entry elements for a member 200 in the ordered set may include a system name 21, a behavior category 22, a timestamp 23, and a random character 24, with timestamp 23 referring to a string of numbers with a current time accurate to milliseconds, and in this example, the value of timestamp 23 as score associated with member 200. In some embodiments, the system name 21 and the action category 22 of the member 200 in the ordered set, and the plurality of sub-categories, such as sub-category 221 through sub-category 22n, further included in the action category 22, correspond to the system name 11, the action category 12, and the sub-category 121 through sub-category 12n, respectively, included in the name of the primary key 100, while the timestamp 23 is a time value accurate to milliseconds, with a higher precision than the date 13 and hour 14. In some embodiments, the random characters 24 are unique identifiers that distinguish members of the ordered set from each other, and members of the set may be sorted from small to large by score in the primary key-value storage system, while members of the set having the same score may be distinguished by their respective associated different random characters 24. In some embodiments, the random character 24 may be generated using any method that ensures that members of the ordered set do not repeat.
In the above manner, the timestamp of the occurrence of the record corresponding to the member 200 is defined as the score value, and all records of the wind-control related behaviors with the same timestamp can be conveniently queried and counted through the score value, and other calculations and analyses and the like are performed on the basis of the score value.
In some embodiments, in a primary key-value storage system, the respective sets of values in an ordered set type may be implemented by a hash table, namely: and pre-mapping (pre-image) the main key through a hash function to obtain an array subscript, and taking the array subscript as the storage position of the value corresponding to the main key. In the primary key-value storage system in the above manner, the maximum number of members in the set is 2321 (i.e. 4294967295, each set can store more than 40 hundred million members), not only the capacity is large, but also the time complexity of adding, deleting and searching the members is O (1), so that the method has high real-time performance when the number of times of the wind control related behaviors is calculated.
According to the definition mode of the ordered set member in the primary key-value storage system and the primary key-value storage system shown in fig. 1 and fig. 2, the system can have a higher data storage capacity, and for example, when a new system or a new behavior category (subcategory) is added, the storage structure of the existing recorded data does not need to be changed, and only the incremental supplementation is performed on the primary key-value storage system according to the rule definition shown in fig. 1 and fig. 2, so that the system also has higher reliability and better expandability.
Fig. 3 shows a flowchart of a method for counting the number of times of a wind control related behavior according to an embodiment of the present disclosure.
As shown in fig. 3, in step S301, each of the climate control related behavior records may first be stored as members with values of an ordered set type using a primary key-value storage system, such that entry elements of each member include at least a system name, a behavior category, and a timestamp containing at least date and hour information.
In some embodiments, the wind-related behavior includes, but is not limited to, at least one of registration, login, transaction, entering a password, password error, and modifying a password. In some embodiments, the behavior classes may be defined according to at least one of an operation type, an execution subject, via media, and an execution object of the behavior. In other embodiments, the behavior category may further have a plurality of subcategories, and the timestamp may further include a time unit with higher resolution, and the finer the subcategory is, the higher the time resolution is, and when the number of subsequent queries and calculations of the wind control related behaviors are performed based on the primary key, the higher the resolution and recorded time resolution of the system included in the single primary key are.
In some embodiments, when the ordered set is used as the value of the primary key, and each of the records of the wind control related behavior is stored as a member of the ordered set, the storage may be implemented by a hash table, that is: and pre-mapping (pre-image) the primary key through a hash function to obtain an array subscript, and taking the array subscript as the storage position of the ordered set corresponding to the primary key. In the primary key-value storage system using the above-described method, the maximum number of members in the ordered set is 2321 (i.e. 4294967295, each set can store more than 40 hundred million members), not only the capacity is large, but also the time complexity of adding, deleting and searching the members is O (1), so that the method has high real-time performance when the number of times of the wind control related behaviors is calculated.
Next, in step S302, an operation of the user specifying a time period and a behavior category for which a representative number of times of the wind control related behaviors are to be calculated may be received by the processor. Taking the primary key-value storage system defined in FIG. 1 as an example, assuming that the row category in the primary key name defines "Login" and "Via media" thereof, then the user may specify the calculation: the total number of times of "logging in" idp "system via" web "from" 0 point "to" 24 point "on" 31/12/2020. In some embodiments, the representative number of wind control related actions includes, but is not limited to, at least one of a total number, a maximum number, a minimum number, and an average number of wind control related actions. In other embodiments, the representative times of other types of wind control related behaviors may be calculated according to actual requirements, and are not specifically limited herein. In some embodiments, the user may also specify the representative number of the wind control related behaviors to be calculated in other ways, including specifying a single system and multiple behavior categories, specifying multiple systems and a single behavior category, and specifying multiple systems and multiple behavior categories, for example only, the user may specify the calculation: and (3) the total times of logging in the idp system through the web and the mobile phone App at 31 days 12/2020 and 0 point.
In some embodiments, in response to the user specifying the operation of the time period and the behavior class of the wind control related behavior to be calculated for the representative number of times, the processor may acquire, in step S303, a set of the specified behavior classes within the specified time period based on the time stamp, and further calculate, in step S304, the representative number of times of the wind control related behavior based on the acquired set of the specified behavior classes within the specified time period in a case where the set of the specified behavior classes within the specified time period is acquired according to the operation specified by the user.
In addition to this, several different cases described below may be included. In some embodiments, for example, in a case where a user specifies multiple systems and a single behavior category, the processor may obtain, for each system, a set of specified behavior categories within a specified time period based on the timestamp, and merge the set of specified behavior categories for each system to obtain a merged set of multiple system-specified behavior categories; and calculating the representative times of the wind control related behaviors based on the combined set of the behavior classes specified by the multiple systems.
In some embodiments, in the case that the user specifies a single system and a plurality of behavior categories, the processor may obtain a set of behavior categories within a specified time period based on the timestamp, and merge the obtained set of behavior categories within the specified time period to obtain a merged set of multiple behavior categories; calculating a representative number of the wind control related behaviors based on a consolidated set of multiple behavior categories.
In some embodiments, for example, in a case where a user specifies multiple systems and multiple behavior categories, the processor may obtain, for each system, a set of behavior categories within a specified time period based on the timestamp, and merge the obtained set of behavior categories within the specified time period to obtain a merged set of multiple behavior categories; merging the merged sets of the multiple behavior categories of each system to obtain a merged set of the multiple behavior categories of the multiple systems; and calculating the representative times of the wind control related behaviors based on the multi-system multi-behavior category combined set.
Next, a method of calculating the representative times of the specific wind-control related behavior will be described in detail with reference to fig. 4. FIG. 4 illustrates a schematic diagram of calculating a representative number of times a wind-related behavior is calculated according to requirements of different patterns of a user according to an embodiment of the disclosure. In some embodiments, the representative times for calculating the wind control related behaviors may be various calculation forms such as counting, summing, maximizing, minimizing, averaging and the like for a specific wind control related behavior, and may be various calculation requirements such as calculating the occurrence times of the wind control related behavior within a specified time, the times of occurrence and compounding of a specific condition, the total amount/average amount of money involved in an occurrence event, and the maximum/small value of an occurrence event result value.
In the case where each of the wind control related behavior records is set as a member by the value of the ordered set type using the aforementioned primary key-value storage system shown in fig. 1 and 2, in the three-dimensional coordinate system 400 shown in fig. 4, the X axis represents the time when the wind control related behavior record occurs (i.e., score corresponding to the record), the Y axis represents the behavior class of the wind control related behavior record, the Z axis represents the system to which the wind control related behavior record belongs, and the origin O (T0, B0, S0) of the coordinate system represents the wind control related behavior record having the time of the system S0, the behavior class B0, and the score T0.
In some embodiments, any point in the three-dimensional coordinate system 400 may correspond to one of the plurality of wind-related behavior records, and in a system with concurrency, may correspond to a plurality of wind-related behavior records of the same system, the same behavior category, and the same score, and the plurality of wind-related behavior records may be distinguished by a unique random character in the record entry.
In the three-dimensional coordinate system 400 defined above, different line segments also contain recordings of the wind-control related behavior with different meanings. In some embodiments, a line segment at any spatial location and parallel to the X-axis represents a collection of anemometry-related behavior records for a particular score value interval corresponding to the line segment location with the same system and the same behavior classification. In some embodiments, a line segment at any spatial location and parallel to the Y-axis represents a collection of anemometry-related behavior records for each behavior category corresponding to the line segment location with the same system and the same score. In other embodiments, a line segment at any spatial location and parallel to the Z-axis represents a collection of the wind-related behavior records for each system corresponding to the line segment location with the same behavior category and the same score.
Similarly, in the three-dimensional coordinate system 400, different planes contain wind control related behavior records with different meanings. In some embodiments, a plane parallel to the plane XOY represents a collection of the same system of the anemometry-related behavior records that contain all behavior classes and all scores. In some embodiments, a plane parallel to plane XOZ represents a collection of the weatherometer-related behavior records that contain the respective system and all scores with the same behavior category. In other embodiments, a plane parallel to plane YOZ represents a collection of anemometry-related behavior records having the same score, including the respective system and all behavior classes.
The method of calculating the number of times of the wind-control related behavior according to the requirements of different modes of the user is further illustrated by the following example.
When the user specifies that the total number of times the wind-related behaviors are to be computed within a single system S0, a single behavior class B0, and a time period T3 through T8, where the dates and hours for T2 through T8 are between 23 and 24 on 12/31/2020/31/24, then the primary key to be queried may first be identified and assembled according to, for example, the naming convention of the primary key in the primary key-value storage system shown in fig. 1, which in this example is S0: B0:20201231:24, and then the processor may obtain a set of wind-related behaviors for score within a time interval corresponding to the precision of T3 on 12/31/2020/31 and T8 on 12/2020, and a set S0B0 corresponding to all records on the segment 41 in the X-axis direction in fig. 4. On the basis of acquiring the required set S0B0, the representative number of times to be calculated by the user is calculated, and in this example, since the total number of times to be calculated by the user is total, the number of records in the set S0B0 only needs to be returned.
In other embodiments, for example, when the user specifies that the average number of times per minute of the wind-related behaviors in the plurality of systems including the system S0 to the system S6, the single behavior category B6, and the time period T1 to T1 are to be calculated, as in the case of the aforementioned T1 to T1, the dates and hours corresponding to the time periods T1 to T1 are also located between 23 and 24 on 12/31/2020/24, similarly, the primary key to be queried may be first identified and assembled according to the naming rules of the primary keys in the primary key-value storage system, and in this example, since a plurality of systems are involved, it is necessary to assemble a plurality of primary keys, S1: B1: 1: 3624, S1: 1, and the time of the primary key is then processed by the primary key processor for each of the time period T1 and the primary key may be obtained by the primary key-year-time-score 2020 and the primary key-score of the primary key-score The sets of the wind control related behaviors in the time stamp interval of the corresponding precision of the time are respectively sets S0B6, S1B6, S2B6, S3B6, S4B6, S5B6, and S6B6, and the sets are merged to obtain a merged set, which corresponds to a set S026B6 formed by all records on a plane 42 parallel to the XOZ plane in fig. 4. On the basis of obtaining the desired combined set S026B6, the representative number to be calculated by the user is calculated, and in this example, since the average number per minute is to be calculated by the user, it is necessary to return the value of the total number recorded in the set S026B6 divided by the number of minutes contained in T1 to T7 as the average number to be calculated by the user.
In some embodiments, for example, when the user specifies that the number of times of the wind control related behavior of the behavior category with the largest number of times among the plurality of behavior categories including the system S0, the B0 to the B0, and the wind control related behaviors in the time period T0 to the T0 is to be calculated, as in the case of the aforementioned T0 to T0, the dates and hours corresponding to the time periods T0 to T0 are also located between 23 and 24 on 31/12/2020, similarly, the primary key to be queried may be first identified and assembled according to the naming rule of the primary key in the primary key-value storage system, and in this example, since a plurality of behavior categories are involved, it is necessary to assemble a plurality of primary keys, which are S0: B0: 0: 3624: S0: 0, then, for each primary key, the processor acquires sets of the wind control related behaviors of score in a time stamp interval with corresponding precision at the time T5 on 31 st 2020 and at the time T7 on 31 st 2020, which are respectively the sets S0B0, S0B1, S0B2, S0B3, S0B4, S0B5, S0B6 and S0B7, and merges the sets to obtain a merged set, which in fig. 4 corresponds to the set S0B027 formed by all records on the plane 43 on XOY. On the basis of obtaining the required combined set S0B027, calculating the representative number of times to be calculated by the user, in this example, since the number of times to be calculated by the user is the number of times of the wind control related behavior of the behavior class that occurs the most frequently, it is necessary to first identify the behavior class that occurs the most frequently, and only as an example, the number of times to occur the behavior class B7 is the most by querying, and then it is the number of records of which the behavior class is B7 in the set S0B027 that should be returned.
In other embodiments, for example, when the user specifies that the number of times of occurrence of the wind control related behavior is the smallest among the wind control related behaviors including the systems S0 through S6, the behavior classes B0 through B7, and the time T4 to be calculated, the number of times of the wind control related behavior, where T4 corresponds to a date and hour between 23 and 24 on 31/12/2020, and, similarly, the primary key to be queried may be first identified and assembled based on the naming convention for the primary key in the primary key-value storage system, in the present example, since a plurality of systems and a plurality of behavior classes are involved, a plurality of primary keys need to be assembled, and then, for each primary key, a set of the wind-related behaviors of the timestamp with corresponding accuracy of score at T4 time 31/12/2020 is obtained by the processor, and each set can be represented by the following matrix:
Figure BDA0003369063900000101
the above sets are merged to obtain a merged set, which in fig. 4 corresponds to a set S026B027 made up of all records on a plane 44 parallel to the YOZ plane. On the basis of obtaining the required combined set S026B027, the representative number of times to be calculated by the user is calculated, in this example, since the number of times to be calculated by the user is the number of times to have the wind control related behavior in the system with the smallest number of times to have the wind control related behavior, it is necessary to first identify the system with the smallest number of times to have the wind control related behavior, and only by way of example, the system with the smallest number of times to have the wind control related behavior is the system S3 through querying, and then the number of records corresponding to the system S3 in the set S026B027 should be returned. It is to be noted that it is preferable that,
in some other embodiments, the user may also specify to calculate a plurality of systems, a plurality of behavior categories, and a representative number of times of occurrence of the wind control related behavior in a specific time period, in this case, the combined set is represented by a body composed of a plurality of planes similar to the plane 44 in fig. 4, and other calculation steps are similar to the foregoing ones and are not described herein again.
By the method for calculating the times of the wind control related behaviors shown in fig. 4, points, line segments, planes and bodies in a coordinate system respectively represent a set or a combined set of records of different sections in a primary key-value storage system, the query and statistical method is simple and quick, and the multi-angle requirement for calculating the times of the wind control related behaviors of a user in multiple modes such as a single-system single-line mode as a category, a single-system multi-row mode as a category, a multi-system single-line mode as a category, a multi-system multi-behavior category and a multi-system multi-behavior category can be responded with lower operation resource cost, higher flexibility and higher real-time performance.
Fig. 5 illustrates a specific example of a primary key-value storage system according to an embodiment of the present disclosure. The partial structure of a primary key-value storage system 500 implemented in accordance with the naming of the primary keys and the definition of members in an ordered set shown in FIGS. 1 and 2 is designed as shown in FIG. 5. The process of calculating the number of times of the wind-control related behavior in the system shown in fig. 5 according to the requirements of different modes of the user will be described below by way of a specific example.
In some embodiments, the user specifies the number of web logins to be made during the 15-point-of-day period 2021-09-18, and the number of records for this key may be obtained directly from the key "idp: login: web:20210918: 15".
In some embodiments, the user specifies the number of web logins to be performed over a 15:10:00 to 15:20:00 time period, e.g., 15 o' clock on the day 2021-09-18, then the scope of score may be limited when data is obtained by the key "idp: login: web:20210918: 15". The minimum value of the limiting range is 2021-09-1815: 10:00 converted into the timestamp with the corresponding precision, and the maximum value of the limiting range is 2021-09-1815: 20:00 converted into the timestamp with the corresponding precision.
In some embodiments, the user specifies to count the number of logins and transfers that the device AAA is on the web during the 15 o' clock period 2021-09-18, then the data for this key may be first obtained directly from the key value "idp: log: web:20210918: 15" and filtered by member (member) for non-device AAA to get "result 1", then the data for this key may be obtained directly from the key value "idp: transfer: web:20210918: 15" and filtered by member (member) for non-device AAA to get "result 2".
In some embodiments, the user specifies the total number of idp system and scs system logins to be calculated 2021-09-18 at 15 points of the day, the total number of keys may be obtained first directly according to the key "idp: logic: web:20210918: 15" to obtain "result 1", then directly according to the key "scs: logic: web:20210918: 15" to obtain "result 2", and then "result 1" + "result 2" may obtain the required total number of times. In addition, some information such as equipment, IP and the like can be filtered according to the value in the member.
In some embodiments, the user specifies the number of logins and transfers to be counted in the idp system, scs system, over the 15-point period of time 2021-09-18, then this total number of keys may be obtained first directly from the key "idp: login: web:20210918: 15", i.e.: the login times of the idp system 15:00 in the hour can be used as 'result 1', and then the total number of the key is directly obtained according to the key value 'scs: login: web:20210918: 15', namely: the number of logins in the hour of scs system 15:00 may be regarded as "result 2", and then the total number of keys is obtained directly according to the key value "idp: transaction: web:20210918: 15", that is: the number of transactions in the idp system 15:00 hour may be referred to as "result 3", and finally, the total number of keys is obtained directly according to the key value "scs: transaction: web:20210918: 15", that is: the number of transactions in this hour of the scs system 15:00 may be taken as "result 4".
In addition, in other embodiments, content filtering in some scenarios can be realized through the number, for example, in a login scenario, IP information can be stored in the number, so that a specific IP can be further screened, and in a transaction scenario, transaction amount can be stored in the number, so that the amount of a transaction can be screened or summed.
Furthermore, in other embodiments, since the capacity of the ordered set type key in the primary key-value storage system can accommodate more than 40 hundred million members, in some cases, the number of members and the space capacity in the key can be reduced in various ways, for example, the expired data of the key can be cleared at regular time, and since the timestamp stored by the fraction of the ordered set type (score), the old data can be easily intercepted and deleted according to score. In other embodiments, the unused keys may be periodically cleared according to the use of the keys, so as to reduce the occupation of the storage space.
Embodiments of the present disclosure also provide a device for calculating the number of times of a wind-control related behavior, and fig. 6 shows a block diagram of a device 600 for calculating the number of times of a wind-control related behavior according to an embodiment of the present disclosure.
In some embodiments, the number of times calculation apparatus 600 includes a primary key-value storage system 602 and a processor 604, wherein the primary key-value storage system 602 may be configured to store each of the climate control related behavior records as members in an ordered set type of value such that the entry elements of each member include at least a system name, a behavior category, and a timestamp containing at least date and hour information.
In some embodiments, the processor 604 may be configured to receive an operation in which a user specifies a time period and a behavior category for the wind control related behavior for which a representative number of times is to be calculated, obtain a set of specified behavior categories within the specified time period based on the timestamp, and calculate the representative number of wind control related behaviors based on the obtained set of specified behavior categories within the specified time period.
In still other embodiments, the processor 604 may be further configured to, in a case where the user specifies a single system and multiple behavior classes, obtain a set of the behavior classes within a specified time period based on the timestamp, merge the obtained set of the behavior classes within the specified time period to obtain a merged set of the multiple behavior classes, and further calculate the representative number of the wind control related behaviors based on the merged set of the multiple behavior classes.
In other embodiments, when the user specifies multiple systems and a single behavior category, for each system, a set of each behavior category in a specified time period may be obtained based on a timestamp, the sets of the specified behavior categories of each system may be merged to obtain a merged set of the behavior categories specified by multiple systems, and further, based on the merged set of the behavior categories specified by multiple systems, the representative times of the wind control related behaviors may be calculated.
In other embodiments, when the user specifies multiple systems and multiple behavior categories, for each system, a set of the behavior categories in a specified time period may be obtained based on a timestamp, the obtained sets of the behavior categories in the specified time period may be merged to obtain a merged set of the multiple behavior categories, the merged sets of the multiple behavior categories of each system may be merged to obtain a merged set of the multiple system multiple behavior categories, and the representative times of the wind control related behaviors may be calculated based on the merged set of the multiple system multiple behavior categories.
In some embodiments, as shown in fig. 6, the times counting apparatus 600 may further include a memory 606, wherein the memory 606 may store software components, such as an operating system, a communication module, an interaction module, and an application program, and is adapted to store instructions or programs executable by the processor 604. In some embodiments, primary key-value storage system 602, processor 604, and memory 606 are connected by a bus 608. In some embodiments, processor 604 may be a stand-alone microprocessor or a collection of one or more microprocessors. Thus, processor 604 performs the method steps of the disclosed embodiments as described above by executing the commands stored by memory 606. The bus 608 connects the above components together, and also connects the above components to a display controller 610 and a display and input/output (I/O) section 612. Display and I/O portion 612 may include a display and mouse, keyboard, modem, network interface, touch input device, motion sensing input device, printer, and other devices known in the art. Typically, the display and I/O unit 612 is connected to other parts of the count device 600 via the I/O control unit 614.
In some embodiments, the number calculating device 600 and its components may be integrated or distributed, and may be centrally located in the same location, or may be distributed in multiple locations, for example, in a cloud.
The above-described flowchart and/or block diagrams of methods, systems, and computer program products according to embodiments of the present disclosure describe various aspects of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations 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, 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/acts specified in the flowchart and/or block diagram block or blocks.
Moreover, although exemplary embodiments have been described herein, the scope thereof includes any and all embodiments based on the disclosure with equivalent elements, modifications, omissions, combinations (e.g., of various embodiments across), adaptations or alterations. The elements of the claims are to be interpreted broadly based on the language employed in the claims and not limited to examples described in the present specification or during the prosecution of the application, which examples are to be construed as non-exclusive. It is intended, therefore, that the specification and examples be considered as exemplary only, with a true scope and spirit being indicated by the following claims and their full scope of equivalents.
The above description is intended to be illustrative and not restrictive. For example, the above-described examples (or one or more versions thereof) may be used in combination with each other. For example, other embodiments may be used by those of ordinary skill in the art upon reading the above description. In addition, in the foregoing detailed description, various features may be grouped together to streamline the disclosure. This should not be interpreted as an intention that a disclosed feature not claimed is essential to any claim. Rather, the subject matter of the present disclosure may lie in less than all features of a particular disclosed embodiment. Thus, the following claims are hereby incorporated into the detailed description as examples or embodiments, with each claim standing on its own as a separate embodiment, and it is contemplated that these embodiments may be combined with each other in various combinations or permutations. The scope of the invention should be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
The above embodiments are only exemplary embodiments of the present disclosure, and are not intended to limit the present invention, the scope of which is defined by the claims. Various modifications and equivalents may be made thereto by those skilled in the art within the spirit and scope of the present disclosure, and such modifications and equivalents should be considered to be within the scope of the present invention.

Claims (10)

1. A method for calculating the times of related wind control behaviors is characterized by comprising the following steps:
storing, with a primary key-value storage system, each of the anemometry-related behavior records as members in an ordered set type of value such that entry elements of each member include at least a system name, a behavior category, and a timestamp containing at least date and hour information;
receiving, by a processor, an operation of a user specifying a time period and a behavior category for which a representative number of times of the wind-control-related behaviors are to be calculated;
obtaining, by the processor, a set of specified behavior categories over a specified time period based on a timestamp; and
calculating, by the processor, a representative number of times the wind-control-related behavior based on the obtained set of specified behavior classes within the specified time period.
2. The count calculation method according to claim 1, wherein in the case where a single system and a plurality of behavior categories are specified by a user, the processor,
a set of individual behavior categories within a specified time period is retrieved based on the time stamp,
merging the acquired sets of all behavior categories in the specified time period to obtain a merged set of a plurality of behavior categories;
calculating a representative number of the wind control related behaviors based on a consolidated set of multiple behavior categories.
3. The count calculation method according to claim 1, wherein in the case where a user specifies a plurality of systems and a single action category, the processor,
for each of the systems, it is preferred that,
a set of specified behavior categories within a specified time period is retrieved based on the timestamp,
merging the appointed behavior category sets of each system to obtain a merged set of the multi-system appointed behavior categories;
and calculating the representative times of the wind control related behaviors based on the combined set of the behavior classes specified by the multiple systems.
4. The count calculation method according to claim 1, wherein in the case where a plurality of systems and a plurality of behavior categories are specified by a user, the processor,
for each of the systems, it is preferred that,
a set of individual behavior categories within a specified time period is retrieved based on the time stamp,
merging the acquired sets of all behavior categories in the specified time period to obtain a merged set of a plurality of behavior categories;
merging the merged sets of the multiple behavior categories of each system to obtain a merged set of the multiple behavior categories of the multiple systems;
and calculating the representative times of the wind control related behaviors based on the combined set of the multi-system multi-behavior categories.
5. The number calculation method according to claim 1, wherein the wind-control related behavior includes at least one of registration, login, transaction, password input, password error, and password modification, and the representative number of the wind-control related behavior includes at least one of a total number, a maximum number, a minimum number, and an average number of the wind-control related behavior.
6. The number calculating method according to claim 1, wherein the entry elements of the respective members include a system name, a behavior category, a time stamp and a random character, and the time stamp includes time information on the order of date, hour, minute, second up to millisecond.
7. The number calculation method according to claim 1, wherein the behavior category is defined according to at least one of an operation type, an execution subject, via media, and an execution object of the behavior.
8. The count method according to claim 1, wherein the primary key-value storage system is implemented via a cross-platform non-relational database.
9. A device for counting the number of times of a wind-related activity, comprising:
a primary key-value storage system storing each of the climate control related behavior records as members with values of an ordered set type such that entry elements of each member include at least a system name, a behavior category, and a time stamp containing at least date and hour information; and
a processor configured to:
receiving operation of a user for specifying a time period and a behavior category of the wind control related behaviors of which the representative times are to be calculated;
acquiring a set of specified behavior categories within a specified time period based on the timestamp; and
calculating a representative number of the wind control related behaviors based on the acquired set of specified behavior classes within the specified time period.
10. The count device of claim 9, wherein the processor is further configured to:
in the case where a user specifies a single system and multiple behavior categories,
a set of individual behavior categories within a specified time period is retrieved based on the time stamp,
merging the acquired sets of all behavior categories in the specified time period to obtain a merged set of a plurality of behavior categories;
calculating a representative number of the wind control related behaviors based on a merged set of multiple behavior categories; in the case where the user specifies multiple systems and a single category of behavior,
for each of the systems, it is preferred that,
a set of individual behavior categories within a specified time period is retrieved based on the time stamp,
merging the appointed behavior category sets of each system to obtain a merged set of the multi-system appointed behavior categories;
calculating the representative times of the wind control related behaviors based on the merged set of the behavior classes specified by the multiple systems;
in the case where the user specifies multiple systems and multiple behavior categories,
for each of the systems, it is preferred that,
a set of individual behavior categories within a specified time period is retrieved based on the time stamp,
merging the acquired sets of all behavior categories in the specified time period to obtain a merged set of a plurality of behavior categories;
merging the merged sets of the multiple behavior categories of each system to obtain a merged set of the multiple behavior categories of the multiple systems;
and calculating the representative times of the wind control related behaviors based on the combined set of the multi-system multi-behavior categories.
CN202111391676.4A 2021-11-23 2021-11-23 Method and device for calculating times of wind control related behaviors Active CN113918623B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111391676.4A CN113918623B (en) 2021-11-23 2021-11-23 Method and device for calculating times of wind control related behaviors

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111391676.4A CN113918623B (en) 2021-11-23 2021-11-23 Method and device for calculating times of wind control related behaviors

Publications (2)

Publication Number Publication Date
CN113918623A true CN113918623A (en) 2022-01-11
CN113918623B CN113918623B (en) 2022-12-02

Family

ID=79247858

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111391676.4A Active CN113918623B (en) 2021-11-23 2021-11-23 Method and device for calculating times of wind control related behaviors

Country Status (1)

Country Link
CN (1) CN113918623B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415952A (en) * 2018-02-02 2018-08-17 北京腾云天下科技有限公司 User data storage method, label computational methods and computing device
CN108572874A (en) * 2018-04-26 2018-09-25 掌阅科技股份有限公司 Data re-transmitting method, electronic equipment based on ordered set and storage medium
CN110083501A (en) * 2018-01-25 2019-08-02 北京京东尚科信息技术有限公司 Interface calls method of counting and device
CN110427438A (en) * 2019-07-30 2019-11-08 中国工商银行股份有限公司 Data processing method and its device, electronic equipment and medium
CN110727727A (en) * 2019-10-15 2020-01-24 深圳前海微众银行股份有限公司 Statistical method and device for database
US20200311132A1 (en) * 2019-03-27 2020-10-01 Western Digital Technologies, Inc. Key value store using change values for data properties
US20200311029A1 (en) * 2019-03-27 2020-10-01 Western Digital Technologies, Inc. Key value store using generation markers

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083501A (en) * 2018-01-25 2019-08-02 北京京东尚科信息技术有限公司 Interface calls method of counting and device
CN108415952A (en) * 2018-02-02 2018-08-17 北京腾云天下科技有限公司 User data storage method, label computational methods and computing device
CN108572874A (en) * 2018-04-26 2018-09-25 掌阅科技股份有限公司 Data re-transmitting method, electronic equipment based on ordered set and storage medium
US20200311132A1 (en) * 2019-03-27 2020-10-01 Western Digital Technologies, Inc. Key value store using change values for data properties
US20200311029A1 (en) * 2019-03-27 2020-10-01 Western Digital Technologies, Inc. Key value store using generation markers
CN110427438A (en) * 2019-07-30 2019-11-08 中国工商银行股份有限公司 Data processing method and its device, electronic equipment and medium
CN110727727A (en) * 2019-10-15 2020-01-24 深圳前海微众银行股份有限公司 Statistical method and device for database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HAN CHEN等: ""Sorting Large Data Sets with FPGA-Accelerated Samplesort"", 《2019 IEEE 27TH ANNUAL INTERNATIONAL SYMPOSIUM ON FIELD-PROGRAMMABLE CUSTOM COMPUTING MACHINES (FCCM)》 *
叶虎: ""一种基于瓦记录磁盘的键值存储系统的研究与实现"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Also Published As

Publication number Publication date
CN113918623B (en) 2022-12-02

Similar Documents

Publication Publication Date Title
US11308092B2 (en) Stream processing diagnostics
CN102945240B (en) Method and device for realizing association rule mining algorithm supporting distributed computation
CN101739292B (en) Based on isomeric group operation self-adapting dispatching method and the system of application characteristic
CN111339073A (en) Real-time data processing method and device, electronic equipment and readable storage medium
Karumuri et al. Towards observability data management at scale
EP2957073B1 (en) Queue monitoring and visualization
CN111177134A (en) Data quality analysis method, device, terminal and medium suitable for mass data
WO2017201057A1 (en) Multidimensional application monitoring visualization and search
Isakov et al. HPC I/O throughput bottleneck analysis with explainable local models
CN111125116A (en) Method and system for positioning code field in service table and corresponding code table
CN110471945A (en) Processing method, system, computer equipment and the storage medium of alive data
CN103455509A (en) Method and system for acquiring time window model parameter
Suriarachchi et al. Big provenance stream processing for data intensive computations
CN113918623B (en) Method and device for calculating times of wind control related behaviors
CN108920134B (en) Method and device for automatically generating design document
US10042902B2 (en) Business rules influenced quasi-cubes with higher diligence of data optimization
CN116302867A (en) Behavior data analysis method, apparatus, computer device, medium, and program product
CN115481026A (en) Test case generation method and device, computer equipment and storage medium
CN112131291B (en) Structured analysis method, device and equipment based on JSON data and storage medium
CN115293685A (en) Logistics order state tracking method, device, equipment and storage medium
US20210312365A1 (en) Analysis of resources utilized during execution of a process
CN109656981B (en) Data statistics method and system
US8195604B2 (en) System and method for verifying IMS databases on a mainframe computer
EP4081911A1 (en) Edge table representation of processes
US20160378285A1 (en) Automatic Detection of Semantics

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