CN105653654A - Lucky draw qualification indexing system and method - Google Patents

Lucky draw qualification indexing system and method Download PDF

Info

Publication number
CN105653654A
CN105653654A CN201511004815.8A CN201511004815A CN105653654A CN 105653654 A CN105653654 A CN 105653654A CN 201511004815 A CN201511004815 A CN 201511004815A CN 105653654 A CN105653654 A CN 105653654A
Authority
CN
China
Prior art keywords
prize drawing
qualification
membership information
information
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201511004815.8A
Other languages
Chinese (zh)
Other versions
CN105653654B (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.)
Shanghai Jiaran Information Technology Co ltd
Original Assignee
Shanghai Hanzhiyou Information Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Hanzhiyou Information Technology Service Co Ltd filed Critical Shanghai Hanzhiyou Information Technology Service Co Ltd
Priority to CN201511004815.8A priority Critical patent/CN105653654B/en
Publication of CN105653654A publication Critical patent/CN105653654A/en
Application granted granted Critical
Publication of CN105653654B publication Critical patent/CN105653654B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Abstract

The invention discloses a lucky draw qualification indexing system and method, and belongs to the technical field of database indexing. The system comprises a first memory cell, a first indexing unit, a second indexing unit and a first query unit. The method comprises the following steps: S1) according to user information, inquiring to obtain corresponding qualification weight information contained in the second indexing unit; S2) according to the qualification weight information, indexing to obtain qualification identification information; and S3) according to the qualification identification information, finally indexing to obtain and output lucky draw qualification information. The technical scheme has the beneficial effects that the query efficiency of the repeated query of the lucky draw qualification can be improved, and the uniformity of lucky draw qualification states in a whole lucky draw system can be kept.

Description

