CN106469166A - A kind of information processing method and device - Google Patents

A kind of information processing method and device Download PDF

Info

Publication number
CN106469166A
CN106469166A CN201510509167.5A CN201510509167A CN106469166A CN 106469166 A CN106469166 A CN 106469166A CN 201510509167 A CN201510509167 A CN 201510509167A CN 106469166 A CN106469166 A CN 106469166A
Authority
CN
China
Prior art keywords
target
target information
alternate data
data storehouse
stored
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
CN201510509167.5A
Other languages
Chinese (zh)
Other versions
CN106469166B (en
Inventor
唐志慧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510509167.5A priority Critical patent/CN106469166B/en
Publication of CN106469166A publication Critical patent/CN106469166A/en
Application granted granted Critical
Publication of CN106469166B publication Critical patent/CN106469166B/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/21Design, administration or maintenance of databases

Abstract

The present invention is with regard to a kind of information processing method and device, including:Receiving terminal sends, the acquisition request for obtaining target information, receiving terminal sends, the acquisition request for obtaining target information;In the alternate data storehouse of multiple target informations that are stored with, judge whether that the stored number of target information is more than the alternate data storehouse of destination number;When it is present, the stored number in target information is more than in the alternate data storehouse of destination number and selects an alternate data storehouse as target database, and extracts destination number target information from target database, and is sent to terminal.When being simultaneously received substantial amounts of acquisition request, due to multiple target informations being stored in multiple different alternate data storehouses in advance, therefore service server just can process multiple process times obtaining request, decreasing to acquisition request on the whole simultaneously, thus improve treatment effeciency.

Description

A kind of information processing method and device
Technical field
The present invention relates to Internet technical field, more particularly, to a kind of information processing method and device.
Background technology
Developing rapidly with Internet technology, the interaction of digitalized electron mode is increasingly popularized, in interaction, There may be mass users and access the situation of same data base so that accessed data base becomes hotspot database simultaneously.
For example, a certain trade company creates the activity of the multiple action messages of inclusion in the server, and multiple activities are believed Breath is stored in a data base, when user needs to obtain this movable action message, can be sent by terminal and be used for obtaining The acquisition taking this movable action message is asked to server;Server obtains an action message from this data base, so After send this action message to terminal.
However, server could be further according to another acquisition after this data base obtains action message according to an acquisition request Request obtains action message from this data base, and that is, server cannot ask to process to multiple acquisition simultaneously, so, works as magnanimity User sends to server when asking for the acquisition obtaining this movable action message simultaneously, and server just cannot be in short-term Interior processed all obtain request, treatment effeciency is relatively low.
Content of the invention
For overcoming problem present in correlation technique, the present invention provides a kind of information processing method and device.
According to embodiments of the present invention be applied to service server in a first aspect, providing a kind of information processing method, described Method includes:
Receiving terminal sends, the acquisition request for obtaining target information, described acquisition request carries the mesh of required acquisition The destination number of mark information;
In the alternate data storehouse of multiple target informations that are stored with, judge whether that the stored number of target information is more than mesh The alternate data storehouse of mark quantity;
When the stored number that there is target information is more than the alternate data storehouse of described destination number, in the storage of target information Quantity is more than in the alternate data storehouse of described destination number and selects an alternate data storehouse as target database, and from institute State and in target database, extract described destination number target information, and be sent to described terminal.
Further, methods described also includes:
When the stored number that there is not target information is more than the alternate data storehouse of described destination number, from least two storages Have in the alternate data storehouse of target information and extract described destination number target information, and be sent to described terminal.
Wherein, the described stored number in target information is alternative more than selection one in the alternate data storehouse of described destination number Data base as target database, including:
It is more than in the alternate data storehouse of described destination number in the stored number of target information and randomly choose an alternate data Storehouse is as target database;
Or,
It is more than in the alternate data storehouse of described destination number in the stored number of target information and select depositing of a target information The maximum alternate data storehouse of storage quantity is as target database.
Wherein, the described stored number judging whether target information is more than the alternate data storehouse of destination number, including:
Obtain the first corresponding relation between presetting database mark and the stored number of target information;
Judge to whether there is target record in described first corresponding relation;The storage number of the target information in described target record Amount is more than or equal to described destination number;
When there is described target record in described first corresponding relation, the Database Identification in described target record is corresponded to Data base as target information stored number be more than described destination number alternate data storehouse;
When there is not described target record in described first corresponding relation, determine that multiple alternate data storehouses do not have target letter The stored number of breath is more than the alternate data storehouse of described destination number.
Further, methods described also includes:
Obtain the remaining of the target information in described target database after extracting described destination number target information to store Quantity;
The record of the Database Identification including described target database is obtained from described first corresponding relation;
Update the record of the Database Identification including described target database using described residue stored number.
Further, methods described also includes:
Generate multiple target informations;
The plurality of target information is stored in multiple alternate data storehouses;And the target that is all stored with each alternate data storehouse Information, in any two alternate data storehouse, the difference of the quantity of target information of storage is less than or equal to predetermined threshold value;
For alternate data storehouse each described, by the Database Identification in described alternate data storehouse and in described alternate data storehouse The quantity of the target information of middle storage records as one, and is stored in the storage number of presetting database mark and target information In the first corresponding relation between amount.
Second aspect according to embodiments of the present invention, provides a kind of information processor, and described device includes:
Receiver module, send for receiving terminal, the acquisition request for obtaining target information, described acquisition request is taken The destination number of the required target information obtaining of band;
Judge module, for, in the alternate data storehouse of multiple target informations that are stored with, judging whether target information Stored number is more than the alternate data storehouse of destination number;
Selecting module, for when exist target information stored number be more than described destination number alternate data storehouse when, The stored number of target information is more than one alternate data storehouse of selection in the alternate data storehouse of described destination number as number of targets According to storehouse;
First extraction module, for extracting described destination number target information from described target database, and sends To described terminal.
Further, described device also includes:
Second extraction module, the stored number for not there is target information is more than the alternate data storehouse of described destination number When, extract described destination number target information from least two alternate data storehouses being stored with target information, concurrently Give described terminal.
Wherein, described selecting module includes:
First choice unit, is more than random in the alternate data storehouse of described destination number for the stored number in target information Select an alternate data storehouse as target database;
Or,
Second select unit, is more than in the alternate data storehouse of described destination number for the stored number in target information and selects The maximum alternate data storehouse of the stored number of one target information is as target database.
Wherein, described judge module includes:
Acquiring unit, for obtaining the first corresponding relation between presetting database mark and the stored number of target information;
Judging unit, for judging to whether there is target record in described first corresponding relation;Mesh in described target record The stored number of mark information is more than or equal to described destination number;
First determining unit, for when there is described target record in described first corresponding relation, by described target record In the corresponding data base of Database Identification as target information stored number be more than described destination number alternate data Storehouse;
Second determining unit, multiple alternative for when there is not described target record in described first corresponding relation, determining There is not the alternate data storehouse more than described destination number for the stored number of target information in data base.
Further, described device also includes:
First acquisition module, for obtaining the mesh extracting in described target database after described destination number target information The remaining stored number of mark information;
Second acquisition module, for obtaining the Database Identification including described target database from described first corresponding relation Record;
Update module, for updating the note of the Database Identification including described target database using described residue stored number Record.
Further, described device also includes:
Generation module, for generating multiple target informations;
First memory module, for being stored in the plurality of target information in multiple alternate data storehouses;And each alternatively counts According to the target information that is all stored with storehouse, in any two alternate data storehouse, the difference of the quantity of target information of storage is less than or waits In predetermined threshold value;
Second memory module, for for alternate data storehouse each described, by the Database Identification in described alternate data storehouse Record as one with the quantity of the target information of storage in described alternate data storehouse, and be stored in presetting database mark In the first corresponding relation and the stored number of target information between.
The technical scheme that embodiments of the invention provide can include following beneficial effect:In the prior art, multiple targets Information is only stored in a data base, when the user of magnanimity sends for obtaining target information to service server simultaneously Acquisition request when, can receive in the service server short time and substantial amounts of obtain request, because service server is according to one Individual acquisition asks to ask to obtain target from this data base further according to another acquisition after this data base obtains target information Information, that is, service server once can only process 1 obtains request it is impossible to ask to process to multiple acquisition simultaneously, So, service server just cannot process all acquisition at short notice and ask, and treatment effeciency is relatively low.
However, in the present invention, send the acquisition for obtaining target information to service server as the user of magnanimity simultaneously During request, due to multiple target informations being stored in multiple different alternate data storehouses in advance, therefore multiple alternative The acquisition request that mass users send can be shared by data base;So, server just can process multiple obtaining simultaneously Taking request, decreasing to the process time obtaining request on the whole, thus improve treatment effeciency.
For example, in the prior art, multiple target informations are only stored in a data base, and service server only simultaneously 1 can be processed and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 users are required to obtain During target information, each user sends 1 respectively and obtains request to service server;Will in the service server short time Receive this 1000 and obtain request, need could to have processed within 100 seconds these completely and obtain request, process on the whole Time is longer, and then treatment effeciency is relatively low.
However, in the present invention, it is assumed that the target information that is all stored with 100 alternate data storehouses, service server can Process 100 simultaneously and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 users are required to When obtaining target information, each user sends 1 respectively and obtains request to service server;In the service server short time This 1000 will be received and obtain request, but only need to 1 second just can process these acquisition requests completely, overall On process time shorter, and then treatment effeciency is higher.
It should be appreciated that above general description and detailed description hereinafter are only exemplary and explanatory, can not Limit the present invention.
Brief description
Accompanying drawing herein is merged in description and constitutes the part of this specification, shows the enforcement meeting the present invention Example, and be used for explaining the principle of the present invention together with description.
Fig. 1 is a kind of flow chart of the information processing method according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of the information processing method according to an exemplary embodiment.
Fig. 3 is a kind of schematic diagram of a scenario according to an exemplary embodiment.
Fig. 4 is a kind of schematic diagram of a scenario according to an exemplary embodiment.
Fig. 5 is a kind of block diagram of the information processor according to an exemplary embodiment.
Specific embodiment
Here will in detail exemplary embodiment be illustrated, its example is illustrated in the accompanying drawings.Explained below is related to attached During figure, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary is implemented Embodiment described in example does not represent all embodiments consistent with the present invention.On the contrary, they be only with such as The example of the consistent apparatus and method of some aspects being described in detail in appended claims, the present invention.
Fig. 1 is a kind of flow chart of the information processing method according to an exemplary embodiment, as shown in figure 1, the party Method is used in service server, comprises the following steps.
In step S101, receiving terminal sends, the acquisition request for obtaining target information;
Obtain the destination number that request carries the target information of required acquisition.
In step s 102, in the alternate data storehouse of multiple target informations that are stored with, judge whether target information Stored number be more than destination number alternate data storehouse;
When the stored number that there is target information is more than the alternate data storehouse of destination number, in step s 103, in mesh The stored number of mark information is more than one alternate data storehouse of selection in the alternate data storehouse of destination number as target database;
In step S104, extract destination number target information from target database, and be sent to terminal.
In embodiment shown in Fig. 1 of the present invention, in the prior art, multiple target informations are only stored in a number According in storehouse, when sending the acquisition request for obtaining target information to service server as the user of magnanimity, business takes simultaneously Substantial amounts of acquisition can be received in the business device short time ask, because service server obtains request from this data base according to one Request could be obtained from this data base acquisition target information further according to another after obtaining target information, that is, business service Device once can only process 1 and obtain request it is impossible to ask to process to multiple acquisition simultaneously, and so, service server is just no Method has processed all acquisition at short notice and has asked, and treatment effeciency is relatively low.
However, in the embodiment shown in Fig. 1 of the present invention, being used for obtaining when the user of magnanimity sends to service server simultaneously When taking the acquisition of target information to ask, due to multiple target informations being stored in multiple different alternate data storehouses in advance In, the acquisition request that mass users send can be shared by therefore multiple alternate data storehouses;So, service server Multiple process times obtaining request, decreasing to acquisition request on the whole just can be processed, thus improve process simultaneously Efficiency.
Fig. 2 is a kind of flow chart of the information processing method according to an exemplary embodiment, as shown in Fig. 2 the party Method is used in service server, comprises the following steps.
In step s 201, multiple target informations are generated;
Target information can be the information such as red packet, integration or commodity.
For example, a certain trade company creates an activity robbing red packet, and this activity includes multiple target informations, each target information Can be the red packet including certain number, such as one 5 yuan of red packet, or one 10 yuan of red packet etc..
Again for example, a certain trade company creates an activity going on the razzle-dazzle, and this activity includes multiple target informations, each target Information can be one or more commodity etc..
In step S202, multiple target informations are stored in multiple alternate data storehouses;
So that the target of storage is believed in be all stored with each alternate data storehouse target information, and any two alternate data storehouse The difference of the quantity of breath is less than or equal to predetermined threshold value;
Predetermined threshold value can be 3,5 or 8 etc., and the present invention is not limited to this.
In embodiments of the present invention, alternate data storehouse can for be stored in the local data base of service server or It is stored in independent of the data base in the other equipment of service server, for example, be stored in the number in a certain storage server According to storehouse etc..
Wherein, the embodiment of the present invention so that alternative data base is to be stored in the local data base of service server is as a example illustrated Illustrate, but not as limiting the scope of the invention.
Obtain the data base alternately data base of multiple non-data storages, the alternate data of acquisition from business server local The quantity in storehouse can determine according to practical situation, and present invention contrast is not any limitation as, as long as meeting the alternate data storehouse obtaining Quantity be more than or equal to 2.
Wherein, when generate target information quantity and alternate data storehouse in quantity between disclosure satisfy that divide exactly computing when, The multiple target informations generating averagely can be stored in multiple alternate data storehouses, i.e. storage in each alternate data storehouse The stored number all same of target information.
For example, with reference to Fig. 3 it is assumed that the quantity of the target information generating is 1000, and the number in the alternate data storehouse obtaining Measure as 5, respectively A1, A2, A3, A4 and A5, divide exactly computing because numerical value 1000 and numerical value 5 can meet, Therefore 1000 target informations averagely can be stored in this 5 alternate data storehouses, divide in each alternate data storehouse Cun Chu not 200 target informations.
Wherein, sometimes cannot meet between the quantity in the quantity and alternate data storehouse of the target information generating and divide exactly fortune During calculation, the multiple target informations that just cannot generate averagely are stored in multiple alternate data storehouses.
For example, with reference to Fig. 4 it is assumed that the quantity of the target information generating is 1000, and the number in the alternate data storehouse obtaining Measure as 6, respectively alternate data storehouse B1, B2, B3, B4, B5 and B6, because numerical value 1000 and numerical value 6 cannot Meet and divide exactly computing, therefore just 1000 target informations averagely cannot be stored in this 6 alternate data storehouses, but as long as The difference meeting the quantity of target information of any two alternate data library storage is less than predetermined threshold value, for example, it is assumed that in advance If threshold value is 5, in the above example, can store respectively in alternate data storehouse B1, B2, B3, B4 and B5 167 target informations, store 165 target informations, in such any two alternate data storehouse in the B6 of alternate data storehouse The difference of the quantity of target information of storage is 0 or is 2, respectively less than predetermined threshold value.
Further, for arbitrary alternate data storehouse, by the Database Identification in this alternate data storehouse with this alternate data storehouse The stored number of the target information of middle storage is as bar record, and is stored in the storage of presetting database mark and target information In the first corresponding relation between quantity, for other each alternate data storehouses, it is performed both by aforesaid operations.
Database Identification can be title or numbering of data base etc., and the present invention is not limited to this.
So, by the flow process of step S201 and step S202 complete by multiple target informations be respectively stored in multiple not With alternate data storehouse, afterwards user just can obtain target information from alternate data storehouse, when user need acquisition target During information, user can check, in terminal, the page obtaining target information, and is taken to business by modes such as click or touch-controls The acquisition that business device sends user's acquisition target information is asked to service server;Service server just can be as follows S203 sends, for user, the target information obtaining needed for user to the flow process of step S207.
Wherein, terminal can be mobile phone, panel computer or notebook computer etc..
For example, when target information is for red packet, in terminal, the page for obtaining red packet of display at least includes red packet acquisition Button and red packet obtain quantity choice box, and user obtains the target of the red packet that quantity choice box selects to need to obtain in red packet Quantity, then clicks on acquisition button, after terminal receive user clicks on the clicking operation obtaining button, obtains user's red packet and obtains Take number choice box to select to need the destination number of the red packet of acquisition, generated for obtaining obtaining of red packet according to this destination number Request Concurrency is taken to give service server.
In step S203, detect whether to receive terminal transmission, the acquisition request for obtaining target information;
Obtain the destination number that request carries the target information of required acquisition;
After multiple target informations are respectively stored in multiple different alternate servers by service server, service server Start to detect whether to receive terminal transmission, the acquisition request for obtaining target information;When service server receives During this acquisition request, execution step S204.
When receiving this acquisition request, in step S204, in the alternate data storehouse of multiple target informations that are stored with, Judge whether that the stored number of target information is more than the alternate data storehouse of destination number;
Specifically, this step can be realized by following flow process, including:
11), obtain the first corresponding relation between presetting database mark and the stored number of target information;
12), judge to whether there is target record in the first corresponding relation;
The stored number of the target information in target record is more than or equal to destination number;
Wherein, for any bar record in the first corresponding relation, obtain the stored number of the target information in this record, This stored number and destination number are compared, if this stored number is more than or equal to destination number, this are recorded It is defined as target record, if this stored number is less than destination number it is determined that this record is not target record.For Other every record in one corresponding relation, is performed both by aforesaid operations.If being not determined by target from the first corresponding relation Record, it is determined that there is not target record in the first corresponding relation, otherwise determines in the first corresponding relation there is target record.
13), when there is target record in the first corresponding relation, by corresponding for the Database Identification in target record data Storehouse as target information stored number be more than destination number alternate data storehouse;
14), when there is not target record in the first corresponding relation, determine that multiple alternate data storehouses do not have target information Stored number be more than destination number alternate data storehouse.
When the stored number that there is target information is more than the alternate data storehouse of destination number;In step S205, in mesh The stored number of mark information is more than one alternate data storehouse of selection in the alternate data storehouse of destination number as target database;
The quantity that the stored number of target information is more than the alternate data storehouse of destination number may be one or more, works as target When the alternate data storehouse quantity that the stored number of information is more than destination number is one, i.e. when only one of which target information When stored number is more than the alternate data storehouse of destination number, then can directly the stored number of this target information be more than The alternate data storehouse of destination number is as target database.
Wherein, when the alternate data storehouse quantity that the stored number of target information is more than destination number is multiple, i.e. when having When the stored number of multiple target informations is more than the alternate data storehouse of destination number, then can be in the stored number of target information More than one alternate data storehouse of random selection in the alternate data storehouse of destination number as target database.
In embodiments of the present invention, send the acquisition for obtaining target information to service server as the user of magnanimity simultaneously During request, due to multiple target informations being stored in multiple different alternate data storehouses in advance, therefore multiple alternative The acquisition request that mass users send can be shared by data base;So, service server just can process simultaneously many Individual acquisition is asked, i.e. have the alternate data storehouse of several target informations that are stored with, service server just can process several simultaneously Individual acquisition is asked, thus decreasing the process time obtaining request to magnanimity on the whole, improves treatment effeciency.
Wherein, because the acquisition that the quantity storing the alternate data storehouse of target information can be processed with service server please simultaneously The quantity asked is identical, therefore, when the quantity that the acquisition for obtaining target information that service server receives is asked is constant In the case of, the alternate data storehouse of storage target information is more, then what service server can be processed simultaneously obtains request Quantity is more, and shorter to the process time of the acquisition request receiving on the whole, that is, treatment effeciency is higher.
Due to having had confirmed the quantity in the alternate data storehouse of storage target information in step S202, if business Server early crosses the target letter having extracted storage in the alternate data storehouse of one of alternate data storehouse of the target information that is stored with Breath, then the quantity in the alternate data storehouse of the target information that is stored with will reduce, due to storing the alternate data storehouse of target information Quantity and service server can process simultaneously obtain request quantity identical, so, service server can simultaneously The quantity obtaining request processing will reduce, and also just reduces service server on the whole to the place obtaining request receiving Reason efficiency.
Therefore, in embodiments of the present invention, service server needs to avoid having extracted one or more alternate data storehouses too early The target information of middle storage, that is, need to make the target information equalization of storage in multiple alternate data storehouses, this just needs as far as possible Make in any two alternate data storehouse the target information of storage number is identical or only small difference.
So, in this step, when the alternate data storehouse quantity that the stored number of target information is more than destination number is multiple When, i.e. when the stored number having multiple target informations is more than the alternate data storehouse of destination number, can be in target information Stored number be more than the maximum alternate data of stored number selecting a target information in the alternate data storehouse of destination number Storehouse is as target database.
In step S206, extract destination number target information from target database, and be sent to terminal;
Further, the embodiment of the present invention is further comprising the steps of.
21), obtain the remaining stored number extracting the target information in target database after destination number target information;
After extracting destination number target information from target database, using the target information in target database Stored number deduct the remaining stored number that destination number obtains the target information in target database.
22) from the first corresponding relation, obtain the record of the Database Identification including target database;
23) record of the Database Identification including target database, is updated using remaining stored number.
Replace the stored number in this record using remaining stored number, to realize updating this note using remaining stored number Record.
For example, the stored number of the target information before this step it is assumed that in target database is 50, Yi Ji In first corresponding relation, it is 50 including the stored number in the record of the Database Identification of target database;Then from number of targets After extracting 10 target informations in storehouse, in target database, there remains 40 target informations, then corresponding first In relation, update the stored number 50 in this record using remaining stored number 40.
When the stored number that there is not target information is more than the alternate data storehouse of destination number, in step S207, from At least two are stored with the alternate data storehouse of target information extracts described destination number target information, and is sent to institute State terminal.
When the stored number that there is not target information is more than the alternate data storehouse of destination number, then each alternate data is described In storehouse, the quantity of the target information of storage is respectively less than destination number, and so, service server is only from an alternate data storehouse In be cannot to get destination number target information it is necessary to obtain destination number from least two alternate data storehouses Target information.
For example, it is assumed that destination number is 10, one has the alternate data storehouse of 5 target informations that are stored with, wherein, alternatively The stored number of the target information in data base 1 is 9, and the stored number of the target information in alternate data storehouse 2 is 5, standby The stored number selecting the target information in data base 3 is 2, and the stored number of the target information in alternate data storehouse 4 is 1, The stored number of the target information in alternate data storehouse 5 is 4.Target letter in 1,2,3,4 and 5 in alternate data storehouse The stored number of breath is respectively less than 10, and therefore, the arbitrary alternate data storehouse from this 5 alternate data storehouses is to get 10 target informations it is necessary to from least two alternate data storehouses obtain 10 target informations.For example, it is possible to from standby Select 9 target informations of acquisition in data base 1, then obtain 1 target information from alternate data storehouse 2, get altogether 10 target informations.
Further, for any database at least two alternate data storehouses, obtain and extract mesh from this data base The remaining stored number of the target information in this data base after mark information, obtains from the first corresponding relation and includes this data base Database Identification record;Update this record using this remaining stored number, wherein it is possible to using remaining stored number Replace the stored number in this record.For other each data bases at least two alternate data storehouses, it is performed both by above-mentioned Operation.
Wherein, in embodiments of the present invention, after extracting target information from an alternate data storehouse, if this is alternative The stored number of the target information in data base is 0, then can delete from the first corresponding relation and include this alternate data storehouse Database Identification record.
In the prior art, multiple target informations are only stored in a data base, when the user of magnanimity is simultaneously to business Server sends when asking for the acquisition obtaining target information, can receive substantial amounts of acquisition in the service server short time Request, because service server could be further according to another after this data base obtains target information according to an acquisition request Obtain request and obtain target information from this data base, that is, service server once can only process 1 obtains request, no Method asks to process to multiple acquisition simultaneously, and so, service server just cannot process all acquisition at short notice and ask, Treatment effeciency is relatively low.
However, in the embodiment shown in Fig. 2 of the present invention, being used for obtaining when the user of magnanimity sends to service server simultaneously When taking the acquisition of target information to ask, due to multiple target informations being stored in multiple different alternate data storehouses in advance In, the acquisition request that mass users send can be shared by therefore multiple alternate data storehouses;So, server can To process multiple process times obtaining request, decreasing to acquisition request on the whole simultaneously, thus improve treatment effeciency.
For example, in the prior art, multiple target informations are only stored in a data base, and service server only simultaneously 1 can be processed and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 users are required to obtain During target information, each user sends 1 respectively and obtains request to service server;Will in the service server short time Receive this 1000 and obtain request, need could to have processed within 100 seconds these completely and obtain request, process on the whole Time is longer, and then treatment effeciency is relatively low.
However, it is assumed that the target information that is all stored with 100 alternate data storehouses in the embodiment shown in Fig. 2 of the present invention, Service server can process 100 simultaneously and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 When individual user is required to obtain target information, each user sends 1 respectively and obtains request to service server;Business takes This 1000 will be received in the business device short time and obtain request, but only need to 1 second just to have processed these completely and obtain Take request, process time on the whole is shorter, and then treatment effeciency is higher.
Fig. 5 is a kind of block diagram of the information processor according to an exemplary embodiment.With reference to Fig. 5, this device bag Include including:
Receiver module 11, send for receiving terminal, the acquisition request for obtaining target information, described acquisition is asked Carry the destination number of the target information of required acquisition;
Judge module 12, for, in the alternate data storehouse of multiple target informations that are stored with, judging whether target information Stored number be more than destination number alternate data storehouse;
Selecting module 13, for when exist target information stored number be more than described destination number alternate data storehouse when, It is more than in the alternate data storehouse of described destination number in the stored number of target information and select an alternate data storehouse as target Data base;
First extraction module 14, for extracting described destination number target information from described target database, concurrently Give described terminal.
In the prior art, multiple target informations are only stored in a data base, when the user of magnanimity is simultaneously to business Server sends when asking for the acquisition obtaining target information, can receive substantial amounts of acquisition in the service server short time Request, because service server could be further according to another after this data base obtains target information according to an acquisition request Obtain request and obtain target information from this data base, that is, service server once can only process 1 obtains request, no Method asks to process to multiple acquisition simultaneously, and so, service server just cannot process all acquisition at short notice and ask, Treatment effeciency is relatively low.
However, in the embodiment shown in Fig. 5 of the present invention, being used for obtaining when the user of magnanimity sends to service server simultaneously When taking the acquisition of target information to ask, due to multiple target informations being stored in multiple different alternate data storehouses in advance In, the acquisition request that mass users send can be shared by therefore multiple alternate data storehouses;So, server can To process multiple process times obtaining request, decreasing to acquisition request on the whole simultaneously, thus improve treatment effeciency.
For example, in the prior art, multiple target informations are only stored in a data base, and service server only simultaneously 1 can be processed and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 users are required to obtain During target information, each user sends 1 respectively and obtains request to service server;Will in the service server short time Receive this 1000 and obtain request, need could to have processed within 100 seconds these completely and obtain request, process on the whole Time is longer, and then treatment effeciency is relatively low.
However, it is assumed that the target information that is all stored with 100 alternate data storehouses in the embodiment shown in Fig. 5 of the present invention, Service server can process 100 simultaneously and obtain request it is assumed that processing 1 acquisition request to need 0.1 second, when 1000 When individual user is required to obtain target information, each user sends 1 respectively and obtains request to service server;Business takes This 1000 will be received in the business device short time and obtain request, but only need to 1 second just to have processed these completely and obtain Take request, process time on the whole is shorter, and then treatment effeciency is higher.
Further, described device also includes:
Second extraction module, the stored number for not there is target information is more than the alternate data storehouse of described destination number When, extract described destination number target information from least two alternate data storehouses being stored with target information, concurrently Give described terminal.
Wherein, described selecting module 13 includes:
First choice unit, is more than random in the alternate data storehouse of described destination number for the stored number in target information Select an alternate data storehouse as target database;
Or,
Second select unit, is more than in the alternate data storehouse of described destination number for the stored number in target information and selects The maximum alternate data storehouse of the stored number of one target information is as target database.
Wherein, described judge module 12 includes:
Acquiring unit, for obtaining the first corresponding relation between presetting database mark and the stored number of target information;
Judging unit, for judging to whether there is target record in described first corresponding relation;Mesh in described target record The stored number of mark information is more than or equal to described destination number;
First determining unit, for when there is described target record in described first corresponding relation, by described target record In the corresponding data base of Database Identification as target information stored number be more than described destination number alternate data Storehouse;
Second determining unit, multiple alternative for when there is not described target record in described first corresponding relation, determining There is not the alternate data storehouse more than described destination number for the stored number of target information in data base.
Further, described device also includes:
First acquisition module, for obtaining the mesh extracting in described target database after described destination number target information The remaining stored number of mark information;
Second acquisition module, for obtaining the Database Identification including described target database from described first corresponding relation Record;
Update module, for updating the note of the Database Identification including described target database using described residue stored number Record.
Further, described device also includes:
Generation module, for generating multiple target informations;
First memory module, for being stored in the plurality of target information in multiple alternate data storehouses;And each alternatively counts According to the target information that is all stored with storehouse, in any two alternate data storehouse, the difference of the quantity of target information of storage is less than or waits In predetermined threshold value;
Second memory module, for for alternate data storehouse each described, by the Database Identification in described alternate data storehouse Record as one with the quantity of the target information of storage in described alternate data storehouse, and be stored in presetting database mark In the first corresponding relation and the stored number of target information between.
With regard to the device in above-described embodiment, wherein the concrete mode of modules execution operation is in relevant the method It has been described in detail in embodiment, explanation will be not set forth in detail herein.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to other of the present invention Embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modifications, purposes Or adaptations follow the present invention general principle and include the present invention undocumented in the art known often Know or conventional techniques.Description and embodiments be considered only as exemplary, true scope and spirit of the invention by under The claim in face is pointed out.
It is described above and precision architecture illustrated in the accompanying drawings it should be appreciated that the invention is not limited in, and Various modifications and changes can carried out without departing from the scope.The scope of the present invention only to be limited by appended claim.

