Operation platform data processing method and system
Through the data processing method of the operation platform, the problem of insufficient current limit and interaction between members of the communication operator platform is solved, the hardware configuration is reduced and the system stability is achieved, and the interaction and activity effect between members is promoted.
Patent Information
- Application Number
- CN202411729993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Communication operator platforms are prone to current limiting problems when processing large amounts of access and business data, resulting in system downtime, and the existing product collection methods lack interaction between members, affecting the spread range of activities and member stickiness.
The data processing method of the operation platform is adopted to obtain client requests, judge and process tokens, allocate management threads, calculate member priority, realize current limiting and commodity allocation, and promote interaction among members.
It reduces hardware configuration requirements, ensures system stability, promotes interaction between members, realizes current limiting and reasonable allocation of resources, and improves the stability and activity effect of system operation.
Smart Images

Figure CN119201480A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a data processing method and system suitable for management purposes in a new generation of information technology, and in particular to an operation platform data processing method and system for management purposes based on current limiting considerations. Background Art
[0002] There are a large number of flash sale products on e-commerce platforms. However, since the platform aims to have as many members as possible actually purchase, the software and hardware resources it configures have superior performance, and flow limiting will affect the member experience, so such platforms usually do not need to perform flow limiting.
[0003] As for the communication operators (such as China Unicom, China Telecom, China Mobile, etc.) in the industrial chain where the applicant of this case is located, most of their consumers can choose specific prizes to redeem based on recharge points, tasks, etc. At the same time, operators occasionally distribute free traffic coupons, call coupons and other commodities. As a result, in certain periods, the access and business data processing volume of the products displayed on the platform (especially the free prizes) will be very large. If the configuration environment of the e-commerce platform is adopted, the development and maintenance costs will be very high. If conventional resource configuration is adopted, current limiting must be carried out, otherwise it is easy to cause downtime.
[0004] Patents such as CN115756797A / CN118916130A disclose methods for queuing or scheduling service requests based on priority to ensure the smooth progress of business threads or improve the overall processing efficiency and response speed of the service system, but their purpose is mostly unrelated to current limiting. At the same time, the existing methods of receiving goods are all based on individual members, and the interactivity between different members is poor, which makes it easy for the actual effects of some activities hosted by communication operators (for example: the spread of activities in consumer groups, word-of-mouth effects and member stickiness, etc.) to be less than expected. Summary of the invention
[0005] The present invention aims to disclose an operation platform data processing method and system to promote interactivity between members and ensure the stability of system operation.
[0006] To achieve the above-mentioned purpose, the present invention discloses an operation platform data processing method, comprising: Step S1, obtain the third request of the client, determine whether the third request meets the requirements, if so, go to step S2, otherwise discard it; wherein the third request that meets the requirements carries the activity identifier, the target product identifier, and the identity identifier of the current member.
[0007] Step S2, check whether the management thread corresponding to the member identity has been assigned, if so, include the member's arrival information in the management thread; if the management thread corresponding to the member identity cannot be found, guide the member to create a group and assign the management thread corresponding to the group ID; wherein the created group information includes the group ID, the number of group members greater than or equal to 2, and the identity IDs of other invited group members.
[0008] Step S3: During the duration of the activity, the management thread identifies and records the arrival time of each member, and after all members in the group have arrived, calculates the average arrival time of the members in the group.
[0009] Step S4, calculating the priority of each management thread, the calculation formula is: priority = 1 + number of members in the group × average waiting time; and average waiting time = thread scheduling time - average arrival time.
[0010] Step S5: After executing the target commodity allocation of each member in the group corresponding to the previous priority, execute the management thread corresponding to the highest priority among the management threads to be scheduled; at the same time, calculate the next thread scheduling time according to the number of members in the group of the currently executed management thread, and then return to step S4 to recalculate the priority ranking of the remaining management threads to be scheduled according to the calculated next thread scheduling time, so as to achieve flow limiting within the duration of the activity until the target commodities in stock are allocated or the activity ends.
[0011] Preferably, before step S1, it also includes: the client sends a second request to apply for a token, and then carries the token in response to the second request in the generated and sent third request; correspondingly, step S1 verifies the validity of the token in the process of determining whether the third request meets the requirements.
[0012] Preferably, before step S1, a counter is used to perform flow limiting processing on the second request for applying for a token.
[0013] Preferably, before step S1, it also includes: obtaining a first request from the client to perform corresponding configuration processing, the first request carries constraint information configured by the event organizer for the target product, the event organizer is a telecommunications operator, and the constraint information includes the number range of members in the group, the range of mobile phone numbers of participating members, and the effective time of the activity.
[0014] Preferably, the constraint information also includes a limit on the number of times the same member can repeatedly participate in the activity. Correspondingly, in the process of determining whether the third request meets the requirements, step S1 verifies whether the member meets the constraint of the limit based on the identity identifier of the current member extracted from the third request.
[0015] Preferably, step S2 includes: calling the address book interface of the communication terminal operated by the member, and filtering out mobile phone numbers that meet the communication operator category, location and number limit constraints from the address book according to the constraint information for the member to create a group, and then judging whether the number of members in the group meets the set number range; and then allocating a group identifier that is unique within the range mapped by the activity identifier after the group is successfully created.
[0016] Preferably, the method of the present invention also includes: after the first group member arrives, the corresponding management thread tracks the count of the group members and starts timing, and after a uniformly set time threshold is reached, it is determined whether all group members are present based on the actual count and the set number of group members. If not, the current group members are removed, and the mapping relationship between the management thread and the current group identifier is released to wait for the mapping of a new group identifier.
[0017] Optionally, when there are at least two identical highest priorities, the randomly selected group, the group with the earliest last-arrived member, or the group with the largest number of members is the winning group.
[0018] Furthermore, the first request also carries the activity time and specifies the storage table attributes of the activity data, and the types of the storage table include a long-term activity table that can automatically perform table partitioning according to the configuration information, and a short-term activity table that can reserve an extended extension function according to the configuration information.
[0019] To achieve the above-mentioned purpose, the present invention also discloses an operation platform data processing system, including a server for interacting with the above-mentioned client, the server is provided with a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor interacts with the client when executing the computer program to implement the above-mentioned method.
[0020] The present invention has the following beneficial effects: 1. A single target product corresponding to a specific activity can be processed based on a single-core CPU, reducing the hardware configuration requirements.
[0021] 2. Members request target products by grouping together, which promotes interactivity among members.
[0022] 3. The management threads to be scheduled are sorted based on priority, and the management threads whose members are not all present are temporarily not involved in the priority sorting. In addition, the method for calculating the priority of the management thread of the present invention is simple. Since each member in the group corresponds to the same target product, the execution time of the currently executed management thread can be accurately calculated (usually the result is the product of the number of members in the group and a proportional coefficient plus a constant, wherein the proportional coefficient and the constant can be accurately calibrated in advance by testing), and then the next scheduling time can be accurately calculated (the calculation result is the sum of the start time and the execution time of the currently executed management thread), so that the entire operation process is in order, the purpose of current limiting is achieved, and the stability of system operation is ensured.
[0023] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 It is a flowchart of the operation platform data processing method disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.
[0026] Example 1
[0027] This embodiment discloses a method for processing operation platform data. Figure 1 As shown, including: Step S1, obtaining the third request from the client, determining whether the third request meets the requirements, if yes, proceeding to step S2, otherwise discarding the request. The third request that meets the requirements carries the activity identifier, the target product identifier, and the identity identifier of the current member.
[0028] Preferably, before this step, it also includes: the client sends a second request to apply for a token, and then carries the token in response to the second request in the generated and sent third request; correspondingly, in the process of judging whether the third request meets the requirements, the validity of the token is verified in step S1. In this way, the application and verification of the token (the specific implementation details are the existing technology well known to those skilled in the art and will not be repeated here) and other processing essences also realize the early flow control of member requests.
[0029] Preferably, before the step S1, the second request for applying for the token is current limited by a counter. Preferably, the specific counter can adopt the redis or jvm current limiting mode. Wherein, if it is redis mode, when the activity is in progress, the client controls the number of requests in the corresponding period according to the total current limit / cycle current limit / time period current limit, and directly rejects the request when the number of requests is greater than or equal to the current limit number. If it is jvm mode, when the activity is in progress, the client divides the total current limit / cycle current limit / time period current limit by the number of nodes, and each node performs current limiting control on the number of requests according to the quotient; round up when the quotient is a decimal. Wherein, the client is generally loaded on the corresponding server node in the server cluster deployed by the communication operator, and one client is equivalent to one node, and the server and the client of the present invention are usually in a one-to-many relationship in terms of physical quantity.
[0030] Preferably, before step S1, it also includes: obtaining a first request from the client to perform corresponding configuration processing, wherein the first request carries the constraint information configured by the activity organizer for the target product. If the activity organizer is a communication operator, the constraint information includes the number range of the members in the group, the mobile phone number attribution range of the participating members (commonly used ranges include the national range, provincial range or municipal range, etc.), and the effective time of the activity.
[0031] Furthermore, the constraint information also includes a limit on the number of times the same member can repeatedly participate in the activity. Correspondingly, in the process of determining whether the third request meets the requirements, step S1 verifies whether the member meets the constraint of the limit based on the identity identifier of the current member extracted from the third request.
[0032] In this embodiment, the first request may also carry the activity time and specify the storage table attributes of the activity data. The types of the storage tables include long-term activity tables that can automatically perform table partitioning according to the configuration information, and short-term activity tables that can reserve extension and expansion functions according to the configuration information; so that corresponding tracking processing can be performed on the storage tables later.
[0033] Among them, long-term activities are those with a fixed frequency of member participation (such as once a day) and a long duration. For such activities, separate tables are created according to the selected period to avoid the accumulation of large amounts of data over a long period of time. The maximum period control is also performed in the parameter configuration to ensure high performance while separating tables.
[0034] Short-term activities are activities with complex parameter dimensions but a short duration. The short duration can control the overall data volume and does not limit the parameter configuration dimensions, thus better supporting the diverse configuration of activities; and flexibility is improved through extension.
[0035] Moreover, dividing the storage table into two types also facilitates data retrieval and improves the real-time performance of data reading and writing, thereby creating conditions for data search and verification based on specific logic in subsequent steps.
[0036] Step S2: Check whether a management thread corresponding to the member identity has been assigned. If so, include the member's arrival information in the management thread. If no management thread corresponding to the member identity is found, guide the member to create a group and assign a management thread corresponding to the group ID. The created group information includes the group ID, the number of group members, and the IDs of other invited group members. The number of group members is greater than or equal to 2.
[0037] Preferably, this step also includes: calling the address book interface of the communication terminal operated by the member, and filtering out the mobile phone numbers that meet the communication operator category (specifically: China Mobile, China Unicom or China Telecom, etc.), location and number of times constraint from the address book according to the constraint information for the member to create a group, and then judging whether the number of members in the group meets the set number range; and then assigning a unique group identifier within the range mapped by the activity identifier after the group is successfully created. In this scenario, the identity identifier of the member corresponding to this embodiment is the mobile phone number. In other scenarios, the identity identifier can be replaced with a unique member name, ID number, etc.
[0038] Step S3: During the duration of the activity, the management thread identifies and records the arrival time of each member, and after all members in the group have arrived, calculates the average arrival time of the members in the group.
[0039] Preferably, while executing this step, the method of this embodiment also includes: after the first member arrives, the corresponding management thread tracks the count of the members and starts timing. After the uniformly set time threshold is reached, it is determined whether all members in the group are present according to the actual count and the set number of members in the group. If not, the current members in the group are removed (the reasons include but are not limited to: some members have not applied for tokens, some invited members have slow responses or have not actually participated, etc.), and the mapping relationship between the management thread and the current group identifier is released to wait for the mapping of a new group identifier. In this way, through recycling and reuse, on the one hand, the load pressure of subsequent priority scheduling can be reduced, and on the other hand, the resource utilization of the management thread is improved.
[0040] Step S4, calculating the priority of each management thread, the calculation formula is: priority = 1 + number of members in the group × average waiting time; and average waiting time = thread scheduling time - average arrival time.
[0041] Step S5: After executing the target commodity allocation of each member in the group corresponding to the previous priority, execute the management thread corresponding to the highest priority among the management threads to be scheduled; at the same time, calculate the next thread scheduling time according to the number of members in the group of the currently executed management thread, and then return to step S4 to recalculate the priority ranking of the remaining management threads to be scheduled according to the calculated next thread scheduling time, so as to achieve flow limiting within the duration of the activity until the target commodities in stock are allocated or the activity ends.
[0042] In this step, the execution tasks corresponding to each management thread can be regarded as tasks such as order generation, notification and inventory update of target goods for each member in the group in order, and can also further include tasks such as payment and / or lottery. Its specific implementation can be flexibly changed according to needs. It is a prior art and will not be described in detail. Among them, the processing tasks of each member are consistent, so that the execution time of the currently executed management thread can be accurately calculated, and the result is usually the product of the number of members in the group and a proportional coefficient and then added to a constant. Among them, the proportional coefficient and constant can be accurately calibrated in advance by testing.
[0043] Among them, the method for determining the highest priority can be to first arrange the management threads into an array, and then compare the two adjacent management threads in order from front to back, retain the thread corresponding to the larger priority value; then compare with the next adjacent management thread, and update the retained result according to the comparison result. The highest priority can also be determined by arranging the binary tree based on the heap structure. Such technologies are all existing technologies well known to those skilled in the art and will not be elaborated. In addition, when there are at least two identical highest priorities, the group can be randomly selected, the group with the earliest arriving members, or the group with the largest number of members can be the winning group; the specific screening rules can be flexibly set for different activities and will not be elaborated.
[0044] Example 2
[0045] This embodiment discloses an operation platform data processing system, including a server for interacting with the above-mentioned client, the server is provided with a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor interacts with the client when executing the computer program to implement the method in the above-mentioned embodiment.
[0046] In summary, the method and system disclosed in the embodiments of the present invention have at least the following beneficial effects: 1. A single target product corresponding to a specific activity can be processed based on a single-core CPU, reducing the hardware configuration requirements.
[0047] 2. Members request target products by grouping together, which promotes interactivity among members.
[0048] 3. The management threads to be scheduled are sorted based on priority, and the management threads whose members are not all present are temporarily not involved in the priority sorting. In addition, the method for calculating the priority of the management thread of the present invention is simple. Since each member in the group corresponds to the same target product, the execution time of the currently executed management thread can be accurately calculated (usually the result is the product of the number of members in the group and a proportional coefficient plus a constant, wherein the proportional coefficient and the constant can be accurately calibrated in advance by testing), and then the next scheduling time can be accurately calculated (the calculation result is the sum of the start time and the execution time of the currently executed management thread), so that the entire operation process is in order, the purpose of current limiting is achieved, and the stability of system operation is ensured.
[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing operation platform data, characterized in that: include: Step S1, obtaining the third request of the client, determining whether the third request meets the requirements, if yes, proceeding to step S2, otherwise discarding the third request; wherein the third request that meets the requirements carries the activity identifier, the target product identifier, and the identity identifier of the current member; Step S2, finding out whether a management thread corresponding to the member identity has been assigned, and if so, incorporating the member's arrival information into the management thread; if no management thread corresponding to the member identity is found, guiding the member to create a group and assigning a management thread corresponding to the group ID; wherein the created group information includes the group ID, the number of group members greater than or equal to 2, and the IDs of other invited group members; Step S3: During the duration of the activity, the management thread identifies and records the arrival time of each member, and after all members in the group have arrived, calculates the average arrival time of the members in the group; Step S4, calculating the priority of each management thread, the calculation formula is: priority = 1 + number of members in the group × average waiting time; and average waiting time = thread scheduling time - average arrival time; Step S5: After executing the target commodity allocation of each member in the group corresponding to the previous priority, execute the management thread corresponding to the highest priority among the management threads to be scheduled; at the same time, calculate the next thread scheduling time according to the number of members in the group of the currently executed management thread, and then return to step S4 to recalculate the priority ranking of the remaining management threads to be scheduled according to the calculated next thread scheduling time, so as to achieve flow limiting within the duration of the activity until the target commodities in stock are allocated or the activity ends.
2. The method according to claim 1, characterized in that: Before step S1, it also includes: the client sends a second request to apply for a token, and then carries the token in response to the second request in the generated and sent third request; correspondingly, step S1 verifies the validity of the token in the process of determining whether the third request meets the requirements.
3. The method according to claim 2, characterized in that Before step S1, a counter is used to perform flow limiting processing on the second request for applying for a token.
4. The method according to any one of claims 1 to 3, characterized in that: Before step S1, the method further includes: Obtain the first request from the client to perform corresponding configuration processing, wherein the first request carries the constraint information configured by the event organizer for the target product, wherein the event organizer is a telecommunications operator, and the constraint information includes the number range of group members, the location range of the participating members' mobile phone numbers, and the effective time of the event.
5. The method according to claim 4, characterized in that The constraint information also includes a limit on the number of times the same member can repeatedly participate in the activity. Correspondingly, in the process of determining whether the third request meets the requirements, step S1 verifies whether the member meets the constraint of the limit on the number of times based on the identity identifier of the current member extracted from the third request.
6. The method according to claim 5, characterized in that The step S2 includes: The address book interface of the communication terminal operated by the member is called, and the mobile phone numbers that meet the communication operator category, location and limit number constraints are screened from the address book according to the constraint information for the member to create a group, and then it is determined whether the number of members in the group meets the set number range; then after the group is successfully created, a group identifier with internal uniqueness within the range mapped by the activity identifier is allocated.
7. The method according to claim 6, characterized in that Also includes: After the first member arrives, the corresponding management thread tracks the member count and starts timing. After the uniformly set time threshold is reached, it determines whether all members of the group are present based on the actual count and the set number of members in the group. If not, the current group member is removed and the mapping relationship between the management thread and the current group ID is released to wait for the mapping of a new group ID.
8. The method according to claim 7, characterized in that When there are at least two identical highest priorities, the winning group is the random selection group, the group with the earliest last-arrived members, or the group with the largest number of members.
9. The method according to claim 4, characterized in that The first request also carries the activity time and specifies the storage table attributes of the activity data. The types of the storage table include a long-term activity table that can automatically perform table partitioning according to configuration information, and a short-term activity table that can reserve an extension extension function according to configuration information.
10. An operation platform data processing system, comprising a server for interacting with the client in any one of the methods described in claims 1 to 9, wherein the server is provided with a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When executing the computer program, the processor interacts with the client to implement the method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Internet platform based multi-person interaction running realization method and apparatus
CN105159662A
Operation method and system for product sales promotion
CN110503470A
Apparatus and method for matching users to groups for online communities and computer simulation
CN113413612A
System and method for providing game ranking service
US20030093168A1
Techniques for group message thread link administration
US20180183619A1