WO2016197839A2 - 一种信息处理方法及装置 - Google Patents

一种信息处理方法及装置 Download PDF

Info

Publication number
WO2016197839A2
WO2016197839A2 PCT/CN2016/084225 CN2016084225W WO2016197839A2 WO 2016197839 A2 WO2016197839 A2 WO 2016197839A2 CN 2016084225 W CN2016084225 W CN 2016084225W WO 2016197839 A2 WO2016197839 A2 WO 2016197839A2
Authority
WO
WIPO (PCT)
Prior art keywords
target
server
identifier
activity
information
Prior art date
Application number
PCT/CN2016/084225
Other languages
English (en)
French (fr)
Other versions
WO2016197839A3 (zh
Inventor
于君泽
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to KR1020187000450A priority Critical patent/KR102091949B1/ko
Priority to SG11201709643SA priority patent/SG11201709643SA/en
Priority to JP2017564122A priority patent/JP6734303B2/ja
Priority to EP16806737.9A priority patent/EP3306898A4/en
Publication of WO2016197839A2 publication Critical patent/WO2016197839A2/zh
Publication of WO2016197839A3 publication Critical patent/WO2016197839A3/zh
Priority to US15/833,907 priority patent/US10491707B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/53Network services using third party service providers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1012Server selection for load balancing based on compliance of requirements or conditions with available server resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to an information processing method and apparatus.
  • a merchant creates an active account including a plurality of activity information in the server.
  • the terminal may send a request for acquiring activity information of the active account to the server through the terminal; Obtain an activity information from the active account and then send the event information to the terminal.
  • a merchant creates an active account for issuing red packets in the server.
  • the active account includes 10,000 red packets to be issued, and each user can only obtain one red envelope when the user
  • the terminal may send a request for obtaining the red envelope of the active account to the server; the server obtains a red envelope from the active account, and then sends the red envelope to the terminal.
  • the present invention provides an information processing method and apparatus.
  • an information processing method is provided, which is applied to a server, where the server is a server in a server group, and each server in the server group is located at a different location and separately stored.
  • activity information for the target activity account the methods include:
  • the acquisition request carrying location information of the terminal, a target activity identifier of the target activity account, and an activity required to be acquired The number of targets of the information;
  • the target number of the activity information acquired by the acquisition request is greater than or equal to, the target number of activity information is obtained locally; and the acquired target number of activity information is sent to the terminal;
  • the server that has not received the acquisition request in the server group selects one of the closest to the terminal. Sending the acquisition request to the selected server, so that the selected server performs, according to the obtaining request, whether the number of activity information of the target active account stored locally is greater than or equal to the The step of getting the number of targets for the activity information that you want to get.
  • the selecting, according to the location information of the terminal, a server that is not the one of the servers in the server group that has not received the obtaining request includes:
  • a server corresponding to the server identifier in the record of the location information of the server including the shortest distance between the location information of the terminal is used as a server closest to the terminal.
  • the method further includes:
  • the target activity account includes a plurality of activity information and a target activity identifier of the target activity account;
  • For each target server storing activity information allocated for the target server in a target database table of the target database of the target server; setting a target server identifier of the target server, a target database identifier of the target database, The target database table identifier of the target database table, the target activity identifier of the target active account, the location information of the target server, the server identifier stored in the local storage, the database identifier, the database table identifier, the activity identifier, and the location information of the server. In the first correspondence between the two.
  • the obtaining the multiple target servers for storing the multiple activity information includes:
  • the same server identifier is removed, and only one server identifier in the same server identifier is retained;
  • the server corresponding to the reserved server ID is used as the target server.
  • the activity information allocated for the target server is stored in the target database table of the target database of the target server, including:
  • the target database is a database corresponding to the target database identifier
  • the target database table is the target database The database table identifies the corresponding database table.
  • an information processing apparatus comprising:
  • a first determining module configured to determine whether an acquisition request for acquiring activity information of the target active account sent by the terminal is received; the obtaining request carries location information of the terminal, a target activity identifier of the target active account, and The number of targets for the activity information that needs to be obtained;
  • a second determining module configured to determine, when the obtaining request is received, whether the number of activity information of the target active account corresponding to the locally stored target activity identifier is greater than or equal to the activity information acquired by the acquiring request Number of goals;
  • a first obtaining module configured to obtain a plurality of target activity information from the local when the target number of the activity information acquired by the acquisition request is greater than or equal to
  • a first sending module configured to send the acquired target number of activity information to the terminal
  • a selection module configured to select one of the servers in the server group that has not received the acquisition request according to location information of the terminal when the target number of activity information acquired by the acquisition request is smaller than The server closest to the terminal;
  • a second sending module configured to send the obtaining request to the selected server, so that the selected server performs, according to the obtaining request, whether the number of activity information of the target active account stored locally is greater than Or the step of equalizing the number of targets of the activity information acquired by the acquisition request.
  • the selection module includes:
  • a first acquiring unit configured to acquire a first correspondence between the locally stored server identifier, the database identifier, the database table identifier, the activity identifier, and the location information of the server;
  • a second acquiring unit configured to acquire, from the first correspondence, a record including a server identifier of all servers that have not received the acquisition request;
  • a third obtaining unit configured to acquire a record including the target activity identifier in a record including a server identifier of all servers that have not received the acquisition request;
  • a fourth obtaining unit configured to acquire location information of the server in each record that includes the target activity identifier
  • a selecting unit configured to select, in the acquired location information of the server, location information of a server that has the shortest distance from the location information of the terminal;
  • a first determining unit configured to determine, in the first correspondence, a record that includes location information of a server that has the shortest distance from location information of the terminal;
  • a second determining unit configured to use, as a server closest to the terminal, a server corresponding to the server identifier in the record of the location information of the server that has the shortest distance between the location information of the terminal.
  • the device further includes:
  • a creating module configured to create a target activity account;
  • the target activity account includes a plurality of activity information and a target activity identifier of the target activity account;
  • a second obtaining module configured to acquire a plurality of target servers for storing the plurality of activity information, and acquire location information of each target server;
  • An allocating module configured to allocate activity information to each target server according to the number of activity information of the target active account and the number of target servers;
  • a first storage module for targeting a target database of the target server for each target server The activity information allocated for the target server is stored in the database table;
  • a second storage module configured to identify a target server of the target server, a target database identifier of the target database, a target database table identifier of the target database table, a target activity identifier of the target active account, and the target
  • the location information of the server is stored in a first correspondence between the locally stored server identifier, the database identifier, the database table identifier, the activity identifier, and the location information of the server.
  • the second obtaining module includes:
  • a fifth obtaining unit configured to acquire a second correspondence between the locally stored server identifier, the database identifier, and the database table identifier of the unstored information
  • a sixth obtaining unit configured to acquire all server identifiers included in the second application relationship
  • the removing unit is configured to remove the same server identifier in all the obtained server identifiers, and only retain one server identifier in the same server identifier;
  • the third determining unit is configured to use the server corresponding to the reserved server identifier as the target server.
  • the first storage module includes:
  • a seventh acquiring unit acquiring a target record including the target server from the second correspondence relationship
  • a fourth determining unit configured to use a database identifier in the target record as a target database identifier, and use a database table identifier in the target record as a target database table identifier;
  • a storage unit configured to store activity information allocated for the target server in a target database table in a target database in the target server;
  • the target database is a database corresponding to the target database identifier;
  • the target database The table is a database table corresponding to the target database table identifier.
  • the technical solution provided by the embodiment of the present invention may include the following beneficial effects: in the prior art, multiple activity information of the target active account is stored only in one server, when a large number of users simultaneously send the target activity to the server.
  • the server receives a large number of acquisition requests in the unit time period, and the number of acquisition requests received by the server in the unit time period is easily greater than the processing that can be processed in the server unit time period.
  • the number of requests so that the server can only process a part of the acquisition requests received during the unit time period, and other acquisition requests can only be processed later, which reduces the response speed of the server to other acquisition requests, and the response efficiency. Lower.
  • the map of the present invention when a large number of users simultaneously send an acquisition request for acquiring activity information of the target active account to the server, since the plurality of activity information of the target active account has been separately stored in different locations in advance, Multiple servers, so multiple servers can share the acquisition requests sent by a large number of users; thus, the number of acquisition requests received in each server unit time period can be reduced, thereby making each server
  • the number of acquisition requests received in a unit time period may be less than the number of acquisition requests that can be processed in the server unit time period, so that each server can process all the processing requests received in each unit time period. After that, the overall response speed to the acquisition request sent by a large number of users is improved, and the response efficiency is improved.
  • FIG. 1 is a flowchart of an information processing method according to an exemplary embodiment
  • FIG. 2 is a flowchart of an information processing method according to an exemplary embodiment
  • FIG. 3 is a schematic diagram of a scenario according to an exemplary embodiment
  • FIG. 4 is a block diagram of an information processing apparatus according to an exemplary embodiment.
  • FIG. 1 is a flowchart of an information processing method according to an exemplary embodiment, where the method is applied to a server, where the server is a server in a server group, and each server in the server group is located at a different location. And the activity information of the target activity account is separately stored; as shown in FIG. 1, the method includes the following steps:
  • step S101 it is determined whether an acquisition request for acquiring activity information of the target activity account sent by the terminal is received;
  • the acquisition request carries the location information of the terminal, the target activity identifier of the target activity account, and the target number of the activity information to be acquired;
  • step S102 when the acquisition request is received, it is determined whether the number of activity information of the target active account corresponding to the target activity identifier stored locally is greater than or equal to the target number of activity information acquired by the acquisition request;
  • step S103 when the target number of the activity information acquired by the acquisition request is greater than or equal to, the server receiving the acquisition request locally acquires the target number of activity information; and the acquired target number of activity information Sent to the terminal;
  • step S104 when the target number of the activity information acquired by the acquisition request is smaller than the target information of the terminal, the server that has not received the acquisition request in the server group selects a server that is closest to the terminal according to the location information of the terminal; Sending the acquisition request to the selected server;
  • step S105 the selected server receives the acquisition request, and determines whether the number of the activity information of the locally stored target active account in step S102 is greater than or equal to the target number of the activity information acquired by the acquisition request. step.
  • the selected server When the selected server receives the acquisition request, the selected server immediately becomes the server that receives the acquisition request.
  • the plurality of activity information of the target activity account is only stored in one server, and when a large number of users simultaneously send the acquisition request for acquiring the activity information of the target activity account to the server, the server unit time period will be After receiving a large number of acquisition requests, the number of acquisition requests received by the server within a unit time period is easily greater than the number of acquisition requests that can be processed within the server unit time period, so that the server can only process the reception within the unit time period. Some of the acquisition requests get the request, and other acquisition requests can only be processed later, which reduces the response speed of the server to other acquisition requests, and the response efficiency is low.
  • the server can process 200 acquisition requests per second.
  • each user sends one acquisition request to the server.
  • the server receives the 10,000 acquisition requests in the unit time period, and takes 50 seconds to completely process the processing requests. The overall response time is longer, and the response efficiency is lower.
  • targets are stored in 50 servers located at different locations.
  • Activity information of the active account and each server can process 200 acquisition requests per second.
  • the 50 servers will use the 10,000 servers.
  • the 10,000 acquisition requests sent by the user are shared. For example, each server receives 200 acquisition requests, and each server can process the processing requests received by each server in one second. The overall response time is shorter, and the response efficiency is further improved. Higher.
  • FIG. 2 is a flowchart of an information processing method according to an exemplary embodiment. As shown in FIG. 2, the method includes the following steps:
  • step S201 a target activity account corresponding to the target activity is created
  • the target activity account includes a plurality of activity information and a target activity identifier of the target activity account; the target activity identifier may be a name and/or a number of the target activity.
  • Target activities can grab red envelope activities, snap up an item's activities, or grab points.
  • each activity information may be a red envelope including a certain amount; for example, a red envelope of 5 yuan, or a red envelope of 10 yuan.
  • each activity information may be the quantity of the commodity limited purchase; for example, one, or two, and the like.
  • step S202 acquiring a plurality of target servers for storing a plurality of activity information, and acquiring location information of each target server;
  • the technicians have servers deployed in different locations in advance, and these servers can perform data communication with each other, and these servers include a database and a database table for storing data, for example, can store activity information, etc.;
  • a client when the user needs to log in to the background server corresponding to the client, the client can select the server closest to the user to log in.
  • technicians have previously deployed a server in each of Beijing, Shanghai, Guangzhou, Xining, Yinchuan, Kunming, and Harbin, with a total of seven servers, which correspond to one client “Tmall Mall”.
  • the user can install the client "Tmall Mall” on the user's mobile phone.
  • the client "Tmall Mall” will select the mobile phone with the user. Log in from the nearest server, that is, select the server located in Beijing to log in.
  • this step can be implemented by the following processes, including:
  • the deployed servers can communicate with each other, so for any server deployed,
  • the server not only knows the local configuration of the server, but also knows the configuration of each of the other servers deployed, that is, knows whether data is stored in the database table in the database in each server.
  • the server may establish a second correspondence between the server identifier, the database identifier, and the database table identifier of the unstored information locally according to the local configuration of the server and the configuration of each of the other servers; the second correspondence The database table identifier of the unstored information in each record in the relationship does not store data in the corresponding database table;
  • the server identifier is the name and/or number of the server
  • the database identifier is the name and/or number of the database
  • the database table identifier is the name and/or number of the database table.
  • the database table identifier of the database table is obtained, the database identifier of the database to which the database table belongs, and the server identifier of the server to which the database belongs are obtained;
  • the server identifier, the database identifier, and the database table identifier are stored in a second correspondence.
  • server identifiers there may be multiple server identifiers that are the same server identifier. Therefore, the same server identifier needs to be removed, and only one server identifier in the same server identifier is retained. In the reserved server ID, any two server IDs are different.
  • the server corresponding to each server identifier that is reserved is used as the target server.
  • step S203 activity information is allocated for each target server according to the number of activity information of the target activity account and the number of target servers;
  • the activity information can be equally distributed to each target server according to the number of activity information and the number of target servers, so that the number of activity information allocated by any two target servers is the same or only a small gap, and there is no Big gap.
  • the number of target servers is 10 and the number of activity information is 1000, 100 activity information is allocated for each target server, so that the activity information is evenly distributed to each target server, that is, any two targets.
  • the number of target information allocated by the server is the same or the same.
  • the number of target servers is 10 and the number of active information is 998
  • two target servers are selected from 10 target servers, and each target server is separately allocated to each of the two target servers.
  • 99 pieces of target information are allocated 100 pieces of target information to each of the other 8 target servers, so that the number of pieces of target information allocated by any two target servers is the same or different.
  • the activity level of users in different regions can be analyzed, and different numbers of activity information are allocated to servers in different locations; among them, more servers are allocated to servers deployed in regions with higher user activity levels.
  • the number of activity information allocates a small number of activity information to servers deployed in areas where the user's activity is low.
  • the target servers are seven, located in Beijing, Shanghai, Guangzhou, Xining, Yinchuan, Kunming, and Harbin; among them, users in Beijing, Shanghai, and Guangzhou are more active, located in Xining, Yinchuan, Kunming, and Harbin. If the user's activity is low, a larger number of activity information can be allocated to servers located in Beijing, Shanghai, and Guangzhou, and a smaller number of activity information is allocated to servers located in Xining, Yinchuan, Kunming, and Haierbin. This achieves reasonable allocation of activity information.
  • step S204 for any target server, the activity information allocated for the target server is stored in the target database table of the target database of the target server; for each of the other target servers, the above operation is performed;
  • the table identifier is used as the target database table identifier; the activity information allocated for the target server is stored in the target database table in the target database in the target server; wherein the target database is the database corresponding to the target database identifier; the target database table is the target The database table identifies the corresponding database table.
  • the target record is deleted from the second correspondence. And storing the target server identifier of the target server, the target database identifier of the target database, the target database table identifier of the target database table, the target activity identifier of the target active account, the location information of the target server, the server identifier, the database identifier, The first correspondence between the database table identifier, the activity identifier, and the location information of the server.
  • all target servers are grouped into a server group.
  • Each server in the server group can connect to the Internet so that the target servers in the server group can communicate with each other.
  • A1 to An represent the target server, respectively.
  • step S201 to step S204 is completed to store multiple activity information of the target activity account in multiple target servers in different locations, and the target activity is immediately activated, and then the user can obtain The activity information of the target activity account is taken.
  • the target server can distribute the activity information that the user needs to obtain for the user through the process of the following steps S205 to S209.
  • each server in the server group determines whether each of the servers receives an acquisition request for acquiring activity information of the target active account.
  • each target server that has been deployed performs the operation of step S205.
  • the target server receives the acquisition request, the activity information acquired by the acquisition request is obtained through the process of step S206 to step S209. And send the obtained activity information to the terminal.
  • the obtaining request carries the location information of the terminal, the target activity identifier of the target active account, and the target number of the activity information that needs to be acquired; each server in the server group is located at a different location, and the target activity is stored separately Activity information for the account.
  • the terminal can be a mobile phone, a tablet, a laptop, etc. used by any user.
  • the user can view the activity page of the target activity on the terminal, and then send the acquisition request for acquiring the activity information of the target activity account to the server by clicking or touching, etc.; the server receives the acquisition request, and the S206 to S209 The process is processed.
  • the target activity is to issue a red envelope
  • one activity information is one red envelope.
  • the target activity page displayed on the terminal includes at least a red envelope acquisition button and a red packet acquisition number selection box, and the user selects a required number in the red packet acquisition number selection box.
  • the number of targets of the red envelope and then click the get button, the terminal receives the click operation of the user clicking the get button, and obtains the number of targets of the red envelope that the user needs to obtain in the red packet acquisition number selection box, according to the target number, the terminal
  • the location information and the target activity identifier of the target activity account generate an acquisition request and send it to the server;
  • the manner in which the terminal obtains the location information of the terminal may be any one of the prior art, which is not limited by the present invention.
  • step S206 the server that receives the acquisition request determines whether the number of activity information of the target active account corresponding to the locally stored target activity identifier is greater than or equal to the acquisition request. The number of targets for the activity information that needs to be obtained;
  • the database identifier and the database table identifier are obtained; and the database in the database corresponding to the acquired database identifier is determined from the obtained server.
  • the database table is a database table corresponding to the obtained database table identifier; obtaining the number of activity information stored in the obtained database table, and determining whether the number of activity information stored in the acquired database table is greater than or equal to The number of activity information that is required to obtain the request.
  • step S207 the server receiving the acquisition request locally acquires the target number of activity information; and the acquired target number of activity information Sent to the terminal;
  • the execution subject of the step of "acquiring the target number of pieces of activity information from the local; and transmitting the acquired target number of pieces of event information to the terminal" in step S207, and the execution in step S206 "determining the locally stored target activity" The execution subject of the step of whether the number of activity information of the account is greater than or equal to the number of targets of the activity information required to acquire the request is the same.
  • the target activity information is obtained from the acquired database table, and the target number of activity information is sent to the terminal. If there is 0 activity information remaining in the obtained database table at this time, that is, the database table is empty at this time; the database table identifier of the database table to be obtained, the database identifier of the database to which the database table belongs, and the database table
  • the server identifier of the server to which the associated database belongs constitutes a record and is stored in the second correspondence; and the record including the database table identifier of the acquired database table is deleted from the first correspondence.
  • one activity information is one red packet
  • the number of red packets to be acquired by the acquisition request is five, and the number of red packets stored in the server that receives the acquisition request is ten, at this time, receiving The number of the red packets stored in the server for obtaining the request is greater than the number of the red packets to be obtained by the obtaining request, and the number of the red packets stored in the server receiving the obtaining request may be determined to satisfy the acquisition request.
  • the number of targets of the red envelope may be selected from the 10 red packets stored by the server receiving the acquisition request and sent to the terminal. At this time, the number of red packets stored by the server receiving the acquisition request at this time is only five.
  • the server that receives the acquisition request selects one of the servers in the server group that has not received the acquisition request according to the location information of the terminal in step S208. a server closest to the terminal; sending the acquisition request to the selected server;
  • step S206 In order to cause the selected server to perform the step of “determining whether the number of the activity information of the locally stored target active account is greater than or equal to the target number of the activity information acquired by the acquisition request” in step S206 according to the acquisition request.
  • step S208 the execution body of the step of "selecting a server closest to the terminal among the servers in the server group that has not received the acquisition request; transmitting the acquisition request to the selected server", and step S206
  • the execution subject of the step of "determining whether the number of pieces of activity information of the locally stored target activity account is greater than or equal to the number of targets of the activity information required to acquire the acquisition request" is the same.
  • the server group includes multiple servers, which are located at different locations, and store activity information of the target active account.
  • the number of the target information of the activity information that is required to be acquired is less than the target number of the activity information
  • the number of the red packets stored in the server that receives the acquisition request cannot meet the target of the red envelope that is acquired by the acquisition request.
  • the number of requirements, and, in order to minimize the communication delay caused by the length of the communication link it is necessary to select a server closest to the terminal among the servers in the server group that have not received the acquisition request, and then Sending the obtaining request to the selected server, so that the selected server receives the obtaining request, and then determining whether the number of the activity information of the locally stored target active account is greater than or equal to the target number of the activity information acquired by the obtaining request.
  • the selected server When the target number of the activity information acquired by the acquisition request is greater than or equal to, the selected server performs “acquiring the target number of activity information from the local; and transmitting the acquired target number of activity information to the terminal” Step, when less than the target number of activity information required to obtain the acquisition request, select Server performs "not received in the server group server through the acquisition request, select a nearest server terminal; obtaining the request to the selected server” step.
  • selecting a server that is the closest to the terminal in the server that has not received the acquisition request in the server group may be implemented by the following process, including:
  • the activity identifiers in all the records in the first correspondence include the target activity identifier of the target activity account and the activity identifier of the other activity account.
  • the location information of the server is obtained in the record.
  • the location information of the device is the location information of the server having the shortest distance from the location information of the terminal.
  • the distance between the location information of the server and the location information of the terminal is calculated for the acquired location information of any server; for each of the acquired other servers
  • the location information performs the above operations, so that the distance between the acquired location information of each server and the location information of the terminal can be obtained; and the location distance information between the terminal and the terminal can be selected according to the calculated distance.
  • the location information of the shortest server is the location information of the shortest server.
  • the first record is obtained, and it is determined whether the location information of the server selected in step 25) is included in the record, when the location information of the server selected in step 25) is included.
  • the acquired record is taken as a record of the location information of the server including the shortest distance from the location information of the terminal.
  • a server corresponding to the server identifier in the record of the location information of the server including the shortest distance from the location information of the terminal is used as the server closest to the terminal.
  • one activity information is one red packet
  • the number of activity information to be acquired by the acquisition request is five, that is, the number of red packets to be acquired is five, assuming that the newly acquired server stores
  • the number of red packets stored in the newly acquired server is smaller than the number of red packets that are acquired by the acquisition request, and therefore, the storage of the newly acquired server is determined.
  • the number of red packets cannot meet the requirement of the number of red packets required to obtain the request, so that only five red packets can be obtained from other servers and returned to the terminal.
  • step S209 the selected server receives the acquisition request, and performs the determination in step S206 whether the number of the activity information of the locally stored target active account is greater than or equal to the target number of the activity information acquired by the acquisition request. step.
  • the selected server When the selected server receives the acquisition request, the selected server immediately becomes the server that receives the acquisition request.
  • step S207 is performed to "acquire a plurality of target activity information from the local; and the number of acquired targets is several
  • the plurality of activity information of the target activity account is only stored in one server, and when a large number of users simultaneously send the acquisition request for acquiring the activity information of the target activity account to the server, the server unit time period will be After receiving a large number of acquisition requests, the number of acquisition requests received by the server within a unit time period is easily greater than the number of acquisition requests that can be processed within the server unit time period, so that the server can only process the reception within the unit time period. Some of the acquisition requests get the request, and other acquisition requests can only be processed later, which reduces the response speed of the server to other acquisition requests, and the response efficiency is low.
  • the server can process 200 acquisition requests per second.
  • each user sends one acquisition request to the server.
  • the server receives the 10,000 acquisition requests in the unit time period, and takes 50 seconds to completely process the processing requests. The overall response time is longer, and the response efficiency is lower.
  • activity information of the target active account is stored in 50 servers located at different locations, and each server can process 200 acquisition requests per second, when distributed in various locations.
  • the 50 servers will share the 10,000 acquisition requests sent by the 10,000 users. For example, each server receives 200 acquisition requests, each Each server can process the processing requests received by each server in one second, and the overall response time is short, and the response efficiency is high.
  • FIG. 4 is a block diagram of an information processing apparatus according to an exemplary embodiment.
  • the apparatus includes:
  • the first judging module 11 is configured to determine whether an acquisition request for acquiring activity information of the target active account sent by the terminal is received; the obtaining request carries location information of the terminal, and a target activity identifier of the target active account And the number of targets for the activity information that needs to be obtained;
  • the second judging module 12 is configured to determine, when the obtaining request is received, whether the number of activity information of the target active account corresponding to the locally stored target activity identifier is greater than or equal to the activity required to obtain the obtaining request The number of targets of the information;
  • the first obtaining module 13 is configured to obtain a plurality of target activity information from the local when the target number of the activity information acquired by the acquisition request is greater than or equal to
  • the first sending module 14 is configured to send the acquired target number of activity information to the terminal;
  • the selecting module 15 is configured to select, in the server group, the server that has not received the obtaining request according to the location information of the terminal when the target number of the activity information that is required to be acquired by the acquiring request is smaller than a server that is closest to the terminal;
  • the second sending module 16 is configured to send the obtaining request to the selected server, so that the selected server performs, according to the obtaining request, whether to determine whether the number of activity information of the target active account stored locally is The step of greater than or equal to the number of targets of the activity information acquired by the acquisition request.
  • the plurality of activity information of the target activity account is only stored in one server, and when a large number of users simultaneously send the acquisition request for acquiring the activity information of the target activity account to the server, the server unit time period will be After receiving a large number of acquisition requests, the number of acquisition requests received by the server within a unit time period is easily greater than the number of acquisition requests that can be processed within the server unit time period, so that the server can only process the reception within the unit time period. Some of the acquisition requests get the request, and other acquisition requests can only be processed later, which reduces the response speed of the server to other acquisition requests, and the response efficiency is low.
  • the selection module 15 includes:
  • a first acquiring unit configured to acquire a first correspondence between the locally stored server identifier, the database identifier, the database table identifier, the activity identifier, and the location information of the server;
  • a second acquiring unit configured to acquire, from the first correspondence, a record including a server identifier of all servers that have not received the acquisition request;
  • a third obtaining unit configured to acquire a record including the target activity identifier in a record including a server identifier of all servers that have not received the acquisition request;
  • a fourth obtaining unit configured to acquire location information of the server in each record that includes the target activity identifier
  • a selecting unit configured to select, in the acquired location information of the server, location information of a server that has the shortest distance from the location information of the terminal;
  • a first determining unit configured to determine, in the first correspondence, a record that includes location information of a server that has the shortest distance from location information of the terminal;
  • a second determining unit configured to use, as a server closest to the terminal, a server corresponding to the server identifier in the record of the location information of the server that has the shortest distance between the location information of the terminal.
  • the device further includes:
  • a creating module configured to create a target activity account;
  • the target activity account includes a plurality of activity information and a target activity identifier of the target activity account;
  • a second obtaining module configured to acquire a plurality of target servers for storing the plurality of activity information, and acquire location information of each target server;
  • An allocating module configured to allocate activity information to each target server according to the number of activity information of the target active account and the number of target servers;
  • a first storage module configured to store, for each target server, activity information allocated for the target server in a target database table of a target database of the target server;
  • a second storage module configured to identify a target server of the target server, a target database identifier of the target database, a target database table identifier of the target database table, a target activity identifier of the target active account, and the target
  • the location information of the server is stored in a first correspondence between the locally stored server identifier, the database identifier, the database table identifier, the activity identifier, and the location information of the server.
  • the second obtaining module includes:
  • a fifth obtaining unit configured to acquire a second correspondence between the locally stored server identifier, the database identifier, and the database table identifier of the unstored information
  • a sixth obtaining unit configured to acquire all server identifiers included in the second application relationship
  • the removing unit is configured to remove the same server identifier in all the obtained server identifiers, and only retain one server identifier in the same server identifier;
  • the third determining unit is configured to use the server corresponding to the reserved server identifier as the target server.
  • the first storage module includes:
  • a seventh acquiring unit acquiring a target record including the target server from the second correspondence relationship
  • a fourth determining unit configured to use a database identifier in the target record as a target database identifier, and use a database table identifier in the target record as a target database table identifier;
  • a storage unit configured to store activity information allocated for the target server in a target database table in a target database in the target server;
  • the target database is a database corresponding to the target database identifier;
  • the target database The table is a database table corresponding to the target database table identifier.