Claims (12)

1. a kind of information processing method, is applied to service server it is characterised in that methods described includes:
Receiving terminal sends, the acquisition request for obtaining target information, described acquisition request carries the mesh of required acquisition The destination number of mark information;
In the alternate data storehouse of multiple target informations that are stored with, judge whether that the stored number of target information is more than mesh The alternate data storehouse of mark quantity;
When the stored number that there is target information is more than the alternate data storehouse of described destination number, in the storage of target information Quantity is more than in the alternate data storehouse of described destination number and selects an alternate data storehouse as target database, and from institute State and in target database, extract described destination number target information, and be sent to described terminal.
2. method according to claim 1 is it is characterised in that methods described also includes:
When the stored number that there is not target information is more than the alternate data storehouse of described destination number, from least two storages Have in the alternate data storehouse of target information and extract described destination number target information, and be sent to described terminal.
3. method according to claim 1 is it is characterised in that the described stored number in target information is more than described Alternate data storehouse is selected as target database in the alternate data storehouse of destination number, including:
It is more than in the alternate data storehouse of described destination number in the stored number of target information and randomly choose an alternate data storehouse As target database;
Or,
It is more than the storage selecting a target information in the alternate data storehouse of described destination number in the stored number of target information The maximum alternate data storehouse of quantity is as target database.
4. method according to claim 1 is it is characterised in that the described storage number judging whether target information Amount is more than the alternate data storehouse of destination number, including:
Obtain the first corresponding relation between presetting database mark and the stored number of target information;
Judge to whether there is target record in described first corresponding relation;The storage number of the target information in described target record Amount is more than or equal to described destination number;
When there is described target record in described first corresponding relation, the Database Identification in described target record is corresponded to Data base as target information stored number be more than described destination number alternate data storehouse;
When there is not described target record in described first corresponding relation, determine that multiple alternate data storehouses do not have target letter The stored number of breath is more than the alternate data storehouse of described destination number.
5. method according to claim 4 is it is characterised in that methods described also includes:
Obtain the remaining of the target information in described target database after extracting described destination number target information and store number Amount;
The record of the Database Identification including described target database is obtained from described first corresponding relation;
Update the record of the Database Identification including described target database using described residue stored number.
6. method according to claim 1 is it is characterised in that methods described also includes:
Generate multiple target informations;
The plurality of target information is stored in multiple alternate data storehouses;And the target that is all stored with each alternate data storehouse Information, in any two alternate data storehouse, the difference of the quantity of target information of storage is less than or equal to predetermined threshold value;
For alternate data storehouse each described, by the Database Identification in described alternate data storehouse and in described alternate data storehouse The quantity of the target information of middle storage records as one, and is stored in the storage number of presetting database mark and target information In the first corresponding relation between amount.
7. a kind of information processor is it is characterised in that described device includes:
Receiver module, send for receiving terminal, the acquisition request for obtaining target information, described acquisition request is taken The destination number of the required target information obtaining of band;
Judge module, for, in the alternate data storehouse of multiple target informations that are stored with, judging whether target information Stored number is more than the alternate data storehouse of destination number;
Selecting module, for when exist target information stored number be more than described destination number alternate data storehouse when, The stored number of target information is more than one alternate data storehouse of selection in the alternate data storehouse of described destination number as number of targets According to storehouse;
First extraction module, for extracting described destination number target information from described target database, and sends To described terminal.
8. device according to claim 7 is it is characterised in that described device also includes:
Second extraction module, the stored number for not there is target information is more than the alternate data storehouse of described destination number When, extract described destination number target information from least two alternate data storehouses being stored with target information, concurrently Give described terminal.
9. device according to claim 7 is it is characterised in that described selecting module includes:
First choice unit, is more than random in the alternate data storehouse of described destination number for the stored number in target information Select an alternate data storehouse as target database;
Or,
Second select unit, is more than in the alternate data storehouse of described destination number for the stored number in target information and selects The maximum alternate data storehouse of the stored number of one target information is as target database.
10. device according to claim 7 is it is characterised in that described judge module includes:
Acquiring unit, for obtaining the first corresponding relation between presetting database mark and the stored number of target information;
Judging unit, for judging to whether there is target record in described first corresponding relation;Mesh in described target record The stored number of mark information is more than or equal to described destination number;
First determining unit, for when there is described target record in described first corresponding relation, by described target record In the corresponding data base of Database Identification as target information stored number be more than described destination number alternate data Storehouse;
Second determining unit, multiple alternative for when there is not described target record in described first corresponding relation, determining There is not the alternate data storehouse more than described destination number for the stored number of target information in data base.
11. devices according to claim 10 are it is characterised in that described device also includes:
First acquisition module, for obtaining the mesh extracting in described target database after described destination number target information The remaining stored number of mark information;
Second acquisition module, for obtaining the Database Identification including described target database from described first corresponding relation Record;
Update module, for updating the note of the Database Identification including described target database using described residue stored number Record.
12. devices according to claim 7 are it is characterised in that described device also includes:
Generation module, for generating multiple target informations;
First memory module, for being stored in the plurality of target information in multiple alternate data storehouses;And each alternatively counts According to the target information that is all stored with storehouse, in any two alternate data storehouse, the difference of the quantity of target information of storage is less than or waits In predetermined threshold value;
Second memory module, for for alternate data storehouse each described, by the Database Identification in described alternate data storehouse Record as one with the quantity of the target information of storage in described alternate data storehouse, and be stored in presetting database mark In the first corresponding relation and the stored number of target information between.
CN201510509167.5A 2015-08-18 2015-08-18 A kind of information processing method and device Active CN106469166B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510509167.5A CN106469166B (en) 2015-08-18 2015-08-18 A kind of information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510509167.5A CN106469166B (en) 2015-08-18 2015-08-18 A kind of information processing method and device

