CN112131267A - Counting processing method, device, server and counting processing system - Google Patents

Counting processing method, device, server and counting processing system Download PDF

Info

Publication number
CN112131267A
CN112131267A CN202010820956.1A CN202010820956A CN112131267A CN 112131267 A CN112131267 A CN 112131267A CN 202010820956 A CN202010820956 A CN 202010820956A CN 112131267 A CN112131267 A CN 112131267A
Authority
CN
China
Prior art keywords
counter table
value
count
stage
counting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010820956.1A
Other languages
Chinese (zh)
Other versions
CN112131267B (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010820956.1A priority Critical patent/CN112131267B/en
Publication of CN112131267A publication Critical patent/CN112131267A/en
Application granted granted Critical
Publication of CN112131267B publication Critical patent/CN112131267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/235Update request formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The utility model discloses a counting processing method, a device, a server and a counting processing system, which relate to the technical field of data processing, wherein the method comprises the following steps: after each resource allocation request is acquired, reading a local total counting backup value, determining whether to respond to the allocation request according to the locally maintained total counting backup value without accessing the global counter table, and reducing the data request amount of the global counter table to reduce the pressure of reading and accessing the global counter table because the total counting backup value is periodically backed up from the global counter table. Furthermore, the updated count value of the first-stage counter table is periodically synchronized to the corresponding second-stage counter in the global counter table, and the updating pressure of the count value is dispersed to the plurality of second-stage counters in the global counter table, so that the plurality of second-stage counters count in parallel, hot spot congestion easily generated when a single counter counts is avoided, and the overall performance is improved.

Description

Counting processing method, device, server and counting processing system
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a counting method, an apparatus, a server, and a counting system.
Background
In a software system, a global counter is often used to count the number of operations, the consumption of resources, and some other statistical information, for example, in the scenario of red packet distribution, coupon distribution, etc., it is often necessary to record the currently consumed budget amount, so as to perform budget control.
In the related art, a mode of counting one by one is adopted, and in a high-concurrency system, a large number of resource allocation requests can make a global counter easily become a performance bottleneck, so that the overall performance is reduced.
Disclosure of Invention
The present disclosure provides a counting processing method, an apparatus, a server and a counting processing system, so as to at least solve the problem in the related art that when the system traffic is high, the pressure of the global counter for counting and reading access is large, which results in the reduction of the system performance.
The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a count processing method, including:
acquiring a resource allocation request;
reading a total counting backup value, wherein the total counting backup value is obtained by regularly backing up the total counting value of a global counter table;
determining the sum of the difference between the set upper counting limit and the total counting backup value and the counted value of a first-stage counter table as the counting threshold value of the first-stage counter table;
counting the resource quantity requested by the resource allocation request by adopting a corresponding first-stage counter in a first-stage counter table;
aggregating the count value of each first-stage counter in the first-stage counter table to obtain the updated count value of the first-stage counter table;
sending a response message for indicating whether resource allocation is allowed or not according to the updated count value of the first-stage counter table and the count threshold;
and periodically synchronizing the updated count value of the first-stage counter table to a corresponding second-stage counter in the global counter table, wherein the global counter table comprises a plurality of second-stage counters, and aggregating the count values of the plurality of second-stage counters to obtain the total count value.
According to a second aspect of the embodiments of the present disclosure, there is provided another count processing method including:
acquiring a count value of a first-stage counter table which is periodically synchronized to a global counter table;
counting the count value by adopting the corresponding second-stage counter in the global counter table;
aggregating the count values of the plurality of second-level counters in the global counter table to obtain a total count value of the global counter table;
and backing up the total count value of the global counter table to the first-stage counter table periodically to obtain a total count backup value, wherein the total count backup value is used for responding to a resource allocation request.
According to a third aspect of the embodiments of the present disclosure, there is provided a count processing apparatus including:
an acquisition module configured to execute an acquisition resource allocation request;
the reading module is configured to read a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of the global counter table;
a first determination module configured to determine a sum of a difference between the set upper count limit and the total count backup value and a counted value of a first-level counter table as a count threshold of the first-level counter table;
a counting module configured to count the amount of resources requested by the resource allocation request by using a corresponding first-stage counter in a first-stage counter table;
the aggregation module is configured to aggregate the count values of the first-stage counters in the first-stage counter table to obtain updated count values of the first-stage counter table;
a response module configured to send a response message indicating whether resource allocation is allowed according to the count value updated by the first-stage counter table and the count threshold;
and the synchronization module is configured to synchronize the updated count value of the first-level counter table to a corresponding second-level counter in the global counter table periodically, wherein the global counter table comprises a plurality of second-level counters, and the count values of the plurality of second-level counters are aggregated to obtain the total count value.
According to a fourth aspect of the embodiments of the present disclosure, there is provided another count processing apparatus including:
the acquisition module is configured to acquire the count value of the first-stage counter table periodically synchronized to the global counter table;
a counting module configured to count the count value by using the corresponding second-stage counter in the global counter table;
an aggregation module configured to aggregate the count values of the plurality of second-level counters in the global counter table to obtain a total count value of the global counter table;
and the backup module is configured to periodically backup the total count value of the global counter table to the first-level counter table to obtain a total count backup value, wherein the total count backup value is used for responding to a resource allocation request.
According to a fifth aspect of embodiments of the present disclosure, there is provided a server including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the counting method according to the first aspect or to implement the counting method according to the second aspect.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a count processing system including: the system comprises a global server and at least one counting server;
the counting server configured to execute the counting processing method according to the first aspect;
a global server configured to perform the counting process method according to the second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform the counting processing method according to the first aspect or perform the counting processing method according to the second aspect.
According to an eighth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor of a server, enable the server to perform the counting process method according to the first aspect or to perform the counting process method according to the second aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
acquiring a resource allocation request, reading a total counting backup value, determining the difference value between a set upper counting limit and the total counting backup value and the sum of the counted values of a first-stage counter table as the counting threshold value of the first-stage counter table, counting the resource quantity requested by the resource allocation request by adopting the corresponding first-stage counter in the first-stage counter table, relieving the processing pressure of the first-stage counter table by arranging a plurality of first-stage counters, further aggregating the counting values of the first-stage counters in the first-stage counter table to obtain the updated counting value of the first-stage counter table, sending a response message for indicating whether the resource allocation is allowed according to the updated counting value and the counting threshold value of the first-stage counter table, and periodically synchronizing the updated counting value of the first-stage counter table to the corresponding second-stage counter in the global counter table, the global counter table comprises a plurality of second-level counters, and count values of the second-level counters are aggregated to obtain a total count value. According to the method and the device, after each resource allocation request is obtained, the global counter table does not need to be accessed, whether the resource allocation request is responded or not is determined according to the total counting backup value maintained locally, and the total counting backup value is backed up from the global counter table periodically, so that the data request quantity of the global counter table is reduced, and the pressure of reading and accessing the global counter table is reduced. Meanwhile, the updating pressure of the count value is dispersed to a plurality of second-stage counters in the global counter table, so that the plurality of second-stage counters count in parallel, hot spot congestion easily generated when a single counter counts is avoided, and the overall performance is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a system architecture 100 for a count processing method or count processing apparatus of the present disclosure, shown according to an example;
FIG. 2 is a flow diagram illustrating a method of count processing according to an exemplary embodiment;
FIG. 3 is a flow diagram illustrating a method of count processing according to an exemplary embodiment;
FIG. 4 is a flow diagram illustrating a method of count processing in accordance with an exemplary embodiment;
FIG. 5 is a flow diagram illustrating a method of count processing in accordance with an exemplary embodiment;
FIG. 6 is a flow diagram illustrating a method of count processing in accordance with an exemplary embodiment;
FIG. 7 is a flow diagram illustrating a method of count processing in accordance with an exemplary embodiment;
FIG. 8 is a flow diagram illustrating a method of count processing in accordance with an exemplary embodiment;
FIG. 9 is a flowchart illustrating a counting process interaction method in accordance with an exemplary embodiment;
FIG. 10 is an architecture diagram illustrating a counting processing system in accordance with an exemplary embodiment;
FIG. 11 is a block diagram illustrating a count processing device according to an exemplary embodiment;
FIG. 12 is a block diagram illustrating a count processing device according to an exemplary embodiment;
fig. 13 is a block diagram illustrating a configuration of a server 10 according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a system architecture 100 for a count processing method or count processing apparatus of the present disclosure, shown according to an example.
As shown in fig. 1, system architecture 100 may include a counting server 101, a network 102, and a global server 103. One or more counting servers 101 may be provided, and a plurality of counting servers are illustrated in fig. 1 as an example. Network 102 is used to provide a medium for communication links between counting server 101 and global server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The counting server 101 is configured to obtain a resource allocation request, and interact with the global server 103 through the network 102 to synchronize a count value updated according to the resource allocation request to the global server 103, or obtain a total count value from the global server 103, and the like.
It should be understood that the number of user terminals, networks and servers in fig. 1 is merely illustrative. There may be any number of counting servers 101, networks 102, and global servers 103, and network levels may be added or subtracted from the system shown in fig. 1, as desired for an implementation.
A count processing method, apparatus, server, and count processing system of the embodiments of the present disclosure are described below with reference to the drawings.
Fig. 2 is a flowchart illustrating a counting method according to an exemplary embodiment, and as shown in fig. 2, the counting method may be executed by the counting server 101 in the system shown in fig. 1, and includes the following steps.
Step 201, obtaining a resource allocation request.
In this embodiment, the resource allocation request includes requested resource information, and the resource information is used for performing information statistics. For example, in a scene of red packet generation in spring, the resource message in the resource allocation request carries the red packet number and the red packet amount requested by the user; in the coupon issuing scene, the resource message carries the number of the coupons requested by the user; in the operation frequency counting scene, the resource message carries the operation frequency requested by the user; in addition, the resource message may also carry other statistical messages such as the consumption times of the resource, which are not listed in this embodiment.
In an example of this embodiment, the resource allocation request may be generated according to a counting message, and specifically, the client generates the resource allocation request according to the counting message by generating the counting message in response to a preset operation of the user, so that the counting server obtains the resource allocation request. For example, the preset operation of the user includes a click operation, a slide operation, or a process of generating the count message by collecting the voice information of the user and recognizing the voice information, for example, the user logs in an application program of the client and clicks a "lead coupon", or a "lead red packet", for example, the lead red packet is a count message, and a resource allocation request is generated according to the count message "lead 10-yuan red packet", so that the count server obtains the resource allocation request and performs statistics on corresponding information.
Step 202, reading a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of the global counter table.
In this embodiment, the global server is provided with a global counter table, where the global counter table includes a plurality of second-stage counters, and the global counter table may aggregate count values of the plurality of second-stage counters to obtain a total count value. A first-stage counter table is arranged in the counting server and comprises a plurality of first-stage counters. The second-stage counter is described in detail in the following steps.
In the embodiment of the present disclosure, if the counting server accesses the global counter to read the total count value after acquiring the resource allocation request, the reading pressure of the global counter is greatly increased, and therefore, in order to reduce the frequency of reading the global counter by the counting server, a total count backup value is maintained in the counting server, and the total count backup value is obtained by periodically backing up the total count value of the global server table. As a possible implementation manner, the global server may be accessed according to a set access cycle to read the total count value in the global counter table, and the total count backup value is updated by using the total count value.
As another possible implementation manner, the total count value of the global counter table is obtained according to a set access period, and if the next access period does not arrive yet and the updated difference value of the total count value in the global counter table is greater than a set threshold, the updated total count value is sent to the counting server to update the total count backup value. For example, the set values are 100, the updated difference value of the total count value in the current global counter table is 200, and is greater than the set threshold value of 100, the updated total count value is directly sent to the counting server to update the total count backup value, so that the accuracy of the total count backup value is improved, and the problem of inaccurate response of the resource allocation request caused by inaccurate acquired total count value when a plurality of counting servers are used is avoided; and if the number of the updating difference values is 60, not sending the updated total counting value to the first-stage counter, waiting for the next access period, acquiring the total counting value of the global server table, and backing up to obtain a total counting backup value.
In the disclosure, after the counting server acquires the resource allocation request each time, the counting server does not need to access the global counter table to acquire the total count value, and can determine whether to respond to the resource allocation request based on the locally maintained total count backup value, so that the reading access pressure of the global counter table is reduced, and the overall performance is improved.
For example, the resource allocation requests acquired by the counting server are 100 ten thousand per second, the number of the counting servers is 1000, each counting server accesses the global counter table once in 100 milliseconds, and if the total count value is read by accessing the global counter table after each resource allocation request is acquired, the number of access requests acquired by the global counter table per second is 100 ten thousand, and the number of access requests acquired by the global counter table per minute is 6000 ten thousand. If the counting server reads the global counter table, acquires a total count value, generates a total count backup value and stores the total count backup value in the counting server, because the counting server does not need to access the global counter table in real time based on the acquired resource allocation request, the number of access requests acquired by the global counter table per second can be greatly reduced, for example, if the counting server accesses the global counter table every 30 seconds, the access times of each kind of global counter table is 2000 times; if the counting server accesses the counting server once per minute, the access times of the global counter table per minute are 1000 times, which are not listed here. The number of access requests of the global counter table is greatly reduced, the pressure of reading access of the global counter table is reduced, and the overall performance is improved.
Step 203, the sum of the difference between the set upper counting limit and the total counting backup value and the counted value of the first-level counter table is determined as the counting threshold value of the first-level counter table.
Wherein the upper limit of the count set in the count server is determined according to the maximum countable value of the global counter table in the global server, the maximum countable value being determined according to different application scenarios, for example, the red packet-blocking scenario is set according to the budget. The set upper limit of the count is equal to or less than the maximum countable value, and in general, when there are a plurality of count servers, since the plurality of count servers allocate resources to the acquired resource allocation request, and the resources allocated by the plurality of counters are all the total resources of the global counter table, in order to improve the reliability of the count, the set upper limit of the count is smaller than the maximum countable value, and for example, the set upper limit of the count is set to 800, if the maximum countable value is 1000.
For example, if the set upper limit of the count is 200, the total count backup value is 160, the difference value is 40, and the counted value of the first-stage counter table is 40, the total countable count value of the first-stage counter table is determined to be 80, that is, the count threshold of the first-stage counter table is 80.
And step 204, counting the resource quantity requested by the resource allocation request by adopting a corresponding first-stage counter in the first-stage counter table.
In this embodiment, the first-stage counter table may obtain multiple resource allocation requests at the same time, and in order to avoid congestion when the first-stage counter table processes multiple resource allocation requests at the same time, the first-stage counter table includes multiple first-stage counters, so that hot spot congestion generated when a single first-stage counter is included is avoided, and overall performance is improved. Therefore, according to the acquired resource allocation request, a relatively idle first-stage counter is selected from the first-stage counter table, and the amount of the resource requested by the resource allocation request is counted. Meanwhile, the first-stage counter table is updated according to the acquired resource allocation requests, instead of the global counter table updating the count values of the global counter table according to each acquired resource allocation request, that is, a large number of resource allocation requests synchronously accessing the global counter table are changed into the first-stage counter table accessing the local, the first-stage counter table updates the count values, the updating pressure of the global counter table is reduced, and the overall performance is improved.
Step 205, aggregating the count values of the first-stage counters in the first-stage counter table to obtain the updated count values of the first-stage counter table.
In this embodiment, the first-stage counter table includes a plurality of first-stage counters, so that the count value of the first-stage counter table is updated according to the sum of the count values of the plurality of first-stage counters, and the updated count value is obtained.
For example, the first-stage counter table includes 3 first-stage counters, which are numbered as a first-stage counter 1, a first-stage counter 2, and a first-stage counter 3, where in the previous step, the first-stage counter 1 is used to count the resource amount requested by the resource allocation request, so that the count value in the first-stage counter 1 is increased from 5 to 15, the count value in the first-stage counter 1 is 15, the count value in the first-stage counter 2 is 15, and the count value in the first-stage counter 3 is 20, and then the count values in the three first-stage counters are aggregated to obtain an updated count value of 50 in the first-stage counter table.
And step 206, sending a response message for indicating whether resource allocation is allowed or not according to the count value and the count threshold value updated by the first-level counter table.
In practical applications, in some scenarios, the resource requested by the resource allocation request has a set upper limit, for example, a red packet or coupon transmission scenario, and the transmission number of red packets and the transmission number of coupons generally have a limited upper limit, so as to compare the updated count value of the first-stage counter table with the count threshold value of the first-stage counter table to determine whether the upper limit is reached and whether the resource requested by the resource allocation request can be allocated.
Therefore, in this embodiment, the count value updated by the first-stage counter table is compared with the count threshold, and a response message indicating whether resource allocation is permitted is sent according to the comparison result.
As a possible implementation manner, if the updated count value of the first-level counter table is greater than or equal to the count threshold of the first-level counter table, sending a first response message, where the first response message is used to refuse to allocate the resource amount requested by the resource allocation request; and sending a second response message if the updated count value of the first-level counter table is smaller than the count threshold value of the first-level counter table, wherein the second response message is used for allowing the resource quantity requested by the resource allocation request to be allocated.
For example, if the updated count value of the first-level counter table is determined to be 50 and less than the count threshold 80 of the first-level counter table, it indicates that the count value obtained after the current update of the first-level counter table is still within the countable count threshold, and therefore, a second response message indicating that the amount of resources requested by the resource allocation request is allowed to be allocated may be sent.
Conversely, if the updated count value of the first-level counter table is determined to be 90 and greater than the count threshold 80 of the first-level counter table, it indicates that the count value obtained after the current update of the first-level counter table has exceeded the countable count threshold, and therefore, a first response message indicating that the amount of resources requested by the resource allocation request is denied may be sent.
And step 207, periodically synchronizing the updated count value of the first-stage counter table to a corresponding second-stage counter in the global counter table, wherein the global counter table comprises a plurality of second-stage counters, and aggregating the count values of the plurality of second-stage counters to obtain a total count value.
In this embodiment, in order to reduce the processing pressure of the global counter table, the global counter table is divided into a plurality of second-stage counters, and the sum of the count values of the plurality of second-stage counters is a total count value. The second-stage counters and the first-stage counter tables have a corresponding relationship, where the corresponding relationship may be that one first-stage counter table corresponds to one second-stage counter, or that multiple first-stage counter tables correspond to one second-stage counter, and the corresponding relationship may be flexibly set based on the requirements of an actual scene, and is not limited in this embodiment. After the count value of the first-stage counter table is updated, the count value updated by the first-stage counter table is periodically synchronized to the corresponding second-stage counter in the global counter table, and the global counter table is divided into a plurality of second-stage counters, so that the update pressure of the count value is dispersed to the plurality of second-stage counters, the parallel counting of the plurality of second-stage counters is realized, the hot spot congestion easily generated when a single counter counts is avoided, and the counting stability is improved.
According to the counting processing method, after each resource allocation request is obtained, the local total counting backup value is read, whether the allocation request is responded is determined according to the locally maintained total counting backup value, the global counter table does not need to be accessed, and the total counting backup value is obtained by backing up from the global counter table periodically, so that the data request quantity of the global counter table is reduced, and the pressure of reading and accessing the global counter table is reduced. Furthermore, the updated count value of the first-stage counter table is periodically synchronized to the corresponding second-stage counter in the global counter table, the count values of the plurality of second-stage counters are aggregated to obtain a total count value, the update pressure of the count values is dispersed to the plurality of second-stage counters in the global counter table, so that the plurality of second-stage counters are counted in parallel, hot spot congestion easily generated when a single counter counts is avoided, and the overall performance is improved.
In practical application, in a large-flow scene, for example, in a spring and evening interaction scene, the coupon is robbed and the data volume of the acquired resource allocation request is large, and the storage pressure of the first-stage counter table is also increased by synchronous access, so that the first-stage counter table becomes a system bottleneck, and the system performance is reduced.
Therefore, based on the previous embodiment, this embodiment provides another counting method, which specifically describes how to determine a corresponding first-level counter in the first-level counter table according to the resource allocation request. Fig. 3 is a flow chart illustrating a method of counting processing according to an exemplary embodiment, as shown in fig. 3, the method comprising the steps of:
step 301, obtaining a resource allocation request.
Step 302, reading a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of the global counter table.
Step 303, determining the sum of the difference between the set upper counting limit and the total counting backup value and the counted value of the first-level counter table as the counting threshold of the first-level counter table.
Step 301 to step 303 can refer to step 101 to step 103 in the embodiment of fig. 2, and are not described herein again.
Step 304, obtaining the user identifier carried in the resource allocation request.
The user identifier, for example, a user name of the user, a mobile phone number reserved during user registration, mailbox information, and the like, may be used to uniquely identify the user.
Step 305, performing hash processing on the user identifier to obtain a hash value of the user identifier.
In practical application, there are many users corresponding to the first-stage counter table, that is, the number of corresponding user identifiers is large, and especially in a large-flow scene, for example, a red packet robbing scene, a coupon robbing scene and other large-flow scenes, resource allocation requests are uniformly distributed to the plurality of first-stage counters in the first-stage counter table, so that the storage and count value updating pressure of each first-stage counter can be balanced, and the overall performance is improved. Therefore, in this embodiment, hash processing is performed on the user identifier carried in the resource allocation request, where the hash processing method may use a hash processing algorithm in the prior art, and details are not described in this embodiment. After the Hash processing is carried out, the corresponding relation between the user identification and the first-stage counters is established according to the generated Hash value, so that the Hash value based on the user identification can be realized, the corresponding resource allocation requests are uniformly allocated to the first-stage counters, and the storage uniformity of the first-stage counters is improved. In addition, the hash value corresponding to each user identifier is unique and has the protection of an encryption algorithm, and the user identifiers can be prevented from being tampered, so that the first-level counter corresponding to the user identifiers is modified, and the safety is improved by carrying out hash processing on the user identifiers.
Step 306, determine the first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
Specifically, according to the corresponding relationship between the hash value of the user identifier and the first-stage counter, after the resource allocation request is obtained, the first-stage counter corresponding to the resource allocation request is determined according to the hash value of the user identifier carried in the resource allocation request.
Step 307, the corresponding first-stage counter in the first-stage counter table is used to count the resource amount requested by the resource allocation request.
And 308, aggregating the count values of the first-stage counters in the first-stage counter table to obtain the updated count values of the first-stage counter table.
Step 309, sending a response message for indicating whether resource allocation is allowed according to the count value and the count threshold value updated by the first-stage counter table.
And 310, periodically synchronizing the updated count value of the first-stage counter table to a corresponding second-stage counter in a global counter table, wherein the global counter table comprises a plurality of second-stage counters, and aggregating the count values of the plurality of second-stage counters to obtain a total count value.
Specifically, step 307 to step 310 may refer to step 204 to step 207 in the embodiment of fig. 2, and the principle is the same, which is not described herein again.
In the counting processing method of the embodiment of the disclosure, the user identifier carried in the resource allocation request is subjected to hash processing, and the corresponding relationship between the user identifier and the first-stage counters is established according to the hash value, so that the user identifier can be uniformly corresponding to each first-stage counter, and the access and storage uniformity of each first-stage counter is improved. In addition, the hash value corresponding to each user identifier is unique, and malicious tampering of the user identifier can also be avoided, so that the first-level counter corresponding to the user identifier is modified.
In the above embodiments, it is explained that the global counter table includes a plurality of second-level counters to relieve the storage pressure of the global counter table, and after the first-level counter table updates the count value, the first-level counter table periodically synchronizes the updated count value to the corresponding second-level counter.
As a first implementation, fig. 4 is a flowchart illustrating a counting processing method according to an exemplary embodiment, and as shown in fig. 4, steps 207 and 310 include the following steps:
step 401, read the device identification.
The device identifier is an identifier of a device in which the first-stage counter table is set, the device is a server device with a counting function, and the device is called a counting server in the present disclosure, that is, the first-stage counter table is set in the counting server, and the device identifier is an identifier of the corresponding counting server. The counting server may be one or more.
Step 402, performing hash processing on the device identifier to obtain a hash value of the device identifier.
In step 403, a second-level counter corresponding to the hash value of the device identifier is determined from the global counter table.
In this disclosure, in order to make the correspondence between each first-stage counter and each second-stage counter uniform, so as to equalize the reading and storing pressure of each second-stage counter, so as to improve the overall performance, the counter server establishes the correspondence between the hash value of the device identifier and the second-stage counter in advance according to the hash value of the device identifier, and specifically, performs hash processing on the device identifier, where the hash processing method may adopt a hash processing algorithm in the prior art, and is not described in detail in this embodiment. After the hash value of the equipment identifier is generated, the counter identifier of the second-stage counter corresponding to the corresponding first-stage counter table is determined according to the corresponding relation between the hash value and the second-stage counter, so that the second-stage counters in the first-stage counter table and the global counter table can be uniformly corresponding, and the storage and access uniformity of each second-stage counter is improved. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
Step 404, periodically generating and sending a synchronization request carrying the counter identifier of the second-stage counter and the updated count value of the first-stage counter table.
According to the method, after the counter server determines the counter identifier of the corresponding second-stage counter according to the generated hash value and the corresponding relationship of the second-stage counter, the counting server periodically generates and sends the synchronization request carrying the counter identifier of the second-stage counter and the updated count value of the first-stage counter table to the corresponding second-stage counter according to the set period so as to update the count value of the second-stage counter, the updating pressure of the count value is dispersed to the plurality of second-stage counters in the global counter table, the plurality of second-stage counters are enabled to count in parallel, hot spot congestion easily generated when a single counter counts is avoided, and the overall performance is improved.
According to the counting processing method, the obtained equipment identification is subjected to Hash processing in the counting server to generate the Hash value, the corresponding relation between the equipment identification and the second-stage counters is established according to the generated Hash value, the first-stage counters and the second-stage counters can be uniformly corresponding, the uniformity of storage and access of each second-stage counter is improved, meanwhile, the second-stage counters corresponding to the first-stage counters are determined at the counting server, the processing pressure of the global server is relieved, and the overall performance is improved. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
As a second implementation, fig. 5 is a flowchart illustrating a counting processing method according to an exemplary embodiment, and as shown in fig. 5, steps 207 and 310 include the following steps:
in step 501, the device identification is read.
The device identifier is an identifier of a device including a first-stage counter table, the device is a server with a counting function, and the device is called a counting server in the disclosure, that is, the first-stage counter table is arranged in the counting server, the device identifier is the device identifier of the counting server, and the corresponding counting server is indicated through the device identifier, so that the corresponding first-stage counter table is indicated.
In step 502, a synchronization request carrying a device identifier and a count value updated by a first-stage counter table is periodically generated and sent, where the device identifier is used to determine a corresponding second-stage counter in the global counter table.
In an embodiment of the present disclosure, the counting server reads the device identifier of itself, periodically generates a synchronization request according to the device identifier and the count value updated by the first-stage counter table, and sends the synchronization request to the global server, so that the global server establishes a correspondence between the device identifier and the second-stage counter in advance according to the obtained device identifier, specifically, the global server performs hash processing on the device identifier, generates a hash value of the device identifier, and establishes a correspondence between the hash value and the second-stage counter, where a hash processing algorithm in the prior art may be used as the hash processing method, and details are not repeated in this embodiment. After the global server performs hash processing on the acquired equipment identifier to generate a hash value, according to the pre-established corresponding relation between the hash value of the equipment identifier and the second-stage counters, the first-stage counters and the second-stage counters can be uniformly corresponding, and the storage and access uniformity of each second-stage counter is improved. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
Furthermore, the global server determines the second-stage counter corresponding to the first-stage counter table from the global counter table according to the corresponding relation between the read device identifier and the second-stage counter, and updates the count value in the corresponding second-stage counter according to the count value of the first-stage counter table carried in the synchronization request, so that the access pressure of the global counter table is reduced, and the overall performance is improved.
In the counting processing method of the embodiment of the disclosure, a synchronous request of the count values of the device and the first-stage counter is generated in the counting server to the global server, so that the global server performs hash processing on the obtained device identifier to generate a hash value of the device identifier, and the corresponding relationship between the device identifier and the second-stage counter is established according to the generated hash value, thereby uniformly corresponding the first-stage counter and the second-stage counter, improving the uniformity of storage and access of each second-stage counter, reducing the configuration requirement of the counting server, and improving the overall performance. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
In order to implement the above embodiments, the present disclosure provides a counting processing method, which is performed by a global server.
Fig. 6 is a flow chart illustrating a method of counting processing according to an exemplary embodiment, as shown in fig. 6, comprising the steps of:
in step 601, a count value of the first-level counter table periodically synchronized to the global counter table is obtained.
In this embodiment, the counter table set in the counting server and the counter table set in the global server are included, for convenience of distinction, the counter table set in the counting server is referred to as a first-stage counter table, the counter table set in the global server is referred to as a global counter table, and in order to reduce the storage pressure of the global counter table, the global counter table is divided into a plurality of second-stage counters, which will be described in the next step.
According to the method and the device, the counting value is updated in the first-level counter table instead of updating the global counter table according to the resource allocation request, namely, a large number of resource allocation requests are synchronously accessed to the global counter table to be changed into the first-level counter table which is accessed locally, the global server table obtains the synchronous counting value from the first-level counter table, the counting value of the global counter table is updated, the access pressure of the global counter table is reduced, the overall performance is improved, and the synchronization request sent by the counting server can be received as a possible implementation mode.
For example, the number of the acquired resource allocation requests per second is 100 ten thousand per second, the number of the first-stage counter tables is 1000, each first-stage counter table accesses the global counter table once in 100 milliseconds to synchronize the count value, and if the count value is updated in the global counter table after each resource allocation request is acquired, the number of the resource allocation requests to be acquired by the global counter table per second is 100 ten thousand; after each resource allocation request is acquired, the first-stage counter table is updated according to the resource allocation request, and then the corresponding synchronous count value is acquired from the first-stage counter table, the data volume of the count value acquired per second is 1000 × 10 — 10000 — 1 ten thousand data volumes. Obviously, the counting value is updated in the first counter table, and the corresponding synchronous counting value is obtained from the first-stage counter table to the corresponding second-stage counter in the global counter table, so that the dimension of the data obtained by the global counter table is changed from the dimension requested by a user to the dimension of the first-stage counter table, the data quantity obtained synchronously is greatly reduced, the data processing pressure of the global counter table is reduced, and the overall performance is improved.
In step 602, the count value is counted using the corresponding second level counter in the global counter table.
In this embodiment, in order to reduce the storage pressure of the global counter table, the global counter table is divided into a plurality of second-level counters, the second-level counters and the first-level counter table have a corresponding relationship, where the corresponding relationship may be that one first-level counter table corresponds to one second-level counter, or that a plurality of first-level counter tables correspond to one second-level counter, and the corresponding relationship may be flexibly set based on the requirement of an actual scene, and is not limited in this embodiment.
Specifically, according to the updated count value of the first-stage counter table, the count value of the corresponding second-stage counter in the global counter table is updated, the writing competition and pressure of a single counter in the global counter table are reduced, the update efficiency of the count value is improved, and the overall performance is improved.
In step 603, count values of a plurality of second-level counters in the global counter table are aggregated to obtain a total count value of the global counter table.
Specifically, the global counter table is aggregated according to the count values of the plurality of second-level counters to obtain a total count value of the global counter table, so that the total count value in the global counter table is updated.
In step 604, the total count value of the global counter table is periodically backed up to the first-level counter table to obtain a total count backup value, wherein the total count backup value is used for responding to the resource allocation request.
As a possible implementation manner, the first-level counter table in the counting server may obtain a total count backup value according to the total count value backup by sending the total count backup value to the counter server according to a preset sending period; as another possible implementation manner, if the updated difference value of the total count value in the global counter table is greater than the threshold, the updated total count value is sent to the first-stage counter table to update the total count backup value in the first-stage counter table. For example, if the threshold is 50, the current total count value is 1000, the current updated total count value is 1080, the updated difference value is 80, and if the current updated total count value is greater than the threshold, the updated total count value 1080 is directly sent to the first-stage counter to update the total count backup value to 1080, so as to improve the accuracy of the total count backup value; if the number of the update difference values is 30, the updated total count value is not sent to the first-stage counter, and the global server sends the total count value to the first-stage counter table after the sending period is up, so that the first-stage counter table is backed up to obtain the total count backup value.
It should be noted that the global counter table may also send the total count value to the first-stage counter table in response to an acquisition request sent by the first-stage counter in a set period.
In the disclosure, the total count value is sent to the first-stage counter table, so that the first-stage counter table updates the total count backup value by using the total count value, and after the first-stage counter table acquires the resource allocation request each time, the first-stage counter table does not need to access the global counter table to acquire the total count value, but can compare the total count value with the locally maintained total count backup value to determine whether to respond to the resource allocation request, thereby reducing the reading access pressure of the global counter table and improving the overall performance.
In the counting processing method of the embodiment of the disclosure, the global server obtains the synchronous count value of the first-stage counter table, updates the count value of the corresponding second-stage counter in the global counter table according to the count value of the first-stage counter table, determines the total count value according to the sum of the count values of a plurality of second-stage counters in the global counter table, and sends the total count value to the first-stage counter table. The counter value of the first-level counter table is synchronized to the corresponding second-level counter in the global counter table, the global counter table is divided into the second-level counters, the updating pressure of the counter value is dispersed to the second-level counters, parallel counting of the second-level counters is achieved, hot spot congestion is avoided when a single counter counts, counting stability is improved, meanwhile, the total counter value is sent to the first-level counter table, the first-level counter table updates the total count backup value by the aid of the total counter value, the total counter value is not required to be read by accessing the global counter table after resource allocation requests are acquired every time, the reading access pressure of the global counter table is reduced, and overall performance is improved.
Based on the foregoing embodiment, this embodiment provides a possible implementation manner of a counting processing method, where a global server, according to a count value carried in a received synchronization request and a device identifier of a device running a first-level counter table, fig. 7 is a flowchart of a counting processing method according to an exemplary embodiment, and as shown in fig. 7, the method includes the following steps:
in step 701, a synchronization request is received, where the synchronization request carries a count value of a first-level counter table periodically synchronized to a global counter table, and a device identifier.
The synchronization request carries a count value of a first-stage counter table which is periodically synchronized to a global counter table, and an equipment identifier of equipment running the first-stage counter table.
In step 702, the device identifier is hashed to obtain a hash value of the device identifier.
In step 703, a second-level counter corresponding to the hash value of the device identifier is determined from the global counter table.
The hash processing method may adopt a hash processing algorithm in the prior art, and is not described in this embodiment. After the global server performs hash processing on the equipment identification of the counting server to generate a hash value, the corresponding second-stage counter is determined according to the pre-established corresponding relation between the hash value of the equipment identification and the second-stage counter, so that the first-stage counter and the second-stage counter can be uniformly corresponding, the storage and access uniformity of each second-stage counter is improved, and hot spot congestion caused by that a large amount of data synchronously accesses one second-stage counter is avoided. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
In step 704, the count value is counted using the corresponding second level counter in the global counter table.
In step 705, count values of a plurality of second level counters in the global counter table are aggregated to obtain a total count value of the global counter table.
In step 706, the total count value of the global counter table is periodically backed up to the first-level counter table to obtain a total count backup value, where the total count backup value is used for responding to the resource allocation request.
Specifically, the steps 704 to 706 refer to the explanation in the previous embodiment, and the principle is the same, which is not described herein again.
In this disclosure, the counting server and the global server may communicate with each other through a wireless network, and a specific implementation manner is not limited in this embodiment.
According to the counting processing method, the global server performs Hash processing on the acquired equipment identification to generate the Hash value, the corresponding relation between the equipment identification and the second-stage counters is established according to the generated Hash value, the first-stage counters and the second-stage counters can be uniformly corresponding, the uniformity of storage and access of each second-stage counter is improved, the storage pressure of a single second-stage counter is reduced, the overall performance is improved, meanwhile, the configuration requirement of the counting server is lowered, and the overall performance is improved. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
Based on the previous embodiment, this embodiment provides a possible implementation manner of a counting processing method, where a global server carries a count value and a counter identifier according to a received synchronization request, and fig. 8 is a flowchart of a counting processing method according to an exemplary embodiment, and as shown in fig. 8, the method includes the following steps:
in step 801, a synchronization request is received, where the synchronization request carries a count value of a first-level counter table periodically synchronized to a global counter table, and a counter identifier.
The synchronization request carries a count value of a first-stage counter table which is periodically synchronized to a global counter table, and a counter identifier.
The counter identifier carried in the synchronization request is determined at the counting server, in this embodiment, after the counting server performs hash processing on the device identifier of the counting server to generate a hash value, the corresponding second-stage counter in the global counter table is determined according to a pre-established correspondence between the hash value of the device identifier and the second-stage counter, specifically, the counter identifier of the corresponding second-stage counter in the global counter table is determined, and the counter identifier can be used for uniquely identifying the corresponding second-stage counter, so that the first-stage counter and the second-stage counter are uniformly corresponded, the uniformity of storage and access of each second-stage counter is improved, and hot spot congestion caused when a large amount of data synchronously accesses one second-stage counter is avoided. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
In step 802, the count value is counted using a corresponding second level counter in the global counter table.
In this embodiment, the global server determines a corresponding second-stage counter in the global counter table according to a counter identifier carried in the received synchronization request, and then counts the count value by using the second-stage counter to update the count value in the second-stage counter.
In step 803, the count values of the plurality of second level counters in the global counter table are aggregated to obtain a total count value of the global counter table.
In the embodiment of the present disclosure, since the count values in the corresponding second-level counters in the above steps are updated, the count values of the plurality of second-level counters in the global counter table are aggregated to obtain a total count value of the global counter table, where the total count value is a total count value obtained according to the count value updated by the first-level counter table.
In step 804, the total count value of the global counter table is periodically backed up to the first-level counter table to obtain a total count backup value, where the total count backup value is used for responding to the resource allocation request.
Specifically, the steps 802 to 804 can refer to the explanation in the previous embodiment, and the principle is the same, which is not described herein again.
In the counting processing method of the embodiment of the disclosure, the global server determines the corresponding second-stage counter according to the counter identifier carried in the received synchronization request, and can uniformly correspond the first-stage counter and the second-stage counter, thereby improving the uniformity of storage and access of each second-stage counter, reducing the storage pressure of a single second-stage counter, improving the overall performance, reducing the configuration requirement of the counting server, and improving the overall performance. In addition, the hash value corresponding to each device identifier is unique, and the device identifier can be prevented from being tampered, so that the second-level counter corresponding to the device identifier is modified, and the security is improved by performing hash processing on the device identifier.
Based on the foregoing embodiments, the present disclosure provides a counting interaction method, in practical applications, a plurality of counter servers may interact with a global server, and the interaction method of each counter server is the same as that of the global server. Fig. 9 is a flowchart illustrating a counting process interaction method according to an exemplary embodiment, as shown in fig. 9, the interaction method comprising the steps of:
in step 1001, the counter server obtains a get resource allocation request.
In step 1002, the counting server reads the total count backup value.
In step 1003, the counting server determines a count threshold of the first level counter table.
Specifically, the sum of the difference between the set upper count limit and the total count backup value and the counted value of the first-stage counter table is determined as the count threshold value of the first-stage counter table.
In step 1004, the user identifier carried in the resource allocation request is obtained, and hash processing is performed on the user identifier to obtain a hash value of the user identifier.
In step 1005, the counting server determines a first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
In step 1006, the counting server counts the amount of resources requested by the resource allocation request using the corresponding first-level counter in the first-level counter table.
In step 1007, the count values of the first-level counters in the first-level counter table are aggregated to obtain the updated count value of the first-level counter table.
In step 1008, the counter server sends a response message indicating whether resource allocation is allowed according to the count value and the count threshold updated by the first-stage counter table. In step 1009, the counter server reads the device id, and generates a synchronization request according to the device id and the count value updated by the first-stage counter table.
It should be understood that, in a scenario, the synchronization request carries the device identifier and the count value updated by the first-level counter table; in one scenario, the counter identifier carried in the synchronization request and the count value updated by the first-level counter table.
The equipment identification and the updated count value of the first-stage counter table can be sent to the global counter table together based on a synchronous request, or can be sent to the global counter table respectively by the counting server based on different requests, in one scene, the counting server reads the equipment identification and then sends the equipment identification to the global server, and then the counting server sends the count value of the first-stage counter table to the global server after updating the count value of the first-stage counter table, and reduces the data volume of the synchronous request through asynchronous sending; in another scenario, after updating the count value of the first-stage counter table, the counting server sends the count value and the device identifier to the global server together, and the sending efficiency is improved by synchronous sending. In this embodiment, the manner in which the counting server sends the device identifier and the count value updated by the first-stage counter table is not limited. Similarly, for the counter identifier carried in the synchronization request and the count value updated by the first-stage counter table, the processing mode principle is the same, and is not described again.
In step 1010, the counting server periodically sends a synchronization request to the global server.
In step 1011, the global server determines a second-level counter corresponding to the first-level counter table in the global counter table according to the device identifier or the counter identifier carried in the synchronization request.
In step 1012, the global server updates the count value of the corresponding second-level counter in the global counter table according to the updated count value of the first-level counter table carried in the synchronization request.
In step 1013, the global server aggregates the total count value according to the plurality of second-level counters.
And the sum of the count values of the plurality of second-stage counters is a total count value.
In step 1014, the global server periodically backs up the total count value in the global counter table to the first level counter table running in the count server.
Specifically, the global server periodically backs up the total count value in the global counter table to a first-stage counter table in the counting server, wherein the total count backup value obtained by backing up the total count value by the first-stage counter table is used for responding to the resource allocation request according to the total count backup value and the count value updated by the first-stage counter table.
It should be noted that the explanation of the foregoing embodiment of the counting processing method is also applicable to the interaction method of this embodiment, and the principle is the same, and is not described again in this embodiment.
In the counting processing method of the embodiment, a resource allocation request is obtained, the count value of a first-stage counter table is updated according to the resource allocation request, the updated count value of the first-stage counter table is periodically synchronized to a corresponding second-stage counter in a global counter table, wherein the global counter table comprises a plurality of second-stage counters, the sum of the count values of the plurality of second-stage counters is a total count value, the updating of the count value is changed from the global counter table to a local first-stage counter table in the disclosure, the synchronous data request amount of the global counter table is reduced, the plurality of second-stage counters are arranged in the global counter table for storing the count values, the pressure of storing a single counter is reduced, the overall performance is improved, and meanwhile, the total count backup value is updated by the total count value obtained from a global server in the first-stage counter table, the global counter table does not need to be accessed to read the total count value after the resource allocation request is obtained every time, so that the pressure of reading and accessing the global counter table is reduced, and the overall performance is improved.
In order to implement the foregoing embodiments, the present disclosure provides a counting processing system, which includes a global server and at least one counting server, where the counting server is configured to execute the counting processing methods in the embodiments of fig. 2 to 5, and the global server is configured to execute the counting processing methods in fig. 6 to 9.
Fig. 10 is an architecture diagram of a counting system according to an exemplary embodiment, which is described with 2 counting servers as an example in the present embodiment, and as shown in fig. 10, the system includes 2 counting servers, which are respectively referred to as a counting server 11 and a counting server 12, and a global server 21.
The global server 21 includes a global counter table 210, and the global counter table 210 includes two second-stage counters, which are referred to as second- stage counters 2101 and 2102.
The counting server 11 includes a first-stage counter table 110, and the first-stage counter table 110 includes two first-stage counters, which are called a first-stage counter 1101 and a first-stage counter 1102. The counting server 12 includes a first-level counter table 120, and the first-level counter table 120 includes two first-level counters, which are referred to as first-level counters 1201 and 1202.
Specifically, the method comprises the following steps:
in step 2001, the counting server 11 is configured to obtain the corresponding resource allocation request, determine a corresponding first-stage counter, that is, the first-stage counter 1101 or the first-stage counter 1102, in the first-stage counter table 110 according to the obtained resource allocation request, and update a count value of the corresponding first-stage counter.
In step 2002, the counter server 11 periodically synchronizes the count value updated by the first-stage counter table 110 to the corresponding second-stage counter 2101 in the global counter table 210.
Similarly, in step 2001, the counting server 12 is configured to obtain the corresponding resource allocation request, determine the corresponding first-stage counter in the first-stage counter table 120, that is, the first-stage counter 1201 or the first-stage counter 1202, according to the obtained resource allocation request, and update the count value of the corresponding first-stage counter.
In step 2002, the counter server 12 periodically synchronizes the updated count value of the first-level counter table 120 to the corresponding second-level counter 2102 in the global counter table 210.
According to the method and the device, after the resource allocation request is obtained, the counting value is updated by the local first-level counter table, the counting value is not updated by the global counter table any more, the synchronous data request quantity of the global counter table is reduced, the plurality of second-level counters are arranged in the global counter table to store the counting value, the storage pressure of the single counters in the global counter table is reduced, and the overall performance is improved.
Further, the global counter table 210 determines a total count value of the global counter table 210 from the sum of the count value of the second stage counter 2101 and the count value of the second stage counter 2102.
In step 2003, the global counter table 210 synchronizes the total count value to the counting server 11 and the counting server 12 periodically, so that a backup value of the total count value, called the total count backup value, is maintained locally in both the counting server 11 and the counting server 12, so that in a scenario where the count value has a limited number, for example, a red packet issue scenario, a response message is generated according to the local total count backup value and the corresponding count value of the first-level counter table 110, and it is not necessary to access the global counter table 210 to read the total count value after each resource allocation request is obtained, thereby reducing the pressure of reading the global counter table and improving the overall performance.
It should be noted that the explanations in the foregoing embodiments of the counting method are also applicable to the counting system of the present embodiment, and the principle is the same, which is not described herein again.
The counting processing system changes the updating of the counting value from the global counter table to the local first-level counter table, reduces the synchronous data request quantity of the global counter table, sets a plurality of second-level counters in the global counter table for storing the counting value, reduces the storage pressure of a single counter, and synchronizes the total counting value in the global counter table to each counting server periodically, so that each counting server maintains a total counting backup value, reduces the access times of the global server, and improves the overall performance.
Fig. 11 is a block diagram illustrating a counting processing apparatus according to an exemplary embodiment, the apparatus being provided at a counting server. Referring to fig. 11, the apparatus includes an acquisition module 111, a reading module 112, a first determination module 113, a counting module 114, an aggregation module 115, a response module 116, and a synchronization module 117.
An obtaining module 111 configured to perform obtaining the resource allocation request.
And a reading module 112 configured to read the total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of the global counter table.
A first determination module 113 configured to determine a sum of a difference between the set upper count limit and the total count backup value and the counted value of the first-stage counter table as a count threshold of the first-stage counter table.
A counting module 114 configured to count the amount of resources requested by the resource allocation request by using a corresponding first-level counter in the first-level counter table.
And an aggregation module 115 configured to aggregate the count values of the first-level counters in the first-level counter table to obtain the updated count values of the first-level counter table.
A response module 116 configured to send a response message indicating whether resource allocation is allowed according to the count value and the count threshold updated by the first-stage counter table.
And a synchronization module 117 configured to synchronize the updated count value of the first-level counter table to a corresponding second-level counter in the global counter table periodically, where the global counter table includes a plurality of second-level counters, and aggregate the count values of the plurality of second-level counters to obtain a total count value.
In a possible implementation manner of the embodiment of the present disclosure, the response module 116 includes:
a first sending unit configured to execute sending a first response message if the updated count value of the first-level counter table is greater than or equal to the count threshold of the first-level counter table, wherein the first response message is used for refusing to allocate the resource amount requested by the resource allocation request; and
a second sending unit configured to execute sending a second response message if the updated count value of the first-level counter table is smaller than the count threshold of the first-level counter table, wherein the second response message is used for allowing the resource amount requested by the resource allocation request to be allocated.
In a possible implementation manner of the embodiment of the present disclosure, the apparatus further includes:
a second determining module configured to obtain a user identifier carried in the resource allocation request; carrying out hash processing on the user identification to obtain a hash value of the user identification; and determining the first-stage counter corresponding to the hash value of the user identification from the first-stage counter table.
In a possible implementation manner of the embodiment of the present disclosure, the synchronization module 117 includes:
a first reading unit configured to read a device identification;
the processing unit is configured to perform hash processing on the device identifier to obtain a hash value of the device identifier;
a determining unit configured to determine the second-stage counter corresponding to the hash value of the device identifier from the global counter table;
a first sending unit configured to periodically generate and send a synchronization request carrying the counter identifier of the second-stage counter and the updated count value of the first-stage counter table.
In another possible implementation manner of the embodiment of the present disclosure, the synchronization module 117 includes:
a second reading unit configured to read the device identification;
a second sending unit, configured to periodically generate and send a synchronization request carrying the device identifier and a count value updated by the first-level counter table, where the device identifier is used to determine the corresponding second-level counter in the global counter table.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
According to the counting processing device, after each resource allocation request is obtained, the local total counting backup value is read, whether the allocation request is responded is determined according to the locally maintained total counting backup value, the global counter does not need to be accessed, and the total counting backup value is periodically backed up from the global counter table, so that the data request quantity of the global counter table is reduced, and the pressure of reading and accessing the global counter table is reduced. Furthermore, the updated count value of the first-stage counter table is periodically synchronized to the corresponding second-stage counter in the global counter table, the count values of the plurality of second-stage counters are aggregated to obtain a total count value, the update pressure of the count values is dispersed to the plurality of second-stage counters in the global counter table, so that the plurality of second-stage counters are counted in parallel, hot spot congestion easily generated when a single counter counts is avoided, and the overall performance is improved.
Fig. 12 is a block diagram illustrating a counting processing apparatus according to an exemplary embodiment, the apparatus being provided at a counting server. Referring to fig. 12, the apparatus includes an acquisition module 121, a counting module 122, an aggregation module 123, and a backup module 124.
The obtaining module 121 is configured to perform obtaining a count value of the first-stage counter table periodically synchronized to the global counter table.
And the counting module 122 is configured to count the count value by using the corresponding second-stage counter in the global counter table.
And an aggregation module 123 configured to aggregate the count values of the plurality of second-level counters in the global counter table to obtain a total count value of the global counter table.
And the backup module 124 is configured to periodically backup the total count value of the global counter table to the first-level counter table to obtain a total count backup value, where the total count backup value is used for responding to the resource allocation request.
In a possible implementation manner of the embodiment of the present disclosure, the obtaining module 121 is further configured to:
and receiving a synchronization request, wherein the synchronization request carries a count value of the first-stage counter table which is periodically synchronized to the global counter table.
In a possible implementation manner of the embodiment of the present disclosure, the synchronization request further carries an equipment identifier of an equipment that runs the first-stage counter table; the device, still include:
the first processing module is configured to perform hash processing on the device identifier to obtain a hash value of the device identifier; and determining the second-stage counter corresponding to the hash value of the equipment identifier from the global counter table.
In another possible implementation manner of the embodiment of the present disclosure, the synchronization request further carries a counter identifier; the device, still include:
a second processing module configured to determine the second-level counter corresponding to the counter identifier in the synchronization request.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The counting processing device of the embodiment of the disclosure obtains a resource allocation request, updates the count value of a first-stage counter table according to the resource allocation request, and periodically synchronizes the count value updated by the first-stage counter table to a corresponding second-stage counter in a global counter table, wherein the global counter table comprises a plurality of second-stage counters, and the sum of the count values of the plurality of second-stage counters is a total count value, the updating of the count value is changed from the global counter table to a local first-stage counter table in the disclosure, the synchronous data request amount of the global counter table is reduced, the plurality of second-stage counters are arranged in the global counter table for storing the count values, the pressure of storing a single counter is reduced, the overall performance is improved, and meanwhile, the first-stage counter table updates the total count backup value by using the total count value obtained from a global server, the global counter table does not need to be accessed to read the total count value after the resource allocation request is obtained every time, so that the pressure of reading and accessing the global counter table is reduced, and the overall performance is improved.
To implement the above embodiments, the present disclosure provides a server comprising a processor, a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the counting process method as described in the preceding method embodiments.
To achieve the above embodiments, the present disclosure provides a storage medium, in which instructions are provided, which when executed by a processor of a server, enable the server to perform the counting processing method according to the foregoing method embodiments.
To achieve the above embodiments, the present disclosure provides a computer program product comprising computer instructions which, when executed by a processor of a server, enable the server to perform the counting process method as described in the preceding method embodiments.
Fig. 13 is a block diagram illustrating a configuration of a server 10 according to an example embodiment. The server shown in fig. 13 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 13, the server 10 includes a processor 11, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 12 or a program loaded from a Memory 16 into a Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the server 10 are also stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An Input/Output (I/O) interface 15 is also connected to the bus 14.
The following components are connected to the I/O interface 15: a memory 16 including a hard disk and the like; and a communication section 17 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like, the communication section 17 performing communication processing via a Network such as the internet; a drive 18 is also connected to the I/O interface 15 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program, carried on a computer readable medium, containing program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 17. The computer program, when executed by the processor 11, performs the above-described functions defined in the method of the present disclosure.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 11 of the server 10 to perform the method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A count processing method, comprising:
acquiring a resource allocation request;
reading a total counting backup value, wherein the total counting backup value is obtained by regularly backing up the total counting value of a global counter table;
determining the sum of the difference between the set upper counting limit and the total counting backup value and the counted value of a first-stage counter table as the counting threshold value of the first-stage counter table;
counting the resource quantity requested by the resource allocation request by adopting a corresponding first-stage counter in a first-stage counter table;
aggregating the count value of each first-stage counter in the first-stage counter table to obtain the updated count value of the first-stage counter table;
sending a response message for indicating whether resource allocation is allowed or not according to the updated count value of the first-stage counter table and the count threshold;
and periodically synchronizing the updated count value of the first-stage counter table to a corresponding second-stage counter in the global counter table, wherein the global counter table comprises a plurality of second-stage counters, and aggregating the count values of the plurality of second-stage counters to obtain the total count value.
2. The counting processing method according to claim 1, wherein the sending a response message indicating whether resource allocation is allowed according to the count value updated by the first-stage counter table and the count threshold value comprises:
if the updated count value of the first-level counter table is greater than or equal to the count threshold value of the first-level counter table, sending a first response message, wherein the first response message is used for refusing to allocate the resource quantity requested by the resource allocation request; and
and if the updated count value of the first-stage counter table is smaller than the count threshold value of the first-stage counter table, sending a second response message, wherein the second response message is used for allowing the resource amount requested by the resource allocation request to be allocated.
3. The counting process method according to claim 1, wherein before counting the amount of resources requested by the resource allocation request by using the corresponding first-stage counter in the first-stage counter table, the method further comprises:
acquiring a user identifier carried in the resource allocation request;
carrying out hash processing on the user identification to obtain a hash value of the user identification; and
and determining the first-stage counter corresponding to the hash value of the user identifier from the first-stage counter table.
4. The count processing method according to any one of claims 1 to 3, wherein said periodically synchronizing the count values updated by the first-stage counter table to the corresponding second-stage counter in the global counter table comprises:
reading a device identification;
performing hash processing on the equipment identifier to obtain a hash value of the equipment identifier;
determining the second-stage counter corresponding to the hash value of the equipment identifier from the global counter table;
and periodically generating and sending a synchronization request carrying the counter identification of the second-stage counter and the updated count value of the first-stage counter table.
5. A count processing method, comprising:
acquiring a count value of a first-stage counter table which is periodically synchronized to a global counter table;
counting the count value by adopting the corresponding second-stage counter in the global counter table;
aggregating the count values of the plurality of second-level counters in the global counter table to obtain a total count value of the global counter table;
and backing up the total count value of the global counter table to the first-stage counter table periodically to obtain a total count backup value, wherein the total count backup value is used for responding to a resource allocation request.
6. A count processing apparatus characterized by comprising:
an acquisition module configured to execute an acquisition resource allocation request;
the reading module is configured to read a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of the global counter table;
a first determination module configured to determine a sum of a difference between the set upper count limit and the total count backup value and a counted value of a first-level counter table as a count threshold of the first-level counter table;
a counting module configured to count the amount of resources requested by the resource allocation request by using a corresponding first-stage counter in a first-stage counter table;
the aggregation module is configured to aggregate the count values of the first-stage counters in the first-stage counter table to obtain updated count values of the first-stage counter table;
a response module configured to send a response message indicating whether resource allocation is allowed according to the count value updated by the first-stage counter table and the count threshold;
and the synchronization module is configured to synchronize the updated count value of the first-level counter table to a corresponding second-level counter in the global counter table periodically, wherein the global counter table comprises a plurality of second-level counters, and the count values of the plurality of second-level counters are aggregated to obtain the total count value.
7. A count processing apparatus characterized by comprising:
the acquisition module is configured to acquire the count value of the first-stage counter table periodically synchronized to the global counter table;
a counting module configured to count the count value by using the corresponding second-stage counter in the global counter table;
an aggregation module configured to aggregate the count values of the plurality of second-level counters in the global counter table to obtain a total count value of the global counter table;
the backup module is configured to periodically backup the total count value of the global counter table to the first-level counter table to obtain a total count backup value, where the total count backup value is used for responding to a resource allocation request.
8. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the counting process method of any one of claims 1 to 4 or to implement the counting process method of claim 5.
9. A counting processing system comprising a global server and at least one counting server;
the counting server configured to execute the counting processing method of any one of claims 1 to 4;
the global server configured to perform the counting method of claim 5.
10. A storage medium, characterized in that instructions in the storage medium, when executed by a processor of a server, enable the server to perform the counting process method of any one of claims 1 to 4 or the counting process method of claim 5.
CN202010820956.1A 2020-08-14 2020-08-14 Count processing method, device, server and count processing system Active CN112131267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010820956.1A CN112131267B (en) 2020-08-14 2020-08-14 Count processing method, device, server and count processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010820956.1A CN112131267B (en) 2020-08-14 2020-08-14 Count processing method, device, server and count processing system

Publications (2)

Publication Number Publication Date
CN112131267A true CN112131267A (en) 2020-12-25
CN112131267B CN112131267B (en) 2023-10-03

Family

ID=73850826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010820956.1A Active CN112131267B (en) 2020-08-14 2020-08-14 Count processing method, device, server and count processing system

Country Status (1)

Country Link
CN (1) CN112131267B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979003A (en) * 2021-02-17 2022-08-30 瞻博网络公司 Determining network device statistics associated with fast and slow counters

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060089951A1 (en) * 2004-10-19 2006-04-27 International Business Machines Corporation Management of global counters in transactions
CN101632070A (en) * 2005-05-16 2010-01-20 微软公司 Coordinating reference counting between each entity of in the address space that separates, carrying out
US7693886B1 (en) * 2006-12-15 2010-04-06 Netapp, Inc. Delta query technique
CN102347909A (en) * 2011-11-22 2012-02-08 迈普通信技术股份有限公司 Method and device for sending massive protocol messages
KR20120065102A (en) * 2010-12-10 2012-06-20 한국전자통신연구원 Method and apparatus for providing global counter
CN102833281A (en) * 2011-06-15 2012-12-19 中兴通讯股份有限公司 Method, device and system for realizing distributed automatically-increasing counting
CN105103130A (en) * 2012-12-20 2015-11-25 甲骨文国际公司 System and method for implementing scalable contention-adaptive statistics counters
US20150341433A1 (en) * 2012-07-06 2015-11-26 Yahoo! Inc. Peer-to-peer architecture for web traffic management
WO2016074759A1 (en) * 2014-11-11 2016-05-19 Unify Gmbh & Co. Kg Method and system for real-time resource consumption control in a distributed computing environment
CN108021597A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 A kind of parallel counter, server and a kind of method of counting
CN109302300A (en) * 2017-07-25 2019-02-01 阿里巴巴集团控股有限公司 Data distributing method and device, data processing method and server
CN110166282A (en) * 2019-04-16 2019-08-23 苏宁易购集团股份有限公司 Resource allocation methods, device, computer equipment and storage medium
CN110249303A (en) * 2017-02-16 2019-09-17 华为技术有限公司 System and method for reducing reference count expense
CN110363482A (en) * 2019-07-16 2019-10-22 腾讯科技(上海)有限公司 Method of counting, device, server and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060089951A1 (en) * 2004-10-19 2006-04-27 International Business Machines Corporation Management of global counters in transactions
CN101632070A (en) * 2005-05-16 2010-01-20 微软公司 Coordinating reference counting between each entity of in the address space that separates, carrying out
US7693886B1 (en) * 2006-12-15 2010-04-06 Netapp, Inc. Delta query technique
KR20120065102A (en) * 2010-12-10 2012-06-20 한국전자통신연구원 Method and apparatus for providing global counter
CN102833281A (en) * 2011-06-15 2012-12-19 中兴通讯股份有限公司 Method, device and system for realizing distributed automatically-increasing counting
CN102347909A (en) * 2011-11-22 2012-02-08 迈普通信技术股份有限公司 Method and device for sending massive protocol messages
US20150341433A1 (en) * 2012-07-06 2015-11-26 Yahoo! Inc. Peer-to-peer architecture for web traffic management
CN105103130A (en) * 2012-12-20 2015-11-25 甲骨文国际公司 System and method for implementing scalable contention-adaptive statistics counters
WO2016074759A1 (en) * 2014-11-11 2016-05-19 Unify Gmbh & Co. Kg Method and system for real-time resource consumption control in a distributed computing environment
CN107111520A (en) * 2014-11-11 2017-08-29 统有限责任两合公司 Method and system for the real time resources consumption control in DCE
CN108021597A (en) * 2016-10-28 2018-05-11 阿里巴巴集团控股有限公司 A kind of parallel counter, server and a kind of method of counting
CN110249303A (en) * 2017-02-16 2019-09-17 华为技术有限公司 System and method for reducing reference count expense
CN109302300A (en) * 2017-07-25 2019-02-01 阿里巴巴集团控股有限公司 Data distributing method and device, data processing method and server
CN110166282A (en) * 2019-04-16 2019-08-23 苏宁易购集团股份有限公司 Resource allocation methods, device, computer equipment and storage medium
CN110363482A (en) * 2019-07-16 2019-10-22 腾讯科技(上海)有限公司 Method of counting, device, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114979003A (en) * 2021-02-17 2022-08-30 瞻博网络公司 Determining network device statistics associated with fast and slow counters

Also Published As

Publication number Publication date
CN112131267B (en) 2023-10-03

Similar Documents

Publication Publication Date Title
CN109949111B (en) Electronic bill identification distribution method, electronic bill generation method, device and system
CN107493340B (en) Data distribution verification method, device and system in block chain network
CN112714192B (en) Data synchronization method and device, computer readable medium and electronic equipment
CN106339222B (en) A kind of service implementing method and device
CN107544837B (en) Cloud service equipment performance data acquisition system, method and device
CN109800270B (en) Data storage and query method and Internet of things system
CN110708212B (en) Method and device for tracking call link in distributed system
US20240146691A1 (en) Data processing method, livestreaming method, authentication server, and live data server
CN110688523A (en) Video service providing method, device, electronic equipment and storage medium
CN110740121A (en) Resource subscription system and method
CN107295031A (en) A kind of method of data synchronization and device
CN103428260A (en) System and method for allocating server to terminal and efficiently delivering messages to the terminal
CN112131267B (en) Count processing method, device, server and count processing system
CN110245014B (en) Data processing method and device
CN108520401B (en) User list management method, device, platform and storage medium
CN113965434A (en) API gateway routing implementation method under cross-machine-room scene
CN113377817A (en) Data processing method, system, device and storage medium
CN113067802A (en) User identification method, device, equipment and computer readable storage medium
CN116991948A (en) Block data synchronization system and method, electronic device and storage medium
CN112351082A (en) Current limiting method and device for HTTP request message
CN114760121B (en) Access frequency control method and access frequency control system
CN113467718B (en) Data processing method and device, electronic equipment and storage medium
CN110401709A (en) Processing method, device and the storage medium of session in a kind of instant messaging application
CN109347766A (en) A kind of method and device of scheduling of resource
CN115629909A (en) Service data processing method and device, electronic equipment and storage medium

Legal Events

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