Abstract

本发明是关于一种信息处理方法及装置,包括:服务器组中的每个服务器均判断各自是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;当一个服务器接收到获取请求时,该服务器判断本地存储的目标活动账户的活动信息的个数是否大于或等于目标个数;当大于或等于获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息并发送给终端;当小于目标个数时,在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将获取请求发送给选择出的服务器。本发明整体上可以提高对海量用户发送的获取请求的响应速度,从而可以提高响应效率。

Description

一种信息处理方法及装置
本申请要求2015年06月08日递交的申请号为2015103091806、发明名称为“一种信息处理方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及互联网技术领域,尤其涉及一种信息处理方法及装置。
背景技术
随着互联网技术的飞速发展,数字化电子方式的交互越来越普及,在交互过程中,可能存在海量用户同时并发访问同一账户的情况,使得被访问账户成为热点账户。
例如,某一商户在服务器中创建了一个包括多个活动信息的活动账户,当用户需要获取该活动的活动信息时,可以通过终端发送用于获取该活动账户的活动信息的请求给服务器;服务器从该活动账户中获取一个活动信息,然后发送该活动信息给终端。
以营销类业务中发放活动红包为例,某一商户在服务器中创建了一个发放红包的活动账户,该活动账户中包括待发放的一万个红包,每个用户只能获取一个红包,当用户需要获取该活动账户中的红包时,可以通过终端发送用于获取该活动账户的红包的请求给服务器;服务器从该活动账户中获取一个红包,然后发送该红包给终端。
然而,当海量用户同时向服务器发送用于获取该活动账户的活动信息时,如果服务器单位时间段内接收到的请求的数量大于服务器单位时间段内所能够处理的请求的数量,则会降低服务器对有些用户发送的请求的响应速度,甚至无法响应有些用户发送的请求,响应效率较低。
发明内容
为克服相关技术中存在的问题,本发明提供一种信息处理方法及装置。
根据本发明实施例的第一方面,提供一种信息处理方法,应用于服务器,所述服务器为服务器组中的一个服务器,所述服务器组中的每个服务器分别位于不同的位置,且分别存储有目标活动账户的活动信息;所述方法包括:
判断是否接收到终端发送的、用于获取所述目标活动账户的活动信息的获取请求;所述获取请求携带所述终端的位置信息、所述目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
当接收到所述获取请求时,判断本地存储的所述目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数;
当大于或等于所述获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给所述终端;
当小于所述获取请求所需获取的活动信息的目标个数时,根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器;将所述获取请求发送给选择出的服务器,以使选择出的服务器根据所述获取请求执行所述判断本地存储的所述目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数的步骤。
其中,所述根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器,包括:
获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
从第一对应关系中获取包括所有未接收过所述获取请求的服务器的服务器标识的记录;
在包括所有未接收过所述获取请求的服务器的服务器标识的记录中获取包括所述目标活动标识的记录;
分别在每个包括所述目标活动标识的记录中获取服务器的位置信息;
在获取的服务器的位置信息中选择一个与所述终端的位置信息之间距离最短的服务器的位置信息;
在所述第一对应关系中确定出包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录;
将包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录中的服务器标识对应的服务器作为距离所述终端最近的一个服务器。
进一步地,所述方法还包括:
创建目标活动账户;所述目标活动账户包括多个活动信息及所述目标活动账户的目标活动标识;
获取用于存储所述多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
根据所述目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务 器分配活动信息;
对于每个目标服务器,在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息;将所述目标服务器的目标服务器标识、所述目标数据库的目标数据库标识、所述目标数据库表的目标数据库表标识、所述目标活动账户的目标活动标识、所述目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
其中,所述获取用于存储所述多个活动信息的多个目标服务器,包括:
获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
获取所述第二应关系中包括的所有的服务器标识;
在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
将保留的服务器标识对应的服务器均作为目标服务器。
其中,所述在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息,包括:
从所述第二对应关系中获取一个包括所述目标服务器的目标记录;
将所述目标记录中的数据库标识作为目标数据库标识,以及将所述目标记录中的数据库表标识作为目标数据库表标识;
将为所述目标服务器分配的活动信息存储在所述目标服务器中的目标数据库中的目标数据库表中;所述目标数据库为所述目标数据库标识对应的数据库;所述目标数据库表为所述目标数据库表标识对应的数据库表。
根据本发明实施例的第二方面,提供一种信息处理装置,所述装置包括:
第一判断模块,用于判断是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;所述获取请求携带所述终端的位置信息、所述目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
第二判断模块,用于当接收到所述获取请求时,判断本地存储的所述目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数;
第一获取模块,用于当大于或等于所述获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息;
第一发送模块,用于将获取的目标个数个活动信息发送给所述终端;
选择模块,用于当小于所述获取请求所需获取的活动信息的目标个数时,根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器;
第二发送模块,用于将所述获取请求发送给选择出的服务器,以使选择出的服务器根据所述获取请求执行所述判断本地存储的所述目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数的步骤。
其中,所述选择模块包括:
第一获取单元,用于获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
第二获取单元,用于从第一对应关系中获取包括所有未接收过所述获取请求的服务器的服务器标识的记录;
第三获取单元,用于在包括所有未接收过所述获取请求的服务器的服务器标识的记录中获取包括所述目标活动标识的记录;
第四获取单元,用于分别在每个包括所述目标活动标识的记录中获取服务器的位置信息;
选择单元,用于在获取的服务器的位置信息中选择一个与所述终端的位置信息之间距离最短的服务器的位置信息;
第一确定单元,用于在所述第一对应关系中确定出包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录;
第二确定单元,用于将包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录中的服务器标识对应的服务器作为距离所述终端最近的一个服务器。
进一步地,所述装置还包括:
创建模块,用于创建目标活动账户;所述目标活动账户包括多个活动信息及所述目标活动账户的目标活动标识;
第二获取模块,用于获取用于存储所述多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
分配模块,用于根据所述目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务器分配活动信息;
第一存储模块,用于对于每个目标服务器,在所述目标服务器的目标数据库的目标 数据库表中存储为所述目标服务器分配的活动信息;
第二存储模块,用于将所述目标服务器的目标服务器标识、所述目标数据库的目标数据库标识、所述目标数据库表的目标数据库表标识、所述目标活动账户的目标活动标识、所述目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
其中,所述第二获取模块包括:
第五获取单元,用于获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
第六获取单元,用于获取所述第二应关系中包括的所有的服务器标识;
去除单元,用于在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
第三确定单元,用于将保留的服务器标识对应的服务器均作为目标服务器。
其中,所述第一存储模块包括:
第七获取单元,从所述第二对应关系中获取一个包括所述目标服务器的目标记录;
第四确定单元,用于将所述目标记录中的数据库标识作为目标数据库标识,以及将所述目标记录中的数据库表标识作为目标数据库表标识;
存储单元,用于将为所述目标服务器分配的活动信息存储在所述目标服务器中的目标数据库中的目标数据库表中;所述目标数据库为所述目标数据库标识对应的数据库;所述目标数据库表为所述目标数据库表标识对应的数据库表。
本发明的实施例提供的技术方案可以包括以下有益效果:在现有技术中,目标活动账户的多个活动信息仅仅存储在一个服务器中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,服务器单位时间段内会接收到大量的获取请求,该服务器单位时间段内接收到的获取请求的数量很轻易就大于该服务器单位时间段内所能处理的获取请求的数量,这样服务器在单位时间段内只能处理接收的获取请求中的一部分获取请求,其他获取请求只能在之后再处理,这就降低了该服务器对其他获取请求的响应速度,响应效率较低。
然而,在本发明图中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,由于事先已经将目标活动账户的多个活动信息分别存储在位于不同位置的多个服务器中,因此多个服务器可以将海量用户发送的获取请求进行分摊;这样,可以降低每个服务器单位时间段内接收的获取请求的数量,进而使得每个服务器 单位时间段内接收到的获取请求的数量可以小于该服务器单位时间段内所能处理的获取请求的数量,如此每个服务器在单位时间段内就可以分别将各自接收的所有的处理请求均处理完毕,如此整体上提高了对海量用户发送的获取请求的响应速度,提高了响应效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本发明。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
图1是根据一示例性实施例示出的一种信息处理方法的流程图;
图2是根据一示例性实施例示出的一种信息处理方法的流程图;
图3是根据一示例性实施例示出的一种场景示意图;
图4是根据一示例性实施例示出的一种信息处理装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种信息处理方法的流程图,该方法应用于服务器中,该服务器为服务器组中的一个服务器,服务器组中的每个服务器分别位于不同的位置,且分别存储有目标活动账户的活动信息;如图1所示,该方法包括以下步骤:
在步骤S101中,判断是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;
该获取请求携带终端的位置信息、目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
在步骤S102中,当接收到该获取请求时,判断本地存储的该目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数;
在步骤S103中,当大于或等于该获取请求所需获取的活动信息的目标个数时,接收该获取请求的服务器从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给终端;
在步骤S104中,当小于该获取请求所需获取的活动信息的目标个数时,根据终端的位置信息,在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将该获取请求发送给选择出的服务器;
在步骤S105中,选择出的服务器接收该获取请求,执行步骤S102中的判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数的步骤。
当选择出的服务器接收到该获取请求时,该选择出的服务器即刻成为接收该获取请求的服务器。
在现有技术中,目标活动账户的多个活动信息仅仅存储在一个服务器中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,服务器单位时间段内会接收到大量的获取请求,该服务器单位时间段内接收到的获取请求的数量很轻易就大于该服务器单位时间段内所能处理的获取请求的数量,这样服务器在单位时间段内只能处理接收的获取请求中的一部分获取请求,其他获取请求只能在之后再处理,这就降低了该服务器对其他获取请求的响应速度,响应效率较低。
然而,在本发明图1所示的实施例中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,由于事先已经将目标活动账户的多个活动信息分别存储在位于不同位置的多个服务器中,因此多个服务器可以将海量用户发送的获取请求进行分摊;这样,可以降低每个服务器单位时间段内接收的获取请求的数量,进而使得每个服务器单位时间段内接收到的获取请求的数量可以小于该服务器单位时间段内所能处理的获取请求的数量,如此每个服务器在单位时间段内就可以分别将各自接收的所有的处理请求均处理完毕,如此整体上提高了对海量用户发送的获取请求的响应速度,提高了响应效率。
例如,在现有技术中,服务器每秒能处理200个获取请求,当分布于各个位置的1万个用户均需要获取目标活动账户的活动信息时,每个用户分别发送1个获取请求给服务器,服务器单位时间段内接收到了这1万个获取请求,需要50秒才能完全处理完这些处理请求,整体上的响应时间较长,进而响应效率较低。
然而,在本发明图1所示的实施例中,位于不同位置的50个服务器中均存储有目标 活动账户的活动信息,且每个服务器每秒能处理200个获取请求,当分布于各个位置的1万个用户均需要获取目标活动账户的活动信息时,这50个服务器会将这1万个用户一共发送的1万个获取请求进行分摊,例如,每个服务器接收200个获取请求,每个服务器只需1秒就可以处理完各自接收的处理请求,整体上响应时间较短,进而响应效率较高。
图2根据一示例性实施例示出的一种信息处理方法的流程图,如图2所示,该方法包括以下步骤:
在步骤S201中,创建目标活动对应的目标活动账户;
其中,目标活动账户包括多个活动信息及目标活动账户的目标活动标识;目标活动标识可以为目标活动的名称和/或编号等。
目标活动可以抢红包的活动、抢购某一商品的活动或抢积分的活动等。
例如,当目标活动为抢红包的活动时,每个活动信息可以为一个包括一定数额的红包;例如一个5元的红包,或一个10元的红包等。当目标活动为抢购某一商品的活动时,每个活动信息可以为商品限购数量;例如1台,或2台等。
在步骤S202中,获取用于存储多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
其中,技术人员事先在不同位置均部署有服务器,这些服务器相互之间可以进行数据通信,且这些服务器均包括数据库和数据库表,用于存储数据,例如可以存储活动信息等;这些服务器均统一对应一个客户端,当用户需要登录客户端对应的后台服务器时,客户端可以选择距离用户最近的服务器进行登录。
例如,技术人员事先在北京、上海、广州、西宁、银川、昆明和哈尔滨中的每个城市中均部署一个服务器,一共7个服务器,这7个服务器统一对应一个客户端“天猫商城”,用户可以在用户的手机上安装客户端“天猫商城”,当用户位于北京时,如果用户需要登录客户端“天猫商城”的后台服务器,客户端“天猫商城”会选择与用户的手机之间距离最近的服务器进行登录,即,选择位于北京的服务器进行登录。
具体地,本步骤可以通过如下流程实现,包括:
11)、获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
其中,部署的服务器相互之间可以进行数据通信,因此,对于部署的任一服务器, 该服务器不仅知道该服务器本地的配置情况,还知道部署的其他每个服务器的配置情况,即,知道每个服务器中的数据库中的数据库表中是否存储有数据。该服务器可以根据该服务器本地的配置情况以及其他每个服务器的配置情况,在该服务器本地建立服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;第二对应关系中的每条记录中的未存储信息的数据库表标识对应的数据库表中均未存储数据;
其中,服务器标识为服务器的名称和/或编号等;数据库标识为数据库的名称和/或编号等;数据库表标识为数据库表的名称和/或编号等。
然而,当在第二对应关系中的某一条记录中的、未存储信息的数据库表标识对应的数据库中存储一条数据后,则在第二对应关系中删除该记录;
当从某一数据库表中删除数据并使得该数据库表中为空时,获取该数据库表的数据库表标识,获取该数据库表所属的数据库的数据库标识,以及获取该数据库所属的服务器的服务器标识;将该服务器标识、该数据库标识和该数据库表标识存储在第二对应关系中。
12)、获取第二对应关系中包括的所有的服务器标识;
其中,获取第二对应关系中的每条记录,分别获取每条记录中的服务器标识;以实现获取第二对应关系中包括的所有的服务器标识。
13)、在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
其中,在获取的所有的服务器标识中,可能存在多个服务器标识为相同的服务器标识,因此需要对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识。在保留的服务器标识中,任意两个服务器标识均不相同。
14)、将保留的每个服务器标识分别对应的服务器均作为目标服务器。
在步骤S203中,根据目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务器分配活动信息;
其中,可以根据活动信息的个数以及目标服务器的个数,将活动信息平均分配给每个目标服务器,这样任意两个目标服务器分配的活动信息的个数相同或者只有微小差距,不会有很大差距。
例如,假设目标服务器的个数为10,活动信息的个数为1000,则为每个目标服务器分配100个活动信息,以实现将活动信息平均分配给每个目标服务器,即,任意两个目标服务器分配的目标信息的个数或者相同。
在另一例子中,假设目标服务器的个数为10,活动信息的个数为998,则从10个目标服务器中选择出两个目标服务器,向这两个目标服务器中每个目标服务器分别分配99个目标信息,向其他8个目标服务器中的每个目标服务器分别分配100个目标信息,这样,任意两个目标服务器分配的目标信息的个数或者相同,或者相差1。
其中,也可以根据历史经验,分析不用地域的用户的活跃程度,对处于不同位置的服务器分配不同个数的活动信息;其中,对在用户的活跃程度较高的地域部署的服务器分配较多个数的活动信息,对在用户的活跃程度较低的地域部署的服务器分配较少个数的活动信息。
例如,假设目标服务器为7个,分别位于北京、上海、广州、西宁、银川、昆明和哈尔滨;其中,位于北京、上海和广州的用户的活跃程度较高,位于西宁、银川、昆明和哈尔滨的用户的活跃程度较低,则可以对分别位于北京、上海和广州的服务器分配较多个数的活动信息,对分别位于西宁、银川、昆明、海尔滨的服务器分配较少个数的活动信息,如此实现合理分配活动信息。
在步骤S204中,对于任一目标服务器,在该目标服务器的目标数据库的目标数据库表中存储为该目标服务器分配的活动信息;对于其他每一目标服务器,均执行上述操作;
具体地,对于任一目标服务器,从第二对应关系中获取一个包括该目标服务器的目标服务器标识的目标记录;将该目标记录中的数据库标识作为目标数据库标识,以及将该目标记录中的数据库表标识作为目标数据库表标识;将为该目标服务器分配的活动信息存储在该目标服务器中的目标数据库中的目标数据库表中;其中,目标数据库为目标数据库标识对应的数据库;目标数据库表为目标数据库表标识对应的数据库表。
进一步地,从第二对应关系中删除目标记录。以及将该目标服务器的目标服务器标识、目标数据库的目标数据库标识、目标数据库表的目标数据库表标识、目标活动账户的目标活动标识、目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
其中,对于其他每一目标服务器,均执行上述操作。
进一步地,当存储完毕后,参见图3,将所有目标服务器组成服务器组。服务器组中的每个服务器均可以连接至互联网,如此,服务器组中的目标服务器可以相互之间进行通信。在图3中,A1~An分别表示目标服务器。
这样,通过步骤S201至步骤S204的流程完成了将目标活动账户的多个活动信息分别存储在处于不同位置的多个目标服务器,同时目标活动即刻启动,之后用户就可以获 取目标活动账户的活动信息,当用户需要获取目标活动账户的活动信息时,目标服务器就可以通过如下步骤S205至步骤S209的流程为用户分发用户所需获取的活动信息。
在步骤S205中,服务器组中的每个服务器均判断各自是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;
目标活动启动之后,已部署的每个目标服务器均执行步骤S205的操作,当某一目标服务器接收到该获取请求时,通过步骤S206至步骤S209的流程获取该获取请求所需获取的活动信息,并将获取的活动信息发送给终端。
其中,该获取请求携带终端的位置信息、目标活动账户的目标活动标识,以及所需获取的活动信息的目标个数;服务器组中的每个服务器分别位于不同的位置,且分别存储有目标活动账户的活动信息。
终端可以为任一用户使用的手机、平板电脑、笔记本电脑等。
其中,用户可以在终端上查看目标活动的活动页面,然后可以通过点击或触控等方式向服务器发送用于获取目标活动账户的活动信息的该获取请求;服务器接收该获取请求,通过S206至S209的流程进行处理。
例如,目标活动为发放红包,以及1个活动信息为1个红包,终端上显示的目标活动页面至少包括红包获取按钮以及红包获取个数选择框,用户在红包获取个数选择框中选择需要获取的红包的目标个数,然后点击获取按钮,终端接收用户点击获取按钮的点击操作后,获取用户在红包获取个数选择框中选择需要获取的红包的目标个数,根据该目标个数、终端的位置信息以及目标活动账户的目标活动标识生成获取请求并发送给服务器;
终端获取终端的位置信息的方式可以通过现有技术中的任意一种方式,本发明对此不加以限定。
当服务器组中的一个服务器接收到该获取请求时,在步骤S206中,接收该获取请求的服务器判断本地存储的目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数;
具体地,在包括与终端的位置信息之间距离最短的、服务器的位置信息的记录中,获取数据库标识和数据库表标识;从获取的服务器中确定出该获取的数据库标识对应的数据库中的数据库表;该数据库表为该获取的数据库表标识对应的数据库表;获取该获取的数据库表中存储的活动信息的个数,判断该获取的数据库表中存储的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的个数。
当大于或等于该获取请求所需获取的活动信息的目标个数时,在步骤S207中,接收该获取请求的服务器从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给终端;
在步骤S207中的执行“从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给终端”的步骤的执行主体,与步骤S206中的执行“判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数”的步骤的执行主体相同。
其中,从该获取的数据库表中获取目标个数个活动信息,并将目标个数个活动信息发送给终端。如果此时该获取的数据库表中剩余0个活动信息,即此时该数据库表中为空;则将获取的该数据库表的数据库表标识、该数据库表所属的数据库的数据库标识、该数据库表所属的数据库所属的服务器的服务器标识组成一条记录,并存储在第二对应关系中;以及从第一对应关系中删除包括该获取的数据库表的数据库表标识的记录。
例如,当1个活动信息为1个红包时,如果该获取请求所需获取的红包个数为5个,接收该获取请求的服务器中存储的红包的个数为10个时,此时,接收该获取请求的服务器中存储的红包的个数10大于该获取请求所需获取的红包的个数5,则确定接收该获取请求的服务器中存储的红包的个数可以满足该获取请求所需获取的红包的目标个数,可以从接收该获取请求的服务器存储的10个红包中选择5个红包,并发送给终端。此时,接收该获取请求的服务器此时存储的红包的个数只剩下5个。
当小于该获取请求所需获取的活动信息的目标个数时,在步骤S208中,接收该获取请求的服务器根据终端的位置信息,在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将该获取请求发送给选择出的服务器;
以使选择出的服务器根据该获取请求执行步骤S206中的“判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数”的步骤。
在步骤S208中的执行“在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将该获取请求发送给选择出的服务器”的步骤的执行主体,与步骤S206中的执行“判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数”的步骤的执行主体相同。
其中,服务器组中包括多个服务器,这些服务器分别位于不同位置,且均存储有目标活动账户的活动信息。
在本发明实施例中,当小于该获取请求所需获取的活动信息的目标个数时,确定接收该获取请求的服务器中存储的红包的个数无法满足该获取请求所需获取的红包的目标个数的需求,以及,为了最大程度降低由于通信链路的长度而带来的通信时延,因此需要在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器,然后发送该获取请求给选择的服务器,以使选择的服务器接收该获取请求,然后判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数,当大于或等于该获取请求所需获取的活动信息的目标个数时,选择的服务器执行“从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给终端”的步骤,当小于该获取请求所需获取的活动信息的目标个数时,选择的服务器执行“在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将该获取请求发送给选择出的服务器”的步骤。
其中,根据终端的位置信息,在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器,可以通过如下流程实现,包括:
21)、获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
其中,第一对应关系中所有记录中的活动标识包括目标活动账户的目标活动标识和其他活动账户的活动标识。
22)、从第一对应关系中获取包括所有未接收过该获取请求的服务器的服务器标识的记录;
23)、在第一对应关系中获取包括目标活动标识的记录;
对于第一对应关系中的任一条记录;判断该记录中包括的活动标识是否是目标活动标识,如果该记录中包括的活动标识是目标活动标识,则获取该记录,对于其他每条记录,均执行上述操作,以实现在第一对应关系中获取所有包括目标活动标识的记录。
24)、分别在每个包括目标活动标识的记录中获取服务器的位置信息;
对于获取的任一条包括目标活动标识的记录,获取该记录中的服务器的位置信息;对于获取的其他每条包括目标活动标识的记录,均执行上述操作,以实现在每个包括目标活动标识的记录中分别获取服务器的位置信息。
25)、在获取的服务器的位置信息中选择一个与终端的位置信息之间距离最短的服务器的位置信息;
其中,如果在步骤24)中只获取了一个服务器的位置信息,则将该获取的一个服务 器的位置信息作为与终端的位置信息之间距离最短的服务器的位置信息。
其中,如果在步骤24)中获取了多个服务器的位置信息,对于获取的任一服务器的位置信息,计算该服务器的位置信息与终端的位置信息之间的距离;对于获取的其他每一服务器的位置信息,均执行上述操作,这样,就可以得到获取的每个服务器的位置信息分别与终端的位置信息之间的距离;根据计算出的距离就可以选择出一个与终端的位置信息之间距离最短的服务器的位置信息。
26)、在第一对应关系中确定出包括与终端的位置信息之间距离最短的、服务器的位置信息的记录;
具体地,在第一对应关系中,获取第1条记录,判断该记录中是否包括在步骤25)中选择出的服务器的位置信息,当包括在步骤25)中选择出的服务器的位置信息时,将该第1条记录作为包括与终端的位置信息之间距离最短的、服务器的位置信息的记录;当不包括与终端的位置信息之间距离最短的、服务器的位置信息的记录,确定该记录不是包括与终端的位置信息之间距离最短的、服务器的位置信息的记录,获取第2条记录,继续执行上述操作,直至获取到的记录包括在步骤25)中选择出的服务器的位置信息时为止,并将获取到的记录作为包括与终端的位置信息之间距离最短的、服务器的位置信息的记录。
27)、将包括与终端的位置信息之间距离最短的、服务器的位置信息的记录中的、服务器标识对应的服务器作为距离终端最近的一个服务器。
例如,当1个活动信息为1个红包时,如果该获取请求所需获取的活动信息的个数为5个时,即所需获取的红包个数为5个,假设最新获取的服务器中存储的红包的个数仅仅为3个时,此时,最新获取的服务器中存储的红包的个数3小于该获取请求所需获取的红包的个数5,因此,确定最新获取的服务器中存储的红包的个数无法满足该获取请求所需获取的红包的目标个数的需求,这样,只能从其他服务器中获取5个红包返回给终端。
在步骤S209中,选择出的服务器接收该获取请求,执行步骤S206中的判断本地存储的目标活动账户的活动信息的个数是否大于或等于该获取请求所需获取的活动信息的目标个数的步骤。
当选择出的服务器接收到该获取请求时,该选择出的服务器即刻成为接收该获取请求的服务器。
进而执行步骤S207中的“从本地获取目标个数个活动信息;并将获取的目标个数个 活动信息发送给终端”的步骤,或执行步骤S208中的“在服务器组中的未接收过该获取请求的服务器中选择一个距离终端最近的服务器;将该获取请求发送给选择出的服务器”的步骤。
在现有技术中,目标活动账户的多个活动信息仅仅存储在一个服务器中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,服务器单位时间段内会接收到大量的获取请求,该服务器单位时间段内接收到的获取请求的数量很轻易就大于该服务器单位时间段内所能处理的获取请求的数量,这样服务器在单位时间段内只能处理接收的获取请求中的一部分获取请求,其他获取请求只能在之后再处理,这就降低了该服务器对其他获取请求的响应速度,响应效率较低。
然而,在本发明图2所示的实施例中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,由于事先已经将目标活动账户的多个活动信息分别存储在位于不同位置的多个服务器中,因此多个服务器可以将海量用户发送的获取请求进行分摊;这样,可以降低每个服务器单位时间段内接收的获取请求的数量,进而使得每个服务器单位时间段内接收到的获取请求的数量可以小于该服务器单位时间段内所能处理的获取请求的数量,如此每个服务器在单位时间段内就可以分别将各自接收的所有的处理请求均处理完毕,如此整体上提高了对海量用户发送的获取请求的响应速度,提高了响应效率。
例如,在现有技术中,服务器每秒能处理200个获取请求,当分布于各个位置的1万个用户均需要获取目标活动账户的活动信息时,每个用户分别发送1个获取请求给服务器,服务器单位时间段内接收到了这1万个获取请求,需要50秒才能完全处理完这些处理请求,整体上的响应时间较长,进而响应效率较低。
然而,在本发明图2所示的实施例中,位于不同位置的50个服务器中均存储有目标活动账户的活动信息,且每个服务器每秒能处理200个获取请求,当分布于各个位置的1万个用户均需要获取目标活动账户的活动信息时,这50个服务器会将这1万个用户一共发送的1万个获取请求进行分摊,例如,每个服务器接收200个获取请求,每个服务器只需1秒就可以处理完各自接收的处理请求,整体上响应时间较短,进而响应效率较高。
图4是根据一示例性实施例示出的一种信息处理装置的框图。参照图4,该装置包括:
第一判断模块11,用于判断是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;所述获取请求携带所述终端的位置信息、所述目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
第二判断模块12,用于当接收到所述获取请求时,判断本地存储的所述目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数;
第一获取模块13,用于当大于或等于所述获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息;
第一发送模块14,用于将获取的目标个数个活动信息发送给所述终端;
选择模块15,用于当小于所述获取请求所需获取的活动信息的目标个数时,根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器;
第二发送模块16,用于将所述获取请求发送给选择出的服务器,以使选择出的服务器根据所述获取请求执行所述判断本地存储的所述目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数的步骤。
在现有技术中,目标活动账户的多个活动信息仅仅存储在一个服务器中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,服务器单位时间段内会接收到大量的获取请求,该服务器单位时间段内接收到的获取请求的数量很轻易就大于该服务器单位时间段内所能处理的获取请求的数量,这样服务器在单位时间段内只能处理接收的获取请求中的一部分获取请求,其他获取请求只能在之后再处理,这就降低了该服务器对其他获取请求的响应速度,响应效率较低。
然而,在本发明图4所示的实施例中,当海量的用户同时向该服务器发送用于获取目标活动账户的活动信息的获取请求时,由于事先已经将目标活动账户的多个活动信息分别存储在位于不同位置的多个服务器中,因此多个服务器可以将海量用户发送的获取请求进行分摊;这样,可以降低每个服务器单位时间段内接收的获取请求的数量,进而使得每个服务器单位时间段内接收到的获取请求的数量可以小于该服务器单位时间段内所能处理的获取请求的数量,如此每个服务器在单位时间段内就可以分别将各自接收的所有的处理请求均处理完毕,如此整体上提高了对海量用户发送的获取请求的响应速度,提高了响应效率。
其中,所述选择模块15包括:
第一获取单元,用于获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
第二获取单元,用于从第一对应关系中获取包括所有未接收过所述获取请求的服务器的服务器标识的记录;
第三获取单元,用于在包括所有未接收过所述获取请求的服务器的服务器标识的记录中获取包括所述目标活动标识的记录;
第四获取单元,用于分别在每个包括所述目标活动标识的记录中获取服务器的位置信息;
选择单元,用于在获取的服务器的位置信息中选择一个与所述终端的位置信息之间距离最短的服务器的位置信息;
第一确定单元,用于在所述第一对应关系中确定出包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录;
第二确定单元,用于将包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录中的服务器标识对应的服务器作为距离所述终端最近的一个服务器。
进一步地,所述装置还包括:
创建模块,用于创建目标活动账户;所述目标活动账户包括多个活动信息及所述目标活动账户的目标活动标识;
第二获取模块,用于获取用于存储所述多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
分配模块,用于根据所述目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务器分配活动信息;
第一存储模块,用于对于每个目标服务器,在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息;
第二存储模块,用于将所述目标服务器的目标服务器标识、所述目标数据库的目标数据库标识、所述目标数据库表的目标数据库表标识、所述目标活动账户的目标活动标识、所述目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
其中,所述第二获取模块包括:
第五获取单元,用于获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
第六获取单元,用于获取所述第二应关系中包括的所有的服务器标识;
去除单元,用于在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
第三确定单元,用于将保留的服务器标识对应的服务器均作为目标服务器。
其中,所述第一存储模块包括:
第七获取单元,从所述第二对应关系中获取一个包括所述目标服务器的目标记录;
第四确定单元,用于将所述目标记录中的数据库标识作为目标数据库标识,以及将所述目标记录中的数据库表标识作为目标数据库表标识;
存储单元,用于将为所述目标服务器分配的活动信息存储在所述目标服务器中的目标数据库中的目标数据库表中;所述目标数据库为所述目标数据库标识对应的数据库;所述目标数据库表为所述目标数据库表标识对应的数据库表。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本发明未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (10)

  1. 一种信息处理方法,应用于服务器,其特征在于,所述服务器为服务器组中的一个服务器,所述服务器组中的每个服务器分别位于不同的位置,且分别存储有目标活动账户的活动信息;所述方法包括:
    判断是否接收到终端发送的、用于获取所述目标活动账户的活动信息的获取请求;所述获取请求携带所述终端的位置信息、所述目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
    当接收到所述获取请求时,判断本地存储的所述目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数;
    当大于或等于所述获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息;并将获取的目标个数个活动信息发送给所述终端;
    当小于所述获取请求所需获取的活动信息的目标个数时,根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器;将所述获取请求发送给选择出的服务器,以使选择出的服务器根据所述获取请求执行所述判断本地存储的所述目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数的步骤。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器,包括:
    获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
    从第一对应关系中获取包括所有未接收过所述获取请求的服务器的服务器标识的记录;
    在包括所有未接收过所述获取请求的服务器的服务器标识的记录中获取包括所述目标活动标识的记录;
    分别在每个包括所述目标活动标识的记录中获取服务器的位置信息;
    在获取的服务器的位置信息中选择一个与所述终端的位置信息之间距离最短的服务器的位置信息;
    在所述第一对应关系中确定出包括与所述终端的位置信息之间距离最短的服务器 的位置信息的记录;
    将包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录中的服务器标识对应的服务器作为距离所述终端最近的一个服务器。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    创建目标活动账户;所述目标活动账户包括多个活动信息及所述目标活动账户的目标活动标识;
    获取用于存储所述多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
    根据所述目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务器分配活动信息;
    对于每个目标服务器,在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息;将所述目标服务器的目标服务器标识、所述目标数据库的目标数据库标识、所述目标数据库表的目标数据库表标识、所述目标活动账户的目标活动标识、所述目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
  4. 根据权利要求3所述的方法,其特征在于,所述获取用于存储所述多个活动信息的多个目标服务器,包括:
    获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
    获取所述第二应关系中包括的所有的服务器标识;
    在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
    将保留的服务器标识对应的服务器均作为目标服务器。
  5. 根据权利要求4所述的方法,其特征在于,所述在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息,包括:
    从所述第二对应关系中获取一个包括所述目标服务器的目标记录;
    将所述目标记录中的数据库标识作为目标数据库标识,以及将所述目标记录中的数 据库表标识作为目标数据库表标识;
    将为所述目标服务器分配的活动信息存储在所述目标服务器中的目标数据库中的目标数据库表中;所述目标数据库为所述目标数据库标识对应的数据库;所述目标数据库表为所述目标数据库表标识对应的数据库表。
  6. 一种信息处理装置,其特征在于,所述装置包括:
    第一判断模块,用于判断是否接收到终端发送的、用于获取目标活动账户的活动信息的获取请求;所述获取请求携带所述终端的位置信息、所述目标活动账户的目标活动标识以及所需获取的活动信息的目标个数;
    第二判断模块,用于当接收到所述获取请求时,判断本地存储的所述目标活动标识对应的目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数;
    第一获取模块,用于当大于或等于所述获取请求所需获取的活动信息的目标个数时,从本地获取目标个数个活动信息;
    第一发送模块,用于将获取的目标个数个活动信息发送给所述终端;
    选择模块,用于当小于所述获取请求所需获取的活动信息的目标个数时,根据所述终端的位置信息,在所述服务器组中的未接收过所述获取请求的服务器中选择一个距离所述终端最近的服务器;
    第二发送模块,用于将所述获取请求发送给选择出的服务器,以使选择出的服务器根据所述获取请求执行所述判断本地存储的所述目标活动账户的活动信息的个数是否大于或等于所述获取请求所需获取的活动信息的目标个数的步骤。
  7. 根据权利要求6所述的装置,其特征在于,所述选择模块包括:
    第一获取单元,用于获取本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系;
    第二获取单元,用于从第一对应关系中获取包括所有未接收过所述获取请求的服务器的服务器标识的记录;
    第三获取单元,用于在包括所有未接收过所述获取请求的服务器的服务器标识的记录中获取包括所述目标活动标识的记录;
    第四获取单元,用于分别在每个包括所述目标活动标识的记录中获取服务器的位置 信息;
    选择单元,用于在获取的服务器的位置信息中选择一个与所述终端的位置信息之间距离最短的服务器的位置信息;
    第一确定单元,用于在所述第一对应关系中确定出包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录;
    第二确定单元,用于将包括与所述终端的位置信息之间距离最短的服务器的位置信息的记录中的服务器标识对应的服务器作为距离所述终端最近的一个服务器。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    创建模块,用于创建目标活动账户;所述目标活动账户包括多个活动信息及所述目标活动账户的目标活动标识;
    第二获取模块,用于获取用于存储所述多个活动信息的多个目标服务器,以及获取每个目标服务器的位置信息;
    分配模块,用于根据所述目标活动账户的活动信息的个数以及目标服务器的个数,为每个目标服务器分配活动信息;
    第一存储模块,用于对于每个目标服务器,在所述目标服务器的目标数据库的目标数据库表中存储为所述目标服务器分配的活动信息;
    第二存储模块,用于将所述目标服务器的目标服务器标识、所述目标数据库的目标数据库标识、所述目标数据库表的目标数据库表标识、所述目标活动账户的目标活动标识、所述目标服务器的位置信息存储在本地存储的服务器标识、数据库标识、数据库表标识、活动标识与服务器的位置信息五者之间的第一对应关系中。
  9. 根据权利要求8所述的装置,其特征在于,所述第二获取模块包括:
    第五获取单元,用于获取本地存储的服务器标识、数据库标识与未存储信息的数据库表标识三者之间的第二对应关系;
    第六获取单元,用于获取所述第二应关系中包括的所有的服务器标识;
    去除单元,用于在获取的所有的服务器标识中,对相同的服务器标识进行去除操作,只保留相同的服务器标识中的一个服务器标识;
    第三确定单元,用于将保留的服务器标识对应的服务器均作为目标服务器。
  10. 根据权利要求9所述的装置,其特征在于,所述第一存储模块包括:
    第七获取单元,从所述第二对应关系中获取一个包括所述目标服务器的目标记录;
    第四确定单元,用于将所述目标记录中的数据库标识作为目标数据库标识,以及将所述目标记录中的数据库表标识作为目标数据库表标识;
    存储单元,用于将为所述目标服务器分配的活动信息存储在所述目标服务器中的目标数据库中的目标数据库表中;所述目标数据库为所述目标数据库标识对应的数据库;所述目标数据库表为所述目标数据库表标识对应的数据库表。