Publications (2)

Publication Number Publication Date
CN106469166A true CN106469166A (en) 2017-03-01
CN106469166B CN106469166B (en) 2019-09-06

Family

ID=58214486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510509167.5A Active CN106469166B (en) 2015-08-18 2015-08-18 A kind of information processing method and device

Country Status (1)

Country Link
CN (1) CN106469166B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636364A (en) * 2018-12-29 2019-04-16 江苏满运软件科技有限公司 The method, system, equipment and the medium that distribute are grouped for electronics red packet
CN110909389A (en) * 2019-11-27 2020-03-24 张齐全 Personal information storage method and device for internet financial platform and electronic equipment
CN113626458A (en) * 2021-08-19 2021-11-09 咪咕数字传媒有限公司 High-concurrency data updating method, device, equipment and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667181A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for data disaster tolerance
CN102081624A (en) * 2009-11-30 2011-06-01 中国移动通信集团北京有限公司 Data inquiring method and data inquiring server
CN102761528A (en) * 2011-04-28 2012-10-31 中兴通讯股份有限公司 System and method for data management
CN103544153A (en) * 2012-07-10 2014-01-29 阿里巴巴集团控股有限公司 Data updating method and system based on database
CN104077302A (en) * 2013-03-28 2014-10-01 中国银联股份有限公司 Big visitor volume account storage as well as retrieval and authentication system
CN104699832A (en) * 2015-03-31 2015-06-10 北京奇艺世纪科技有限公司 Determining method and device of related information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667181A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for data disaster tolerance
CN102081624A (en) * 2009-11-30 2011-06-01 中国移动通信集团北京有限公司 Data inquiring method and data inquiring server
CN102761528A (en) * 2011-04-28 2012-10-31 中兴通讯股份有限公司 System and method for data management
CN103544153A (en) * 2012-07-10 2014-01-29 阿里巴巴集团控股有限公司 Data updating method and system based on database
CN104077302A (en) * 2013-03-28 2014-10-01 中国银联股份有限公司 Big visitor volume account storage as well as retrieval and authentication system
CN104699832A (en) * 2015-03-31 2015-06-10 北京奇艺世纪科技有限公司 Determining method and device of related information

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636364A (en) * 2018-12-29 2019-04-16 江苏满运软件科技有限公司 The method, system, equipment and the medium that distribute are grouped for electronics red packet
CN110909389A (en) * 2019-11-27 2020-03-24 张齐全 Personal information storage method and device for internet financial platform and electronic equipment
CN113626458A (en) * 2021-08-19 2021-11-09 咪咕数字传媒有限公司 High-concurrency data updating method, device, equipment and computer storage medium

