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

A kind of information processing method and device Download PDF

Info

Publication number
CN105991571B
CN105991571B CN201510067932.2A CN201510067932A CN105991571B CN 105991571 B CN105991571 B CN 105991571B CN 201510067932 A CN201510067932 A CN 201510067932A CN 105991571 B CN105991571 B CN 105991571B
Authority
CN
China
Prior art keywords
detail record
user
detail
record
searching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510067932.2A
Other languages
Chinese (zh)
Other versions
CN105991571A (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 CN201510067932.2A priority Critical patent/CN105991571B/en
Priority to PCT/CN2016/073144 priority patent/WO2016127854A1/en
Publication of CN105991571A publication Critical patent/CN105991571A/en
Application granted granted Critical
Publication of CN105991571B publication Critical patent/CN105991571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a kind of information processing method and device, the described method includes: the corresponding hot spot account of generation activity, the hot spot account includes the detail record of default number of branches, and the detail record includes the movable mark, the mark of the detail record, the state of the detail record and subject matter parameter;In response to the access request that user sends for the activity, from the hot spot account, a corresponding current detail record is searched for each user, the state of the current detail record is the free time;Corresponding user is distributed into the current detail record, and updates the state of the current detail record to occupy.In this way, the prior art can be solved under the second grade very high scene of concurrency, the limited technical problem of the concurrent access ability of application server processes.

Description

Information processing method and device
Technical Field
The present application relates to the field of network data processing, and in particular, to an information processing method and apparatus.
Background
With the rapid development of information technology, electronic and electronic technology-based digital electronic interaction is becoming more and more popular. In the interaction process, a situation that a large number of users access the same application account concurrently may exist, so that the accessed account becomes a hot account, and if the concurrent access amount cannot be reduced, the response speed of the application to the user access may be reduced, even the situation that the user access cannot be responded occurs, and the access experience of the user is affected.
At present, the concurrent access amount of the hotspot account is reduced mostly by splitting the hotspot account. For example, taking a scenario of issuing a red packet in a marketing service as an example, a hot spot account is a red packet account with a length of 100 ten thousand yuan, the hot spot account may be split into 100 sub-accounts, and activity information configuration is performed on each sub-account to form a sub-account configuration list, which may be specifically shown in fig. 1. When a client user receives a red envelope through an application page, the application server can be triggered to distribute a designated activity for the user from 100 activities, and route the access of the user to the designated activity, so that the user receives the red envelope from a sub-account corresponding to the designated activity. For example, the application server routes user a to activity 003, user a may then pick up the red envelope from sub-account 003.
In the above scheme, if the second-level concurrency amount of the red account is tens of thousands of users, the second-level concurrency amount of each sub-account can be reduced to hundreds of users. However, on the premise of implementing the above scheme, an operator needs to make accurate estimation on service requirements, and split the red account into a reasonable number of sub-accounts.
If the number of the split sub-accounts is large, the cost of activity information configuration is increased, and the configuration complexity is increased by checking the correctness among the sub-accounts, so that the processing resources of the application server are consumed.
If the number of the split sub-accounts is small, the second-level concurrency of each sub-account is still high in the process of activity proceeding possibly, an account splitting instruction needs to be issued to the application server for splitting again in an emergency, each sub-account is further split, therefore, the current activity is inevitably influenced, in addition, in the process of splitting again, not only can activity information configuration and account splitting correctness check be involved, but also a large amount of data migration can be involved, the implementation process is complex, the difficulty is high, and the processing resources of the application server can still be consumed.
In addition, in the above scheme for splitting the hot spot account, in order to ensure the thread security of concurrent access, the application processor may process the behavior of modifying the hot spot account data by the user in a locking manner, that is, only one user is allowed to read and modify the hot spot account data at a time.
Still taking the above scenario of issuing a red packet as an example, no matter for a 100 ten thousand yuan red packet account before splitting or for a 1 ten thousand yuan sub-account after splitting, a locking problem is involved when multiple users concurrently access. For example, A, B, C three users access the sub-account 003 concurrently, and the time stamps sorted by the time stamps of the three users routed to the sub-account 003 by the application server are A, B, C in sequence, then when the user a reads the account balance of the sub-account 003, and picks up the red pack, the sub-account 003 is locked, the users B and C are prohibited from reading the account balance of the sub-account 003, and only after the user a picks up and modifies the account balance of the sub-account 003, the sub-account 003 is unlocked, and other users are permitted to read the account balance of the sub-account 003.
In practical applications, the second-level concurrency amount may be tens of thousands of users, and if the application server cannot timely process or release the concurrent accesses of the users, the application server may be dragged down as the load capacity is continuously increased.
In summary, although the solution of splitting the hot spot account can reduce the concurrent access amount of the sub-account to a certain extent, the locking problem still severely limits the ability of the application server to respond to the concurrent access.
Disclosure of Invention
The technical problem to be solved by the application is to provide an information processing method, so as to solve the technical problem that in the prior art, under a scene with a high second-level concurrency amount, the processing concurrency access capability of an application server is limited.
The application also provides an information processing device used for ensuring the realization and the application of the method in practice.
In order to solve the above problem, the present application discloses an information processing method, including the steps of:
generating a hotspot account corresponding to the activity, wherein the hotspot account comprises a preset number of detail records, and the detail records comprise the identification of the activity, the identification of the detail records, the state of the detail records and subject matter parameters;
in response to an access request sent by a user for the activity, searching a corresponding current detail record for each user from the hotspot account, wherein the current detail record is idle;
and distributing the current detail record to a corresponding user, and updating the state of the current detail record to be occupied.
Correspondingly, the application also discloses an information processing device, which comprises:
the system comprises a generating unit, a processing unit and a processing unit, wherein the generating unit is used for generating a hot spot account corresponding to an activity, the hot spot account comprises a preset number of detail records, and the detail records comprise an identifier of the activity, an identifier of the detail record, a state of the detail record and a subject matter parameter;
a searching unit, configured to search, in response to an access request sent by a user for the activity, a corresponding current detail record for each user from the hotspot account, where a state of the current detail record is idle;
and the distribution unit is used for distributing the current detail record searched by the search unit to a corresponding user and updating the state of the current detail record to be occupied.
Compared with the prior art, the method has the following advantages:
in the account configuration stage, the account splitting, the activity information configuration and the sub-account correctness check are not needed to be carried out as in the prior art, only the preset detail record without difference is needed to be generated, the generation process is simple and easy to realize, and the technical problem that in the prior art, the processing resources of the application server are greatly consumed for reducing the second-level concurrency of the hot account can be solved.
In addition, in the activity proceeding stage, the behavior of processing the parallel access request of the user is converted into the processing process of matching detailed records, the account data does not need to be modified in real time, the thread safety of concurrent access can be guaranteed, and the capability of the application server for responding the concurrent access can be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a schematic diagram of a subaccount configuration list in the prior art;
FIG. 2 is a flowchart of an embodiment 1 of the information processing method of the present application;
FIG. 3 is a schematic illustration of a detail record in the present application;
FIG. 4 is another schematic illustration of a detail record in the present application;
FIG. 5 is a flowchart of embodiment 2 of the information processing method of the present application;
fig. 6 is a block diagram of the information processing apparatus according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 2, a flowchart of embodiment 1 of the information processing method of the present application is shown, which may include the following steps:
step 101, generating a hotspot account corresponding to an activity, wherein the hotspot account comprises a preset number of detail records, and each detail record comprises an identifier of the activity, an identifier of the detail record, a state of the detail record and a subject matter parameter.
According to the scheme of the embodiment of the application, the detail record without difference of the preset strip can be generated according to the activity requirement, and the detail record can comprise the identification of the activity, the identification of the detail record, the state of the detail record and the object parameter. In particular, the identity of the activity may be an activity name and/or an activity ID; the identification of the detail record can be a detail record name and/or a detail record ID; the detail record state can be idle or occupied, wherein if the detail record is allocated to the user, the state is represented as occupied, otherwise, the state is represented as idle, and the initial state of the detail record is generally the idle state; the subject matter parameter may be the number of subject matter, which may typically be presented in different forms for different activities, for example, if the activity is a robbed red envelope, the subject matter parameter may be the amount of the red envelope, e.g., 5 dollars, 10 dollars, etc.; if the activity is robbing goods, the target object parameter can be the limited purchase quantity of the goods, and if the goods are mobile phones, the target object parameter can be 1 station, 2 stations and the like. In practical applications, the embodiment of the present application may not specifically limit the specific representation form of each item of information included in the detail record. As an example, the detail record may be embodied as a schematic diagram as shown in FIG. 3.
It should be noted that the application server may set the object parameters according to a default configuration, or the application server may set the object parameters according to a manual configuration of an operator, which is not specifically limited in this embodiment of the application, and generally the application server does not set the object parameters in real time according to information input by a user at the client. For example, the application server may set the red packet amount of all detail records to 5 yuan, or may set the red packet amount of all detail records to 10 yuan; or the red packet amount of one part of detail record can be set to be 5 yuan, and the red packet amount of the other part of detail record can be set to be 10 yuan; however, the application server does not generally respond to the client user in real time, and sets the amount of the red envelope according to the value input by the user.
In addition, it should be noted that the identifier of the activity is used to indicate which specific activity the detail record corresponds to, and when the application server routes the user to the hotspot account and allocates the detail record to the user in the subsequent processing process, the accuracy of routing of the application server can be further checked through the identifier of the activity. As an example, if the requirement on the routing accuracy is not high, or only the only activity is currently performed, the detail record may not include the identifier of the activity, and of course, in order to ensure the routing accuracy of the application server, it is optimal to use the detail record including the identifier of the activity.
The generation of the detail records with no difference in the preset pieces in the embodiment of the application means that the detail records are not distinguished from one another, and can be allocated to the user as long as the detail records are in an idle state. The preset number can be a preset specified number, for example, 1 ten thousand detail records are specified to be generated; alternatively, the preset number may be a calculated number obtained from the total distribution number, the generation factor, and the target object parameter, for example, if the total distribution number is 100 ten thousand-dollar red packets, the generation factor is 0.8, and the target object parameter is 5-dollar, then the calculation knows that 100 × 0.8/5 is 16 ten thousand detail records are to be generated. It should be noted that the generation factor may be randomly set, or may also be set according to experience of other related activities, and furthermore, the generation factor may also be set according to historical data of the past year of the activity, which is not specifically limited in the embodiment of the present application.
In summary, in the account configuration stage before the start of the activity, the embodiment of the application does not need to split the account by the application server, does not need to configure the activity information for each sub-account, does not need to check the correctness among the sub-accounts, and only needs to generate the detail record with no difference in the preset strips, so that the generation process is simple and easy to implement, and the processing resource of the application server can be saved. Therefore, the technical problem that in the prior art, a large amount of processing resources of the application server are consumed for reducing the second-level concurrency of the hot spot account is solved.
Step 102, in response to an access request sent by a user for the activity, searching a corresponding current detail record for each user from the hotspot account, wherein the state of the current detail record is idle.
Step 101 is mainly directed to the account configuration stage before the start of the activity, and once the account configuration is completed and the activity is started, the application server may directly execute step 102 to respond to the access request of the user.
For example, a client user views an activity page, and may send an access request to an application server by clicking or touch, and the application server receives the access request sent by the user, and may perform information processing according to the scheme of the embodiment of the present application. Taking a scene of double-11 red packet issuing as an example, the activity page may display a 5-yuan red packet getting button and a 10-yuan red packet getting button, and when the user a clicks the 10-yuan red packet getting button, the user a sends an access request to the application server, where the access request is used to indicate that the user a requests to get the 10-yuan red packet of the double-11 activity.
Optionally, after receiving the access request, the application server may authenticate the identity of the user a, the behavior of the user a to receive the red envelope, the amount of money for which the user a requests to receive the red envelope, and the like, and after the authentication is passed, the application server performs information processing according to the scheme of the embodiment of the present application.
Specifically, in this embodiment of the present application, an information processing process of the application server may be embodied as: determining hot spot accounts corresponding to activities in which users participate, and searching a detail record in an idle state for each user from the hot spot accounts to serve as a current detail record distributed to the users.
As an example, if only one user currently sends an access request to the application server, the application server may determine a current detail record for the user from all detail records of which the hotspot account is in an idle state.
For example, the application server may randomly determine the current detail record from all detail records in the idle state, e.g., the detail records with IDs 10 to 20 are all in the idle state, and the application server may randomly determine the detail record with ID 12 as the current detail record. Or, the application server may determine, as the current detail record, the detail record with the largest ID or the smallest ID among all the detail records in the idle state, for example, the detail records with IDs of 10 to 20 are all in the idle state, and the application server may determine the detail record with the smallest ID of 10 as the current detail record. Or, the application server may determine, according to a preset matching rule, a current detail record matching the user ID from all detail records in the idle state, for example, the user ID is 123456, and the detail records with IDs of 10 to 20 are all in the idle state, and if the matching rule is that the last digit of the ID of the detail record is the same as the last digit of the ID of the user, the application server may determine the detail record with ID 16 as the current detail record. Specifically, the embodiment of the present application may not be limited to the manner in which the application server determines the current detail record, the specific implementation means of each manner, and the like.
As an example, if there are multiple users currently sending access requests to the application server concurrently, the application server may determine a current detail record for each user from all detail records of the hotspot account in the idle state in at least three ways described below. The three ways of determining the current detail record by the application server are not explained here for a while, and refer to the following description.
And 103, distributing the current detail record to a corresponding user, and updating the state of the current detail record to be occupied.
Whether single-user access or multi-user concurrent access is adopted, the application server can allocate a corresponding current detail record to each user. It is to be understood that assigning the current detail record to the corresponding user means establishing a correspondence between the current detail record and the corresponding user. For example, detail records 10, 11, 12 are sequentially assigned to user A, B, C, and if detail records 10, 11, 12 are shown in fig. 3, step 103 assigns the current detail record to the corresponding user representation, user a gets a 5-membered red envelope, user B gets a 5-membered red envelope, and user C gets a 10-membered red envelope; if the detail records 10, 11, 12 are represented in fig. 4, step 103 assigns the current detail record to the corresponding user representation, and users A, B and C respectively purchase 1 handset.
In the embodiment of the application, each detail record can only be uniquely allocated to one user, so that after the corresponding relationship between the current detail record and the corresponding user is established, the state of the current detail record can be updated, and the idle state is modified into the occupied state, thereby indicating that the detail record is allocated to the user.
In summary, the embodiment of the application converts the behavior of the user getting the red envelope or the goods for the first time into the processing process of matching the detail records, does not need to modify the account balance or the number of the remaining goods in real time, can ensure the thread safety of concurrent access, and is beneficial to improving the capability of the application server for responding the concurrent access.
It should be noted that, although the solution of the embodiment of the present application mainly aims at the marketing service, the technical problem existing in the service implementation process is substantially solved by using technical means.
As mentioned in relation to step 102, three ways for the application server to determine the current detail record are explained below.
Implementation mode one
If the identification of the detail record included in the hotspot account adopts a self-increment design, the application server can determine the current detail record in the following way: obtaining a detail record identifier distributed by a cache server for each user, wherein the detail record identifier is distributed by the cache server according to a self-increment design according to the time stamp sequence of each user sending an access request; and searching the corresponding current detail record for each user according to the identification of the detail record.
In order to avoid that multiple concurrent users preempt the same detail record and achieve lock-free processing, in the embodiment of the present application, an identifier of a detail record may be allocated to each user according to the sequence of timestamps of access requests sent by the users by using the cache server. For example, a current value of a detail record ID may be maintained in a distributed cache server, when users a and B access concurrently, if user a arrives earlier than user B, (current value +1) may be assigned to user a, and at the same time, the cache server maintains (current value +1), and when user B arrives, (current value +2) is assigned to user B, and continues to maintain (current value + 2). By analogy, when other users send access requests to the application server, the cache server can allocate a corresponding detail record ID to each user, and the specific process is not described herein. As an example, the cache server may assign a corresponding detail record ID to each user through an incr operation of redis: redis- > incr ('prerecordidnum _ activity 001'). It should be noted that, in the above example, the argument value is represented as 1, and in a specific application, the argument value may be set as needed, which may not be specifically limited in the embodiment of the present application.
For example, the cache server allocates the detail record ID to the user a to be 10, and allocates the detail record ID to the user B to be 11, and the application server can accordingly establish the corresponding relationship between the user a and the detail record with the ID of 10, and establish the corresponding relationship between the user B and the detail record with the ID of 11, as can be known from the schematic diagram shown in fig. 3, the user a can receive the 5-dimensional red packet, and the user B can receive the 5-dimensional red packet.
Implementation mode two
The application server may determine the current detail record in the following manner: and sequentially searching a corresponding current detail record for each user from all detail records of the hot spot account in the idle state according to the time stamp sequence of the access request sent by each user.
In order to avoid that multiple concurrent users occupy the same detail record and achieve lock-free processing, in the embodiment of the present application, a corresponding current detail record may be sequentially allocated to each user according to the sequence of the timestamps of the access requests sent by the users. For example, the detail records with the IDs of 10 to 20 are all in an idle state, the users a and B access concurrently, and the user a arrives earlier than the user B, the application server may randomly determine one current detail record for each of the users a and B in sequence from all the detail records in the idle state, for example, the ID of the current detail record determined for the user a is 10, and the ID of the current detail record determined for the user B is 12. Or, the application server may determine a current detail record for each of the users a and B in turn according to the sorting of the size of the detail record IDs, for example, the detail records are sorted in ascending order according to the IDs, the ID of the current detail record determined for the user a is 10, and the ID of the current detail record determined for the user B is 11; alternatively, the detail records are sorted in descending ID order, with the ID of the current detail record determined for user A being 20 and the ID of the current detail record determined for user B being 19.
Optionally, the second implementation manner may further cooperate with the first implementation manner to determine a corresponding current detail record for the user, which may be embodied as: the application server may determine the current detail record for the user by using the cache server in the first implementation manner, and determine the current detail record for the user in the second implementation manner when the cache server fails. For example, the application server may determine whether the cache server fails by monitoring the heartbeat of the cache server.
Implementation mode three
The application server may determine the current detail record in the following manner: obtaining the specified number of detail records from all detail records of the hotspot account in the idle state; and determining a corresponding current detail record for each user from the specified number of detail records by using the identity of each user.
In order to avoid that multiple concurrent users occupy the same detail record and achieve lock-free processing, in the embodiment of the application, a specified number of detail records can be captured from all detail records in an idle state, and then a corresponding current detail record is determined for each user from the specified number of detail records according to a certain matching rule by combining user IDs. For example, the specified number is 10, all detail records with IDs 001 to 100 are in an idle state, the IDs of the detail records captured by the application server are 001 to 010, if the ID of the user a is 123456, the ID of the user B is 654321, and the matching rule is: and determining the position of the current detail record corresponding to the user in the captured detail record by taking the designated bit of the user ID as a basis. For example, if the specified position is the penultimate position of the user ID, the position of the current detail record corresponding to the user a in the captured detail record is 5, that is, the detail record with the ID of 005; the position of the current detail record corresponding to the user B in the grasped detail record is 2, that is, the detail record with the ID of 002.
It should be noted that, in the embodiment of the present application, multiple matching rules may be sequentially set, and if a detail record cannot be determined for a user through a current matching rule, a next matching rule may be sequentially used to perform detail record matching until a corresponding current detail record is determined for the user. Alternatively, if multiple detail records are determined for the user by the current matching rule, the current detail record may be randomly determined from the determined multiple detail records, or the corresponding current detail record may be determined for the user by combining other matching rules. This may not be specifically limited in the embodiment of the present application, as long as one current detail record is determined for each user.
For example, the matching rule in the embodiment of the present application may also be: the user ID and the specification record ID are matched to make the two identical or have a preset corresponding relationship, which is not specifically limited in the present application.
Referring to fig. 5, a flowchart of embodiment 2 of the information processing method of the present application is shown, which may include the following steps:
step 201, generating a hotspot account corresponding to the activity, where the hotspot account includes a preset number of detail records, and the detail records include an identifier of the activity, an identifier of the detail record, a state of the detail record, and a subject matter parameter.
The implementation process of step 201 can refer to step 101 shown in fig. 2 above, and is not described here again.
Step 202, responding to an access request sent by the user for the activity, judging whether the number of detail records of the hotspot account in the idle state is lower than a preset value, and if not, executing step 203.
The embodiment of the application mainly aims at scenes with high second-level concurrency, in order to avoid the phenomenon of insufficient distribution of detail records, namely, the number of detail records in an idle state is smaller than the number of concurrently-accessed users, before distributing corresponding current detail records to each user, the application server can firstly judge whether the number of detail records in the idle state at present is lower than a preset value, and if the number of detail records in the idle state is not lower than the preset value, the step of determining the current detail records for the users can be continuously executed.
For example, the preset value may be a preset specified value, for example, the specified value is 100, that is, when the number of detail records of the hotspot account in the idle state is greater than 100, the step of determining the current detail record for the user may be continuously performed. Alternatively, the preset value may be a preset ratio, for example, the ratio is 20%, that is, when the number of detail records of the hotspot account in the idle state is greater than 20% of the preset number, the step of determining the current detail record for the user may be continuously performed. Alternatively, the preset value may be the number of users concurrently accessing, for example, the number of users concurrently accessing is 100, that is, when the number of detail records of the hotspot account in the idle state is greater than 100, the step of determining the current detail record for the user may be continuously performed.
Step 203, searching a corresponding current detail record for each user from the hotspot account, wherein the state of the current detail record is idle.
And 204, distributing the current detail record to a corresponding user, and updating the state of the current detail record to be occupied.
The implementation process of steps 203 and 204 can refer to steps 102 and 103 shown in fig. 2, and are not described herein again.
Optionally, the hotspot account further includes a pre-allocation number and/or an unallocated number, and when it is determined in step 202 that the number of detail records of the hotspot account in the idle state is lower than the preset value, the application server may further perform the following steps: and judging whether the unallocated number is greater than zero, if so, generating a new detail record by using the unallocated number, and searching for a corresponding current detail record for each user.
In the embodiment of the application, the pre-distribution number refers to the sum of target parameters of detailed records of a preset number, and the unallocated number refers to the difference between the total distribution number and the pre-distribution number. Taking the above-mentioned rob-of-red-packet activity as an example, if the total distribution number is 100 ten thousand yuan red packet, the generation factor is 0.8, and the money amount of the red packet is 5 yuan, the pre-distribution number corresponding to 16 ten thousand detail records is 16 × 5-80 ten thousand yuan, and the unallocated number is 100-80-20 ten thousand yuan.
If the unallocated number is greater than zero, it indicates that there is a surplus in the red packet or the commodity, and a new detail record can be continuously generated by combining the unallocated number for distribution by the application server. It should be noted that, the application server may determine the current detail record for the user from the remaining detail records (i.e., the detail records in the idle state in the preset number of detail records), and determine the current detail record for the user from the new detail records when the current detail record is insufficient. Alternatively, the application server may determine the current detail record for the user from the new detail record and determine the current detail record for the user from the remaining detail records when insufficient. Alternatively, the application server may not distinguish between the remaining detail records and the new detail records, and directly determine the current detail record for the user therefrom.
Optionally, as an example, the application server may also determine whether the pre-allocation number is smaller than the total allocation number, if so, generate a new detail record by using the unallocated number, and then perform the step of searching for a corresponding current detail record for each user. The specific process may refer to the scheme described above with respect to the unallocated number, and is not described herein again.
Alternatively, if the unallocated number is determined to be equal to zero or the pre-allocated number is determined to be equal to the total allocated number, in order to increase the speed of processing the user request, the application server may further calculate a difference value between the number of detail records in the idle state and the number of concurrently accessed users, sort the detail records according to the timestamp of the concurrently accessed users sending the access requests, and directly feed back the activity end page to the users which are consistent with the difference value and are ranked later (i.e., the users which are not allocated to the detail records). For example, there are remaining 3 detail records in an idle state in the red envelope account, 5 users currently send access requests to the application server concurrently, and the 5 users are sequentially 1, 2, 3, 4, and 5 according to the time stamp sorting, and accordingly, the application server may allocate one current detail record to each of the users 1, 2, and 3, that is, each of the users 1, 2, and 3 takes one red envelope, and simultaneously, the application server may return a red envelope robbing activity end page to the users 4 and 5. In this way, the time for the application server to respond to the users 4 and 5 can be shortened, and the user experience of the users 4 and 5 can be improved.
In summary, when the allocation is insufficient, a new detail record can be generated according to the actual situation, and data migration is not involved in the process, and the corresponding relation between the ongoing activity, the existing detail record, the established detail record and the user is not affected.
Optionally, the embodiment of the present application may further include a settlement step after the activity is ended. For example, for a red envelope robbing activity, the settlement step refers to calculating the balance of the red envelope; for the goods robbing activity, the settlement step refers to calculating the number of the remaining goods. Specifically, the embodiment of the present application provides the following two settlement implementation manners:
in a first implementation manner, the application server releases all detail records in the hotspot account in the idle state, and updates the detail records as follows: the pre-distribution number is zero, and the unallocated number is the total distribution number, and the sum of the target parameters of all detail records in the occupied state. Wherein the unallocated number is the calculated value.
In the second implementation manner, the application server calculates the sum of the target object parameters of the unallocated number + the number of all detail records in the idle state.
In correspondence with the method provided by embodiment 1 of the information processing method of the present application, referring to fig. 6, the present application also provides embodiment 1 of an information processing apparatus, and in this embodiment, the apparatus may include:
a generating unit 301, configured to generate a hotspot account corresponding to an activity, where the hotspot account includes a preset number of detail records, and each detail record includes an identifier of the activity, an identifier of the detail record, a state of the detail record, and a subject parameter;
a searching unit 302, configured to search, in response to an access request sent by a user for the activity, a corresponding current detail record from the hotspot account for each user, where a state of the current detail record is idle;
the allocating unit 303 is configured to allocate the current detail record searched by the searching unit to a corresponding user, and update the state of the current detail record to occupied.
The searching unit may determine a corresponding current detail record for each user according to the scheme described in the method embodiment, which is not described herein again.
For multi-user concurrent access, the lookup unit in the embodiment of the present application can be embodied in the following three implementation manners:
in a first implementation manner, if multiple users send access requests concurrently and the identifier of the detail record adopts a self-increment design, the search unit includes:
the first obtaining unit is used for obtaining a detail record identifier distributed by a cache server for each user, wherein the detail record identifier is distributed by the cache server according to a self-increment design according to the time stamp sequence of an access request sent by each user;
and the first searching subunit is used for searching the corresponding current detail record for each user according to the identifier of the detail record.
In a second implementation manner, if multiple users concurrently send access requests, the search unit includes:
and the second searching subunit is used for sequentially searching a corresponding current detail record for each user from all the detail records of the hot spot account in the idle state according to the time stamp sequence of the access request sent by each user.
In a third implementation manner, if multiple users concurrently send access requests, the search unit includes:
a second obtaining unit, configured to obtain a specified number of detail records from all the detail records of the hotspot account in an idle state;
and the third searching subunit is used for determining a corresponding current detail record for each user from the specified number of detail records by using the identity of each user.
Optionally, on the basis of the above scheme, the apparatus further includes:
the first judging unit is used for judging whether the number of the detail records of the hot spot account in the idle state is lower than a preset value before the searching unit searches the current detail record, and if not, the searching unit is informed to search the current detail record.
Optionally, if the number of detail records of which the hotspot account is in an idle state is lower than the preset value, and the hotspot account further includes a pre-allocation number and/or an unallocated number, where the pre-allocation number is a sum of object parameters of the detail records of the preset number, and the unallocated number is a difference between a total allocation number and the pre-allocation number, the apparatus further includes:
a second judging unit, configured to, when the number of detail records of the hotspot account in an idle state is lower than the preset value, judge whether the unallocated number is greater than zero, if yes, generate a new detail record by using the unallocated number, and notify the searching unit to search for the current detail record; or,
and the third judging unit is used for judging whether the pre-distribution number is smaller than the total distribution number when the number of the detail records of the hot spot account in the idle state is smaller than the preset value, if so, generating a new detail record by using the unallocated number, and informing the searching unit to search the current detail record.
The application also provides the intelligent equipment, and the processor of the intelligent equipment is integrated with the information processing device.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the system-class embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The information pushing method and device provided by the present application are introduced in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (12)

1. An information processing method, characterized by comprising the steps of:
generating a hotspot account corresponding to the activity, wherein the hotspot account comprises a preset number of detail records, and the detail records comprise the identification of the activity, the identification of the detail records, the state of the detail records and subject matter parameters;
in response to an access request sent by a user for the activity, searching a corresponding current detail record for each user from the hotspot account, wherein the current detail record is idle;
and distributing the current detail record to a corresponding user, and updating the state of the current detail record to be occupied.
2. The method according to claim 1, wherein if a plurality of users send access requests concurrently and the identification of the detail record adopts a self-increment design, the searching for a corresponding current detail record for each user specifically comprises:
obtaining an identifier of a detail record distributed by a cache server for each user, wherein the identifier of the detail record is distributed by the cache server according to a self-increment design according to the time stamp sequence of an access request sent by each user;
and searching the corresponding current detail record for each user according to the identification of the detail record.
3. The method according to claim 1, wherein if a plurality of users send access requests concurrently, said searching for a corresponding current detail record for each user specifically comprises:
and sequentially searching a corresponding current detail record for each user from all detail records of the hot spot account in the idle state according to the time stamp sequence of the access request sent by each user.
4. The method according to claim 1, wherein if a plurality of users send access requests concurrently, said searching for a corresponding current detail record for each user specifically comprises:
obtaining the specified number of detail records from all detail records of the hotspot account in the idle state;
and determining a corresponding current detail record for each user from the specified number of detail records by using the identity of each user.
5. The method according to any one of claims 1 to 4, wherein before searching for a corresponding current detail record for each user, further comprising:
and judging whether the number of the detail records of the hot spot account in the idle state is lower than a preset value, if not, searching a corresponding current detail record for each user.
6. The method of claim 5, wherein the hotspot account further comprises a pre-allocation number and/or an unallocated number, the pre-allocation number is a sum of target parameters of the preset number of detail records, the unallocated number is a difference between a total allocation number and the pre-allocation number, and when the number of detail records of the hotspot account in an idle state is lower than the preset value, the method further comprises:
judging whether the unallocated number is greater than zero, if so, generating a new detail record by using the unallocated number, and then searching a corresponding current detail record for each user;
or,
and judging whether the pre-distribution number is smaller than the total distribution number, if so, generating a new detail record by using the unallocated number, and then searching a corresponding current detail record for each user.
7. An information processing apparatus characterized by comprising:
the system comprises a generating unit, a processing unit and a processing unit, wherein the generating unit is used for generating a hot spot account corresponding to an activity, the hot spot account comprises a preset number of detail records, and the detail records comprise an identifier of the activity, an identifier of the detail record, a state of the detail record and a subject matter parameter;
a searching unit, configured to search, in response to an access request sent by a user for the activity, a corresponding current detail record for each user from the hotspot account, where a state of the current detail record is idle;
and the distribution unit is used for distributing the current detail record searched by the search unit to a corresponding user and updating the state of the current detail record to be occupied.
8. The apparatus of claim 7, wherein if multiple users send access requests concurrently and the detailed record is identified by a self-increment design, the searching unit comprises:
the first obtaining unit is used for obtaining the identification of the detail record distributed by the cache server for each user, and the identification of the detail record is distributed by the cache server according to the self-increment design according to the time stamp sequence of the access request sent by each user;
and the first searching subunit is used for searching the corresponding current detail record for each user according to the identifier of the detail record.
9. The apparatus of claim 7, wherein if multiple users send access requests concurrently, the lookup unit comprises:
and the second searching subunit is used for sequentially searching a corresponding current detail record for each user from all the detail records of the hot spot account in the idle state according to the time stamp sequence of the access request sent by each user.
10. The apparatus of claim 7, wherein if multiple users send access requests concurrently, the lookup unit comprises:
a second obtaining unit, configured to obtain a specified number of detail records from all the detail records of the hotspot account in an idle state;
and the third searching subunit is used for determining a corresponding current detail record for each user from the specified number of detail records by using the identity of each user.
11. The apparatus of any one of claims 7 to 10, further comprising:
the first judging unit is used for judging whether the number of the detail records of the hot spot account in the idle state is lower than a preset value before the searching unit searches the current detail record, and if not, the searching unit is informed to search the current detail record.
12. The apparatus of claim 11, wherein the hotspot account further comprises a pre-allocation number and/or an unallocated number, the pre-allocation number being a sum of subject matter parameters of the detail records of the preset number, and the unallocated number being a difference between a total allocation number and the pre-allocation number, the apparatus further comprising:
a second judging unit, configured to, when the number of detail records of the hotspot account in an idle state is lower than the preset value, judge whether the unallocated number is greater than zero, if yes, generate a new detail record by using the unallocated number, and notify the searching unit to search for the current detail record;
or,
and the third judging unit is used for judging whether the pre-distribution number is smaller than the total distribution number when the number of the detail records of the hot spot account in the idle state is smaller than the preset value, if so, generating a new detail record by using the unallocated number, and informing the searching unit to search the current detail record.
CN201510067932.2A 2015-02-09 2015-02-09 A kind of information processing method and device Active CN105991571B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510067932.2A CN105991571B (en) 2015-02-09 2015-02-09 A kind of information processing method and device
PCT/CN2016/073144 WO2016127854A1 (en) 2015-02-09 2016-02-02 Information processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510067932.2A CN105991571B (en) 2015-02-09 2015-02-09 A kind of information processing method and device

Publications (2)

Publication Number Publication Date
CN105991571A CN105991571A (en) 2016-10-05
CN105991571B true CN105991571B (en) 2019-04-09

Family

ID=56614973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510067932.2A Active CN105991571B (en) 2015-02-09 2015-02-09 A kind of information processing method and device

Country Status (2)

Country Link
CN (1) CN105991571B (en)
WO (1) WO2016127854A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255827A (en) * 2016-12-28 2018-07-06 卓望数码技术(深圳)有限公司 The processing method and system of a kind of hot spot data
CN108615145A (en) * 2018-04-09 2018-10-02 交通银行股份有限公司 A kind of method and system of account parallel access money
CN110569470B (en) * 2019-09-09 2022-03-11 北京字节跳动网络技术有限公司 User matching method and device, readable medium and electronic equipment
CN112905310A (en) * 2021-03-30 2021-06-04 中国建设银行股份有限公司 Data processing method, device, equipment and storage medium
CN117808602B (en) * 2024-03-01 2024-06-25 联动优势电子商务有限公司 Hot account billing method and related device based on sub-account expansion

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095741A (en) * 2011-10-27 2013-05-08 阿里巴巴集团控股有限公司 Handling method and system of distributing limited resources by multi-user
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN103325032A (en) * 2012-03-21 2013-09-25 阿里巴巴集团控股有限公司 Data processing method and device
CN103347062A (en) * 2013-06-24 2013-10-09 北京汉柏科技有限公司 Virtual computing resource distribution method
WO2014103112A1 (en) * 2012-12-26 2014-07-03 カルチュア・コンビニエンス・クラブ株式会社 Provision device, program, and provision method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100444566C (en) * 2004-02-20 2008-12-17 中兴通讯股份有限公司 Multi-user concurrent insertion device and its method
CN104077381B (en) * 2012-05-02 2018-09-14 北京奇虎科技有限公司 Web access requests processing method and distribution method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095741A (en) * 2011-10-27 2013-05-08 阿里巴巴集团控股有限公司 Handling method and system of distributing limited resources by multi-user
CN103164256A (en) * 2011-12-08 2013-06-19 深圳市快播科技有限公司 Processing method and system capable of achieving one machine supporting high concurrency
CN103325032A (en) * 2012-03-21 2013-09-25 阿里巴巴集团控股有限公司 Data processing method and device
WO2014103112A1 (en) * 2012-12-26 2014-07-03 カルチュア・コンビニエンス・クラブ株式会社 Provision device, program, and provision method
CN103347062A (en) * 2013-06-24 2013-10-09 北京汉柏科技有限公司 Virtual computing resource distribution method

Also Published As

Publication number Publication date
CN105991571A (en) 2016-10-05
WO2016127854A1 (en) 2016-08-18

Similar Documents

Publication Publication Date Title
CN105991571B (en) A kind of information processing method and device
US10700947B2 (en) Life cycle management method and device for network service
CN109040259B (en) CDN node distribution method and system based on MEC
CN109949111B (en) Electronic bill identification distribution method, electronic bill generation method, device and system
JP2019517748A (en) Agent allocation method, device, server and recording medium
CN107277086B (en) Service processing system, service processing method and service updating method
CN106844397B (en) Task transmission method, device and system based on sub-base and sub-table
US10904107B2 (en) Service resource management system and method thereof
CN110457128B (en) Task allocation method, device and system
CN110289999B (en) Data processing method, system and device
CN109981795B (en) Resource request scheduling method and device
CN106209402A (en) The telescopic method of a kind of virtual network function and equipment
CN106357792A (en) Node routing method and system
CN115118784A (en) Computing resource scheduling method, device and system
US20190004844A1 (en) Cloud platform construction method and cloud platform
CN111614792B (en) Transparent transmission method, system, server, electronic device and storage medium
CN109062683A (en) The method, apparatus and computer readable storage medium of host resource distribution
CN105187483B (en) Distribute the method and device of cloud computing resources
CN110650514B (en) Path updating method, device and system
WO2017167129A1 (en) Method and device for distributing data center data to user
KR102091949B1 (en) Information processing method and apparatus
CN113691575A (en) Communication method, device and system
CN111404980B (en) Data storage method and object storage system
JP7235296B2 (en) SESSION MANAGEMENT METHOD, SESSION MANAGEMENT DEVICE, AND PROGRAM
JP2018185607A (en) Resource management system and resource management method

Legal Events

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

Effective date of registration: 20201010

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201010

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: Cayman Islands Grand Cayman capital building, a four storey No. 847 mailbox

Patentee before: Alibaba Group Holding Ltd.