A kind of prize drawing qualification directory system and method
Technical field
The present invention relates to technical field of database index, particularly relate to a kind of prize drawing qualification directory system and method.
Background technology
Traditional lottery system is generally traditional data storehouse, it is set up a user in a database and draws a lottery eligibility form, the qualification of inquiry prize drawing each time all needs to perform one query statement in this database, if exist user repeat inquiry prize drawing qualification time, the number of times that repeats of above-mentioned inquiry statement can be very many, thus drag slow whole inquiry velocity. If there is a large amount of concurrent repetition query manipulations, then the service quality of database may be caused to decline, service even cannot be normally provided.
Summary of the invention
According to the above-mentioned problems in the prior art, now provide the technical scheme of a kind of draw a lottery qualification directory system and method, it is intended to promote the inquiry efficiency that prize drawing qualification repeats inquiry, and the unity of the membership status that can keep drawing a lottery in whole lottery system.
Technique scheme specifically comprises:
A kind of prize drawing qualification directory system, wherein, comprising:
First storage unit, for preserving the prize drawing membership information being associated with different users;
First indexing units, connects described first storage unit, for arranging a qualification identification information for index for membership information of drawing a lottery described in each, and the corresponding user profile of qualification identification information described in each;
2nd indexing units, connect described first indexing units, for arranging a qualification weight information for index according to qualification identification information described in each, described qualification weight information comprises the described user profile and qualification expired time that are associated with described qualification identification information;
First query unit, connect described 2nd indexing units, for obtaining the described qualification weight information of the correspondence that described 2nd indexing units comprises according to the inquiry of described user profile, thus obtain described qualification identification information according to described qualification weight information index, and obtain described prize drawing membership information according to the described final index of qualification identification information and export.
Preferably, this prize drawing qualification directory system, wherein, described qualification expired time from one for described prize drawing membership information preset initial operating period to one for described prize drawing membership information preset the termination operating time;
Described first query unit using time of currently inquiring about as the described termination operating time, searching the operating time that whether there is the described user profile mated mutually is in described qualification expired time, and obtain described qualification identification information according to searching the described user profile obtained, and obtain described prize drawing membership information according to described qualification identification information index and export.
Preferably, this prize drawing qualification directory system, wherein, described first query unit obtains qualification weight information described at least one according to the inquiry of described user profile;
Then described prize drawing qualification directory system also comprises:
Display unit, connects described first query unit, and the number for the described qualification weight information described first query unit inquiry obtained shows user to check.
Preferably, this prize drawing qualification directory system, wherein, is applicable to redis storage system;
Described first indexing units adopts key value that the index of form is set up mode and forms the index information comprising described qualification identification information, adopt described qualification identification information to form key value information, and adopt the described prize drawing membership information after serializing to form form information.
Preferably, this prize drawing qualification directory system, wherein, also comprises:
Newly-increased unit, connects described first indexing units and described 2nd indexing units respectively, for forming the described qualification identification information for index and described qualification weight information respectively according to newly-increased described prize drawing membership information;
2nd storage unit, connect described newly-increased unit and described first indexing units respectively, newly-increased described prize drawing membership information is stored in described 2nd storage unit simultaneously, and described first indexing units generates the corresponding described qualification identification information for index according to the described prize drawing membership information preserved in described 2nd storage unit;
Indexing unit, connects described 2nd storage unit, and the described prize drawing membership information for the expired time preset more than a shelf time in described 2nd storage unit is labeled as expired;
2nd query unit, connect described 2nd indexing units, for search according to default very first time interval obtain to current time in described 2nd storage unit preserve be marked as expired described prize drawing membership information, and be included in a list for clearance export;
Cleaning unit, connects described 2nd query unit, described first indexing units, described 2nd indexing units and described 2nd storage unit respectively, for deleting corresponding described prize drawing membership information according to described list for clearance.
Preferably, this prize drawing qualification directory system, wherein, also comprises:
State changing unit, connect described 2nd indexing units, after being used in the prize drawing qualification being associated with described prize drawing membership information, is updated to the preset value being greater than the described termination operating time the described operating time in the corresponding described prize drawing membership information in described 2nd indexing units.
Preferably, this prize drawing qualification directory system, wherein, also comprises:
Operating record unit, connects described newly-increased unit, for recording the newly-increased record to described prize drawing membership information, and the use record to the prize drawing qualification being associated with described prize drawing membership information;
Synchronous unit, connects described operating record unit and described first storage unit respectively, for according to the described newly-increased record in described operating record unit and/or described use record:
Described prize drawing membership information is added in described first storage unit;And/or
The using state of the described prize drawing membership information that change is stored in described first storage unit.
Preferably, this prize drawing qualification directory system, wherein, when only there is described newly-increased record for same described prize drawing membership information in described operating record unit, described prize drawing membership information is added in described first storage unit by described synchronous unit; Or
When only there is described use record for same described prize drawing membership information in described operating record unit, the described using state of the described prize drawing membership information of the correspondence preserved in described first storage unit is changed to and uses by described synchronous unit; Or
When there is described newly-increased record and described use record for same described prize drawing membership information in described operating record unit simultaneously, described prize drawing membership information is added in described first storage unit by described synchronous unit, and the described using state of the described prize drawing membership information being added is changed to and use.
Preferably, this prize drawing qualification directory system, wherein, also comprises:
Operation clearing cell, connects described operating record unit and described synchronous unit respectively;
Described operation clearing cell is used for:
Carry out the operation operating or once changing the using state of described prize drawing membership information being once added into by described prize drawing membership information in described first storage unit at described synchronous unit after, remove all described newly-increased record being associated with corresponding described prize drawing membership information and described use record that preserve in described operating record unit.
A kind of prize drawing qualification indexing means, wherein:
The prize drawing membership information being associated with different users is preserved in one first storage unit;
A qualification identification information for index is set for membership information of drawing a lottery described in each, the corresponding user profile of qualification identification information described in each;
Arranging a qualification weight information for index according to qualification identification information described in each, described qualification weight information comprises the described user profile and qualification expired time that are associated with described qualification identification information, also comprises:
Step S1, obtains the described qualification weight information of the correspondence that described 2nd indexing units comprises according to the inquiry of described user profile;
Step S2, obtains described qualification identification information according to described qualification weight information index;
Step S3, obtains described prize drawing membership information according to the described final index of qualification identification information and exports.
Preferably, this prize drawing qualification indexing means, wherein, described qualification expired time from one for described prize drawing membership information preset initial operating period to one for described prize drawing membership information preset the termination operating time;
Described step S3 specifically comprises:
Step S31, using time of currently inquiring about as the described termination operating time, searching the operating time that whether there is the described user profile mated mutually is in described qualification expired time:
If there is not the described user profile mated mutually, then exit;
Step S32, obtains described qualification identification information according to searching the described user profile obtained;
Step S33, obtains described prize drawing membership information according to described qualification identification information index and exports.
Preferably, this prize drawing qualification indexing means, wherein, in described step S1, obtain qualification weight information described at least one according to the inquiry of described user profile, and show user to check the number that described first query unit inquires about the described qualification weight information obtained by a display screen.
Preferably, this prize drawing qualification indexing means, wherein, it is applicable to redis storage system, and adopt key value that the index of form is set up mode and form the index information comprising described qualification identification information, adopt described qualification identification information to form key value information, and adopt the described prize drawing membership information after serializing to form form information.
Preferably, this prize drawing qualification indexing means, wherein, the step clearing up expired described prize drawing membership information in described first storage unit comprises:
Steps A 1, forms the described qualification identification information for index and described qualification weight information respectively according to newly-increased described prize drawing membership information, and is stored in one the 2nd storage unit by newly-increased described prize drawing membership information;
Steps A 2, the described prize drawing membership information of the expired time preset more than a shelf time in described 2nd storage unit is labeled as expired;
Steps A 3, search according to default very first time interval obtain to current time in described 2nd storage unit preserve be marked as expired described prize drawing membership information, and be included in a list for clearance export;
Steps A 4, deletes corresponding described prize drawing membership information according to described list for clearance.
Preferably, this prize drawing qualification indexing means, wherein, after the prize drawing qualification being associated with described prize drawing membership information is used, is updated to the preset value being greater than the described termination operating time the described operating time in the corresponding described prize drawing membership information in described 2nd indexing units.
Preferably, this prize drawing qualification indexing means, wherein, records the newly-increased record to described prize drawing membership information, and the use record to the prize drawing qualification being associated with described prize drawing membership information;
Then adopt a synchronous unit, according to described newly-increased record and/or described use record:
Described prize drawing membership information is added in described first storage unit; And/or
The using state of the described prize drawing membership information that change is stored in described first storage unit.
Preferably, this prize drawing qualification indexing means, wherein, adopts described synchronous unit:
When described operating record unit only exists described newly-increased record for same described prize drawing membership information, described prize drawing membership information is added in described first storage unit; Or
When described operating record unit only exists described use record for same described prize drawing membership information, the described using state of the described prize drawing membership information of the correspondence preserved in described first storage unit is changed to and uses; Or
When there is described newly-increased record and described use record for same described prize drawing membership information in described operating record unit simultaneously, described prize drawing membership information is added in described first storage unit, and the described using state of the described prize drawing membership information being added is changed to and uses.
Preferably, this prize drawing qualification indexing means, wherein, carry out the operation operating or once changing the using state of described prize drawing membership information being once added into by described prize drawing membership information in described first storage unit at described synchronous unit after, an operation clearing cell is adopted to remove all described newly-increased record being associated with corresponding described prize drawing membership information and described use record preserved in described operating record unit.
The useful effect of technique scheme is:
1) a kind of prize drawing qualification directory system is provided, it is possible to promote the inquiry efficiency that prize drawing qualification repeats inquiry, and the unity of the membership status that can keep drawing a lottery in whole lottery system.
2) a kind of prize drawing qualification indexing means is provided, it is possible to support that above-mentioned prize drawing qualification directory system normally runs.
Accompanying drawing explanation
Fig. 1 is in the preferred embodiment of the present invention, the overall structure schematic diagram of a kind of qualification directory system of drawing a lottery;
Fig. 2-4 is in the preferred embodiment of the present invention, the schematic flow sheet of a kind of qualification indexing means of drawing a lottery.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only the present invention's part embodiment, instead of whole embodiments. Based on the embodiment in the present invention, other embodiments all that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belong to the scope of protection of the invention.
It should be noted that, when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
In prior art, user is after inquiry prize drawing qualification, often because unstable networks or self reason etc. do not use this prize drawing qualification to draw a lottery immediately, and may repeatedly enter the Web page and inquire about prize drawing qualification, the burden that above-mentioned repetitive operation brings background data base can produce the more inquiry statement repeating to be performed exactly, and when the above-mentioned repetitive operation of concurrent enormous amount occurs, be easy to make database cannot normally provide service, even can wear whole lottery system down.
In the preferred embodiment of the present invention, based on the above-mentioned problems in the prior art, existing offer a kind of prize drawing qualification directory system, specifically as shown in Figure 1, comprising:
First storage unit 1, for preserving the prize drawing membership information being associated with different users;
First indexing units 2, connects the first storage unit 1, for arranging a qualification identification information for index for each prize drawing membership information, and the corresponding user profile of each qualification identification information;
2nd indexing units 3, connects the first indexing units 2, and for arranging a qualification weight information for index according to each qualification identification information, qualification weight information comprises the user profile being associated with qualification identification information and qualification expired time;
First query unit 4, connect the 2nd indexing units 3, for obtaining the qualification weight information of the correspondence that the 2nd indexing units 3 comprises according to user profile inquiry, thus obtain qualification identification information according to qualification weight information index, and according to the final index of qualification identification information obtain prize drawing membership information and export.
In a specific embodiment, above-mentioned first storage unit 1 can be traditional database, such as SQL (StructuredQueryLanguage, structuralized query language) database or other similar relevant databases etc. This first storage unit 1 is preserved the prize drawing membership information being associated with different users, each prize drawing membership information can comprise: the using state information etc. of the user profile (such as user ID) of user, the time information that the prize drawing membership information being associated with this user is saved in the first storage unit 1 and this prize drawing membership information. Above-mentioned information can describe in detail hereinafter.
In this embodiment, adopt above-mentioned first indexing units 2, form a corresponding qualification identification information for carrying out index for each prize drawing membership information being stored in the first storage unit 1. This qualification identification information can adopt the user profile in above-mentioned prize drawing membership information, such as user ID.
In this embodiment, adopting above-mentioned 2nd indexing units 3, for the qualification identification information for prize drawing membership information being carried out index that each is formed by above-mentioned first indexing units 2, forming a corresponding qualification weight information.This qualification weight information can comprise above-mentioned user profile (such as user ID) and qualification expired time. This qualification expired time can from one for described prize drawing membership information preset initial operating period to one for described prize drawing membership information preset the termination operating time. In other words, this qualification expired time is a default time period, this time period be one regular time section, its initial moment is a default initial operating period, and its end time is a default termination operating time. A preferred embodiment of the initial value of above-mentioned qualification weight information can be: 12345678022403, wherein front 8 (12345678) for representing user profile, rear 6 (022403), for the operating time of the prize drawing membership information for representing correspondence, namely corresponding prize drawing membership information was increased newly in above-mentioned first storage unit 1 when 24 days 3 February. Then above-mentioned qualification expired time is that a default time period is such as from 010101 (when 01 month 01 day 01) to 123124 (during 31 days 24 December).
Then in this embodiment, user obtains the qualification weight information of the correspondence that the 2nd indexing units 3 comprises according to user profile inquiry, thus obtain qualification identification information according to qualification weight information index, and according to the final index of qualification identification information obtain prize drawing membership information and export.
In the preferred embodiment of the present invention, above-mentioned first query unit 4 is according to the current inquiry time, searching the operating time that whether there is the user profile mated mutually is in above-mentioned qualification expired time, and obtain qualification identification information according to searching the user profile that obtains, and obtain prize drawing membership information according to qualification identification information index and export.
Specifically, in a preferred embodiment of the present invention, the maximum operating time scope of each user profile corresponding can be unified as from initial operating period (when 01 month 01 day 01) to terminating the operating time (during 31 days 24 December), such as user profile is 12345678, corresponding operating time scope is 010101 to 123124, then the maximum of above-mentioned qualification weight information can span (i.e. qualification expired time) be just 12345678010101 to 12345678123124, above-mentioned first query unit 4 can using be associated with current time the current operation time (such as 122117) as above-mentioned initial operating period, to determine the operating time scope of this time inquiry, and within the above-mentioned operating time determined, search whether there is corresponding qualification weight information, such as whether this range-based searching of 12345678122117-12345678123124 has corresponding value, thus find corresponding qualification weight information, and and then index obtain qualification identification information, and finally obtain being stored in the prize drawing membership information in above-mentioned first storage unit 1.
In the preferred embodiment of the present invention, above-mentioned first query unit 4 obtains at least one qualification weight information according to user profile inquiry.
Then still as shown in Figure 1, above-mentioned prize drawing qualification directory system also comprises:
Display unit 5, connects the first query unit 4, and the number for the qualification weight information the first query unit 4 inquiry obtained shows user to check.
Specifically, in the preferred embodiment of the present invention, if obtaining multiple qualification weight information being associated with user profile according to the inquiry of aforesaid operations time range, and each qualification weight information must a corresponding qualification identification information, thus a corresponding prize drawing membership information, the number of times of the prize drawing qualification that the number of the qualification weight information that therefore above-mentioned inquiry obtains actual expression user is currently available, therefore shows user to check this number.
In the preferred embodiment of the present invention, above-mentioned prize drawing qualification directory system is applicable to redis storage system. So-called redis storage system, be that a use ANSI C increased income is write, network enabled, can based on internal memory also can the log type of persistence, key value (Key) to the database of form (Value).
Therefore, above-mentioned first indexing units 2 can adopt the index of Key-Value to set up mode and form the index information comprising qualification identification information, wherein adopt qualification identification information to form Key information, and adopt and form Value information with the prize drawing membership information of json form after serializing.
In the preferred embodiment of the present invention, still as shown in Figure 1, above-mentioned prize drawing qualification directory system also comprises:
Newly-increased unit 6, connects the first indexing units 2 and the 2nd indexing units 3 respectively, for forming the qualification identification information for index and qualification weight information respectively according to newly-increased prize drawing membership information;
2nd storage unit 7, connect newly-increased unit 1 and the first indexing units 2 respectively, newly-increased prize drawing membership information is stored in the 2nd storage unit 7 simultaneously, and the first indexing units 2 generates the corresponding qualification identification information for index according to the prize drawing membership information preserved in the 2nd storage unit 7;
Indexing unit 8, connects the 2nd storage unit 7, and the prize drawing membership information for the expired time preset more than a shelf time in the 2nd storage unit 7 is labeled as expired;
2nd query unit 9, connect the 2nd indexing units 3, for search according to default very first time interval obtain to current time in the 2nd storage unit 7 preserve be marked as expired prize drawing membership information, and be included in a list for clearance export;
Cleaning unit 10, connects the 2nd query unit 9, first indexing units 2, the 2nd indexing units 3 and the 2nd storage unit 7 respectively, for deleting corresponding prize drawing membership information according to list for clearance.
Specifically, in the preferred embodiment of the present invention, above-mentioned newly-increased unit 6 is for forming corresponding qualification identification information according to the prize drawing membership information intending increasing and put into above-mentioned first indexing units 2, and forms corresponding qualification weight information and put into above-mentioned 2nd indexing units 3. The complete information of above-mentioned prize drawing membership information is included in above-mentioned qualification identification information. The prize drawing membership information that above-mentioned plan is newly-increased is put into above-mentioned 2nd storage unit 7 by newly-increased unit 6 simultaneously.
Then in the preferred embodiment of the present invention, above-mentioned prize drawing qualification directory system is preset the expired time of a prize drawing membership information. Above-mentioned indexing unit 8 is adopted to be labeled as expired by the prize drawing membership information that the shelf time in the 2nd storage unit 7 exceedes above-mentioned default expired time subsequently. Specifically, can by the 2nd storage unit 7 preserve time equivalence be considered as in the first storage unit 1 preserve time, if the shelf time exceedes above-mentioned qualification expired time, then think that this prize drawing membership information is expired, need cleaning, therefore adopt above-mentioned indexing unit 8 it to be marked.
In the preferred embodiment of the present invention, adopt above-mentioned 2nd query unit 9, by the two-stage index system of the 2nd indexing units 3 and the first indexing units 2, regularly (timed interval according to default) search obtain to current time in the 2nd storage unit 7 preserve be marked as expired prize drawing membership information, and be included in a list for clearance export. Such as, operating time information corresponding to current time is 162115 (16: 21: 15), search within the scope of the operating time that then this is determined according to 000000-162115 and it is marked as the expired qualification weight information corresponding to prize drawing membership information, and and then search and obtain this prize drawing membership information, put into a list for clearance export searching the expired prize drawing membership information that is marked as obtained subsequently.
Subsequently, in the preferred embodiment of the present invention, adopt above-mentioned cleaning unit 10, it is marked as expired prize drawing membership information according to what above-mentioned list for clearance comprised and deletes corresponding prize drawing membership information, thus complete the expired cleaning operation of prize drawing membership information.
In the preferred embodiment of the present invention, still as shown in Figure 1, above-mentioned prize drawing qualification directory system also comprises:
State changing unit 11, connects the 2nd indexing units 3, after being used in the prize drawing qualification being associated with prize drawing membership information, is updated to the preset value being greater than and terminating the operating time operating time to membership information of should drawing a lottery in the 2nd indexing units 3.
Specifically, in the preferred embodiment of the present invention, as noted before, the maximum operating time scope of corresponding qualification weight information can be defined as 010101-123124, and therefore correspondingly, the maximum termination operating time is 123124. In other words, if operating time corresponding to certain qualification weight information is greater than 123124, then this qualification weight information is just expired, is namely queried never and obtains. Therefore, in the preferred embodiment of the present invention, adopt above-mentioned state changing unit 11 that the operating time in qualification weight information corresponding for the prize drawing membership information used is updated to a preset value of the value being greater than the maximum termination operating time, this preset value can be 171253, it is possible to thinks any value being greater than the maximum termination operating time.
In the preferred embodiment of the present invention, still as shown in Figure 1, above-mentioned prize drawing qualification directory system also comprises:
Operating record unit 12, connects newly-increased unit 6, for recording the newly-increased record to prize drawing membership information, and the use record to the prize drawing qualification being associated with prize drawing membership information;
Synchronous unit 13, respectively attended operation record cell 12 and the first storage unit 1, for according to the newly-increased record in operating record unit and/or use record:
Prize drawing membership information is added in the first storage unit 1; And/or
The using state of the prize drawing membership information that change is stored in the first storage unit 1.
Specifically, in the preferred embodiment of the present invention, when only there is newly-increased record for same prize drawing membership information in operating record unit 12, prize drawing membership information is added in the first storage unit 1 by above-mentioned synchronous unit 13; Or
When only there is use record for same prize drawing membership information in operating record unit 12, the using state of the prize drawing membership information of the correspondence preserved in the first storage unit 1 is changed to and uses by synchronous unit 13; Or
When there is newly-increased record for same prize drawing membership information in operating record unit 12 simultaneously and use record, prize drawing membership information is added in the first storage unit 1 by synchronous unit 13, and the using state of the prize drawing membership information being added is changed to and use.
In other words, at initial operating period and within the scope of being associated with operating time that current operation time of current time delimited, synchronous unit 13 searches the operating record that certain prize drawing membership information exists in operating record unit 12:
If only there is newly-increased record, then represent that this prize drawing membership information needs to be added in the first storage unit 1, then this prize drawing membership information is synchronized in above-mentioned first storage unit 1 by synchronous unit 13;
If only existing and using record, then represent that this prize drawing membership information is added in the first storage unit 1 already, and used, now in the prize drawing membership information of the correspondence that this using state is synchronized in above-mentioned first storage unit 1 by synchronous unit 13, change to by the using state of this prize drawing membership information and use (be defaulted as and do not use).
If there is newly-increased record in this prior before the operating time and use record simultaneously, then represent that this prize drawing membership information needs to be added in the first storage unit 1, and finish using, now synchronous unit 13 needs first to be added in above-mentioned first storage unit 1 by this prize drawing membership information, and its using state is changed to simultaneously and use.
In the preferred embodiment of the present invention, still as shown in Figure 1, above-mentioned prize drawing qualification directory system also comprises:
Operation clearing cell 14, respectively attended operation record cell 12 and synchronous unit 13;
Aforesaid operations clearing cell 14 for:
After the operation carrying out once being added in the first storage unit 1 by prize drawing membership information at synchronous unit 13 or the operation carrying out the once using state of change prize drawing membership information, remove all newly-increased record being associated with corresponding prize drawing membership information preserved in operating record unit 12 and use record.
In other words, in the preferred embodiment of the present invention, after synchronous unit 13 has regularly carried out one subsynchronous (using state of newly-increased prize drawing membership information or change prize drawing membership information), the all newly-increased record that operating record unit 12 is comprised by employing aforesaid operations clearing cell 14 and use record are removed, to avoid occur the synchronous operation of the repetition for same prize drawing membership information in synchronous process next time.
In sum, in technical solution of the present invention, set up two-stage index by redis storage system, thus solve concurrent queries bigger when traditional data storehouse the problem that service performance is low, inquiry efficiency is lower, reduce the resource rate of utilization of whole lottery system.
In the preferred embodiment of the present invention, based on above described prize drawing qualification directory system, existing offer a kind of prize drawing qualification indexing means, it specifically comprises:
The prize drawing membership information being associated with different users is preserved in one first storage unit;
A qualification identification information for index is set for each prize drawing membership information, the corresponding user profile of each qualification identification information;
According to each qualification identification information, a qualification weight information for index is set, qualification weight information comprises the user profile being associated with qualification identification information, and it is associated with the operating time information of qualification identification information, initial operating time information is the time that prize drawing membership information is added in the first storage unit, also comprises step as shown in Figure 2:
Step S1, obtains the qualification weight information of the correspondence that the 2nd indexing units comprises according to user profile inquiry;
Step S2, obtains qualification identification information according to qualification weight information index;
Step S3, obtains prize drawing membership information according to the final index of qualification identification information and exports.
In the preferred embodiment of the present invention, qualification expired time from one for prize drawing membership information preset initial operating period to one for prize drawing membership information preset the termination operating time;
Then above-mentioned steps S3 is concrete as shown in Figure 3, comprising:
Step S31, using time of currently inquiring about as the termination operating time, searching the operating time that whether there is the user profile mated mutually is in qualification expired time:
If there is not the user profile mated mutually, then exit;
Step S32, obtains qualification identification information according to searching the user profile obtained;
Step S33, obtains prize drawing membership information according to qualification identification information index and exports.
In the preferred embodiment of the present invention, in above-mentioned steps S1, it is possible to obtain at least one qualification weight information according to user profile inquiry, and show user to check the number that the first query unit inquires about the qualification weight information obtained by a display screen.
In the preferred embodiment of the present invention, above-mentioned prize drawing qualification indexing means is equally applicable to redis storage system, therefore can adopt key value that the index of form is set up mode (Key-Value mode) and form the index information comprising qualification identification information, and adopt qualification identification information to form Key information, and the prize drawing membership information after serializing is adopted to form Value information.
In the preferred embodiment of the present invention, the step clearing up expired prize drawing membership information in above-mentioned first storage unit is concrete as shown in Figure 4, comprising:
Steps A 1, forms the qualification identification information for index and qualification weight information respectively according to newly-increased prize drawing membership information, and is stored in by newly-increased prize drawing membership information in one the 2nd storage unit;
Steps A 2, the prize drawing membership information of the expired time preset more than a shelf time in the 2nd storage unit is labeled as expired;
Steps A 3, search according to default very first time interval obtain to current time in the 2nd storage unit preserve be marked as expired prize drawing membership information, and be included in a list for clearance export;
Steps A 4, deletes corresponding prize drawing membership information according to list for clearance.
In the preferred embodiment of the present invention, after the prize drawing qualification being associated with prize drawing membership information is used, it is the preset value being greater than and terminating the operating time by the operating time information updating in the qualification weight information of the correspondence in the 2nd indexing units.
In the preferred embodiment of the present invention, record the newly-increased record to prize drawing membership information, and the use record to the prize drawing qualification being associated with prize drawing membership information;
Then adopt a synchronous unit, according to newly-increased record and/or use record:
Prize drawing membership information is added in the first storage unit; And/or
The using state of the prize drawing membership information that change is stored in the first storage unit.
In the preferred embodiment of the present invention, adopt synchronous unit:
When operating record unit only exists newly-increased record for same prize drawing membership information, prize drawing membership information is added in the first storage unit; Or
When operating record unit only exists use record for same prize drawing membership information, the using state of the prize drawing membership information of the correspondence preserved in the first storage unit is changed to and uses; Or
When operating record unit existing newly-increased record for same prize drawing membership information simultaneously and uses record, prize drawing membership information is added in the first storage unit, and the using state of the prize drawing membership information being added is changed to and uses.
In the preferred embodiment of the present invention, after the operation carrying out once being added in the first storage unit by prize drawing membership information at synchronous unit or the operation carrying out the once using state of change prize drawing membership information, an operation clearing cell is adopted to remove all newly-increased record being associated with corresponding prize drawing membership information preserved in operating record unit and use record.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection domain is limited; to those skilled in the art; should recognize and all should be included in protection scope of the present invention the scheme that the equivalent replacement done by all utilizations specification sheets of the present invention and diagramatic content and apparent change obtain.