Also Published As

Publication number Publication date
CN106469166B (en) 2019-09-06

Similar Documents

Publication Publication Date Title
US11790116B2 (en) Systems and methods for privacy preserving determination of intersections of sets of user identifiers
CN106686105B (en) Message pushing method, computing device, server and information sharing system
CN109829077B (en) Page display method, device and equipment
CN108334625B (en) User information processing method and device, computer equipment and storage medium
CN106055630A (en) Log storage method and device
CN107733786B (en) Friend recommendation method and device
CN110674247A (en) Barrage information intercepting method and device, storage medium and equipment
CN103024090A (en) Method and system for identifying user terminal
CN104967594A (en) Stolen account identification method and apparatus
CN106155925A (en) A kind of method and device obtaining data
CN106469166A (en) A kind of information processing method and device
CN111431818A (en) Cross-domain request traffic distribution method and device, storage medium and computer equipment
CN107395587A (en) A kind of data managing method and system based on multipoint cooperative mechanism
CN105991744A (en) Method and equipment used for synchronizing user application data
CN111553749A (en) Activity push strategy configuration method and device
CN116028696A (en) Resource information acquisition method and device, electronic equipment and storage medium
CN105871982A (en) Content pushing method, device and system
CN110866380A (en) Method and terminal for filling in information field content
CN106776947A (en) Resource acquiring method, device and terminal
CN109982143B (en) Method, device, medium and equipment for determining video playing time delay
CN112019642A (en) Audio uploading method, device, equipment and storage medium
CN110275863A (en) File moving method, device and storage medium
CN107305610B (en) Access path processing method and device, and automaton identification method, device and system
CN105592029A (en) Method and server for synchronizing virtual resource transfer operation state
CN112214751A (en) Verification code generation method and device

Legal Events

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

Effective date of registration: 20200923

Address after: Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200923

Address after: Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Grand Cayman Islands

Patentee before: Alibaba Group Holding Ltd.