PCT/CN2016/084225 2015-06-08 2016-06-01 一种信息处理方法及装置 WO2016197839A2 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
KR1020187000450A KR102091949B1 (ko) 2015-06-08 2016-06-01 정보 프로세싱 방법 및 장치
SG11201709643SA SG11201709643SA (en) 2015-06-08 2016-06-01 Information processing method and device
JP2017564122A JP6734303B2 (ja) 2015-06-08 2016-06-01 情報処理方法及び装置
EP16806737.9A EP3306898A4 (en) 2015-06-08 2016-06-01 Information processing method and device
US15/833,907 US10491707B2 (en) 2015-06-08 2017-12-06 Information processing using a server group

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510309180.6 2015-06-08
CN201510309180.6A CN106302608B (zh) 2015-06-08 2015-06-08 一种信息处理方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/833,907 Continuation US10491707B2 (en) 2015-06-08 2017-12-06 Information processing using a server group

Publications (2)

Publication Number Publication Date
WO2016197839A2 true WO2016197839A2 (zh) 2016-12-15
WO2016197839A3 WO2016197839A3 (zh) 2017-02-09

Family

ID=57502893

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084225 WO2016197839A2 (zh) 2015-06-08 2016-06-01 一种信息处理方法及装置

Country Status (7)

Country Link
US (1) US10491707B2 (zh)
EP (1) EP3306898A4 (zh)
JP (1) JP6734303B2 (zh)
KR (1) KR102091949B1 (zh)
CN (1) CN106302608B (zh)
SG (1) SG11201709643SA (zh)
WO (1) WO2016197839A2 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113099247B (zh) * 2021-03-17 2023-01-20 北京达佳互联信息技术有限公司 虚拟资源处理方法、装置、服务器、存储介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678697A (zh) * 2013-12-26 2014-03-26 乐视网信息技术(北京)股份有限公司 倒排索引存储方法及其系统
CN103716251A (zh) * 2014-01-14 2014-04-09 三星电子(中国)研发中心 用于内容分发网络的负载均衡方法及设备
US20140196038A1 (en) * 2013-01-08 2014-07-10 Commvault Systems, Inc. Virtual machine management in a data storage system
CN104363300A (zh) * 2014-11-26 2015-02-18 浙江宇视科技有限公司 一种服务器集群中计算任务分布式调度装置