Claims (18)

1. a prize drawing qualification directory system, it is characterised in that, comprising:
First storage unit, for preserving the prize drawing membership information being associated with different users;
First indexing units, connects described first storage unit, for arranging a qualification identification information for index for membership information of drawing a lottery described in each, and the corresponding user profile of qualification identification information described in each;
2nd indexing units, connect described first indexing units, for arranging a qualification weight information for index according to qualification identification information described in each, described qualification weight information comprises the described user profile and qualification expired time that are associated with described qualification identification information;
First query unit, connect described 2nd indexing units, for obtaining the described qualification weight information of the correspondence that described 2nd indexing units comprises according to the inquiry of described user profile, thus obtain described qualification identification information according to described qualification weight information index, and obtain described prize drawing membership information according to the described final index of qualification identification information and export.
2. prize drawing qualification directory system as claimed in claim 1, it is characterised in that, described qualification expired time from one for described prize drawing membership information the initial operating period preset to termination operating time preset for described prize drawing membership information;
Described first query unit using time of currently inquiring about as the described termination operating time, searching the operating time that whether there is the described user profile mated mutually is in described qualification expired time, and obtain described qualification identification information according to searching the described user profile obtained, and obtain described prize drawing membership information according to described qualification identification information index and export.
3. prize drawing qualification directory system as claimed in claim 1, it is characterised in that, described first query unit obtains qualification weight information described at least one according to the inquiry of described user profile;
Then described prize drawing qualification directory system also comprises:
Display unit, connects described first query unit, and the number for the described qualification weight information described first query unit inquiry obtained shows user to check.
4. prize drawing qualification directory system as claimed in claim 1, it is characterised in that, it is applicable to redis storage system;
Described first indexing units adopts key value that the index of form is set up mode and forms the index information comprising described qualification identification information, adopt described qualification identification information to form key value information, and adopt the described prize drawing membership information after serializing to form form information.
5. prize drawing qualification directory system as claimed in claim 1, it is characterised in that, also comprise:
Newly-increased unit, connects described first indexing units and described 2nd indexing units respectively, for forming the described qualification identification information for index and described qualification weight information respectively according to newly-increased described prize drawing membership information;
2nd storage unit, connect described newly-increased unit and described first indexing units respectively, newly-increased described prize drawing membership information is stored in described 2nd storage unit simultaneously, and described first indexing units generates the corresponding described qualification identification information for index according to the described prize drawing membership information preserved in described 2nd storage unit;
Indexing unit, connects described 2nd storage unit, and the described prize drawing membership information for the expired time preset more than a shelf time in described 2nd storage unit is labeled as expired;
2nd query unit, connect described 2nd indexing units, for search according to default very first time interval obtain to current time in described 2nd storage unit preserve be marked as expired described prize drawing membership information, and be included in a list for clearance export;
Cleaning unit, connects described 2nd query unit, described first indexing units, described 2nd indexing units and described 2nd storage unit respectively, for deleting corresponding described prize drawing membership information according to described list for clearance.
6. prize drawing qualification directory system as claimed in claim 2, it is characterised in that, also comprise:
State changing unit, connect described 2nd indexing units, after being used in the prize drawing qualification being associated with described prize drawing membership information, is updated to the preset value being greater than the described termination operating time the described operating time in the corresponding described prize drawing membership information in described 2nd indexing units.
7. prize drawing qualification directory system as claimed in claim 5, it is characterised in that, also comprise:
Operating record unit, connects described newly-increased unit, for recording the newly-increased record to described prize drawing membership information, and the use record to the prize drawing qualification being associated with described prize drawing membership information;
Synchronous unit, connects described operating record unit and described first storage unit respectively, for according to the described newly-increased record in described operating record unit and/or described use record:
Described prize drawing membership information is added in described first storage unit; And/or
The using state of the described prize drawing membership information that change is stored in described first storage unit.
8. prize drawing qualification directory system as claimed in claim 7, it is characterized in that, when only there is described newly-increased record for same described prize drawing membership information in described operating record unit, described prize drawing membership information is added in described first storage unit by described synchronous unit; Or
When only there is described use record for same described prize drawing membership information in described operating record unit, the described using state of the described prize drawing membership information of the correspondence preserved in described first storage unit is changed to and uses by described synchronous unit; Or
When there is described newly-increased record and described use record for same described prize drawing membership information in described operating record unit simultaneously, described prize drawing membership information is added in described first storage unit by described synchronous unit, and the described using state of the described prize drawing membership information being added is changed to and use.
9. prize drawing qualification directory system as claimed in claim 7, it is characterised in that, also comprise:
Operation clearing cell, connects described operating record unit and described synchronous unit respectively;
Described operation clearing cell is used for:
Carry out the operation operating or once changing the using state of described prize drawing membership information being once added into by described prize drawing membership information in described first storage unit at described synchronous unit after, remove all described newly-increased record being associated with corresponding described prize drawing membership information and described use record that preserve in described operating record unit.
10. a prize drawing qualification indexing means, it is characterised in that:
The prize drawing membership information being associated with different users is preserved in one first storage unit;
A qualification identification information for index is set for membership information of drawing a lottery described in each, the corresponding user profile of qualification identification information described in each;
Arranging a qualification weight information for index according to qualification identification information described in each, described qualification weight information comprises the described user profile and qualification expired time that are associated with described qualification identification information, also comprises:
Step S1, obtains the described qualification weight information of the correspondence that described 2nd indexing units comprises according to the inquiry of described user profile;
Step S2, obtains described qualification identification information according to described qualification weight information index;
Step S3, obtains described prize drawing membership information according to the described final index of qualification identification information and exports.
11. prize drawing qualification indexing means as claimed in claim 10, it is characterized in that, described qualification expired time from one for described prize drawing membership information preset initial operating period to one for described prize drawing membership information preset the termination operating time;
Described step S3 specifically comprises:
Step S31, using time of currently inquiring about as the described termination operating time, searching the operating time that whether there is the described user profile mated mutually is in described qualification expired time:
If there is not the described user profile mated mutually, then exit;
Step S32, obtains described qualification identification information according to searching the described user profile obtained;
Step S33, obtains described prize drawing membership information according to described qualification identification information index and exports.
12. prize drawing qualification indexing means as claimed in claim 10, it is characterized in that, in described step S1, obtain qualification weight information described at least one according to the inquiry of described user profile, and show user to check the number that described first query unit inquires about the described qualification weight information obtained by a display screen.
13. prize drawing qualification indexing means as claimed in claim 10, it is characterized in that, it is applicable to redis storage system, and adopt key value that the index of form is set up mode and form the index information comprising described qualification identification information, adopt described qualification identification information to form key value information, and adopt the described prize drawing membership information after serializing to form form information.
14. prize drawing qualification indexing means as claimed in claim 10, it is characterised in that, the step clearing up expired described prize drawing membership information in described first storage unit comprises:
Steps A 1, forms the described qualification identification information for index and described qualification weight information respectively according to newly-increased described prize drawing membership information, and is stored in one the 2nd storage unit by newly-increased described prize drawing membership information;
Steps A 2, the described prize drawing membership information of the expired time preset more than a shelf time in described 2nd storage unit is labeled as expired;
Steps A 3, search according to default very first time interval obtain to current time in described 2nd storage unit preserve be marked as expired described prize drawing membership information, and be included in a list for clearance export;
Steps A 4, deletes corresponding described prize drawing membership information according to described list for clearance.
15. prize drawing qualification indexing means as claimed in claim 11, it is characterized in that, after the prize drawing qualification being associated with described prize drawing membership information is used, is updated to the preset value being greater than the described termination operating time the described operating time in the corresponding described prize drawing membership information in described 2nd indexing units.
16. prize drawing qualification indexing means as claimed in claim 14, it is characterised in that, record the newly-increased record to described prize drawing membership information, and the use record to the prize drawing qualification being associated with described prize drawing membership information;
Then adopt a synchronous unit, according to described newly-increased record and/or described use record:
Described prize drawing membership information is added in described first storage unit; And/or
The using state of the described prize drawing membership information that change is stored in described first storage unit.
17. prize drawing qualification indexing means as claimed in claim 16, it is characterised in that, adopt described synchronous unit:
When described operating record unit only exists described newly-increased record for same described prize drawing membership information, described prize drawing membership information is added in described first storage unit;Or
When described operating record unit only exists described use record for same described prize drawing membership information, the described using state of the described prize drawing membership information of the correspondence preserved in described first storage unit is changed to and uses; Or
When there is described newly-increased record and described use record for same described prize drawing membership information in described operating record unit simultaneously, described prize drawing membership information is added in described first storage unit, and the described using state of the described prize drawing membership information being added is changed to and uses.
18. prize drawing qualification indexing means as claimed in claim 16, it is characterized in that, carry out the operation operating or once changing the using state of described prize drawing membership information being once added into by described prize drawing membership information in described first storage unit at described synchronous unit after, an operation clearing cell is adopted to remove all described newly-increased record being associated with corresponding described prize drawing membership information and described use record preserved in described operating record unit.
CN201511004815.8A 2015-12-28 2015-12-28 Lottery qualification indexing system and method Active CN105653654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511004815.8A CN105653654B (en) 2015-12-28 2015-12-28 Lottery qualification indexing system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511004815.8A CN105653654B (en) 2015-12-28 2015-12-28 Lottery qualification indexing system and method

