CN112131267B - Count processing method, device, server and count processing system - Google Patents

Count processing method, device, server and count processing system Download PDF

Info

Publication number
CN112131267B
CN112131267B CN202010820956.1A CN202010820956A CN112131267B CN 112131267 B CN112131267 B CN 112131267B CN 202010820956 A CN202010820956 A CN 202010820956A CN 112131267 B CN112131267 B CN 112131267B
Authority
CN
China
Prior art keywords
counter table
count
stage
value
counter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010820956.1A
Other languages
Chinese (zh)
Other versions
CN112131267A (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

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

Abstract

The invention discloses a counting processing method, a counting processing device, a server and a counting processing system, and relates to the technical field of data processing, wherein the counting processing method comprises the following steps: after each resource allocation request is acquired, a local total count backup value is read, whether to respond to the allocation request is determined according to the local maintained total count backup value, and the global counter table is not required to be accessed. 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 plurality of second-stage counters count in parallel by dispersing the updating pressure of the count value to the plurality of second-stage counters in the global counter table, so that hot spot congestion easily generated during counting of a single counter is avoided, and the overall performance is improved.

Description

Count processing method, device, server and count processing system
Technical Field
The disclosure relates to the technical field of data processing, and in particular relates to a counting processing method, a counting processing device, a server and a counting processing system.
Background
In software systems, it is often necessary to use a global counter to count the number of operations, consumption of resources, and other statistical information, and in situations such as distribution of red packets, distribution of ticket cards, etc., it is often necessary to record the amount of budget currently consumed for budget control.
In the related art, a counting-by-counting mode is adopted, and in a high-concurrency system, a large number of resource allocation requests can cause the global counter to easily become a performance bottleneck, so that the overall performance is reduced.
Disclosure of Invention
The disclosure provides a counting processing method, a device, a server and a counting processing system, which at least solve the problem that in the related art, when the system flow is higher, the pressure of the global counter for counting and reading access is higher, so that the system performance is reduced.
The technical scheme of the present disclosure is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided a count processing method, including:
acquiring a resource allocation request;
reading a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of a global counter table;
determining the sum of the difference value between the set upper limit of the count and the total count backup value and the counted value of a first-stage counter table as a count threshold value of the first-stage counter table;
Counting the amount of resources requested by the resource allocation request by adopting a corresponding first-stage counter in a first-stage counter table;
aggregating the count values of all first-stage counters in the first-stage counter table to obtain updated count values of the first-stage counter table;
according to the updated count value of the first-level counter table and the count threshold, sending a response message for indicating whether resource allocation is allowed or not;
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 second-stage counters to obtain the total count value.
According to a second aspect of embodiments of the present disclosure, there is provided another count processing method, including:
acquiring a count value of a first-stage counter table 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 a plurality of second-stage counters in the global counter table to obtain the total count value of the global counter table;
And periodically backing up the total count value of the global counter table to the first-stage 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 third aspect of the embodiments of the present disclosure, there is provided a count processing apparatus including:
an acquisition module configured to perform acquiring a 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 determining module configured to determine a sum of a difference between a set upper count limit and the total count backup value and a counted value of a first-stage counter table as a count threshold of the first-stage counter table;
the counting module is configured to count the resource quantity requested by the resource allocation request by adopting a corresponding first-level counter in the first-level counter table;
the aggregation module is configured to aggregate the count value of each first-stage counter in the first-stage counter table to obtain an updated count value of the first-stage counter table;
a response module configured to send a response message indicating whether resource allocation is allowed or not according to the count value updated by the first-level counter table and the count threshold;
And the synchronization module is configured to periodically synchronize 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 the count values of the second-stage counters are aggregated to obtain the total count value.
According to a fourth aspect of embodiments of the present disclosure, there is provided another count processing apparatus, including:
an acquisition module configured to perform acquisition of count values of the first-level counter table periodically synchronized to the global counter table;
a counting module configured to count the count value with the corresponding second-stage counter in the global counter table;
the aggregation module is configured to aggregate count values of a plurality of second-stage 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-stage 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 comprising:
A processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the count processing method according to the first aspect or to implement the count processing method according to the second aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a count processing system, comprising: the system comprises a global server and at least one counting server;
the counting server is configured to execute the counting processing method according to the first aspect;
a global server configured to perform the count processing method as described in the second aspect.
According to a seventh aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of a server, enables the server to perform the counting processing method as described in the first aspect, or to perform the counting processing method as described in 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 count processing method according to the first aspect, or to perform the count processing method according to the second aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of obtaining a resource allocation request, reading a total count backup value, determining the sum of a difference value between a set upper limit of count and the total count backup value and a counted value of a first-stage counter table as a count threshold value of the first-stage counter table, counting the resource amount requested by the resource allocation request by adopting a corresponding first-stage counter in the first-stage counter table, relieving the processing pressure of the first-stage counter table by setting a plurality of first-stage counters, further, aggregating the counted value of each first-stage counter in the first-stage counter table to obtain a counted value updated by the first-stage counter table, sending a response message for indicating whether resource allocation is allowed or not according to the counted value updated by the first-stage counter table and the count threshold value, and synchronizing the counted 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 aggregating the counted values of the plurality of second-stage counters to obtain the total counted value. In the method, after each resource allocation request is acquired, the global counter table is not required to be accessed, and whether to respond to the resource allocation request is determined according to the locally maintained total count backup value. Meanwhile, the updating pressure of the count value is distributed 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 which is easy to generate 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 disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a system architecture 100 for a count processing method or count processing apparatus of the present disclosure, according to one example;
FIG. 2 is a flow chart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 5 is a flowchart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 6 is a flowchart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 7 is a flowchart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 8 is a flowchart illustrating a method of counting processing according to an exemplary embodiment;
FIG. 9 is a flowchart illustrating a method of interaction of a count process, according to an example embodiment;
FIG. 10 is an architecture diagram of a count processing system according to an exemplary embodiment;
FIG. 11 is a block diagram of a count processing device, according to an exemplary embodiment;
FIG. 12 is a block diagram of a count processing device, according to an example embodiment;
fig. 13 is a block diagram illustrating a structure of a server 10 according to an exemplary embodiment.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of 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 foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a system architecture 100 for a count processing method or count processing apparatus of the present disclosure, according to one example.
As shown in fig. 1, the system architecture 100 may include a counting server 101, a network 102, and a global server 103. Wherein the number of counting servers 101 may be one or more, a plurality of which are illustrated in fig. 1. The network 102 is a medium used to provide a communication link between the counting server 101 and the global server 103. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
The counting server 101 is configured to acquire a resource allocation request, interact with the global server 103 through the network 102, and synchronize a count value updated according to the resource allocation request to the global server 103, or acquire a total count value from the global server 103, or 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, as desired, and network levels may be increased or decreased for the system shown in fig. 1.
The following describes a count processing method, apparatus, server, and count processing system of the embodiments of the present disclosure with reference to the accompanying drawings.
Fig. 2 is a flowchart illustrating a counting processing method according to an exemplary embodiment, which may be performed by the counting server 101 in the system shown in fig. 1, as shown in fig. 2, including the following steps.
Step 201, a resource allocation request is obtained.
In this embodiment, the resource allocation request includes the requested resource information, and the resource information is used for information statistics. For example, in the case of a late spring red packet, the resource message in the resource allocation request carries the number of red packets and the amount of red packets requested by the user; in the scene of issuing coupons, the resource information carries the quantity of coupons requested by users; in the operation frequency statistics scene, the resource message carries the operation frequency requested by the user; in addition, the resource message may also carry some other statistical messages such as the consumption times of the resource, which are not listed in this embodiment.
In one 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 user preset operation, so that the counting server obtains the resource allocation request. For example, the preset operation of the user includes clicking operation and sliding operation, or is generated by collecting voice information of the user and recognizing the voice information, for example, the user logs in an application program of the client, clicks "get coupon", or "get red packet", for example, the get red packet is a counting message, and a resource allocation request is generated according to the counting message "get 10 yuan red packet", so that the counting server obtains the resource allocation request and counts 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, a global counter table is provided in the global server, 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. The counting server is provided with a first-stage counter table which comprises a plurality of first-stage counters. Wherein, regarding the second stage counter, the following steps are described in detail.
In the embodiment of the disclosure, if the counting server accesses the global counter to read the total count value after obtaining the resource allocation request, the reading pressure of the global counter is greatly increased, so 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, the global server may be accessed according to a set access period to read a total count value in the global counter table, and update the total count backup value with the total count value.
As another possible implementation manner, the total count value of the global counter table is obtained according to the set access period, and if the next access period is not yet reached and the difference value of the total count value update in the global counter table is greater than the set threshold value, the updated total count value is sent to the count server to update the total count backup value. For example, the set value is 100, the difference value of the total count value update in the current global counter table is 200, and the difference value is greater than the set threshold value by 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 that when a plurality of counting servers are used, the response of a resource allocation request is inaccurate due to the inaccuracy of the obtained total count value is avoided; if the updated difference is 60, the updated total count value is not sent to the first-stage counter, and after the next access period is up, the total count value of the global server table is obtained and backed up to obtain a total count backup value.
In the method, after each time of resource allocation request acquisition, 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 or not 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, with the resource allocation requests acquired by the counting server being 100 ten thousand/second, the number of the counting servers is 1000, each counting server accesses the global counter table once every 100 milliseconds, and if the global counter table is accessed to read the total count value after each resource allocation request is acquired, the number of access requests to be acquired by the global counter table is 100 ten thousand times per second, and 6000 ten thousand times per minute. If the counting server reads the global counter table, acquires the total count value, generates the 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 once every 30 seconds, the number of accesses of the global counter table per minute is 2000; if the counting server accesses once every minute, the number of accesses to the global counter table is 1000, which is 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, determining 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 as the count threshold of the first-stage counter table.
Wherein the upper limit of the count set in the counting server is determined according to the maximum countable value of the global counter table in the global server, the maximum countable value is determined according to different application scenes, for example, the reddish packet scene is set according to budget. When the set upper count limit is equal to or less than the maximum countable value, in general, when there are a plurality of counting servers, the plurality of counting servers allocate resources to the acquired resource allocation requests, and the plurality of counting servers allocate resources as the total resources of the global counter table, so that the set upper count limit is smaller than the maximum countable value, for example, 1000 maximum countable values, in order to improve the reliability of the counting, the set upper count limit may be set to 800.
For example, the upper limit of the count is set to 200, the total count backup value is 160, the difference is 40, and the counted value of the first-stage counter table is 40, and it is determined that the total countable count value of the first-stage counter table is 80, that is, the count threshold of the first-stage counter table is 80.
In step 204, the amount of resources requested by the resource allocation request is counted using the corresponding first level counter in the first level counter table.
In this embodiment, the first-stage counter table may acquire multiple resource allocation requests at the same time, so as to avoid congestion when the first-stage counter table processes multiple resource allocation requests at the same time, and include multiple first-stage counters in the first-stage counter table, so as to avoid hot spot congestion generated when a single first-stage counter is included, and improve overall performance. Therefore, according to the acquired resource allocation request, a more idle first-level counter is selected from the first-level counter table, and the resource amount requested by the resource allocation request is counted. Meanwhile, the first-stage counter table is adopted to update the count value according to the acquired resource allocation requests, instead of the global counter table updating the count value according to each acquired resource allocation request, that is to say, a large number of resource allocation requests synchronously access the global counter table to be changed into access local first-stage counter tables, and the first-stage counter table is adopted to update the count value, so that 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 value 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, to obtain an updated count value.
For example, the first-stage counter table includes 3 first-stage counters, numbered as first-stage counter 1, first-stage counter 2 and first-stage counter 3, where in the previous step, the resource amount requested by the resource allocation request is counted by using first-stage counter 1, so that the count value in first-stage counter 1 increases from 5 to 15, the count value in first-stage counter 1 is 15, the count value in first-stage counter 2 is 15, the count value in first-stage counter 3 is 20, and the updated count value of the first-stage counter table is 50 after the count values in the three first-stage counters are aggregated.
Step 206, sending a response message for indicating whether to allow resource allocation according to the count value and the count threshold 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 a coupon sending scenario, where the sending number of red packets and the sending number of coupons generally have a defined upper limit, so that the count value updated by the first-level counter table is compared with the count threshold value of the first-level counter table to determine whether the upper limit is reached, and whether the resource requested by the resource allocation request can be allocated.
Thus, in this embodiment, the count value updated by the first-stage counter table is compared with the count threshold value, and a response message indicating whether or not to permit resource allocation is transmitted according to the result of the comparison.
As one 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, a first response message is sent, where the first response message is used to reject the resource amount requested by the allocation resource allocation request; and if the updated count value of the first-level counter table is smaller than the count threshold of the first-level 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.
For example, if the count value updated by the first-level counter table is determined to be 50, which is smaller than the count threshold 80 of the first-level counter table, it is indicated that the count value obtained after the current update of the first-level counter table is still within the countable count threshold, and thus, a second response message indicating that the amount of resources requested by the allocation resource allocation request is allowed may be transmitted.
In contrast, if it is determined that the updated count value of the first counter table is 90 and is greater than the count threshold 80 of the first counter table, it indicates that the count value obtained after the current update of the first counter table has exceeded the countable count threshold, and therefore, a first response message indicating that the amount of resources requested by the allocation resource allocation request is refused may be transmitted.
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, where the global counter table includes 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 the total count value. The second-stage counter and the first-stage counter table have a corresponding relationship, and the corresponding relationship may be that one first-stage counter table corresponds to one second-stage counter, or that a plurality of first-stage counter tables correspond to one second-stage counter, and the corresponding relationship may be flexibly set based on the requirement of an actual scene, which is not limited in this embodiment. After the count value of the first-stage counter table is updated, 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 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, hot spot congestion is avoided when a single counter counts, and the counting stability is improved.
According to the counting processing method of the embodiment of the disclosure, after each resource allocation request is acquired, a local total counting backup value is read, whether to respond to the allocation request is determined according to the local total counting backup value without accessing the global counter table, and because the total counting backup value is regularly backed up from the global counter table, the data request amount of the global counter table is reduced, so that the reading access pressure of the global counter table is reduced. And 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, and the plurality of second-stage counters are counted in parallel by dispersing the updated pressure of the count value to the plurality of second-stage counters in the global counter table, so that hot spot congestion which is easy to occur when a single counter counts is avoided, and the overall performance is improved.
In practical application, under a high-flow scene, for example, under a spring-night interaction scene, the full name participates in a robbed packet and robs a coupon, because the data volume of the acquired resource allocation request is large, the synchronous access also increases the storage pressure of the first-stage counter table, so that the first-stage counter table becomes a system bottleneck, and the system performance is reduced.
Therefore, based on the above embodiment, the present embodiment provides another counting processing method, specifically explaining how to determine the 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, as shown in FIG. 3, according to an exemplary embodiment, the method comprising the steps of:
step 301, a resource allocation request is obtained.
In step 302, a total count backup value is read, 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 count limit and the total count backup value and the counted value of the first-stage counter table as the count threshold of the first-stage counter table.
Step 301 to step 303 may refer to step 101 to step 103 in the embodiment of fig. 2, and are not described herein.
Step 304, a user identifier carried in the resource allocation request is obtained.
The user identifier, for example, a user name of the user, a mobile phone number reserved when the user registers, mailbox information and the like, can be used for uniquely identifying the information of the user.
In step 305, a hash process is performed on the user identifier to obtain a hash value of the user identifier.
In practical application, the number of users corresponding to the first-stage counter table may be more, that is, the number of corresponding user identifiers is more, especially in a high-flow scene, for example, a red packet scene, a coupon, and the like, resource allocation requests are uniformly distributed to a plurality of first-stage counters of the first-stage counter table, so that the storage and count value updating pressures of each first-stage counter can be balanced, and the overall performance is improved. Therefore, in this embodiment, the 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, which is not described in detail in this embodiment. After the hash processing is carried out, the corresponding relation between the user identifier and the first-stage counters is established according to the generated hash value, so that the hash value based on the user identifier can be realized, the corresponding resource allocation request is uniformly allocated to each first-stage counter, and the storage uniformity of each first-stage counter is improved. In addition, the hash value corresponding to each user identifier is unique and has the protection of an encryption algorithm, so that the user identifier can be prevented from being tampered, the first-stage counter corresponding to the user identifier is modified, and the security is improved by carrying out hash processing on the user identifier.
Step 306, determining a first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
Specifically, according to the corresponding relation between the hash value of the user identifier and the first-stage counter, after the resource allocation request is acquired, 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.
In step 307, the amount of resources requested by the resource allocation request is counted using the corresponding first level counter in the first level counter table.
Step 308, aggregating the count values of the first-stage counters in the first-stage counter table to obtain the updated count value of the first-stage counter table.
Step 309, transmitting a response message indicating whether to allow resource allocation according to the count value and the count threshold updated by the first level counter table.
Step 310, periodically synchronizing the updated count value of the first-stage counter table to a corresponding second-stage counter in the global counter table, where the global counter table includes 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, steps 307 to 310 may refer to steps 204 to 207 in the embodiment of fig. 2, and the principles are the same, and will not be described herein.
In the counting processing method of the embodiment of the disclosure, through carrying out hash processing on the user identifier carried in the resource allocation request, the corresponding relation between the user identifier and the first-stage counter 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 be avoided, so that the first-stage counter corresponding to the user identifier is modified.
In the above embodiments, the global counter table includes a plurality of second-stage counters to relieve the storage pressure of the global counter table, and the first-stage counter table periodically synchronizes the updated count value to the corresponding second-stage counter after updating the count value, so the present disclosure specifically describes how to periodically synchronize the updated count value of the first-stage counter table to the corresponding second-stage counter in the global counter table through the following two embodiments.
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, reading a device identification.
The device identifier refers to an identifier of a device with a first-level counter table, where the device is a server device with a counting function, and is referred to as a counting server in the disclosure, that is, the first-level counter table is set in the counting server, and the device identifier is an identifier of a corresponding counting server. The counting server may be one or more.
Step 402, hash processing is performed on the device identifier to obtain a hash value of the device identifier.
Step 403, determining a second-level counter corresponding to the hash value of the device identifier from the global counter table.
In the disclosure, in order to make the correspondence between each first-stage counter table and each second-stage counter uniform, so as to balance the reading and storing pressures 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 use a hash processing algorithm in the prior art, and will not be 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 counter 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 equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
Step 404, periodically generating and transmitting a synchronization request carrying a counter identification of the second level counter and a count value updated by the first level counter table.
In the method, after the counter server determines the counter identification of the corresponding second-stage counter according to the generated corresponding relation between the hash value and the second-stage counter, the counter server periodically generates and transmits a synchronous request carrying the counter identification of the second-stage counter and the updated count value of the first-stage counter to the corresponding second-stage counter according to a set period, so that the second-stage counter can update the count value, and the updating pressure of the count value is distributed to a plurality of second-stage counters in the global counter table, so that the plurality of second-stage counters count in parallel, hot spots and congestion which are easy to generate when the single counter counts are avoided, and the overall performance is improved.
In the counting processing method of the embodiment of the disclosure, hash processing is performed on the acquired equipment identifier in the counting server to generate a hash value, and a corresponding relation between the equipment identifier and the second-stage counter is established according to the generated hash value, 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, meanwhile, the second-stage counter corresponding to the first-stage counter is determined at the counting server end, the processing pressure of the global server is relieved, and the overall performance is improved. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment 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, a device identification is read.
The device identifier refers to an identifier of a device including a first-stage counter table, where the device is a server with a counting function, and is referred to as a counting server in this disclosure, that is, the first-stage counter table is set in the counting server, and the device identifier is an identifier of the counting server, and indicates a corresponding counting server through the device identifier, so as to indicate the corresponding first-stage counter table.
In step 502, a synchronization request carrying a device identification and a count value updated by a first level counter table is periodically generated and transmitted, wherein the device identification is used to determine a corresponding second level counter in the global counter table.
In one embodiment of the disclosure, a counting server reads a device identifier of itself, periodically generates a synchronization request according to the device identifier and a count value updated by a first-stage counter table, and sends the synchronization request to a global server, so that the global server pre-establishes a corresponding relationship between the device identifier and a second-stage counter according to the acquired device identifier, specifically, the global server hashes the device identifier to generate a hash value of the device identifier, and establishes a corresponding relationship between the hash value and the second-stage counter, wherein the hash processing method can adopt a hash processing algorithm in the prior art, which is not repeated in the embodiment. After the global server carries out hash processing on the acquired equipment identifier to generate a hash value, according to the corresponding relation between the hash value of the equipment identifier and the second-stage counter, the first-stage counter table and the second-stage counter 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 equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
And then, the global server determines the second-stage counter corresponding to the first-stage counter from the global counter tables according to the corresponding relation between the read equipment 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 carried in the synchronous request, thereby reducing the access pressure of the global counter table and improving the overall performance.
In the counting processing method of the embodiment of the disclosure, the synchronous request of the count values of the equipment and the first-stage counter is generated in the counting server to the global server, so that the global server hashes the acquired equipment identifier to generate the hash value of the equipment identifier, and the corresponding relation between the equipment identifier and the second-stage counter is established according to the generated hash value, 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, the configuration requirement of the counting server is reduced, and the overall performance is improved. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
In order to implement the above-described embodiments, the present disclosure provides a count processing method that is executed by a global server.
FIG. 6 is a flow chart illustrating a method of counting processing, as shown in FIG. 6, according to an exemplary embodiment, the method comprising the steps of:
in step 601, the count value of the first level counter table is obtained periodically synchronized to the global counter table.
In this embodiment, the counter table is included in the counting server, and the counter table is also included in the global server, so that the counter table is called a first-stage counter table in the counting server, the counter table is called a global counter table in the global server, and the global counter table is divided into a plurality of second-stage counters in order to reduce the storage pressure of the global counter table, which will be described in the next step.
In the method, the count value is updated in the first-stage counter table, and the global counter table is not updated according to the resource allocation request, namely, the effect that a large number of resource allocation requests synchronously access the global counter table to be changed into access local first-stage counter tables is achieved, the global server table obtains the synchronous count value from the first-stage counter table, the count value is updated on the global counter table, the access pressure of the global counter table is reduced, the overall performance is improved, and as a possible implementation mode, the synchronous request sent by the counting server can be received.
For example, with the acquired resource allocation requests being 100 ten thousand/second, the first-stage counter tables being 1000, each first-stage counter table accessing the global counter table once for 100 milliseconds to perform count value synchronization, if the count value is updated in the global counter table after each resource allocation request is acquired, the number of resource allocation requests to be acquired by the global counter table per second is 100 ten thousand times; if after each resource allocation request is acquired, after the first-stage counter table is updated according to the value of the resource allocation request, the corresponding synchronous count value is acquired from the first-stage counter table, and the data amount of the acquired count value per second is 1000×10=10000=1 ten thousand data amounts. Obviously, the counting value is updated in the first counter table, and the corresponding synchronous counting value is acquired from the first counter table to the corresponding second counter in the global counter table, so that the dimension of the data acquired by the global counter table is changed from the user request dimension to the first counter table dimension, the data volume acquired 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 a 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-stage counters, where the second-stage counters and the first-stage counter table have a correspondence relationship, and the correspondence relationship may be that one first-stage counter table corresponds to one second-stage counter, or that a plurality of first-stage counter tables corresponds to one second-stage counter.
Specifically, according to the count value updated by the first-stage counter table, the count value of the corresponding second-stage counter in the global counter table is updated, so that the competition and the pressure written in the global counter table when the global counter table is a single counter are reduced, the efficiency of updating the count value is improved, and the overall performance is improved.
In step 603, the count values of the second-stage 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 second-stage counters, so as to obtain the total count value of the global counter table, and update of the total count value in the global counter table is realized.
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, where the total count backup value is used to respond to the resource allocation request.
As a possible implementation manner, the method can send the total count backup value to the counter server according to a preset sending period, so that a first-stage counter table in the counter server is backed up according to the total count value to obtain the total count backup value; as another possible implementation manner, if the difference value of the total count value update in the global counter table is greater than the threshold value, 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, 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 that the accuracy of the total count backup value is improved; if the updated difference is 30, the updated total count value is not sent to the first-stage counter, and after a transmission period is up, the global server sends the total count value to the first-stage counter table, so that the first-stage counter table is backed up to obtain a 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 the acquisition request sent by the first-stage counter according to the set period.
In the method, 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, the first-stage counter table does not need to access the global counter table to acquire the total count value after acquiring the resource allocation request each time, and the first-stage counter table can compare the 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.
According to the counting processing method of the embodiment of the disclosure, a global server obtains the synchronous count value of a first-stage counter table, the count value of a corresponding second-stage counter in the global counter table is updated according to the count value of the first-stage counter table, the total count value is determined according to the sum of the count values of a plurality of second-stage counters in the global counter table, and the total count value is sent to the first-stage counter table. According to the method and the device, the count value of the first-stage counter table is synchronized to the corresponding second-stage counter in the global counter table, and the global counter table is divided into the plurality of second-stage counters, so that the update pressure of the count value is distributed to the plurality of second-stage counters, the plurality of second-stage counters are counted in parallel, hot spot congestion is avoided when a single counter counts, the counting stability is improved, and meanwhile, 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, the global counter table is not required to be accessed to read after each resource allocation request is acquired, the read access pressure of the global counter table is reduced, and the overall performance is improved.
Based on the above embodiment, this embodiment provides a possible implementation manner of a counting processing method, and 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 identification.
The synchronization request carries the count value of the first-stage counter table periodically synchronized to the global counter table, and the device identifier of the device running the first-stage counter table.
In step 702, a hash process is performed on the device identifier to obtain a hash value of the device identifier.
In step 703, a second level counter corresponding to the hash value of the device identification is determined from the global counter table.
The hash processing method may adopt a hash processing algorithm in the prior art, which is not described in detail in this embodiment. After the global server carries out hash processing on the equipment identifier of the counting server to generate a hash value, the corresponding second-level counter is determined according to the corresponding relation between the hash value of the equipment identifier and the second-level counter, so that the first-level counter table and the second-level counter can be uniformly corresponding, the storage and access uniformity of each second-level counter is improved, and hot spot congestion caused by synchronous access of a large amount of data to one second-level counter is avoided. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
In step 704, the count value is counted using a corresponding second level counter in the global counter table.
In step 705, 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 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 to respond to the resource allocation request.
Specifically, the principles of steps 704-706 are the same as those explained in the previous embodiment, and will not be repeated here.
In the present disclosure, the counting server and the global server may communicate through a wireless network, which is not limited in this embodiment for a specific implementation manner.
In the counting processing method of the embodiment of the disclosure, the global server performs hash processing on the acquired equipment identifier to generate the hash value, and the corresponding relation between the equipment identifier and the second-stage counter is established according to the generated hash value, 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, the storage pressure of a single second-stage counter is reduced, the overall performance is improved, the configuration requirement of the counting server is reduced, and the overall performance is improved. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
Based on the above embodiment, this embodiment provides a possible implementation manner of a counting processing method, where the 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, wherein the synchronization request carries a count value of a first level counter table periodically synchronized to a global counter table, and a counter identification.
The synchronization request carries the count value of the first-stage counter table periodically synchronized to the global counter table and the counter identification.
The counter identifier carried in the synchronization request is determined at the counting server side, after the counting server performs hash processing on the self device identifier to generate a hash value, the corresponding second-level counter in the global counter table is determined according to the corresponding relation between the hash value of the pre-established device identifier and the second-level counter, specifically, the counter identifier of the corresponding second-level counter in the global counter table is determined, and the counter identifier can be used for uniquely identifying the corresponding second-level counter, so that the first-level counter table and the second-level counter are uniformly corresponding, the storage and access uniformity of each second-level counter is improved, and hot congestion caused by synchronous access of a large amount of data to a certain second-level counter is avoided. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
In step 802, a 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 the counter identifier carried in the received synchronization request, and further counts the count value by using the second-stage counter, so as 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 disclosure, since the count value in the corresponding second-stage counter in the above step is updated, the count values of the plurality of second-stage counters in the global counter table are further aggregated to obtain a total count value of the global counter table, where the total count value is the total count value obtained according to the count value updated by the first-stage 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 principles of steps 802-804 may be the same as those explained in the previous embodiment, and will not be repeated here.
According to the counting processing method, the global server determines the corresponding second-stage counter according to the counter identification carried in the received synchronous request, 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, the storage pressure of a single second-stage counter is reduced, the overall performance is improved, the configuration requirement of the counting server is reduced, and the overall performance is improved. In addition, the hash value corresponding to each equipment identifier is unique, so that the equipment identifier can be prevented from being tampered, the second-stage counter corresponding to the equipment identifier is modified, and the safety is improved by carrying out hash processing on the equipment identifier.
Based on the above embodiments, the disclosure provides a counting processing interaction method, in practical application, a plurality of counter servers may interact with a global server, and each counter server interacts with the global server in the same way. FIG. 9 is a flowchart illustrating a method of interaction of a count process, as shown in FIG. 9, according to an exemplary embodiment, the method of interaction comprising the steps of:
In step 1001, a counter server obtains a get resource allocation request.
In step 1002, the count server reads the total count backup value.
In step 1003, the count server determines a count threshold for 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, a 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 identification from among the first level counter tables.
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 an 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 or not, based on the count value and the count threshold updated by the first level counter table. In step 1009, the counter server reads the device identifier, and generates a synchronization request according to the device identifier and the count value updated by the first-level counter table.
It should be understood that, in one scenario, the synchronization request carries the device identifier and the count value updated by the first-stage counter table; in one scenario, a counter identifier carried in the synchronization request and a count value updated by the first level counter table.
The device identifier and the updated count value of the first-stage counter table can be sent to the global counter table together based on one synchronous request, or can be sent by the counting server respectively based on different requests, under one scene, the counting server reads the device identifier and then sends the device identifier to the global server, and further, after updating the count value of the first-stage counter table, the counting server sends the count value of the first-stage counter table to the global server, and the data quantity of the synchronous request is reduced through asynchronous sending; in another scenario, after updating the count value of the first-stage counter table, the count value and the device identifier are sent to the global server together by the counting server, and the sending efficiency is improved through synchronous sending. In the present embodiment, the manner in which the counting server transmits 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 principle of the processing mode is the same, and no description is repeated.
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-stage counter in the global counter table according to the count value updated by the first-stage 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.
Wherein 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 a 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 counter server, wherein the first-stage counter table is used for backing up the total count backup value obtained by backing up the total count value and responding to the resource allocation request according to the total count backup value and the updated count value of 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 the present embodiment, and the principle is the same, which is not repeated in the present embodiment.
In the counting processing method of the embodiment, a resource allocation request is acquired, a 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 update of the count value is changed from the global counter table to a local first-stage counter table in the method, the synchronous data request amount of the global counter table is reduced, a plurality of second-stage counters are arranged in the global counter table to store the count value, the pressure of storing a single counter is reduced, the overall performance is improved, meanwhile, the first-stage counter table updates the total count backup value by using the total count value acquired from the global server, the total count value is not required to be accessed to read after the resource allocation request is acquired each time, the pressure of the global counter table to be read is reduced, and the overall performance is improved.
In order to implement the above embodiments, the embodiments of the present disclosure provide a counting processing system, including a global server and at least one counting server, where the counting server is configured to perform the counting processing method of the embodiments of fig. 2-5, and the global server is configured to perform the counting processing method described in fig. 6-9.
Fig. 10 is a block diagram of a counting processing system according to an exemplary embodiment, in which 2 counting servers are taken as an example, and the system is described, and as shown in fig. 10, the system includes 2 counting servers, which are respectively called 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, 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-stage counter table 120, and the first-stage counter table 120 includes two first-stage counters, which are called first-stage counters 1201 and 1202.
Specifically:
in step 2001, the counting server 11 is configured to obtain a corresponding resource allocation request, determine a corresponding first-stage counter in the first-stage counter table 110, that is, the first-stage counter 1101 or the first-stage counter 1102, according to the obtained resource allocation request, and update the 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 into the corresponding second-stage counter 2101 in the global counter table 210.
Similarly, in step 2001, the counting server 12 is configured to obtain a corresponding resource allocation request, determine a 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 count value updated by the first-stage counter table 120 into the corresponding second-stage counter 2102 in the global counter table 210.
In the method, after the resource allocation request is acquired, the local first-stage counter table updates the count value, but the global counter table does not update the count value any more, so that the synchronous data request quantity of the global counter table is reduced, a plurality of second-stage counters are arranged in the global counter table to store the count value, the pressure of storing a single counter in the global counter table is reduced, and the overall performance is improved.
Further, the global counter table 210 determines the 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 periodically synchronizes the total count values to the count server 11 and the count server 12, so that the count server 11 and the count server 12 each locally maintain a backup value of the total count value, which is called a total count backup value, so that under a scenario where the count value has a limited number, for example, a red packet issuing scenario, a response message is generated according to the local total count backup value and the count value of the corresponding first-stage counter table 110, and the global counter table 210 does not need to be accessed to read the total count value after each resource allocation request is acquired, thereby reducing the pressure of the global counter table read access and improving the overall performance.
It should be noted that the explanation in the foregoing embodiment of the counting processing method is also applicable to the counting processing system of this embodiment, and the principle is the same, and will not be repeated here.
According to the counting processing system, the count value is updated from the global counter table to the local first-stage counter table, the synchronous data request quantity of the global counter table is reduced, a plurality of second-stage counters are arranged in the global counter table to store the count value, the pressure of single counter storage is reduced, the total count value in the global counter table is periodically synchronized to each counting server, a total count backup value is maintained in each counting server, the access times of the global server are reduced, and the overall performance is improved.
Fig. 11 is a block diagram illustrating a counting processing device according to an exemplary embodiment, which is disposed 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.
The acquisition module 111 is configured to perform acquisition of the resource allocation request.
The reading module 112 is configured to read a total count backup value, where the total count backup value is obtained by periodically backing up the total count value of the global counter table.
The first determining module 113 is 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.
The counting module 114 is configured to count the amount of resources requested by the resource allocation request using a corresponding first level counter in the first level counter table.
The aggregation module 115 is configured to aggregate the count value of each first-stage counter in the first-stage counter table to obtain an updated count value of the first-stage counter table.
A response module 116 configured to send a response message indicating whether resource allocation is allowed or not, based on the count value and the count threshold updated by the first level counter table.
And a synchronization module 117 configured to periodically synchronize 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 includes a plurality of second-stage counters, and aggregate the count values of the plurality of second-stage counters to obtain a total count value.
In one possible implementation of the embodiment of the disclosure, the response module 116 includes:
a first transmitting unit configured to perform transmitting a first response message for refusing to allocate the amount of resources requested by the resource allocation request if the count value updated by the first-stage counter table is greater than or equal to the count threshold of the first-stage counter table; and
and a second transmitting unit configured to perform transmitting a second response message for allowing allocation of the amount of resources requested by the resource allocation request if the count value updated by the first-stage counter table is smaller than the count threshold of the first-stage counter table.
In one possible implementation of an embodiment of the disclosure, the apparatus further includes:
the second determining module is configured to acquire a user identifier carried in the resource allocation request; carrying out hash processing on the user identifier to obtain a hash value of the user identifier; and determining the first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
In one 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 equipment identifier to obtain a hash value of the equipment identifier;
a determining unit configured to determine the second-level counter corresponding to the hash value of the device identifier from among the global counter table;
and a first transmitting unit configured to periodically generate and transmit a synchronization request carrying a counter identification of the second-stage counter and a count value updated by 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;
and a second sending unit configured to periodically generate and send a synchronization request carrying the device identifier and the 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.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the counting processing device of the embodiment of the disclosure, after each resource allocation request is acquired, a local total counting backup value is read, whether to respond to the allocation request is determined according to the locally maintained total counting backup value, and the global counter is not required to be accessed. And 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, and the plurality of second-stage counters are counted in parallel by dispersing the updated pressure of the count value to the plurality of second-stage counters in the global counter table, so that hot spot congestion which is easy to occur when a single counter counts is avoided, and the overall performance is improved.
Fig. 12 is a block diagram of a counting processing device according to an exemplary embodiment, which is disposed 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 acquisition module 121 is configured to perform acquisition of count values of the first-stage counter table periodically synchronized to the global counter table.
The counting module 122 is configured to count a count value by using the corresponding second-stage counter in the global counter table.
The aggregation module 123 is configured to aggregate count values of a plurality of second-stage counters in the global counter table to obtain a total count value of the global counter table.
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 one possible implementation manner of the embodiment of the present disclosure, the acquiring module 121 is further configured to:
and receiving a synchronization request, wherein the synchronization request carries the count value of the first-stage counter table 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 running the first-level counter table; the device further comprises:
the first processing module is configured to perform hash processing on the equipment identifier to obtain a hash value of the equipment 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 further comprises:
and a second processing module configured to determine the second-stage counter corresponding to the counter identification in the synchronization request.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
According to the counting processing device, a resource allocation request is acquired, 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 update of the count value is changed from the global counter table to a local first-stage counter table, the synchronous data request amount of the global counter table is reduced, a plurality of second-stage counters are arranged in the global counter table to store the count value, the pressure of storing a single counter is reduced, the overall performance is improved, meanwhile, the first-stage counter table utilizes the total count value acquired from the global server to update the total count backup value, the global counter table is not required to be accessed to read after each resource allocation request is acquired, the pressure of the global counter table to be read is reduced, and the overall performance is improved.
To achieve the above embodiments, the present disclosure provides a server including a processor, a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the count processing method as described in the foregoing method embodiments.
In order to implement the above-described embodiments, the present disclosure provides a storage medium, which when executed by a processor of a server, enables the server to perform the count processing method as described in 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 a counting processing method as described in the method embodiments above.
Fig. 13 is a block diagram illustrating a structure of a server 10 according to an exemplary embodiment. The server illustrated in fig. 13 is merely an example, and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 13, the server 10 includes a processor 11 that 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, random Access Memory) 13. In the RAM 13, various programs and data required 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 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; the drive 18 is also connected to the I/O interface 15 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program embodied on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network through the communication section 17. The above-described functions defined in the methods of the present disclosure are performed when the computer program is executed by the processor 11.
In an exemplary embodiment, a storage medium is also provided, such as a memory 804 including instructions executable by the processor 11 of the server 10 to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In the context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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 adaptations, uses, or adaptations of the disclosure following the general 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 is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (21)