Family Cites Families (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6003030A (en) * 1995-06-07 1999-12-14 Intervu, Inc. System and method for optimized storage and retrieval of data on a distributed computer network
US5742598A (en) * 1995-10-19 1998-04-21 International Business Machines Corp. Network for efficiently locating resources and routing service requests received from individual node connections
US6185598B1 (en) * 1998-02-10 2001-02-06 Digital Island, Inc. Optimized network resource location
ATE491297T1 (de) * 1999-06-17 2010-12-15 Level 3 Communications Llc System und verfahren zur integrierter lastverteilung und betriebsmittelverwaltung in einer internet-umgebung
MXPA02007308A (es) * 2000-01-28 2004-11-12 Williams Comm Llc Sistema y metodo para determinar un servidor optimo en una red distribuida para dar servicio a flujos de contenido.
US7020698B2 (en) * 2000-05-31 2006-03-28 Lucent Technologies Inc. System and method for locating a closest server in response to a client domain name request
CN1367439A (zh) * 2002-02-10 2002-09-04 苏州市蜗牛电子有限公司 多客户端互动的负载均衡方法及系统
JP2007034889A (ja) * 2005-07-29 2007-02-08 Toshiba Corp 映像信号処理装置及び映像信号処理方法
US7822808B2 (en) * 2006-04-21 2010-10-26 Motenet, Inc. Collection and distribution of sense-on-demand data
US8581721B2 (en) * 2007-03-08 2013-11-12 Cfph, Llc Game access device with privileges
US20150156460A1 (en) * 2009-10-06 2015-06-04 Google Inc. System and method of filling in gaps in image data
US8266126B2 (en) * 2010-03-24 2012-09-11 Matrixx Software, Inc. System with multiple conditional commit databases
US9158610B2 (en) * 2011-08-04 2015-10-13 Microsoft Technology Licensing, Llc. Fault tolerance for tasks using stages to manage dependencies
US20130166622A1 (en) * 2011-12-27 2013-06-27 Citrix Systems, Inc Using Mobile Device Location Data with Remote Resources
CN103544153B (zh) * 2012-07-10 2016-07-27 阿里巴巴集团控股有限公司 一种基于数据库的数据更新方法和系统
US20140095925A1 (en) * 2012-10-01 2014-04-03 Jason Wilson Client for controlling automatic failover from a primary to a standby server
JP5526209B2 (ja) * 2012-10-09 2014-06-18 株式会社Ubic フォレンジックシステムおよびフォレンジック方法並びにフォレンジックプログラム
CN103796154B (zh) * 2012-10-31 2017-10-10 华为技术有限公司 一种wlan中应用信息的获取方法、设备和系统
CN104077302B (zh) * 2013-03-28 2017-07-25 中国银联股份有限公司 一种大用户量账户存储和检索及认证系统
CN103825835A (zh) * 2013-11-29 2014-05-28 中邮科通信技术股份有限公司 一种互联网高并发秒杀系统
CN103838855A (zh) * 2014-03-17 2014-06-04 广东创能科技有限公司 余票更新的方法
US10051035B2 (en) * 2014-06-03 2018-08-14 Verizon Patent And Licensing Inc. Method and apparatus for providing secure file transmission
CN105446985B (zh) * 2014-06-30 2018-12-14 北京金山安全软件有限公司 一种缓存文件夹识别方法及装置
JP6272190B2 (ja) * 2014-09-02 2018-01-31 株式会社日立製作所 計算機システム、計算機、負荷分散方法及びそのプログラム
US10191895B2 (en) * 2014-11-03 2019-01-29 Adobe Systems Incorporated Adaptive modification of content presented in electronic forms
CN104636957B (zh) * 2015-02-04 2018-07-24 上海瀚之友信息技术服务有限公司 一种处理高并发数据请求的系统和方法
GB2527672B (en) * 2015-05-22 2016-06-01 Gamesys Ltd Measuring device analysis

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140196038A1 (en) * 2013-01-08 2014-07-10 Commvault Systems, Inc. Virtual machine management in a data storage system
CN103678697A (zh) * 2013-12-26 2014-03-26 乐视网信息技术(北京)股份有限公司 倒排索引存储方法及其系统
CN103716251A (zh) * 2014-01-14 2014-04-09 三星电子(中国)研发中心 用于内容分发网络的负载均衡方法及设备
CN104363300A (zh) * 2014-11-26 2015-02-18 浙江宇视科技有限公司 一种服务器集群中计算任务分布式调度装置

Also Published As

Publication number Publication date
CN106302608B (zh) 2020-02-04
JP2018520431A (ja) 2018-07-26
KR20180016506A (ko) 2018-02-14
CN106302608A (zh) 2017-01-04
EP3306898A4 (en) 2019-01-02
SG11201709643SA (en) 2017-12-28
WO2016197839A3 (zh) 2017-02-09
US20180109647A1 (en) 2018-04-19
EP3306898A2 (en) 2018-04-11
US10491707B2 (en) 2019-11-26
KR102091949B1 (ko) 2020-03-23
JP6734303B2 (ja) 2020-08-05

Similar Documents

Publication Publication Date Title
CN110032447B (zh) 用于分配资源的方法和装置
US9332039B2 (en) Method, apparatus, and system for establishing voice communication
CN107241281B (zh) 一种数据处理方法及其装置
CN109085999B (zh) 数据处理方法及处理系统
US10235047B2 (en) Memory management method, apparatus, and system
CN101771723A (zh) 数据同步方法
WO2016029790A1 (zh) 数据传输方法及装置
CN111787367B (zh) 发放资源的方法、装置、系统、存储介质和计算机设备
CN113361913A (zh) 一种通信业务编排方法、装置、计算机设备及存储介质
CN101778131A (zh) 数据同步系统
CN106302861B (zh) 一种地址分配方法及装置
CN101789963A (zh) 数据同步系统
WO2016197839A2 (zh) 一种信息处理方法及装置
CN111930482A (zh) 基于节点集群的任务处理方法、装置、设备及存储介质
US9432476B1 (en) Proxy data storage system monitoring aggregator for a geographically-distributed environment
CN114257545B (zh) 一种报文转发方法及装置
CN111404978A (zh) 一种数据存储方法及云存储系统
WO2017185801A1 (zh) 分布式数据库系统中的表连接方法及分布式数据库系统
WO2017167129A1 (zh) 一种为用户分配数据中心的方法和设备
CN114615272A (zh) 媒体数据转发服务器调度方法和系统
CN111722783B (zh) 数据存储方法及装置
JP2019528521A (ja) 統計を集約するための方法および分散ストレージシステム
WO2019001023A1 (zh) 资源分配方法及系统
JP6511006B2 (ja) リソース割当管理装置および割当て先サーバ決定方法
CN110780817B (zh) 数据记录方法和装置、存储介质及电子装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 11201709643S

Country of ref document: SG

ENP Entry into the national phase

Ref document number: 2017564122

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20187000450

Country of ref document: KR

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16806737

Country of ref document: EP

Kind code of ref document: A2