Publications (2)

Publication Number Publication Date
CN105653654A true CN105653654A (en) 2016-06-08
CN105653654B CN105653654B (en) 2021-11-30

Family

ID=56477085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511004815.8A Active CN105653654B (en) 2015-12-28 2015-12-28 Lottery qualification indexing system and method

Country Status (1)

Country Link
CN (1) CN105653654B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106028165A (en) * 2016-06-17 2016-10-12 武汉斗鱼网络科技有限公司 Method and system for realizing lucky draw in mobile terminal of live broadcasting website
CN108399266A (en) * 2018-03-23 2018-08-14 广州爱九游信息技术有限公司 Data pick-up method, apparatus, electronic equipment and computer readable storage medium
CN109598551A (en) * 2018-11-30 2019-04-09 网易(杭州)网络有限公司 A kind of the game lottery drawing method and device of distributed server structure
CN111787366A (en) * 2018-03-28 2020-10-16 广州华多网络科技有限公司 Method, device, system, storage medium and computer equipment for distributing resources

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1858737A (en) * 2006-01-25 2006-11-08 华为技术有限公司 Method and system for data searching
CN1894689A (en) * 2003-08-29 2007-01-10 伏泰劳普蒂克斯有限公司 Method, device and software for querying and presenting search results
CN1975729A (en) * 2005-12-02 2007-06-06 国际商业机器公司 System of effectively searching text for keyword, and method thereof
CN102193917A (en) * 2010-03-01 2011-09-21 中国移动通信集团公司 Method and device for processing and querying data
CN103489120A (en) * 2013-10-12 2014-01-01 从兴技术有限公司 Credit sale network lottery drawing system and implementation method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1894689A (en) * 2003-08-29 2007-01-10 伏泰劳普蒂克斯有限公司 Method, device and software for querying and presenting search results
CN1975729A (en) * 2005-12-02 2007-06-06 国际商业机器公司 System of effectively searching text for keyword, and method thereof
CN1858737A (en) * 2006-01-25 2006-11-08 华为技术有限公司 Method and system for data searching
CN102193917A (en) * 2010-03-01 2011-09-21 中国移动通信集团公司 Method and device for processing and querying data
CN103489120A (en) * 2013-10-12 2014-01-01 从兴技术有限公司 Credit sale network lottery drawing system and implementation method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106028165A (en) * 2016-06-17 2016-10-12 武汉斗鱼网络科技有限公司 Method and system for realizing lucky draw in mobile terminal of live broadcasting website
CN108399266A (en) * 2018-03-23 2018-08-14 广州爱九游信息技术有限公司 Data pick-up method, apparatus, electronic equipment and computer readable storage medium
CN108399266B (en) * 2018-03-23 2022-01-07 阿里巴巴(中国)有限公司 Data extraction method and device, electronic equipment and computer readable storage medium
CN111787366A (en) * 2018-03-28 2020-10-16 广州华多网络科技有限公司 Method, device, system, storage medium and computer equipment for distributing resources
CN109598551A (en) * 2018-11-30 2019-04-09 网易(杭州)网络有限公司 A kind of the game lottery drawing method and device of distributed server structure

