Summary of the invention
The application technical problems to be solved are can largely to update for huge number of users, resulting user
And the situation that regular quantity is equally huge with quantity is updated, the efficiency of user data update is improved, is realized in second grade/Millisecond
The real-time query for crowd's rule that user meets is calculated in real time, and the result of acquisition is supplied to audient in a manner of higher efficiency
Target.
In view of this, the application provides a kind of method of rule that update user is met, wherein include:
The user data is divided into not by the user data for obtaining user to be updated according to the attribute of the user data
Generic multiple user tags;
According to the classification information of the user tag, processing is updated to the user tag, to search the use of variation
The rule that family label and the user tag for recalculating the variation are met.
Preferably, wherein the classification information of the user tag include dynamic, the dynamic user tag be attribute with
Environmental change and changed user tag
Further, processing is updated to the user tag, further includes:
The mapping relations are established, mapping relations, clause's expression formula including regular expression to clause's expression formula to rule
The then mapping relations of expression formula, dynamic user tag to the mapping relations of clause's expression formula, user and clause's expression formula
The bitmap hit relationship whether hit and user hit the mapping relations of regular expression;
The user data of user to be updated is compared with the user data of original customer data base, searches the dynamic of variation
The user tag of state is returned if do not found, is entered in next step if finding;
The dynamic user tag for searching the variation is closed in the mapping of the dynamic user tag to clause's expression formula
Corresponding several clause's expression formulas in system;
For corresponding several clause's expression formulas, time whether user to be updated hits clause's expression formula is carried out
Calculating is gone through, the hit relationship of the user to be updated and corresponding several clause's expression formulas are obtained;
The bitmap hit relationship is compared before the hit relationship is calculated with the traversal, finds the hit of variation
Relationship;
Hit relationship for the variation is to become being not hit by from hit, then searches son corresponding to the hit relationship
Sentence expression formula, and will be described right in the corresponding several regular expressions of mapping relations of clause's expression formula to the regular expression
Several regular expressions answered are deleted from the mapping relations for the regular expression that the user to be updated hits;
Hit relationship for the variation is to become hit from being not hit by, then by the user to be updated and the hit
The bitmap hit of clause's expression formula corresponding to relationship, which updates, to be uploaded in the bitmap hit relationship, and searches the hit relationship
Corresponding clause's expression formula clause's expression formula to the regular expression the corresponding several regular expressions of mapping relations,
Corresponding several regular expressions are increased in the mapping relations of the regular expression of user's hit to be updated.
Preferably, processing is updated to the user tag further include:
According to the dynamic user tag content, the dynamic user tag, which is divided into, can enumerate class, can not enumerate
Class, which can be indexed, and can not be enumerated can not index class;
Attribute storage of array is established to the enumerable dynamic user tag, and is looked into using filtering query method
It askes;Search tree storage is established to the dynamic user tag that can not be enumerated but can index, and is inquired using indexing method;To not
It can enumerate and the dynamic user tag that can not be indexed divides range storage, and storage is numbered to range, and using can rope
Draw query method and may filter that query method query composition.
Preferably, each dynamic user tag has the timestamp of record latest update time.
Further, processing is updated to the user tag further include:
Policy Updates request is received, by carrying out classified inquiry control to the dynamic user tag, establishes user institute
The new mapping relations of the rule of satisfaction.
Preferably, the classification information of the user tag further includes position, the user tag of the position be attribute and when
Between user tag relevant with spatial position.
Further, processing is updated to the user tag further include:
Spatial index number is established to all users, unique global identity of the user is established and states the space of foundation
The mapping relations of index number;
The user data for transmitting user to be updated distributes local identification code to the user to be updated, establishes spatial index
The mapping relations of number and local identification code;
The user data of the user to be updated is compared with original customer data base, if the user to be updated with
Before be not present, then establish new spatial index number if the user to be updated is original user and check the spatial index
Whether number changes, and to spatial index number, there is no the use of the position for then updating the user to be updated of variation
The attribute information of family label, it is changed to spatial index number, delete the original local knowledge of the user to be updated
Other code establishes new local identification code, and updates the mapping relations of local identification code and spatial index number.
Further, during the user data of the transmission user to be updated, using Distributed Message Queue mode
Data are carried out to the user data and update decoupling, and are cut by data of the key signature character to the user data
Point.
Preferably, establishing spatial index number to all users using hibert curve.
Further, spatial index is established to the user tag of the position further include:
Modulus is carried out again to the spatial index number of the foundation to divide.
Preferably, being updated processing to the user tag and including:
The attribute information of the user tag of the position is stored in continuous caching, the caching is with one to work as
Ground identification code is the offset Compass of following table.
Preferably, being updated processing to the user tag further include:
According to the variation frequent degree of the user tag of the position of the user to be updated, dynamic setting updates threshold values, when
The variation of the user tag of the position of the user to be updated is updated again when being more than the update threshold values.
Preferably, further including supporting data mistake during the update processing method of the user tag to the position
Phase sets data expiration period by dynamic, deletes the data not updated yet more than data expiration period.
Preferably, further including the user tag of sliding to the classification of the user tag, the user tag of the sliding is
Attribute itself it is constant but with environmental change changed user tag.
Preferably, being updated processing to the user tag further include:
According to the frequent degree of the user tag of sliding using different storage modes in case updating and inquiring, for frequent journey
The user tag of high sliding is spent using matrix storage mode;The user tag of the sliding low for frequent degree is deposited using chained list
Storage mode.
Preferably, the classification information of the user tag further includes context and static state, the user tag of the context
It is attribute with the simultaneous user tag of condition, the user tag of the static state is the fixed user tag of attribute, using building
Vertical function determining method handles the user tag of the context, using the user tag for establishing indexing means and handling the static state.
Present invention also provides a kind of systems of rule that update user is met, wherein includes:
First device, to obtain the user data of user to be updated, according to the attribute of the user data, by the use
User data is divided into different classes of multiple user tags;
Second device is updated processing to the user tag according to the classification information of the user tag, to search
The rule that the user tag of variation and the user tag for recalculating the variation are met.
Preferably, the classification information of the user tag includes dynamic, and the dynamic user tag is attribute with environment
Change and changed user tag.
Preferably, the dynamic engine server second device includes the first engine, and first engine is to the dynamic
User tag be updated processing:
Establish the mapping relations, comprising: mapping relations, the clause's expression formula to rule of regular expression to clause's expression formula
Then the inverted list mapping relations of expression formula, the inverted list mapping relations of dynamic user tag to clause's expression formula, user and one
Bitmap hit relationship and user that whether a clause's expression formula hits hit the inverted list mapping relations of regular expression;
The user data of user to be updated is compared with the user data of original customer data base, searches the dynamic of variation
The user tag of state is returned if do not found, is entered in next step if finding;
The dynamic user tag for searching the variation is closed in the mapping of the dynamic user tag to clause's expression formula
Corresponding several clause's expression formulas in system;
For corresponding several clause's expression formulas, time whether user to be updated hits clause's expression formula is carried out
Calculating is gone through, the hit relationship of the user to be updated and corresponding several clause's expression formulas are obtained;
The bitmap hit relationship is compared before the hit relationship is calculated with the traversal, finds the hit of variation
Relationship;
Hit relationship for the variation is to become being not hit by from hit, then searches son corresponding to the hit relationship
Sentence expression formula, and will be described right in the corresponding several regular expressions of mapping relations of clause's expression formula to the regular expression
Several regular expressions answered are deleted from the mapping relations for the regular expression that the user of the user to be updated hits;
Hit relationship for the variation is to become hit from being not hit by, then by the user to be updated and the hit
The bitmap hit of clause's expression formula corresponding to relationship, which updates, to be uploaded in the bitmap hit relationship, and searches the hit relationship
Corresponding clause's expression formula clause's expression formula to the regular expression the corresponding several regular expressions of mapping relations,
The mapping that corresponding several regular expressions are increased to the regular expression of user's hit of the user to be updated is closed
In system.
Further, first engine is updated processing to the user tag, further includes:
According to the dynamic user tag content, the dynamic user tag, which is divided into, can enumerate class, can not enumerate
Class, which can be indexed, and can not be enumerated can not index class;
Attribute storage of array is established to the enumerable dynamic user tag, and is looked into using filtering query method
It askes;Search tree storage is established to the dynamic user tag that can not be enumerated but can index, and is inquired using indexing method;To not
It can enumerate and the dynamic user tag that can not be indexed divides range storage, and storage is numbered to range, and using can rope
Draw query method and may filter that query method query composition.
Preferably, each corresponding timestamp for being stored with the record latest update time of the dynamic user tag.
Further, first engine is updated processing to the user tag, further includes:
Policy Updates request is received, classified inquiry control is carried out by the dynamic user tag to user, establishes user
The new mapping relations of the rule met.
Preferably, the classification information of the user tag includes position, and the user tag of the position is attribute and time
User tag relevant with spatial position.
Preferably, the second device further includes several second engines, described to handle the user tag of the position
The framework of second engine includes:
First module, to receive and transmit the user data of the user to be updated;
Second module, to transmit and distribute the user data of the user to be updated;
Third module, to transmit simultaneously dispatch user inquiry request and Policy Updates request;And
4th module is updated and returns the result to the user tag to the position.
Further, the process that the 4th module is updated and returns the result to the user tag of the position, packet
It includes:
To all users establish spatial index number, establish the user unique global identity and the spatial index
The mapping relations of number;
The user data for transmitting user to be updated distributes local identification code to the user to be updated, establishes spatial index
The mapping relations of number and local identification code;
The user data of the user to be updated is compared with original customer data base, if the user to be updated with
Before be not present, then establish new spatial index number if the user to be updated is original user and check the spatial index
Whether number changes, and to spatial index number, there is no the use of the position for then updating the user to be updated of variation
The attribute information of family label, it is changed to spatial index number, delete the original local knowledge of the user to be updated
Other code establishes new local identification code, and updates the mapping relations of local identification code and spatial index number.
Further, several first modules using Distributed Message Queue mode to the user tag of the position into
Row data update decoupling, and carry out cutting by data of the key signature character to the user tag of position.
Preferably, during second engine establishes spatial index to the user tag of the position, the 4th mould
Block establishes spatial index number to the user tag of the position using hibert curve.
Further, it during second engine establishes spatial index to the user tag of the position, also wraps
It includes and modulus division is carried out again to the spatial index number of the foundation.
Preferably, second engine is updated processing to the user tag further include:
The attribute information of the user tag of the position is stored in continuous caching, the caching is with one to work as
Ground identification code is the offset Compass of following table.
Preferably, second engine is updated processing to the user tag further include:
According to the variation frequent degree of the user tag of the position of the user to be updated, dynamic setting updates threshold values, when
The variation of the user tag of the position of the user to be updated is updated again when being more than the update threshold values.
Preferably, also being wrapped during update processing method of second engine to the user tag of the position
It includes, dynamic sets data expiration period, deletes the data not updated yet more than data expiration period.
Preferably, the classification information of the user tag further includes sliding, the user tag of the sliding be attribute and when
Between user tag relevant with spatial position.
Preferably, the second device further includes several third engines, the third engine marks the user of the sliding
The update processing method of label uses different storage modes according to the frequent degree of the user tag of sliding including the third engine
In case updating and inquiring: the user tag of the sliding high for frequent degree uses matrix storage mode;It is low for frequent degree
Sliding user tag use storage of linked list mode.
Preferably, the system for the rule that the update user is met further includes several mirror nodes, each described the
One engine, each second engine and each third engine have at least one mirror nodes to provide service.
The classification information of the preferable user tag further includes context and static state, and the user tag of the context is
For attribute with the simultaneous user tag of condition, the user tag of the static state is the fixed user tag of attribute.
Optionally, the system also includes 3rd device, the 3rd device updates processing institute using indexing means are established
Static user tag is stated, the first device directly updates the processing context information label and returns result.
Preferably, the second device point duty and the corresponding user tag of absorbed responsible processing.
Compared with prior art, the method described herein for updating the rule that user is met passes through according to user tag
Data activity degree and content, user tag is divided into the use of dynamic user tag, the user tag of position and sliding
Family label etc. does not have to the label of class, and uses different update processing methods for inhomogeneous label, especially most to update
It is frequent dynamic user tag using processing method is quickly and effectively updated, improves the place that system updates request to user
Reason ability and processing speed, and then improve user and meet real-time update and the inquiry of rule to improve the effect of user data update
Rate;
Further, the herein described update processing method to the dynamic user tag is by establishing several mappings
Relationship is inquired and is calculated using mapping relations, is equivalent to from fine granularity and is cached to inquiry calculated result, therefore is big
Amplitude accelerates calculating;It is calculated by related clause's expression formula to dynamic user tag, is carried out from calculating simultaneously
Beta pruning, therefore calculation amount is greatly reduced, and then computational efficiency greatly improved, it further increases user and meets the real-time of rule
It updates and inquires to improve the efficiency of user data update.
In addition, system of the application by establishing the rule that the update user is met, is calculated using distributed rule
Framework, the calculation block of the user tag including Distributed Architecture and position to the division and user tag for establishing user tag
Frame realizes the reasonable distribution and processing in real time of user tag, further increases the processing speed that user updates request.
Specific embodiment
In a typical configuration of this application, terminal, the equipment of service network and trusted party include one or more
Processor (CPU), input/output interface, network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or
Any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, computer
Readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
The core concept of the application is, real-time calculating be in order to mass data — that is, number of users, regular quantity with
And update quantity huge data-this on the basis of, the data changed in real time in the short time are quickly calculated, are returned in real time
It returns as a result, helping audience (such as advertiser or seller) to inquire rapidly meets crowd.The data wherein changed in real time
Real-time update including user tag (such as location information, turnover etc.) and to the real-time creation of crowd's rule with more
Newly.
In conjunction with above-mentioned core concept, a kind of offer user is provided in the embodiment of the application and meets the real-time of rule
Update method and real-time update system.By the attribute according to user tag, the data including user tag storage it is specific in
The active degree and content etc. of appearance and data, are divided into dynamic user tag, the user tag of position and cunning for user tag
Dynamic user tag etc. does not have to the label of classification, and uses different update processing methods for different classes of label, especially
It is the user tag of the position relative complex to update dynamic user tag the most frequent and content using fast and effective
Update processing method, thus greatly improve user update request processing speed, and then improve user meet rule it is real-time
It updates and inquires to improve the efficiency of user data update, audience is supplied in a manner of higher efficiency, realize audient group
Crowd's rule that body meets in the nearest user of second grade/Millisecond real-time query.
Specifically, with reference to the accompanying drawing and specific embodiment is described in further detail the application.
A kind of real time updating method of user's satisfaction rule is provided in the one aspect of the application, comprising: is obtained to more
The user data is divided into different classes of multiple users according to the attribute of the user data by the user data of new user
Label;According to the classification information of the user tag, processing is updated to the user tag, to search user's mark of variation
Sign and recalculate the rule that the user tag of the variation is met.
In the one side of the application, the user data of each user includes a global identity and multiple user tags,
When user's proposition update petition, multiple user tags of user to be updated are obtained.Wherein, the preferable reality optimal in the application
It applies in example, according to the attribute of the user data, can classify to the user tag, the user tag classification information
Including dynamic user tag, the user tag of the user tag of position and sliding, the use of the user tag of context and static state
Family label etc..Dynamic user tag is included at least to the classification of the user tag, wherein the dynamic user tag is
Attribute changed user tag with environmental change.In the preferred embodiment,;The classification of the user tag is also wrapped
It includes, the user tag of the user tag of position and sliding, the user tag of the position is attribute and time and spatial position phase
The user tag of pass,;The user tag of the sliding is that attribute itself is constant but changed user marks with environmental change
Label.;In other embodiments, can also include to the classification of the user tag, the use of the user tag of context and static state
Family label., the user tag of the context is attribute with the simultaneous user tag of condition, the user tag of the static state
For the user tag that attribute is fixed.
Fig. 4 is the division schematic diagram to user tag according to the application one aspect, is illustrated below in conjunction with Fig. 4, in detail
The specific descriptions for illustrating user tag attribute different classes of in the preferred embodiment of the application one preferable one, in the application one
In preferred embodiment, the user tag 100 is divided into following a few classes: dynamic user tag 101, position user's mark
Label 103, the user tag 105 of sliding, the user tag 109 of the user tag of context 107 and static state, the dynamic user
Label 101 be attribute with environmental change changed user tag 100, such as user purchase commodity, user subscription
Information etc., the user tag 103 of the position are attribute user tag 100 relevant to time and spatial position simultaneously, such as
User Activity position etc., the user tag 103 of the position are also hung with user's self space position because both linking up with the time
Hook, therefore the calculation of the user tag 103 of position is different from dynamic user tag 101, the sliding label slippage
User tag 105 is constant for attribute value itself, but with the changed user tag 100 of environmental change attribute, such as at any time
Passage, (transaction stroke count attribute is constant in a period of time, but the number for stroke count of trading for the transaction stroke count in user's nearest a period of time
Value changes at any time) etc..The user tag 107 of the context is attribute with the simultaneous user tag 100 of condition,
Attribute occurs simultaneously with condition, such as user enjoys certain preferential difference with the means of payment and different, and the static mark
The static user tag 109 of label is the fixed user tag 100 of attribute, indeclinable in the indeclinable or relatively long time
User tag 100 can incorporate into as user tag 109 of static labels static state, such as age, gender, the name of user etc..Its
In to the dynamic user tag 101, the user tag of position 103, sliding user tag 105 and sliding user mark
Label 105 are required to be calculated in real time.The user tag 107 of the context and static user tag 109 are calculated real-time
It is of less demanding.
It is described by taking the mode classification as an example in subsequent embodiment, certain those skilled in the art will be understood that
The description for stating tag types is only for example, other according to data activity degree and content to user tag 100 or user data into
Capable division and the method and its modification that use different processing modes to be updated processing or other division modes, such as wrap
Include dynamic user tag 101, the user tag 105 of sliding combines tag types known to other skilled in the art
Division methods etc., all within the thought range of the application.It is arrived according to above-mentioned category division for 100 pairs as specific user tag
Can negotiate to determine by audience and developer in which specific classification, repeat no more.
In user tag 100, the dynamic user tag 101 is data storage capacity maximum, and data variation frequency is most
High a kind of user tag 100, therefore how to realize that the real-time update of dynamic user tag 101 and real-time query become
The key technical problem of the application, the update in the one aspect of the embodiment of the present application, to the dynamic user tag 101
The core concept that processing method is are as follows: by establishing several mapping relations, several dynamic user tags 101 and rule list
Up to the hit relationship or corresponding relationship between formula, clause's expression formula and between the regular expression and clause's expression formula
Mapping relations find the relevant clause's expression formula of the dynamic user tag 101 of variation using the mapping relations,
And the corresponding regular expression of relevant clause's expression formula is found, relationship is hit according to relevant clause's expression formula
Situation of change, the rule corresponding rule met to the dynamic user tag of the variation is updated.
In the preferred embodiment, the update processing method of the dynamic user tag 101 is specifically included:
Step S01: establishing several mapping relations, mapping relations, Zi Jubiao including regular expression to clause's expression formula
Up to formula to the mapping relations of regular expression, dynamic user tag to the mapping relations of clause's expression formula, user and a son
Bitmap hit relationship and user that whether sentence expression formula hits hit the mapping relations of regular expression;
Step S02: the user data of user to be updated is compared with the user data of original customer data base, is searched
The dynamic user tag of variation is returned if do not found, is entered in next step if finding;
Step S03: the dynamic user tag of the variation is searched in the dynamic user tag to clause's expression formula
Mapping relations in corresponding several clause's expression formulas;
Step S04: being directed to corresponding several clause's expression formulas, carries out whether the user to be updated hits clause's table
Traversal up to formula calculates, and obtains the hit relationship of the user to be updated and corresponding several clause's expression formulas;
Step S05: the bitmap hit relationship is compared before the hit relationship is calculated with the traversal, finds change
The hit relationship of change;
Step S06: the hit relationship for the variation is to become being not hit by from hit, then searches the hit relationship institute
Corresponding clause's expression formula clause's expression formula to the regular expression the corresponding several regular expressions of mapping relations, and
By corresponding several regular expressions from the mapping relations for the regular expression that the user of the user to be updated hits
It deletes;
Step S07: the hit relationship for the variation is to become hit from being not hit by, then by the user to be updated
Bitmap hit with clause's expression formula corresponding to the hit relationship, which updates, to be uploaded in the bitmap hit relationship, and searching should
Mapping relations corresponding several rule of the clause's expression formula corresponding to hit relationship in clause's expression formula to the regular expression
Corresponding several regular expressions are increased to the regular expression of user's hit of the user to be updated by then expression formula
In mapping relations.
It is described herein update processing method support user dynamic user tag 101 real-time update, support from
The user tag (Field) of user (User) arrives the real-time query of regular (Group), and each user is known by a unique identity
Other code (ID) and multiple user tags 100 form, and the regular expression (Gid) that user meets includes multiple structures with (AND)
Changing query statement, (SQL, Structured Query, the SQL statement in regular expression can split into one or more son
Sentence expression formula (Cid), it may be assumed that gid-> { cid }+, each clause's expression formula only includes a relationship, wherein numerous regular expressions
In clause's expression formula (Cid) much to be duplicate, such as { ' gender ': ' male ' }, { ' age ', ' 15~20 ' } etc., by building
Vertical mapping relations saving inquiry calculation amount, wherein in the following description, mapping relations are including corresponding corresponding table and accordingly
Inverted list etc..
Specifically, table one is the update processing method pseudocode schematic diagram of the dynamic user tag 101, to make to describe
It is relatively sharp accurate, below with reference to table one, the update processing method of the dynamic user tag 101 is further retouched
It states:
In the step S01, the mapping relations are established, the mapping relations include: regular expression to clause's table
Up to the correspondence table (Gid-> Cids) of formula, the inverted list (Cid-> Gids) of clause's expression formula to regular expression, dynamic use
The position whether inverted list (Field-> Cids), user and the clause's expression formula of family label 101 to clause's expression formula hit
Figure hit relationship (User+Cid-> Bitmap) and user hit the inverted list (User-> Gids) of regular expression;
In the step S02, receive user (User) update request after, by the user data of user to be updated with it is original
The user data of customer data base is compared, and searches the dynamic user tag 101 (Field) of one or more variations, such as
It does not find, returns, if found, enter step S13;
In the step S03, for the dynamic user tag 101 of the variation, the dynamic of the variation is searched
User tag 101 the dynamic user tag 101 to clause's expression formula inverted list (Field- > Cids) if in it is corresponding
Dry clause's expression formula (Cid) is formed clause's expression formula set (Cid Set);
In the step S04, to the inner corresponding several clause's expression formulas of clause's expression formula set (Cid Set)
(Cid), the traversal calculating (Cid+User) whether the user to be updated hits clause's expression formula is carried out, the user and institute are obtained
State the hit relationship (the hit relationship of User+Cid) of clause's expression formula in related clause's expression formula set;
In the step S04, by the step S14 obtain the user in related clause's expression formula set
Corresponding dynamic user before the hit relationship of the hit relationship (the hit relationship of User+Cid) of clause's expression formula is calculated with traversal
((User+Cid-> Bitmap) carries out correlation ratio pair to the hit bitmap of label 101 and clause's expression formula, finds the hit of variation
Relationship (hits relationship from True > False), hits relationship change if hit relationship became being not hit by now from former hit
Labeled as T, if hit relationship becomes hitting that (hit relationship hits relationship from False-> True) now from being not hit by the past
Variation is labeled as F;
In the step S06, corresponding clause's expression formula of T is labeled as the hit relationship change, to every height
Sentence expression formula searches clause's expression formula to the inverted list (Cid-> Gids) of regular expression, obtains corresponding several regular expressions
Formula (Gid), composition rule expression formula set (Gidset), by each of each described regular expression set (Gid set)
Regular expression is deleted from the inverted list (User-> Gids) that the user hits regular expression;
In the step S07, to it is described hit relationship change be labeled as F clause, then will the user to be updated and
The bitmap hit of clause's expression formula corresponding to the hit relationship update the bitmap hit relationship that is uploaded to ((User+Cid->
Bitmap in), and the falling in clause's expression formula to regular expression of clause's expression formula corresponding to the hit relationship is searched
The corresponding several regular expressions (Cid-> Gids) of table are arranged, corresponding several regular expressions are increased to described to more
In the inverted list (User-> Gids) of the regular expression of user's hit of new user.
In conclusion the herein described update processing method to the dynamic user tag 101 is by advising one
Then expression formula splits into multiple clause's expression formulas, and establishes several mapping relations, is inquired and is calculated using mapping relations, phase
When therefore significantly accelerating calculating in being cached from fine granularity to inquiry calculated result;Simultaneously by using dynamic
Related clause's expression formula of family label 101 calculates, and beta pruning has been carried out from calculating, therefore calculation amount is greatly reduced, and big
Width improves computational efficiency.
Those skilled in the art will be understood that the description of the above-mentioned update processing method to the dynamic user tag 101
It is only for example, other modifications carried out according to the intention of the update processing method of the dynamic user tag 101 of the application, including
Pseudocode, the variation of programming language or corresponding control table name etc., within the thought range of the application.
Table one: the update processing method pseudocode schematic diagram of the dynamic user tag
In one embodiment another aspect of the application, to the update processing method of the dynamic user tag further include:
It is stored, is specifically included according to dynamic 101 classifying content of user tag: the dynamic user tag 101 is divided for can
Class is enumerated, can not enumerate index class and can not enumerate and can not index class;The enumerable dynamic user tag 101 is built
Vertical attribute storage of array, and inquired using filtering query method;To the dynamic user tag 101 that can not be enumerated but can index
Search tree storage is established, and is inquired using indexing method;To can not enumerate and the dynamic user tag 101 that can not be indexed is drawn
Point range storage, and storage is numbered to range, and using can search index method with may filter that query method query composition.
Further, in the particular embodiment, for the enumerable dynamic user tag 101, pass through dictionary
Numerical value is obtained, such as men and women's attribute, 0 and 1 can be set, then using 0 and 1 numerical value as dynamic user tag 101
One attribute of record, is put into attribute array, can merge storage for enumerable dynamic user tag 101, in turn
Save memory.The dynamic user tag 101 that can not be enumerated but can index is searched by establishing search tree (B+tree)
The key (Key) of tree is field value, and value (Value) is hit value, is formed hit list (Postinglist).Because of B+ tree branch
It holds the upper limit (Lower_bound), lower limit searches (Upper_bound), and naturally supports range query (Range query),
It is easy to be quick can to support that boolean queries (Boolean query) are therefore inquired.For the dynamic that can not be enumerated and can not index
User tag 101, such as such as trade stroke count, can first pass through to range carry out range number, filtered by range number
It does specific range filter again afterwards, to save operation cost, reduces and calculate the time.
In addition, each dynamic user tag 101 is newest with recording in one preferred embodiment of the application
The timestamp of renewal time, since the sequence that dynamic user tag 101 updates may be indefinite, therefore by being each described
Dynamic user tag 101 configures the timestamp of a record latest update time, can recorde each label it is newest more
The new time, to prevent by old update request covering.Wherein, in the preferred embodiment, to each dynamic user tag 101
A timestamp is set, wherein timestamp can be made of an array, and can continuously be stored.
The herein described method for updating the rule that user is met, further includes the request of real-time reception Policy Updates, passes through
Classified inquiry control is carried out to the dynamic user tag 101 of user, obtains the mapping table for establishing the user for meeting new rule.When
When Policy Updates, according to new Rule content, using different querying method inquiry storage modes, different dynamic users is marked
Label 101, the dynamic user tag 101 for obtaining the user of the new rule of satisfaction are gathered.By to different dynamic user marks
Label 101, which establish different storage mode and inquiry mode, can largely save memory, and largely reduce inquiry calculation amount, in turn
Lower query time, improves real-time.
Those skilled in the art will be understood that it is above-mentioned to the Policy Updates when to the processing side of dynamic user tag 101
The description of method is only for example, other according to the application to the Policy Updates when to the processing method of dynamic user tag 101
The modification carried out, including pseudocode, the variation of programming language, storage attribute value and storage field name etc., in this Shen
Within thought range please.
In one preferred embodiment of the application, to the process of the update processing of the user tag in position, including
Following steps:
S11: spatial index number is established to all users, and establishes the global identity and the Spatial Cable of the user
Draw the mapping relations of number;
S12: transmitting the user data of user to be updated, distributes local identification code to the user to be updated, establishes space
The mapping relations of index number and local identification code;
S13: the user data of the user to be updated is compared with original customer data base, if the use to be updated
Family not previously exists, then establishes new spatial index number and check the space if the user to be updated is original user
Whether index number changes, and to spatial index number, there is no the positions for then updating the user to be updated of variation
User tag 103 attribute information, to the spatial index number it is changed, it is original to delete the user to be updated
Local identification code, establish new local identification code, and update local identification code and the spatial index number mapping relations.
The update processing method of the herein described user tag 103 in position can satisfy the position of real-time update user
Information (such as longitude and latitude, road name etc.), crowd's quantity of a certain position of energy real-time query.It is detailed below in conjunction with specific embodiment
Describe the process of the bright herein described update processing to the user tag 103 in position in detail.
In the step S11, spatial index number and the global identity of the user are established to all users
The mapping relations of (User ID) and the spatial index number can use hibert curve in the preferred embodiment
Spatial index number (Key) is established to all users.To relatively stable user data, such as gender, possession, age bracket can be used
Filter (Filter) filtering.Further, it is also possible to it is subdivided to each spatial index number progress modulus, according in system
Central processor number can be divided into several piecemeals (Block), can increase parallel amount, such as the central processing according to system
Device number can be divided into several piecemeals (Block), in each piecemeal, in order to increase parallel amount, carry out again to data
Modulus divides, for example is divided into 10 block (specific number can be determined according to system processing capacity), each block
1/10 data for being responsible for a piecemeal update and inquiry.Wherein, the first order is stored in the index of the Block, can be used
Tree table (Btree map) storage, Key are spatial index key, and value (Value) is that offset (Offset) pointer is directed toward hit list
(Posting list), the method being capable of high search index efficiency.
In the step S12, the user data of user to be updated is transmitted, distributes local identification to the user to be updated
Code (Local id) establishes the corresponding table (Key- > Local id) of spatial index number with local identification code.Preferably implementing
In example, the user data for transmitting user to be updated can distribute to institute using second module 305 and the third module 304
Processing node processing is stated, also can use first module 309 using Distributed Message Queue (MetaQ) mode to institute's rheme
The user tag 103 set carries out data and updates decoupling, and by key signature character (Tag) to the user tag 103 of position
Data carry out cutting, and in an alternate embodiment of the invention, different key signature characters can pass through the identification to each user
Code (ID) modulus is set, and different back end is responsible for handling a part of key signature character information, to be conveniently done
The dilatation of back end and capacity reducing, and then improve the treatment effeciency that user updates request.
Further, the user has unique global identity code, when the user of the position of user marks
Label 103 can be assigned the local identification code (local id) increased since 0 after entering one the 4th module 307, and length can
Think 4 bytes (Bytes), while establishing the local identification code and mapping pass correspondingly with the global identity code
It is that the hit list in spatial index table is stored using local identification code, by the data of the user tag 103 of the position
Attribute is stored in continuous caching, and it is that lower target deviates Compass that the caching, which has with the local identification code,.
In the step S13, when user's more new data is sent in upstream, by the user data of the user to be updated with
Original customer data base is compared, if the user to be updated not previously exists, establishes new spatial index number
(Key), if the user to be updated is original user, check whether the spatial index number (Key) changes, to described
Spatial index numbers (Key), and there is no the attributes of the user tag 103 of the position for then updating the user to be updated of variation
Information, the attribute information of the user tag 103 of the position are stored in a continuous caching, can be by described in calling
The local identification code (Local id) of caching is the attribute letter that the offset Compass of following table finds the user tag 103 of corresponding position
Breath, so that the attribute information to user is updated, it is changed to spatial index number (Key) then delete it is described to
Update the original local identification code (Local id) of user, establish new local identification code, and update local identification code with it is described
The mapping relations of spatial index number.
In the preferred embodiment, by the position of the content of the user tag 103 of received position and original customer data base
Update is compared in 103 content of user tag set, by the content of the user tag 103 of received position and original user data
103 content of user tag of the position in library further includes during update is compared, according to the user tag 103 of the position
Variation frequent degree, dynamic setting update threshold values, and according to loading condition set update precision, according to update precision to position
User tag 103 be updated.It is selected to update precision according to the loading condition of system, such as: under normal circumstances, it is greater than 1
The variation of rice all updates;If the flow of user data is big, 5 meters or more of variation can be greater than and updated again;If the number of user
It is very big according to flow, then it can be greater than 20 meters and just update.Update described here refers to the update to spatial index (Key),
The attribute that the location information of user such as latitude and longitude information can be used as the user tag 103 of position updates always, and influences to use
The accuracy of user data.Furthermore the longitude and latitude of user changes, and the spatial index of user does not need to update under some cases, therefore
The load pressure of system can be alleviated by setting update threshold value by the dynamic, improve the processing speed of system.
Those skilled in the art will be understood that the above-mentioned description for setting update threshold value to the dynamic is only for example, other roots
The modification for updating threshold value and being carried out is set according to herein described dynamic, the variation etc. of range, update mode including updating threshold value,
Within the thought range of the application.
It during the update processing method of the user tag 103 to the position, further include supporting data expired,
Data expiration period is set by dynamic, deletes the data not updated yet more than data expiration period.In the particular embodiment,
Such as if a user has reported primary information, but uploads (for example turn off application, network loss etc.) never again, then existing
The information of reporting of user may be expired invalid over time, it is therefore desirable to remove these data.Specific real
In existing, it can establish a thread and successively scan each piecemeal (Block), check whether every record is expired, if expired
User data set can then be deleted, and Resource recovery.
In an alternate embodiment of the invention, to the update processing method of the user tag 105 of the sliding, including according to sliding
The frequent degree of user tag 105 is using different storage modes in case updating and inquiring, comprising: the sliding high for frequent degree
User tag 105 use matrix storage mode, can be when single user be very frequent to user using matrix storage mode
Data can be traversed quickly using array, to support stochastic searching and sum;The user tag of the sliding low for frequent degree
105 use storage of linked list mode, and the time window of behavior does not store, and save storage, also save query process.
In addition, in an alternate embodiment of the invention, the update processing system further includes 3rd device 207, the user is marked
The classification of label 100 can also include the user tag 107 and static user tag 109 of context, due to the context
User tag 107, which can be directly used, establishes the i.e. renewable processing of function determining method, calculate in real time it is simple and easy, therefore can be by institute
First device 204 is stated directly to handle and return result.The user tag 109 of the static state can use and establish indexing means
Processing can be carried out indexing offline and be searched, and 3rd device 207 described in the user tag 109 of the static state is handled, and described the
Three devices 207 are not high to real time handling requirement, can reduce system load and improve treatment effeciency.
In conclusion the data activity degree and content described herein by according to user tag 100, user is marked
Label 100 are divided into the mark that user tag 105 of dynamic user tag 101, the user tag of position 103 and sliding etc. does not have to class
Label, and different update processing methods is used for inhomogeneous label, especially to update dynamic user the most frequent
Label 101 improves processing capacity and processing speed that system updates request to user using processing method is quickly and effectively updated
Degree, and then improve user and meet real-time update and the inquiry of rule to improve the efficiency of user data update;Further, this Shen
Please the update processing method to the dynamic user tag 101 by establishing several mapping relations, utilize mapping relations
It is inquired and is calculated, be equivalent to from fine granularity and inquiry calculated result is cached, therefore significantly accelerate calculating;Together
When calculated by related clause's expression formula to dynamic user tag 101, beta pruning has been carried out from calculating, therefore has substantially been subtracted
Calculation amount is lacked, and then computational efficiency greatly improved, has further increased user and meet the real-time update of rule and inquire to mention
The efficiency of high user data update.
In addition, the present invention also provides a kind of systems of rule that update user is met, wherein include:
First device, to obtain the user data of user to be updated, according to the attribute of the user data, by the use
User data is divided into different classes of multiple user tags;
Second device is updated processing to the user tag to the classification information according to the user tag, with
It searches the user tag of variation and recalculates the rule that the user tag of the variation is met.
The update user that Fig. 5 updates the system for the rule that user meets described in one embodiment of the application expires
The system framework schematic diagram of the rule of foot;As shown in figure 5, the system for updating the rule that user is met includes first device
204 and second device 205, in which:
User data of the first device 204 to obtain user to be updated, according to the attribute of the user data
Difference is classified and is distributed to the user tag 100, and classification includes dynamic user tag, and the user tag of position is sliding
Dynamic user tag etc.;
The second device 205 receives the user tag 100 that the first device 204 distributes, described to inhomogeneous use
Family label 100 distributes to different engines, is updated to inhomogeneous user tag 100 using different update processing methods
It returns the result, wherein the second device 205 includes at least several first engines 235, first engine 235 is to handle
Dynamic user tag 101 is stated, wherein update processing method of first engine 235 to dynamic user tag 101 are as follows: build
It stands between several dynamic user tags 101 and regular expression, clause's expression formula and the regular expression and institute
The mapping relations for stating the hit relationship or corresponding relationship between clause's expression formula find the institute of variation using the mapping relations
The relevant clause's expression formula of dynamic user tag 101 is stated, and finds the corresponding regular expression of relevant clause's expression formula
Formula meets the user to be updated with user according to the situation of change for hitting relationship to relevant clause's expression formula
Rule set be updated.
The system for updating the rule that user is met further includes that user updates request interface 201, rule query interface
203, the user updates request interface 201 and updates request to real-time reception user, and obtain user to be updated includes one
The user data of global identity and multiple user tags 100;The rule query interface 203 receives real-time rule query request
And export the result of the first device 204 real-time merger return.
In an alternate embodiment of the invention, the update processing system can also include 3rd device 207, to the user tag
100 classification can also include the user tag 107 and static user tag 109 of context.The user of the context marks
Label 107 can calculate simple and easy in real time using the processing of function determining method is established, and the user tag 109 of the static state can be with
Using indexing means processing is established, it can carry out indexing offline and search, therefore the user tag 107 of the context can be direct
It is handled by first device 201, the user tag 109 of the static state can use the not high 3rd device 207 of real time handling requirement
It is handled, reduce system load and improves treatment effeciency.
Those skilled in the art will be understood that the above-mentioned description to the 3rd device 207 is only for example, other are according to this
The modification that the user tag 107 of context and the user tag 109 of the static state are carried out when applying to the Policy Updates,
Including the variation such as title, storage address, within the thought range of the application.
In the preferred embodiment, each engine in the second device 205 point is blamed and absorbed responsible processing is corresponding
User tag 100.Because of the diversification of user tag 100, user is being supported in use, the real time processing system needs in future
It wants to support several hundred thousands of labels, the differentiated services of user tag 100 is supported by establishing, make user tag 100 can be with
Accomplish horizontal extension, separately maintain, system has good scalability and maintainability, can also support different types of label
It calculates and optimizes.Therefore, the corresponding engine of each label only handles oneself responsible label, if rule is responsible for not comprising engine
Label, then the engine will not be processed;Equally, if user property does not include the user tag that engine is responsible for, with regard to the engine
It does not need to be updated and calculate, accomplishes that each engine is ultimate attainment absorbed responsible yet.Meanwhile focusing on task at hand for cooperation engine, it establishes
There is unified entrance to application layer, engine can choose the user tag of oneself calling, so that real time processing system be made to unite
One supports, without building proprietary system for specific user.
In optimal embodiment, the second device 205 has multiple engines, and different engine types handles different
User tag includes at least the first engine 235, and first engine 235 is to handle the dynamic user tag 101.In
In preferred embodiment, the second device 205 can also include the second engine 215 and third engine 255, second engine
215 user tag 103 to handle the position, user tag of the third engine 255 to handle the sliding
105.The dynamic user tag 101, the user tag of position 103, the definition of the user tag 105 of sliding and its attribute are retouched
State the definition and its attribute description phase of the identical user tag 100 in the real time updating method for meeting rule with the user
Together, it repeats no more.
In one preferred embodiment of the application, the second device 205 will be divided into following a few classes: the first engine 235,
Second engine 215, third engine 255.It is described by taking the mode classification as an example below in an example, certain this field
Technical staff will be understood that the description of above-mentioned tag types is only for example, other are according to data activity degree and content to described
What two devices 205 carried out divides and handles method and its modification that different user tags is updated processing, such as is divided into
First engine 235, the second engine 215 combine division methods of tag types known to other skilled in the art etc., all
Within the thought range of the application.As for specific several second devices 205 how allocation processing which user tag 100 can
To negotiate to determine by audience and developer, repeat no more.
In user tag 100, the dynamic user tag 101 is data storage capacity maximum, and data variation frequency is most
High a kind of user tag 100, therefore the reality of dynamic user tag 101 how is realized using first engine 235
Shi Gengxin and real-time query become the key technical problem of the application, in the one aspect of the embodiment of the present application, described first
Engine 235 meets method described in the real time updating method of rule using herein described user to the dynamic user tag
101 are updated processing.
In conclusion herein described first engine 235 is logical to the update processing method of the dynamic user tag 101
It crosses and a regular expression is split into multiple clause's expression formulas, and establish several mapping relations, looked into using mapping relations
It askes and calculates, be equivalent to from fine granularity and inquiry calculated result is cached, therefore significantly accelerate calculating;Pass through simultaneously
Related clause's expression formula of dynamic user tag 101 is calculated, beta pruning has been carried out from calculating, therefore meter is greatly reduced
Calculation amount, and computational efficiency greatly improved.
Fig. 6 user described in one embodiment of the application meets the rule that the real-time update system update user of rule meets
The block schematic illustration of second engine in system then.It is in the preferred embodiment, described to update what user was met in conjunction with Fig. 6
The system of rule includes the second engine 215, and the framework of second engine 215 includes the first module 309, the second module 305, the
Three modules 304 and the 4th module 307, wherein first module 309 is to transmit the request user user's to be updated
User data;User data of several first modules 305 to transmit and distribute the request user user to be updated, institute
If stating third module 304 to request to give dry-cure node to user query request and Policy Updates;And the 4th module 307
It is updated and returns the result to the user tag 103 to position.Wherein, the 4th module 307 establishes all users
The mapping relations of spatial index number and the global identity and spatial index number;Transmission request user is to be updated
The user data of user distributes local identification code to request user user to be updated, establishes spatial index number and locality
The mapping relations of identification code;The user data of the request user user to be updated is compared with original customer data base,
If request user user to be updated not previously exists, new spatial index number is established, if the request user waits for more
New user is original user, then checks whether the spatial index number changes, to spatial index number there is no
The attribute information of the user tag 103 of the position for then updating the request user user to be updated of variation, to the Spatial Cable
It is changed to draw number, deletes the original local identification code of request user user to be updated, establishes new local identification
Code, and update the mapping relations of local identification code and spatial index number.
The framework of second engine 215 can also include updating user data interface 301 and retrieval user interface 303,
The user data for updating user data interface 301 to receive request user user to be updated;The retrieval user interface
303 to receive the request of retrieval user query and Policy Updates request.
In the present embodiment, first module 205, the third module 304 and the 4th module 307 all with it is external
Service platform 313 is connected, such as comprehensive service operation and management platform (OSS), and to show processing status, statistical report is more
New result and managing process.
Herein described second engine 215 can satisfy location information (such as the longitude and latitude, road that processing in real time updates user
Road title etc.), and crowd's quantity of a certain position of energy real-time query.It is described in detail below in conjunction with specific embodiment herein described
Process of second engine 215 to the update processing of the user tag 103 of position.
Update of herein described second engine 215 to the user tag 103 of position specifically establishes all users
The mapping relations of spatial index number and the global identity (User ID) and spatial index number, preferable
In embodiment, hibert curve can be used, spatial index number (Key) is established to all users.To relatively stable user
Data, such as gender, possession, age bracket can be filtered with filter (Filter).Further, it is also possible to each spatial index
Number progress modulus is subdivided, according to the central processing unit number of system, can be divided into several piecemeals (Block), Neng Goujia
Big parallel amount, such as according to the central processing unit number of system, several piecemeals (Block) can be divided into, in each piecemeal,
In order to increase parallel amount, modulus division is carried out to data again, for example is divided into 10 block (specific number can root
Determined according to system processing capacity), 1/10 data that each block is responsible for a piecemeal update and inquiry.Wherein, described
The index of Block stores the first order, and tree table (Btree map) storage can be used, and Key is spatial index key, is worth (Value)
It is directed toward hit list (Posting list) for offset (Offset) pointer, the method being capable of high search index efficiency.
In the step S12, the user data of user to be updated is transmitted, distributes local identification to the user to be updated
Code (Local id) establishes the mapping relations (Key- > Local id) of spatial index number with local identification code.Preferable real
It applies in example, the user data for transmitting user to be updated can distribute to the 4th module 307 processing using the first module 309,
Data more new explanation can also be carried out using using user tag 103 of Distributed Message Queue (MetaQ) mode to the position
Coupling, and cutting is carried out by the data of key signature character (Tag) to the user tag 103 of position, in an alternate embodiment of the invention,
Different key signature characters can be set by identity code (ID) modulus to each user, different back end
It is responsible for a part of key signature character information of processing, to be conveniently done dilatation and the capacity reducing of back end, and then improves and use
Family updates the treatment effeciency of request.
Further, the user has unique global identity code, when the user of the position of user marks
Label 103 can be assigned the local identification code (local id) increased since 0 after entering one the 4th module 307, and length can
Think 4 bytes (Bytes), while establishing the local identification code and mapping pass correspondingly with the global identity code
It is that the hit list in spatial index table is stored using local identification code, by the data of the user tag 103 of the position
Attribute is stored in continuous caching, and it is that lower target deviates Compass that the caching, which has with the local identification code,.
In the step S13, when user's more new data is sent in upstream, by the user data of the user to be updated with
Original customer data base is compared, if the user to be updated not previously exists, establishes new spatial index number
(Key), if the user to be updated is original user, check whether the spatial index number (Key) changes, to described
Spatial index numbers (Key), and there is no the attributes of the user tag 103 of the position for then updating the user to be updated of variation
Information, the attribute information of the user tag 103 of the position are stored in a continuous caching, can be by described in calling
The local identification code (Local id) of caching is the attribute letter that the offset Compass of following table finds the user tag 103 of corresponding position
Breath, so that the attribute information to user is updated, it is changed to spatial index number (Key) then delete it is described to
Update the original local identification code (Local id) of user, establish new local identification code, and update local identification code with it is described
The mapping relations of spatial index number.
In the preferred embodiment, by the position of the content of the user tag 103 of received position and original customer data base
Update is compared in 103 content of user tag set, by the content of the user tag 103 of received position and original user data
103 content of user tag of the position in library further includes during update is compared, according to the user tag 103 of the position
Variation frequent degree, dynamic setting update threshold values, and according to loading condition set update precision, according to update precision to position
User tag 103 be updated.It is selected to update precision according to the loading condition of system, such as: under normal circumstances, it is greater than 1
The variation of rice all updates;If the flow of user data is big, 5 meters or more of variation can be greater than and updated again;If the number of user
It is very big according to flow, then it can be greater than 20 meters and just update.Update described here refers to the update to spatial index (Key),
The attribute that the location information of user such as latitude and longitude information can be used as the user tag 103 of position updates always, and influences to use
The accuracy of user data.Furthermore the longitude and latitude of user changes, and the spatial index of user does not need to update under some cases, therefore
The load pressure of system can be alleviated by setting update threshold value by the dynamic, improve the processing speed of system.
Those skilled in the art will be understood that the above-mentioned description for setting update threshold value to the dynamic is only for example, other roots
The modification for updating threshold value and being carried out is set according to herein described dynamic, the variation etc. of range, update mode including updating threshold value,
Within the thought range of the application.
It during the update processing method of the user tag 103 to the position, further include supporting data expired,
Data expiration period is set by dynamic, deletes the data not updated yet more than data expiration period.In the particular embodiment,
Such as if a user has reported primary information, but uploads (for example turn off application, network loss etc.) never again, then existing
The information of reporting of user may be expired invalid over time, it is therefore desirable to remove these data.Specific real
In existing, it can establish a thread and successively scan each piecemeal (Block), check whether every record is expired, if expired
User data set can then be deleted, and Resource recovery.
In an alternate embodiment of the invention, to the update processing method of the user tag 105 of the sliding, including according to sliding
The frequent degree of user tag 105 is using different storage modes in case updating and inquiring, comprising: the sliding high for frequent degree
User tag 105 use matrix storage mode, can be when single user be very frequent to user using matrix storage mode
Data can be traversed quickly using array, to support stochastic searching and sum;The user tag of the sliding low for frequent degree
105 use storage of linked list mode, and the time window of behavior does not store, and save storage, also save query process.
In the preferred embodiment, the system for updating the rule that user is met is additionally provided with mirror nodes, described
Each computing engines have at least one mirror nodes to provide service in second device 205, serve a computing engines
The data of multiple mirror nodes and service are impartial, for example, in one embodiment, each computing engines are with there are three mirror image sections
Point, the data of each mirror nodes and service are impartial, so if one of mirror nodes break down, another two
Mirror nodes can provide same service.Specifically, the information preservation of the mirror nodes, in ZK frame, path name is advised
It then can be with are as follows: root/ partition number/mirror image number, wherein the contents value of ZK frame joint storage is a protobuf object,
Include the information such as rpc ip/port.Mirror nodes need to keep ZK heartbeat, when inquiry when, according to mirror nodes information into
Row inquiry, if a mirror nodes do not connect, can inquire next mirror nodes to live.
Wherein, the protocolbuf object (hereinafter referred to as PB) is a kind of format of data exchange of Google, it is independent
In language, independently of platform.Google provides the realization of three kinds of language: java, c++ and python, each realization all includes
The compiler and library file of corresponding language.It is faster than using xml to carry out data exchange since it is a kind of binary format
It is many.It can be it for the data exchange under the data communication or isomerous environment between Distributed Application.As a kind of effect
Rate and compatible all very outstanding binary data transmission format can be used for such as network transmission, configuration file, data storage
Equal numerous areas.
Those skilled in the art will be understood that the above-mentioned description to the mirror nodes is only for example, other are according to the application
The modification that the function of the mirror nodes is carried out, storage mode including use, using variation of frame etc., in the application
Thought range within.
In conclusion system of the application by establishing the rule that the update user is met, using distributed rule
Computing architecture handles the Distributed Architecture of user tag, according to the data activity degree of user tag 100 and content by user
Label 100 is divided into user tag 105 of dynamic user tag 101, the user tag of position 103 and sliding etc. and does not have to class
Label, establishes second device 205, and the second device 205 includes several first engines 235, the second engine 215 and third engine
255, different processing methods is used to inhomogeneous user tag, realizes the reasonable distribution and processing in real time of user tag,
Further increase the processing speed that user updates request.
Meanwhile the herein described system for updating the rule that user is met proposes a kind of frame of second engine 215,
Second engine 215 receives update request and the user data for updating user and retrieving user, is distributed processing to user,
And use and spatial index is established to each user and is stored according to the spatial index, when needing to carry out location updating,
It calls spatial index to be updated processing to the user tag of the position of user, and then improves the processing energy of the second engine 215
Power and treatment effeciency.
Obviously, those skilled in the art can carry out various modification and variations without departing from the essence of the application to the application
Mind and range.In this way, if these modifications and variations of the application belong to the range of the claim of this application and its equivalent technologies
Within, then the application is also intended to include these modifications and variations.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt
With specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment
In, the software program of the application can be executed to implement the above steps or functions by processor.Similarly, the application
Software program (including relevant data structure) can be stored in computer readable recording medium, for example, RAM memory,
Magnetic or optical driver or floppy disc and similar devices.In addition, hardware can be used to realize in some steps or function of the application, example
Such as, as the circuit cooperated with processor thereby executing each step or function.
In addition, a part of the application can be applied to computer program product, such as computer program instructions, when its quilt
When computer executes, by the operation of the computer, it can call or provide according to the present processes and/or technical solution.
And the program instruction of the present processes is called, it is possibly stored in fixed or moveable recording medium, and/or pass through
Broadcast or the data flow in other signal-bearing mediums and transmitted, and/or be stored according to described program instruction operation
In the working storage of computer equipment.Here, including a device according to one embodiment of the application, which includes using
Memory in storage computer program instructions and processor for executing program instructions, wherein when the computer program refers to
When enabling by processor execution, method and/or skill of the device operation based on aforementioned multiple embodiments according to the application are triggered
Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned exemplary embodiment, Er Qie
In the case where without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and scope of the present application is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the application.Any reference signs in the claims should not be construed as limiting the involved claims.This
Outside, it is clear that one word of " comprising " does not exclude other units or steps, and odd number is not excluded for plural number.That states in device claim is multiple
Unit or device can also be implemented through software or hardware by a unit or device.The first, the second equal words are used to table
Show title, and does not indicate any particular order.