CN106997431B - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN106997431B
CN106997431B CN201610046778.5A CN201610046778A CN106997431B CN 106997431 B CN106997431 B CN 106997431B CN 201610046778 A CN201610046778 A CN 201610046778A CN 106997431 B CN106997431 B CN 106997431B
Authority
CN
China
Prior art keywords
bitmap
time period
user
target
unit time
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
CN201610046778.5A
Other languages
Chinese (zh)
Other versions
CN106997431A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610046778.5A priority Critical patent/CN106997431B/en
Publication of CN106997431A publication Critical patent/CN106997431A/en
Application granted granted Critical
Publication of CN106997431B publication Critical patent/CN106997431B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/316User authentication by observing the pattern of computer usage, e.g. typical user behaviour

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Social Psychology (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

In the present invention, for any user and any operation feature, no matter how many times the user has the operation feature, the corresponding relationship among the user identifier, the operation feature and the bitmap in the embodiment of the present invention only stores one user identifier of the user and one operation feature, and does not store the execution time, but uses the bitmap to represent whether the operation feature appears in each unit time period, wherein the bitmap corresponding to a certain user identifier and a certain operation feature includes a plurality of single-character values, and any single-character value can represent whether the user corresponding to the user identifier appears the operation feature in the unit time period corresponding to the single-character value, so compared with the prior art, the embodiment of the present invention can save the storage space.

Description

Data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus.
Background
Currently, a user performs sensitive operations such as payment, transfer or login on a network more and more times, the sensitive operations are often related to the property of the user, and therefore, in order to protect the property of the user from being damaged, when the user performs a certain sensitive operation, it is necessary to judge whether the sensitive operation is at risk, and interrupt the sensitive operation when the sensitive operation is at risk.
Currently, the following methods are generally used to determine whether the sensitive operation is at risk, including: the method comprises the steps of obtaining the current operation characteristics of the sensitive operation, obtaining the historical operation characteristics of each sensitive operation executed by a user in a period of time before the sensitive operation is executed, judging whether the current operation characteristics and the historical operation characteristics have obvious differences or not, and determining that the sensitive operation has risks when the obvious differences exist.
In order to determine whether each sensitive operation executed by the user is risky by using the method, each time the user executes one sensitive operation, the execution time when the sensitive operation is executed and the operation characteristics of the sensitive operation need to be acquired, and then the user identifier of the user, the operation characteristics and the execution time are combined into one record and stored in the corresponding relationship among the locally stored user identifier, the operation characteristics and the execution time, wherein the execution time is expressed in the form of year, month, day, hour, minute and second, for example, 35 minutes and 03 seconds in 23/2015 08/05/month; the same is true for other users.
However, the inventor has found in the process of implementing the present invention that such a solution in the related art has at least the following disadvantages:
when a user executes a plurality of sensitive operations a day, a plurality of records about the user are stored in the corresponding relationship, each record contains the user identification, an operation characteristic and an execution time of the user, and occupies a large storage space on the whole.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a data processing method and a data processing device.
According to a first aspect of embodiments of the present invention, there is provided a data processing method, the method including:
when acquiring the execution time of a user in executing sensitive operation and the operation characteristics of the sensitive operation, searching whether a bitmap corresponding to the user identifier and the operation characteristics exists in a first corresponding relation among the user identifier, the operation characteristics and the bitmap;
when a bitmap corresponding to the user identifier and the operation features exists, calculating the number of unit time periods spaced between a unit time period corresponding to a single character numerical value at the tail of the bitmap and a unit time period where the execution time is located; a single character value includes only one character;
supplementing the end of the bitmap with the plurality of first preset single-character values, and supplementing the end of the bitmap supplemented with the plurality of first preset single-character values with a second preset single-character value.
Further, the method further comprises:
when no bitmap corresponding to the user identification and the operation characteristics exists, creating a bitmap according to the second preset single character numerical value;
and forming a record by the user identification, the operating characteristics and the created bitmap and storing the record in the first corresponding relation.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
supplementing the end of the bitmap with the plurality of first preset single-character values and supplementing the end of the bitmap with the plurality of first preset single-character values with a second preset single-character value, comprising:
determining the unit time period of the execution time;
searching the determined target time period of the unit time period in the second corresponding relation;
searching a sub bitmap corresponding to the searched target time period in the second corresponding relation;
and supplementing the plurality of first preset single-character values at the tail of the sub-bitmap, and supplementing a second preset single-character value at the tail of the sub-bitmap supplemented with the plurality of first preset single-character values.
Further, the method further comprises:
when the total number of the types of the operation features of a user to be inquired in a unit time period to be inquired is inquired, searching whether a target record comprising the user identifier of the user to be inquired exists in a first corresponding relation among the user identifier, the operation features and a bitmap;
when target records including the user identification of the user to be inquired exist, judging whether a second preset single character numerical value exists in the single character numerical values corresponding to the unit time period to be inquired or not in a bitmap in each target record;
and counting the number of bitmaps with the second preset single character value in the single character values corresponding to the unit time period to be inquired in all the bitmaps of the target record, and taking the number as the total number.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the judging whether the second preset single character value exists in the single character values corresponding to the unit time period to be inquired includes:
searching a target time period in which the unit time period to be inquired is located in the second corresponding relation;
searching a target sub-bitmap corresponding to the target time period in the second corresponding relation;
searching a single character numerical value corresponding to the unit time period to be inquired in the target sub-bitmap;
and judging whether the searched single character numerical value has the second preset single character numerical value or not.
According to a second aspect of embodiments of the present invention, there is provided a data processing apparatus, the apparatus comprising:
the system comprises a first searching module, a second searching module and a third searching module, wherein the first searching module is used for searching whether a bitmap corresponding to a user identifier and an operation characteristic exists in a first corresponding relation among the user identifier, the operation characteristic and the bitmap when the execution time of a user in executing sensitive operation and the operation characteristic of the sensitive operation are obtained;
the calculation module is used for calculating the number of unit time periods spaced between a unit time period corresponding to a single character numerical value at the tail of the bitmap and the unit time period of the execution time when the bitmap corresponding to the user identifier and the operation characteristic exists; a single character value includes only one character;
and the supplement module is used for supplementing the plurality of first preset single character values at the tail of the bitmap and supplementing a second preset single character value at the tail of the bitmap supplemented with the plurality of first preset single character values.
Further, the apparatus further comprises:
the creating module is used for creating a bitmap according to the second preset single character numerical value when the bitmap corresponding to the user identification and the operation characteristic does not exist;
and the storage module is used for forming a record by the user identification, the operation characteristics and the created bitmap and storing the record in the first corresponding relation.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the supplementary module includes:
the determining unit is used for determining the unit time period of the execution time;
the first searching unit is used for searching the determined target time period of the unit time period in the second corresponding relation;
a second searching unit, configured to search a sub bitmap corresponding to the searched target time period in the second correspondence;
a supplement unit for supplementing the plurality of first preset single character values at the end of the sub-bitmap and supplementing a second preset single character value at the end of the sub-bitmap supplemented with the plurality of first preset single character values.
Further, the apparatus further comprises:
the second searching module is used for searching whether a target record comprising the user identifier of the user to be inquired exists in a first corresponding relation among the user identifier, the operation feature and the bitmap when the total number of the types of the operation features of the user to be inquired in the unit time period to be inquired is inquired;
the judging module is used for judging whether a second preset single character numerical value exists in the single character numerical values corresponding to the unit time period to be inquired or not in a bitmap in the target record for each target record when the target record comprising the user identification of the user to be inquired exists;
and the counting module is used for counting the number of bitmaps with the second preset single character value in the single character values corresponding to the unit time period to be inquired in all the bitmaps of the target record, and taking the number as the total number.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the judging module comprises:
a third searching unit, configured to search the second corresponding relationship for a target time period in which the unit time period to be queried is located;
a fourth searching unit, configured to search for a target sub-bitmap corresponding to the target time period in the second correspondence;
a fifth searching unit, configured to search, in the target sub-bitmap, a single-character numerical value corresponding to the unit time period to be queried;
and the judging unit is used for judging whether the second preset single character numerical value exists in the searched single character numerical values.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
in the prior art, for any user and any operation feature, the user has the operation feature for several times, the corresponding relationship in the prior art stores several user identifications of the user, several operation features and several unit time periods, and the time in the prior art is expressed in a year, month, day, time, minute and second manner.
In the present invention, for any user and any operation feature, no matter how many times the user has appeared the operation feature, only one user identifier and one operation feature are stored in the correspondence among the user identifier, the operation feature and the bitmap in the embodiment of the present invention, and the execution time is not stored, but the bitmap is used to indicate whether the operation feature appears in each unit time period, wherein the bitmap corresponding to a certain user identifier and a certain operation feature includes a plurality of single-character values, and any single-character value can indicate whether the user corresponding to the user identifier appears the operation feature in the unit time period corresponding to the single-character value, so compared with the prior art, the embodiment of the present invention can save the storage space.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow diagram illustrating a method of data processing in accordance with an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of data processing in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating a data processing apparatus according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a data processing method according to an exemplary embodiment, which is used in a terminal, as shown in fig. 1, and includes the following steps.
In step S101, when acquiring an execution time of a user when executing a sensitive operation and an operation feature of the sensitive operation, in a first corresponding relationship among a user identifier, the operation feature, and a bitmap, whether a bitmap corresponding to the user identifier and the operation feature exists is searched for;
in the embodiment of the present invention, the user identifier is used to uniquely identify the user, and is used to identify a name of the user or a user account of the user, which is not limited in the present invention.
Sensitive operations may be payments, transfers, logins, etc. that are related to the user's information about the user's property.
In general, a user performs sensitive operations on a terminal used by the user, and therefore, the operation characteristics may be an IP address of the terminal used by the user or a hardware identifier of the terminal used by the user, and the hardware identifiers of different terminals are different. The terminal may be a mobile phone, a tablet computer, or an intelligent wearable device, and the like, which is not limited in the present invention.
For example, when a user needs to log in a server, the user can obtain a login page for logging in the server on a terminal, wherein the login page comprises a login account input box, a login password input box and a login button, the user can input a user account in the login account input box and a user password in the login password input box, and then the login button is clicked; when the terminal receives the operation of clicking a login button by a user, the terminal determines to receive the sensitive operation, at the moment, the terminal acquires the current moment of the terminal and serves as the execution moment when the user executes the sensitive operation, then acquires a user account and a user password input by the user on a login page, acquires the current IP address or hardware identification of the terminal and serves as the operation characteristic of the sensitive operation, and then the terminal sends the user account, the user password, the execution moment and the operation characteristic to the server.
The server receiving terminal sends the user account, the user password, the execution time and the operation characteristic, then obtains a first corresponding relation among a locally stored user identifier, the operation characteristic and a bitmap, and searches whether the bitmap corresponding to the user identifier and the operation characteristic exists in the first corresponding relation.
When there is a bitmap corresponding to the user identifier and the operation feature, in step S102, calculating the number of unit time periods spaced between a unit time period corresponding to a single character value located at the end of the bitmap and a unit time period in which the execution time is located;
the bitmap is composed of a plurality of single-character values, and any one of the single-character values is a first preset single-character value or a second preset single-character value, wherein the first preset single-character value can be 0, and the second preset single-character value can be 1.
Each single-character value in the bitmap corresponds to a unit time period, and in any two adjacent single-character values, the time periods corresponding to the two single-character values are also adjacent. Next, in a bitmap, it is assumed that a single-character value 1 is adjacent to a single-character value 2, and the single-character value 1 is located before the single-character value 2, and the unit time period corresponding to the single-character value 1 is adjacent to the unit time period corresponding to the single-character value 2, and the unit time period corresponding to the single-character value 1 is located before the unit time period corresponding to the single-character value 2.
The duration of the unit time period may be 1 second, 2 seconds, 3 seconds, or the like, which is not limited in the present invention. It should be noted that, in the embodiment of the present invention, the duration of the unit time period is only illustrated as 1 second, but not as a limitation to the scope of the present invention.
When a unit time period in which an execution time corresponding to a certain single-character value in the bitmap is located is to be acquired, the sequence number of the single-character value in the bitmap can be searched, and the sequence number of the single-character value in the bitmap can be: the number of single-character values preceding the single-character value + 1. The unit time period of the execution time corresponding to the single character numerical value is the unit time period which is ordered as the sequence number; for example, the unit period of time ordered to 1 is 0 th to 1 st seconds, the unit period of time ordered to 2 is 1 st to 2 nd seconds, the unit period of time ordered to 3 is 2 nd to 3 rd seconds, and so on.
In a record in the first corresponding relationship among the user identifier, the operation feature and the bitmap, when a single character value in the bitmap in the record is a first preset single character value, the operation feature in the record appears in a unit time period corresponding to the single character value in the user identifier corresponding to the record; and when a certain single-character numerical value in the bitmap in the record is a second preset single-character numerical value, indicating that the user corresponding to the user identifier in the record has no operation characteristic in the record in the unit time period corresponding to the certain single-character numerical value.
In the embodiment of the present invention, for the user and the operation feature, when the user has the operation feature in a certain unit time period and after the end of the bitmap is supplemented with a second preset single-character value, if the feature does not have to be present in one or more consecutive unit time periods after the unit time period, it is not necessary to supplement the first preset single-character value at the end of the bitmap until the user has the operation feature in a unit time period after the unit time period, the number of unit time periods spaced between the unit time period and the unit time period after the unit time period is determined, then the number of first preset single-character values is supplemented at the end of the bitmap, and then the end of the bitmap supplemented with the number of first preset single-character values is supplemented with a second preset single-character value.
For example, assume that the duration of the unit time period is 1 second, the first preset single-character value is 0, and the second preset single-character value is 1. For user 1 and operating characteristics IP1, assuming that the bitmap corresponding to user 1 and IP1 at this time is "001101", it can be derived from the bitmap "001101": the user 1 does not appear the IP1 in the 1 st to 2 nd seconds, the user 1 does not appear the IP1 in the 2 nd to 3 rd seconds, the user 1 appears the IP1 in the 3 rd to 4 th seconds, the user 1 appears the IP1 in the 4 th to 5 th seconds, the user 1 does not appear the IP1 in the 5 th to 6 th seconds, and the user appears the IP1 in the 6 th to 7 th seconds.
Assuming that the user 1 does not have the IP1 in the 7 th to 8 th seconds, the bitmap "001101" corresponding to the IP1 of the user 1 does not need to be updated, if the user 1 does not have the feature IP1 in the 8 th to 9 th seconds and in the 9 th to 10 th seconds, and the user 1 does not have the IP1 until the 10 th to 11 th seconds, since the unit time periods corresponding to the single character value "1" at the end of the bitmap "001101" are the 6 th to 7 th seconds, and the intervals between the 6 th to 7 th seconds and the 10 th to 11 th seconds are three unit time periods, respectively: from the 7 th to the 8 th seconds, from the 8 th to the 9 th seconds, and from the 9 th to the 10 th seconds, 3 0's are supplemented at the end of the bitmap "001101" to obtain a bitmap "001101000", and then a 1's are supplemented at the end of the bitmap "001101000" to obtain a bitmap "0011010001".
In step S103, supplementing the end of the bitmap with the number of first preset single-character values, and supplementing the end of the bitmap supplemented with the number of first preset single-character values with a second preset single-character value;
preferably, the first predetermined single-character value may be 0 and the second predetermined single-character value may be 1.
In the embodiment of the present invention, the bitmap in one record sometimes includes a very large number of single character values, for example, assuming that the duration of a unit time period is 1 second, one day includes 86400 unit time periods, and each unit time period corresponds to one single character value, the number of single character values included in the bitmap will not be counted after many days.
When the number of single-character values included in a bitmap in one record is very large, if a single-character value corresponding to a unit time period is to be searched in the bitmap, it takes much time to search for the single-character value corresponding to the unit time period from the very large single-character values, and the searching efficiency is low.
Therefore, in order to improve the search efficiency, in another embodiment of the present invention, for any record in the first correspondence between the user identifier, the operation feature, and the bitmap, the bitmap in the record is split into a plurality of sub-bitmaps according to a target time period, the duration of the target time period is greater than the duration of the unit time period, for any split sub-bitmap, the target time period corresponding to the sub-bitmap and the sub-bitmap are stored in the second correspondence between the target time period and the sub-bitmap, and for each split sub-bitmap, the above operations are performed. At this time, the bitmap in the first corresponding relationship is the second corresponding relationship between the target time period and the sub-bitmap.
The duration of the target time period may be 6 hours, 12 hours, or 24 hours, etc., which is not limited in this embodiment of the present invention, and the duration of the target time period is 24 hours, which is, but not limited to the scope of the present invention, that is, the duration of the target time period is 86400 seconds, and a maximum of 86400 single-character values are included in one bitmap. In the embodiment of the present invention, each day may be a target time period, and thus, the target time period may be a date, for example, a certain day of a certain month of a certain year.
In this way, if a single-character value corresponding to a certain unit time period is to be searched, a target time period in which the unit time period is located may be determined, then a sub-bitmap corresponding to the target time period may be searched in a second correspondence between the target time period and the sub-bitmap, and then a single-character value corresponding to the unit time period may be searched in the sub-bitmap.
For example, if a single-character value corresponding to 20 th to 21 th of 3 rd at 15 th of 2015 year 08 month 08 day is to be searched, the target time period may be determined to be 2015 year 08 month 08 day, then a sub-bitmap corresponding to 2015 year 08 month 08 day in the second corresponding relationship between the target time period and the sub-bitmap may be searched, and then a single-character value corresponding to 20 th to 21 th of 15 th of 3 th of 2015 year 08 month 08 day in the sub-bitmap corresponding to 2015 year 08 month 08 day in the target time period may be searched.
In step S103, the unit time period in which the execution time is located may be determined; searching the determined target time period of the unit time period in the second corresponding relation; searching a sub bitmap corresponding to the searched target time period in the second corresponding relation; the end of the sub-bitmap is supplemented with the number of first preset single-character values, and the end of the sub-bitmap supplemented with the number of first preset single-character values is supplemented with a second preset single-character value.
When there is no bitmap corresponding to the user identifier and the operation feature, in step S104, a bitmap is created according to a second preset single character value;
when there is no bitmap corresponding to the user identifier of the user and the operation feature, it indicates that the user has not yet presented the operation feature in the history process, and at this time, in order to store the operation feature presented by the user at the execution time, it is necessary to create a bitmap according to a second preset single character value. The number of unit time periods before the unit time period at which the execution time is located may be counted, a null bitmap may be generated, the number of first preset single-character values may be supplemented in the null bitmap, and then a second preset single-character value may be supplemented in the last first preset single-character value.
In step S105, the user identifier, the operation feature and the created bitmap are combined into one record and stored in the first corresponding relationship.
In another embodiment of the present invention, sometimes a target number of first preset single-character values may continuously appear in a bitmap, where the target number is greater than or equal to 4, and because the number of characters included in the target number of first preset single-character values that continuously appear is large, when the target number of first preset single-character values continuously appear in a bitmap, the target number of first preset single-character values that continuously appear in the bitmap may be replaced with "a target number of first preset single-character values of preset identifiers", where the preset identifiers include only one character, which may be "x" or "+", and the like, which is not limited in the present invention.
Wherein the alphabetic letters in alphabets A-Z have different ranking numbers, for example, A has a ranking number of 1 in alphabets A-Z, B has a ranking number of 2 in alphabets A-Z, and Z has a ranking number of 26 in alphabets A-Z. Thus, in another embodiment of the present invention, the target number may be represented by the letter's rank number in the alphabets A-Z.
Thus, when the target number is less than or equal to 26, the "target number preset identifier first preset single character value" includes only 3 characters, so that the memory space can be saved. For example, assuming that 100 s appear continuously in the bitmap, 100 s appearing continuously may be replaced with "J × 0".
When the target number is more than 26, the "first preset single character value of the target number preset identifier" includes characters which are more than 3, but can still save the storage space; and when the target number is far larger than 26, the effect of saving the storage space is more obvious. For example, assuming that 52 0 s appear in the bitmap in succession, the 52 0 s appearing in succession may be replaced with "2 × Z × 0". Alternatively, assuming that 45 0 s appear continuously in the bitmap, the 45 0 s appearing continuously may be replaced with "3 × O × 0".
In some cases, a target number of second preset single-character values may also continuously appear in a bitmap, the target number is greater than or equal to 4, and because the number of characters included in the target number of second preset single-character values is large, when the target number of second preset single-character values continuously appear in a bitmap, the target number of first preset single-character values continuously appear in the bitmap can be replaced by the target number of second preset single-character values with preset identifiers according to the manner, so that the storage space is saved.
In the prior art, for any user and any operation feature, the user has the operation feature for several times, the corresponding relationship in the prior art stores several user identifications of the user, several operation features and several unit time periods, and the time in the prior art is expressed in a year, month, day, time, minute and second manner.
In the embodiment shown in fig. 1 of the present invention, for any user and any operation feature, no matter how many times the user has occurred in the operation feature, in the correspondence between the user identifier, the operation feature and the bitmap in the embodiment of the present invention, only one user identifier of the user and one operation feature are stored, and the execution time is not stored, but the bitmap is used to indicate whether the operation feature occurs in each unit time period, where the bitmap corresponding to a certain user identifier and a certain operation feature includes a plurality of single-character values, and any single-character value can indicate whether the user corresponding to the user identifier has occurred in the unit time period corresponding to the single-character value, so compared with the prior art, the embodiment of the present invention can save the storage space.
Then, it may be necessary to query the total number of the categories of the operation features that the user appears in a certain unit time period, and in another embodiment of the present invention, the total number of the categories of the operation features that the user appears in a certain unit time period may be queried through the following method, which is shown in fig. 2 and includes:
in step S201, when the total number of the types of the operation features appearing in the unit time period to be queried by the user to be queried is to be queried, in the first corresponding relationship among the user identifier, the operation features, and the bitmap, whether a target record including the user identifier of the user to be queried exists is searched for;
when there is a target record including the user identifier of the user to be queried, in step S202, for each target record, in a bitmap in the target record, determining whether a second preset single character value exists in single character values corresponding to the unit time period to be queried;
further, when there is no target record including the user identifier of the user to be queried, it indicates that the user has not presented the operation feature in the history process, and the process is ended.
In another embodiment of the present invention, if the bitmap in the first corresponding relationship is the second corresponding relationship between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the step may specifically be: for any target record, the bitmap in the target record is a second corresponding relation between the target time period and the sub-bitmap, and the target time period in which the unit time period to be inquired is located is searched in the second corresponding relation; searching a target sub-bitmap corresponding to the searched target time period in the second corresponding relation; searching a single character value corresponding to a unit time period to be inquired in the target sub-bitmap; and judging whether a second preset single character numerical value exists in the searched single character numerical values. For each of the other target records, the above-described operation is performed.
In step S203, the number of bitmaps having the second preset single character value in the single character values corresponding to the unit time period to be queried is counted as the total number in the bitmaps of all target records.
FIG. 3 is a block diagram illustrating a data processing apparatus according to an example embodiment. Referring to fig. 3, the apparatus includes:
the first searching module 11 is configured to, when acquiring an execution time of a user when executing a sensitive operation and an operation feature of the sensitive operation, search whether a bitmap corresponding to a user identifier and the operation feature exists in a first corresponding relationship among the user identifier, the operation feature, and the bitmap;
a calculating module 12, configured to calculate, when there is a bitmap corresponding to the user identifier and the operation feature, the number of unit time periods spaced between a unit time period corresponding to a single character value located at the end of the bitmap and a unit time period in which the execution time is located; a single character value includes only one character;
a supplement module 13, configured to supplement the first preset single-character values at the end of the bitmap, and supplement a second preset single-character value at the end of the bitmap supplemented with the first preset single-character values.
Further, the apparatus further comprises:
the creating module is used for creating a bitmap according to the second preset single character numerical value when the bitmap corresponding to the user identification and the operation characteristic does not exist;
and the storage module is used for forming a record by the user identification, the operation characteristics and the created bitmap and storing the record in the first corresponding relation.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the supplementary module 13 includes:
the determining unit is used for determining the unit time period of the execution time;
the first searching unit is used for searching the determined target time period of the unit time period in the second corresponding relation;
a second searching unit, configured to search a sub bitmap corresponding to the searched target time period in the second correspondence;
a supplement unit for supplementing the plurality of first preset single character values at the end of the sub-bitmap and supplementing a second preset single character value at the end of the sub-bitmap supplemented with the plurality of first preset single character values.
Further, the apparatus further comprises:
the second searching module is used for searching whether a target record comprising the user identifier of the user to be inquired exists in a first corresponding relation among the user identifier, the operation feature and the bitmap when the total number of the types of the operation features of the user to be inquired in the unit time period to be inquired is inquired;
the judging module is used for judging whether a second preset single character numerical value exists in the single character numerical values corresponding to the unit time period to be inquired or not in a bitmap in the target record for each target record when the target record comprising the user identification of the user to be inquired exists;
and the counting module is used for counting the number of bitmaps with the second preset single character value in the single character values corresponding to the unit time period to be inquired in all the bitmaps of the target record, and taking the number as the total number.
Wherein, the bitmap in the first corresponding relation is a second corresponding relation between the target time period and the sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the judging module comprises:
a third searching unit, configured to search the second corresponding relationship for a target time period in which the unit time period to be queried is located;
a fourth searching unit, configured to search for a target sub-bitmap corresponding to the target time period in the second correspondence;
a fifth searching unit, configured to search, in the target sub-bitmap, a single-character numerical value corresponding to the unit time period to be queried;
and the judging unit is used for judging whether the second preset single character numerical value exists in the searched single character numerical values.
In the prior art, for any user and any operation feature, the user has the operation feature for several times, the corresponding relationship in the prior art stores several user identifications of the user, several operation features and several unit time periods, and the time in the prior art is expressed in a year, month, day, time, minute and second manner.
In the embodiment shown in fig. 3 of the present invention, for any user and any operation feature, no matter how many times the user has occurred in the operation feature, in the correspondence between the user identifier, the operation feature and the bitmap in the embodiment of the present invention, only one user identifier of the user and one operation feature are stored, and the execution time is not stored, but the bitmap is used to indicate whether the operation feature occurs in each unit time period, where the bitmap corresponding to a certain user identifier and a certain operation feature includes a plurality of single-character values, and any single-character value can indicate whether the user corresponding to the user identifier has occurred in the unit time period corresponding to the single-character value, so compared with the prior art, the embodiment of the present invention can save the storage space.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (8)

1. A method of data processing, the method comprising:
when acquiring the execution time of a user in executing sensitive operation and the operation characteristics of the sensitive operation, searching whether a bitmap corresponding to the user identifier and the operation characteristics exists in a first corresponding relation among the user identifier, the operation characteristics and the bitmap;
when a bitmap corresponding to the user identifier and the operation features exists, calculating the number of unit time periods spaced between a unit time period corresponding to a single character numerical value at the tail of the bitmap and a unit time period where the execution time is located; a single character value includes only one character;
supplementing the end of the bitmap with the plurality of first preset single character values, and supplementing the end of the bitmap supplemented with the plurality of first preset single character values with a second preset single character value;
a bitmap in the first corresponding relation is a second corresponding relation between a target time period and a sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
supplementing the end of the bitmap with the plurality of first preset single-character values and supplementing the end of the bitmap with the plurality of first preset single-character values with a second preset single-character value, comprising:
determining the unit time period of the execution time;
searching the determined target time period of the unit time period in the second corresponding relation;
searching a sub bitmap corresponding to the searched target time period in the second corresponding relation;
and supplementing the plurality of first preset single-character values at the tail of the sub-bitmap, and supplementing a second preset single-character value at the tail of the sub-bitmap supplemented with the plurality of first preset single-character values.
2. The method of claim 1, further comprising:
when no bitmap corresponding to the user identification and the operation characteristics exists, creating a bitmap according to the second preset single character numerical value;
and forming a record by the user identification, the operating characteristics and the created bitmap and storing the record in the first corresponding relation.
3. The method according to any one of claims 1-2, further comprising:
when the total number of the types of the operation features of a user to be inquired in a unit time period to be inquired is inquired, searching whether a target record comprising the user identifier of the user to be inquired exists in a first corresponding relation among the user identifier, the operation features and a bitmap;
when target records including the user identification of the user to be inquired exist, judging whether a second preset single character numerical value exists in the single character numerical values corresponding to the unit time period to be inquired or not in a bitmap in each target record;
and counting the number of bitmaps with the second preset single character value in the single character values corresponding to the unit time period to be inquired in all the bitmaps of the target record, and taking the number as the total number.
4. The method according to claim 3, wherein the bitmap in the first corresponding relationship is a second corresponding relationship between a target time period and a sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the judging whether the second preset single character value exists in the single character values corresponding to the unit time period to be inquired includes:
searching a target time period in which the unit time period to be inquired is located in the second corresponding relation;
searching a target sub-bitmap corresponding to the target time period in the second corresponding relation;
searching a single character numerical value corresponding to the unit time period to be inquired in the target sub-bitmap;
and judging whether the searched single character numerical value has the second preset single character numerical value or not.
5. A data processing apparatus, characterized in that the apparatus comprises:
the system comprises a first searching module, a second searching module and a third searching module, wherein the first searching module is used for searching whether a bitmap corresponding to a user identifier and an operation characteristic exists in a first corresponding relation among the user identifier, the operation characteristic and the bitmap when the execution time of a user in executing sensitive operation and the operation characteristic of the sensitive operation are obtained;
the calculation module is used for calculating the number of unit time periods spaced between a unit time period corresponding to a single character numerical value at the tail of the bitmap and the unit time period of the execution time when the bitmap corresponding to the user identifier and the operation characteristic exists; a single character value includes only one character;
a supplement module for supplementing the plurality of first preset single character values at the end of the bitmap and supplementing a second preset single character value at the end of the bitmap supplemented with the plurality of first preset single character values;
a bitmap in the first corresponding relation is a second corresponding relation between a target time period and a sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the supplementary module includes:
the determining unit is used for determining the unit time period of the execution time;
the first searching unit is used for searching the determined target time period of the unit time period in the second corresponding relation;
a second searching unit, configured to search a sub bitmap corresponding to the searched target time period in the second correspondence;
a supplement unit for supplementing the plurality of first preset single character values at the end of the sub-bitmap and supplementing a second preset single character value at the end of the sub-bitmap supplemented with the plurality of first preset single character values.
6. The apparatus of claim 5, further comprising:
the creating module is used for creating a bitmap according to the second preset single character numerical value when the bitmap corresponding to the user identification and the operation characteristic does not exist;
and the storage module is used for forming a record by the user identification, the operation characteristics and the created bitmap and storing the record in the first corresponding relation.
7. The apparatus according to any one of claims 5-6, further comprising:
the second searching module is used for searching whether a target record comprising the user identifier of the user to be inquired exists in a first corresponding relation among the user identifier, the operation feature and the bitmap when the total number of the types of the operation features of the user to be inquired in the unit time period to be inquired is inquired;
the judging module is used for judging whether a second preset single character numerical value exists in the single character numerical values corresponding to the unit time period to be inquired or not in a bitmap in the target record for each target record when the target record comprising the user identification of the user to be inquired exists;
and the counting module is used for counting the number of bitmaps with the second preset single character value in the single character values corresponding to the unit time period to be inquired in all the bitmaps of the target record, and taking the number as the total number.
8. The apparatus according to claim 7, wherein the bitmap in the first corresponding relationship is a second corresponding relationship between a target time period and a sub-bitmap; the duration of the target time period is greater than the duration of the unit time period;
the judging module comprises:
a third searching unit, configured to search the second corresponding relationship for a target time period in which the unit time period to be queried is located;
a fourth searching unit, configured to search for a target sub-bitmap corresponding to the target time period in the second correspondence;
a fifth searching unit, configured to search, in the target sub-bitmap, a single-character numerical value corresponding to the unit time period to be queried;
and the judging unit is used for judging whether the second preset single character numerical value exists in the searched single character numerical values.
CN201610046778.5A 2016-01-22 2016-01-22 Data processing method and device Active CN106997431B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610046778.5A CN106997431B (en) 2016-01-22 2016-01-22 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610046778.5A CN106997431B (en) 2016-01-22 2016-01-22 Data processing method and device

Publications (2)

Publication Number Publication Date
CN106997431A CN106997431A (en) 2017-08-01
CN106997431B true CN106997431B (en) 2020-09-25

Family

ID=59428275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610046778.5A Active CN106997431B (en) 2016-01-22 2016-01-22 Data processing method and device

Country Status (1)

Country Link
CN (1) CN106997431B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415952B (en) * 2018-02-02 2020-10-16 北京腾云天下科技有限公司 User data storage method, label calculation method and calculation equipment
CN108415978B (en) * 2018-02-09 2021-04-09 北京腾云天下科技有限公司 User tag storage method, user portrait calculation method and calculation equipment
CN109471786B (en) * 2018-11-16 2019-08-30 苏州好玩友网络科技有限公司 A kind of collecting method, device, equipment and storage medium
CN110442599A (en) * 2019-07-29 2019-11-12 浙江大华技术股份有限公司 A kind of data processing, the method and apparatus for hiding vehicle query
CN111415200B (en) * 2020-03-20 2023-05-26 腾讯音乐娱乐科技(深圳)有限公司 Data processing method and device
CN112269726A (en) * 2020-10-22 2021-01-26 腾讯音乐娱乐科技(深圳)有限公司 Data processing method and device
CN112527803B (en) * 2020-12-30 2024-01-26 北京百家科技集团有限公司 Data processing method and device and computer equipment
CN114356972B (en) * 2021-12-03 2022-08-23 四川科瑞软件有限责任公司 Data processing method, and event time-based retrieval method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419535A (en) * 2008-11-19 2009-04-29 北京航空航天大学 Distributed virtual magnetic disc system of virtual machine
CN101582817A (en) * 2009-06-29 2009-11-18 华中科技大学 Method for extracting network interactive behavioral pattern and analyzing similarity
CN103179132A (en) * 2013-04-09 2013-06-26 中国信息安全测评中心 Method and device for detecting and defending CC (challenge collapsar)
CN103581626A (en) * 2013-11-04 2014-02-12 浙江宇视科技有限公司 Video monitoring system and video storage information recording method
CN104486777A (en) * 2014-12-01 2015-04-01 中国联合网络通信集团有限公司 Method and device for processing data
CN104680395A (en) * 2009-08-28 2015-06-03 谷歌公司 Audience segment estimation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7574460B2 (en) * 2005-12-01 2009-08-11 International Business Machines Corporation Journaling database changes using minimized journal entries that may be output in human-readable form

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419535A (en) * 2008-11-19 2009-04-29 北京航空航天大学 Distributed virtual magnetic disc system of virtual machine
CN101582817A (en) * 2009-06-29 2009-11-18 华中科技大学 Method for extracting network interactive behavioral pattern and analyzing similarity
CN104680395A (en) * 2009-08-28 2015-06-03 谷歌公司 Audience segment estimation
CN103179132A (en) * 2013-04-09 2013-06-26 中国信息安全测评中心 Method and device for detecting and defending CC (challenge collapsar)
CN103581626A (en) * 2013-11-04 2014-02-12 浙江宇视科技有限公司 Video monitoring system and video storage information recording method
CN104486777A (en) * 2014-12-01 2015-04-01 中国联合网络通信集团有限公司 Method and device for processing data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"位图法统计活跃用户";freedomai;《https://blog.csdn.net/freedomai/article/details/48167363》;20150901;第1-2页 *

Also Published As

Publication number Publication date
CN106997431A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
CN106997431B (en) Data processing method and device
CN110737592B (en) Link abnormality identification method, server and computer readable storage medium
CN112800197A (en) Method and device for determining target fault information
CN105989457A (en) Information query method and apparatus thereof
CN104426868A (en) Request processing method and processing apparatus
CN109446515A (en) Group information analysis method, electronic device and computer readable storage medium
CN109739854A (en) A kind of date storage method and device
CN111444253A (en) Data import method and device, computer readable storage medium and computer equipment
CN116340424A (en) Method, device, equipment and storage medium for separately storing report data
CN110781375A (en) User state identification determining method and device
CN114860806A (en) Data query method and device of block chain, computer equipment and storage medium
CN108268545A (en) A kind of method and apparatus of the establishment in the user tag library of classification
CN111401959B (en) Risk group prediction method, apparatus, computer device and storage medium
CN109885710B (en) User image depicting method based on differential evolution algorithm and server
CN113656466A (en) Policy data query method, device, equipment and storage medium
CN112650964A (en) Service processing method, equipment and machine readable storage medium
CN112419058A (en) Data management method and device, storage medium and electronic equipment
CN110837606A (en) Spatio-temporal data fusion query method, device, server and storage medium
CN112035501B (en) User identifier updating method, device and equipment
CN113781237B (en) Product purchase order consumption method based on distributed artificial intelligence system
CN113434508B (en) Method and apparatus for storing information
CN106649427B (en) Information identification method and device
CN112559886A (en) Method, device, equipment, storage medium and product for sorting historical record documents
CN108256989B (en) Data display method and system of fund preparation system
CN114064830A (en) Navigation data automatic production method, system, electronic 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
TR01 Transfer of patent right

Effective date of registration: 20200922

Address after: Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Grand Cayman Islands

Patentee before: Alibaba Group Holding Ltd.

TR01 Transfer of patent right