Also Published As

Publication number Publication date
CN105653654B (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN102521406B (en) Distributed query method and system for complex task of querying massive structured data
CN102521405B (en) Massive structured data storage and query methods and systems supporting high-speed loading
CN103853727B (en) Improve the method and system of big data quantity query performance
CN101286160B (en) Data base indexing process
CN103561133B (en) A kind of IP address attribution information index method and method for quickly querying
CN105653654A (en) Lucky draw qualification indexing system and method
CN106777225A (en) The moving method and system of a kind of data
CN106815260B (en) Index establishing method and equipment
CN111460023A (en) Service data processing method, device, equipment and storage medium based on elastic search
CN102323947A (en) Generation method of pre-join table on ring-shaped schema database
CN107665246B (en) Dynamic data migration method based on graph database and graph database cluster
CN101241511A (en) Rapid index method based on space-time data
CN103092867A (en) Method and system for managing data, and data analyzing device
CN110928882B (en) Memory database indexing method and system based on improved red black tree
CN101000677A (en) Matching method and system of marketing business recommended
Tank et al. Speeding ETL processing in data warehouses using high-performance joins for changed data capture (cdc)
CN102081649A (en) Method and system for searching computer files
CN103064908A (en) Method for rapidly removing repeated list through a memory
CN109669975A (en) A kind of industry big data processing system and method
CN105787090A (en) Index building method and system of OLAP system of electric data
CN109634975B (en) Data synchronization method and device, electronic equipment and computer readable storage medium
CN111488340B (en) Data processing method and device and electronic equipment
CN112269802A (en) Method and system for frequent deletion, modification and check optimization based on Clickhouse
CN101661507A (en) Method for merging data and system thereof
CN110489490A (en) Data storage and query method based on distributed data base

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231018

Address after: Room A320, 3rd Floor, No. 1359 Zhonghua Road, Huangpu District, Shanghai, 200010

Patentee after: Shanghai Jiaran Information Technology Co.,Ltd.

Address before: 200003 Fengsheng Building, No. 763 Mengzi Road, Huangpu District, Shanghai

Patentee before: SHANGHAI HANDPAL INFORMATION TECHNOLOGY SERVICE Co.,Ltd.