1. A count processing method, comprising:
acquiring a resource allocation request;
reading a total count backup value, wherein the total count backup value is obtained by periodically backing up the total count value of a global counter table;
determining the sum of the difference value between the set upper limit of the count and the total count backup value and the counted value of a first-stage counter table as a count threshold value of the first-stage counter table;
counting the amount of resources requested by the resource allocation request by adopting a corresponding first-stage counter in a first-stage counter table;
aggregating the count values of all first-stage counters in the first-stage counter table to obtain updated count values of the first-stage counter table;
according to the updated count value of the first-level counter table and the count threshold, sending a response message for indicating whether resource allocation is allowed or not;
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 second-stage counters to obtain the total count value.
2. The counting processing method according to claim 1, wherein the transmitting a response message indicating whether resource allocation is allowed or not according to the count value updated by the first-stage counter table and the count threshold value includes:
if the updated count value of the first-stage counter table is greater than or equal to the count threshold of the first-stage counter table, a first response message is sent, wherein the first response message is used for refusing to allocate the resource amount 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 method according to claim 1, wherein before counting the amount of resources requested by the resource allocation request using the corresponding first-level counter in the first-level counter table, further comprising:
acquiring a user identifier carried in the resource allocation request;
carrying out hash processing on the user identifier to obtain a hash value of the user identifier; and
And determining the first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
4. A count processing method according to any one of claims 1 to 3, wherein said periodically synchronizing the count value updated by said first-stage counter table to a corresponding second-stage counter in said global counter table comprises:
reading a device identifier;
carrying out 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 synchronous 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 according to any one of claims 1 to 3, wherein said periodically synchronizing the count value updated by said first-stage counter table to a corresponding second-stage counter in said global counter table comprises:
reading a device identifier; and
and periodically generating and sending a synchronization request carrying the device identifier and the updated count value of the first-stage counter table, wherein the device identifier is used for determining the corresponding second-stage counter in the global counter table.
6. A count processing method, comprising:
acquiring a count value of a first-stage counter table 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 a plurality of second-stage counters in the global counter table to obtain the total count value of the global counter table;
and periodically backing up the total count value of the global counter table to the first-stage counter table to obtain a total count backup value, wherein the total count backup value is used for responding to a resource allocation request.
7. The counting processing method according to claim 6, wherein the acquiring the count value of the first-stage counter table is periodically synchronized to the global counter table, comprising:
and receiving a synchronization request, wherein the synchronization request carries the count value of the first-stage counter table periodically synchronized to the global counter table.
8. The count processing method of claim 7 wherein the synchronization request further carries a device identification of a device running the first level counter table;
Before the counting of the count value by adopting the corresponding second-stage counter in the global counter table, the method further comprises:
carrying out hash processing on the equipment identifier to obtain a hash value of the equipment identifier;
and determining the second-stage counter corresponding to the hash value of the equipment identifier from the global counters.
9. The count processing method according to claim 7, wherein the synchronization request further carries a counter identification;
before the counting of the count value by adopting the corresponding second-stage counter in the global counter table, the method further comprises:
and determining the second-stage counter corresponding to the counter identification in the synchronous request.
10. A count processing apparatus, comprising:
an acquisition module configured to perform acquiring a 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 determining module configured to determine a sum of a difference between a set upper count limit and the total count backup value and a counted value of a first-stage counter table as a count threshold of the first-stage counter table;
The counting module is configured to count the resource quantity requested by the resource allocation request by adopting a corresponding first-level counter in the first-level counter table;
the aggregation module is configured to aggregate the count value of each first-stage counter in the first-stage counter table to obtain an updated count value of the first-stage counter table;
a response module configured to send a response message indicating whether resource allocation is allowed or not according to the count value updated by the first-level counter table and the count threshold;
and the synchronization module is configured to periodically synchronize 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 the count values of the second-stage counters are aggregated to obtain the total count value.
11. The count processing apparatus of claim 10 wherein the response module comprises:
a first transmitting unit configured to perform transmitting a first response message for refusing to allocate the amount of resources requested by the resource allocation request if the count value updated by the first-stage counter table is greater than or equal to the count threshold of the first-stage counter table; and
And a second transmitting unit configured to perform transmitting a second response message for allowing allocation of the amount of resources requested by the resource allocation request if the count value updated by the first-stage counter table is smaller than the count threshold of the first-stage counter table.
12. The count processing apparatus of claim 10, further comprising:
the second determining module is configured to acquire a user identifier carried in the resource allocation request; carrying out hash processing on the user identifier to obtain a hash value of the user identifier; and determining the first-level counter corresponding to the hash value of the user identifier from the first-level counter table.
13. The count processing apparatus according to any one of claims 10 to 12, wherein the synchronization module includes:
a first reading unit configured to read a device identification;
the processing unit is configured to perform hash processing on the equipment identifier to obtain a hash value of the equipment identifier;
a determining unit configured to determine the second-level counter corresponding to the hash value of the device identifier from among the global counter table;
And the first sending unit is configured to periodically generate and send a synchronous request carrying the counter identification of the second-stage counter and the updated count value of the first-stage counter.
14. The count processing apparatus according to any one of claims 10 to 12, wherein the synchronization module includes:
a second reading unit configured to read the device identification;
and a second sending unit configured to periodically generate and send a synchronization request carrying the device identifier and the count value updated by the first-stage counter, where the device identifier is used to determine the corresponding second-stage counter in the global counter table.
15. A count processing apparatus, comprising:
an acquisition module configured to perform acquisition of count values of the first-level counter table periodically synchronized to the global counter table;
a counting module configured to count the count value with the corresponding second-stage counter in the global counter table;
the aggregation module is configured to aggregate count values of a plurality of second-stage 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-stage counter table to obtain a total count backup value, wherein the total count backup value is used for responding to a resource allocation request.
16. The count processing apparatus of claim 15 wherein the acquisition module is further configured to:
and receiving a synchronization request, wherein the synchronization request carries the count value of the first-stage counter table periodically synchronized to the global counter table.
17. The count processing apparatus of claim 16 wherein the synchronization request further carries a device identification of a device running the first level counter table; the device further comprises:
the first processing module is configured to perform hash processing on the equipment identifier to obtain a hash value of the equipment identifier; and determining the second-stage counter corresponding to the hash value of the equipment identifier from the global counters.
18. The count processing apparatus of claim 16 wherein the synchronization request further carries a counter identification; the device further comprises:
and a second processing module configured to determine the second-stage counter corresponding to the counter identification in the synchronization request.
19. 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 count processing method of any one of claims 1 to 5 or to implement the count processing method of any one of claims 6 to 9.
20. A counting processing system, comprising a global server and at least one counting server;
the counting server configured to perform the counting processing method of any one of claims 1 to 5;
the global server configured to perform the count processing method of any one of claims 6 to 9.
21. 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 method of any one of claims 1 to 5 or to perform the counting method of any one of claims 6 to 9.
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 CN112131267A (en) 2020-12-25
CN112131267B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11509590B2 (en) * 2021-02-17 2022-11-22 Juniper Networks, Inc. Determining network device statistics associated with fast counters and slow counters

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7401102B2 (en) * 2004-10-19 2008-07-15 International Business Machines Corporation Management of global counters in transactions
US9100362B2 (en) * 2012-07-06 2015-08-04 Yahoo! Inc. Peer-to-peer architecture for web traffic management

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN112131267A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN107480990B (en) Block chain accounting method and device
CN109104336B (en) Service request processing method and device, computer equipment and storage medium
CN107493340B (en) Data distribution verification method, device and system in block chain network
CN110597858A (en) Task data processing method and device, computer equipment and storage medium
CN109246229A (en) A kind of method and apparatus of distribution resource acquisition request
CN110602056B (en) Service parameter transmission method and device
CN112714192B (en) Data synchronization method and device, computer readable medium and electronic equipment
US20240146691A1 (en) Data processing method, livestreaming method, authentication server, and live data server
CN111966289A (en) Partition optimization method and system based on Kafka cluster
CN110688523A (en) Video service providing method, device, electronic equipment and storage medium
CN109902103A (en) Service data management method, device, equipment and computer readable storage medium
CN106375102A (en) Service registration method, application method and correlation apparatus
CN112131267B (en) Count processing method, device, server and count processing system
CN115442373A (en) Data processing method, device, equipment and storage medium
CN110245014B (en) Data processing method and device
CN113067802A (en) User identification method, device, equipment and computer readable storage medium
CN109214189B (en) Method, device, storage medium and electronic equipment for identifying program bugs
CN113467718B (en) Data processing method and device, electronic equipment and storage medium
CN111010290A (en) Service log processing method and device, electronic equipment and storage medium
CN109347766A (en) A kind of method and device of scheduling of resource
CN115422184A (en) Data acquisition method, device, equipment and storage medium
CN110134547B (en) Middleware-based repeated data deleting method and related device
CN110489231B (en) Transaction information recording method, apparatus and computer readable storage medium
CN113760640A (en) Monitoring log processing method, device, 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