CN112131241A - System quota real-time statistical method, device, equipment and storage medium - Google Patents

System quota real-time statistical method, device, equipment and storage medium Download PDF

Info

Publication number
CN112131241A
CN112131241A CN202011070201.0A CN202011070201A CN112131241A CN 112131241 A CN112131241 A CN 112131241A CN 202011070201 A CN202011070201 A CN 202011070201A CN 112131241 A CN112131241 A CN 112131241A
Authority
CN
China
Prior art keywords
quota
condition
conditions
option information
version number
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.)
Pending
Application number
CN202011070201.0A
Other languages
Chinese (zh)
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.)
Shanghai Zhongyan Network Technology Co ltd
Original Assignee
Shanghai Zhongyan Network 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 Shanghai Zhongyan Network Technology Co ltd filed Critical Shanghai Zhongyan Network Technology Co ltd
Priority to CN202011070201.0A priority Critical patent/CN112131241A/en
Publication of CN112131241A publication Critical patent/CN112131241A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2329Optimistic concurrency control using versioning
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a system quota real-time statistical method, a device, equipment and a storage medium. The method comprises the steps of establishing a quota check table comprising a plurality of quota conditions and option information corresponding to the quota conditions, wherein the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions; caching quota condition quantity, and creating a local version number and a remote version number; acquiring option information, matching the option information with quota conditions, checking quota condition quantity according to a matching result, and updating quota condition quantity and a local version number; and comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result. The method and the device support cross quota configuration with dimension not larger than 4, option combination and recombination, and quota condition quantity statistics under the condition of complex quota is realized. The method and the device solve the technical problems that in the related technology, a quota setting mode only supports a simple quota condition and cannot meet complicated and diversified investigation requirements.

Description

System quota real-time statistical method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for system quota real-time statistics.
Background
The questionnaire system usually has two quota setting modes, namely a common quota and a cross quota, after a quota check is set for a question, whether a quota full member exists is checked according to a quota check item in a question answering process, if one quota check item is full, the quota of the question answering person is judged to be full, and the questionnaire survey is terminated. If the user successfully finishes the submission of the answer sheet, the system updates each matched quota condition according to the answer sheet submitted by the user, adds 1 to the finished quantity of the quota condition and stores the quota condition in the database. Therefore, the investigation crowd can be controlled to meet the actual requirements, and the investigation can meet the actual requirements.
The current quota setting mode only supports simple quota conditions, such as 1-dimensional or 2-dimensional cross quotas, and the simple quota conditions cannot meet investigation requirements along with the complexity and diversity of investigation conditions.
Aiming at the problems that the quota setting mode in the related technology only supports a simple quota condition and cannot meet the research requirements of complication and diversity, an effective solution is not provided at present.
Disclosure of Invention
The application mainly aims to provide a method, a device, equipment and a storage medium for counting system quota in real time, so as to solve the problem that the quota setting mode in the related technology only supports a simple quota situation, and the research requirements of complication and diversity cannot be met.
In order to achieve the above object, in a first aspect, the present application provides a system quota real-time statistical method.
The method according to the application comprises the following steps:
creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions;
caching quota condition quantities of a plurality of quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and a local version number;
and comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result.
In one possible implementation manner of the present application, the method further includes:
carrying out data tiling processing on the cross quota condition not greater than 4 dimensions by using a Cartesian product method to obtain a corresponding one-dimensional array;
the one-dimensional array is stored in a quota check table.
In one possible implementation manner of the present application, the preset rule includes an option combination rule, where the option combination rule represents that an option information combination exists in option information of multiple quota conditions, and the option combination rule includes: and naturally sequencing and combining each option information in the option information combination with the option information of other quota conditions.
In a possible implementation manner of the present application, comparing the quota condition number before updating with a preset threshold, and performing quota allocation operation according to a comparison result includes:
if the quota condition number before updating is larger than or equal to a preset threshold, determining that the quota corresponding to the quota condition is full, and stopping continuing the quota;
and if the quota condition number before updating is smaller than the preset threshold, updating the remote version number and continuing quota operation.
In a possible implementation manner of the present application, updating the cached quota condition number is to add 1 to the quota condition number to obtain an updated quota condition number.
In one possible implementation manner of the present application, the method further includes:
creating an index mark for each quota condition of the quota check table;
and positioning and searching the quota condition by using a preset query symbol, wherein the preset query symbol is matched with the index mark.
In a second aspect, the present application further provides a system quota real-time statistics apparatus, the apparatus includes:
the system comprises a check table establishing module, a quota check table establishing module and a quota checking module, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions;
the storage module is used for caching quota condition quantities of a plurality of quota conditions respectively and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
the acquisition updating module is used for acquiring the option information uploaded by the user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and the local version number at the same time;
and the quota operation module is used for comparing the quota condition number before updating with a preset threshold value and performing quota allocation operation according to a comparison result.
In one possible implementation manner of the present application, the check table creating module includes:
the processing unit is used for carrying out data tiling processing on the cross quota condition not greater than 4 dimensions by using a Cartesian product method to obtain a corresponding one-dimensional array;
the one-dimensional array is stored in a quota check table.
In one possible implementation manner of the present application, the quota operating module is specifically configured to:
if the quota condition number before updating is larger than or equal to a preset threshold, determining that the quota corresponding to the quota condition is full, and stopping continuing the quota;
and if the quota condition number before updating is smaller than the preset threshold, updating the remote version number and continuing quota operation.
In one possible implementation manner of the present application, the obtaining and updating module is specifically configured to:
and adding 1 to the quota condition number to obtain the updated quota condition number.
In one possible implementation manner of the present application, the check table establishing module is further specifically configured to:
creating an index mark for each quota condition of the quota check table;
and positioning and searching the quota condition by using a preset query symbol, wherein the preset query symbol is matched with the index mark.
In a third aspect, the present application further provides an electronic device for real-time system quota statistics, where the electronic device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the system quota real-time statistics method of any of the first aspects.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is loaded by a processor to execute the steps in the system quota real-time statistics method in any one of the first aspect.
In the embodiment of the application, a real-time system quota counting method is provided, a quota check table comprising a common quota condition and a cross quota condition not greater than 4 dimensions is created, cross quota configuration not greater than 4 dimensions can be supported, option combination and recombination can be supported, quota condition quantity counting under the condition of a complex quota is realized, and complicated and diversified investigation requirements can be met; and further, the technical problems that in the related art, the quota setting mode only supports a simple quota condition and cannot meet complicated and diversified investigation requirements are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow chart illustrating an embodiment of a method for real-time system quota statistics according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an embodiment of performing a quota allocation operation according to a comparison result according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an embodiment of performing location lookup on a quota condition according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram illustrating an embodiment of a system quota real-time statistics apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an embodiment of an electronic device for real-time system quota statistics, according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
In addition, the term "plurality" shall mean two as well as more than two.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
First, an embodiment of the present application provides a method for real-time system quota statistics, where an execution subject of the method for real-time system quota statistics is a device for real-time system quota statistics, and the device for real-time system quota statistics is applied to a processor, and the method for real-time system quota statistics includes: creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions; caching quota condition quantities of a plurality of quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities; acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and a local version number; and comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result.
Referring to fig. 1, fig. 1 is a schematic flow chart of an embodiment of a real-time system quota statistics method provided in the present application, where the real-time system quota statistics method includes:
101. and creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions.
In this embodiment of the present application, a quota check table may adopt a list data format and be stored in a database MongoDB stored based on a distributed file, and the quota check table may be named as option _ combinations in the MongoDB database, and a plurality of quota conditions correspond to the option _ combinations format respectively, where the option _ combinations format corresponding to a common quota condition may be set to be < qid > _< option _ id >, and a cross quota condition not greater than 4 dimensions may have three cases, which are respectively a 2-dimensional cross quota, a 3-dimensional cross quota, and a 4-dimensional cross quota, and in this embodiment of the present application, a cartesian product method is first used to perform data tiling on the cross quota condition not greater than 4 dimensions, so as to obtain a corresponding one-dimensional array, and the one-dimensional array is stored in the quota check table.
It should be noted that, in this embodiment of the application, the option information corresponding to the multiple quota conditions may be divided into two cases, namely, an option combination case corresponding to a 4-dimensional cross quota condition, where the 4-dimensional cross quota condition is denoted as a, B, and C, and D, A, B, C, D respectively denotes the option information corresponding to the quota condition of one dimension, and for the option combination case, it is assumed that the option information a is an option combination G (E, F), that is, the option information a is a combination G of an E option and an F option, and the 4-dimensional cross quota condition may be denoted as (E, B, and C, and D) or (F, B, and C, and D); the option _ combinations format corresponding to the 4-dimensional cross quota condition can be generated by a natural ordering combination according to the A and B and C and D and option combination G (E, F), such as A | B | C | D.
102. And caching quota condition quantities of a plurality of quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities.
In this embodiment of the present application, counting quota progress is implemented by using a redis _ memorize caching mechanism, redis is actually a key value database, but it has the advantage of a partial relational database at the same time.
103. And acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and the local version number.
In this embodiment of the application, the preset rule may be adapted to the option information corresponding to the multiple quota conditions in step 101, specifically, the preset rule may include an option combination rule, where the option combination rule represents that an option information combination exists in the option information of the multiple quota conditions, and the option combination rule includes: and performing the same natural ordering combination as in step 101 on each option information in the option information combination and the option information of other quota conditions. After acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking quota condition quantity according to a matching result, updating a local version number after the quota condition quantity is changed, and updating quota condition quantity cached by a pickle serialization module when entering a quota progress page.
104. And comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result.
In the embodiment of the application, by creating the quota check table including the common quota condition and the cross quota condition not greater than 4 dimensions, cross quota configuration not greater than 4 dimensions can be supported, option combination and recombination can also be supported, quota condition quantity statistics under the condition of a complex quota is realized, and complicated and diverse investigation requirements can be met.
As shown in fig. 2, a schematic flow chart of an embodiment of performing quota allocation operation according to a comparison result provided in an embodiment of the present application is provided, in some embodiments of the present application, the comparing a quota condition number before updating with a preset threshold, and performing quota allocation operation according to the comparison result may further include:
201. and if the quota condition number before updating is larger than or equal to the preset threshold, determining that the quota corresponding to the quota condition is full, and stopping continuing the quota.
202. And if the quota condition number before updating is smaller than the preset threshold, updating the remote version number and continuing quota operation.
In the embodiment of the application, when a user submits answers, no matter whether the current quota condition number reaches a preset threshold, the quota condition number is added by 1, so that in the embodiment of the application, the quota condition number before updating is compared with the preset threshold, if the quota condition number before updating is greater than or equal to the preset threshold, the quota corresponding to the quota condition is determined to be full, the answer is finished, and the quota is stopped to continue; if the quota condition number before updating is smaller than the preset threshold, updating the remote version number to enable the remote version number to be consistent with the local version number, continuing quota operation, and directly reading the cached updated quota condition number at the pickle serialization module when entering a quota progress page next time.
As shown in fig. 3, which is a schematic flow chart of an embodiment of performing location search on a quota condition according to an embodiment of the present application, in some embodiments of the present application, a method may further include:
301. creating an index mark for each quota condition of the quota check table;
302. and positioning and searching the quota condition by using a preset query symbol, wherein the preset query symbol is matched with the index mark.
In the embodiment of the application, the preset query character can be set as a $ in operational character of the MongoDB database, and the index mark matched with the $ in operational character is searched in the quota check table through the $ in operational character, so that the quota condition can be quickly searched, and the problem of high difficulty in searching the quota condition when option combination exists is solved.
In order to better implement the real-time system quota statistical method in the embodiment of the present application, on the basis of the real-time system quota statistical method, an embodiment of the present application further provides a real-time system quota statistical device, as shown in fig. 4, the real-time system quota statistical device 400 includes:
a check table establishing module 401, configured to create a quota check table, where the quota check table includes multiple quota conditions and option information corresponding to the multiple quota conditions, and the multiple quota conditions include a common quota condition and a cross quota condition that is not greater than 4 dimensions;
a storage module 402, configured to cache quota condition quantities of multiple quota conditions, respectively, and create a local version number and a remote version number that is consistent with the local version number for the quota condition quantities;
the acquisition update module 403 is configured to acquire option information uploaded by a user, match the option information with quota conditions according to a preset rule, check the quota condition number according to a matching result, and update the cached quota condition number and the local version number at the same time;
and the quota operation module 404 is configured to compare the quota condition number before updating with a preset threshold, and perform a quota allocation operation according to a comparison result.
In some embodiments of the present application, the look-up table establishing module 401 includes:
the processing unit 4001 is configured to perform data tiling on a cross quota condition that is not greater than 4 dimensions by using a cartesian product method to obtain a corresponding one-dimensional array;
the one-dimensional array is stored in a quota check table.
In some embodiments of the present application, the quota operation module 404 is specifically configured to:
if the quota condition number before updating is larger than or equal to a preset threshold, determining that the quota corresponding to the quota condition is full, and stopping continuing the quota;
and if the quota condition number before updating is smaller than the preset threshold, updating the remote version number and continuing quota operation.
In some embodiments of the present application, the obtaining and updating module 403 is specifically configured to:
and adding 1 to the quota condition number to obtain the updated quota condition number.
In some embodiments of the present application, the look-up table establishing module 401 is further specifically configured to:
creating an index mark for each quota condition of the quota check table;
and positioning and searching the quota condition by using a preset query symbol, wherein the preset query symbol is matched with the index mark.
Specifically, for a specific process of each module in the device according to the embodiment of the present application to implement the function thereof, reference may be made to descriptions of the system quota real-time statistical method in any embodiment corresponding to fig. 1 to fig. 3, which is not described herein again in detail.
The embodiment of the present application further provides an electronic device for real-time system quota statistics, which integrates any one of the system quota real-time statistics apparatuses provided by the embodiments of the present application, and the electronic device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to perform the steps of the system quota real-time statistics method in any embodiment of the system quota real-time statistics method described above.
The electronic device for real-time system quota statistics in the embodiment of the application integrates any one of the system quota real-time statistics devices provided in the embodiment of the application. As shown in fig. 5, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, specifically:
the electronic device may include components such as a processor 501 of one or more processing cores, memory 502 of one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 501 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the electronic device. Optionally, processor 501 may include one or more processing cores; the Processor 501 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and preferably the processor 501 may integrate an application processor, which handles primarily the operating system, user interfaces, application programs, etc., and a modem processor, which handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.
The memory 502 may be used to store software programs and modules, and the processor 501 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the server, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
The electronic device further comprises a power supply 503 for supplying power to each component, and preferably, the power supply 503 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 503 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may also include an input unit 504, where the input unit 504 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the server may further include a display unit and the like, which will not be described in detail herein. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 runs the application program stored in the memory 502, so as to implement various functions as follows:
creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions;
caching quota condition quantities of a plurality of quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and a local version number;
and comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system quota real-time counting apparatus, the electronic device and the corresponding units thereof described above may refer to the description of the system quota real-time counting method in any embodiment corresponding to fig. 1 to fig. 3, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by related hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by the processor 501.
To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The system quota real-time statistical method comprises a computer program and a processor, wherein the computer program is loaded by the processor to execute the steps of any one of the system quota real-time statistical methods provided by the embodiments of the application. For example, the computer program may be loaded by a processor to perform the steps of:
creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions;
caching quota condition quantities of a plurality of quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
acquiring option information uploaded by a user, matching the option information with quota conditions according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and a local version number;
and comparing the quota condition number before updating with a preset threshold value, and performing quota allocation operation according to the comparison result.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A system quota real-time statistical method is characterized by comprising the following steps:
creating a quota check table, wherein the quota check table comprises a plurality of quota conditions and option information corresponding to the quota conditions, and the quota conditions comprise common quota conditions and cross quota conditions not greater than 4 dimensions;
caching quota condition quantities of the quota conditions respectively, and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
acquiring option information uploaded by a user, matching the option information with the quota condition according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and the local version number at the same time;
and comparing the quota condition quantity before updating with a preset threshold value, and performing quota allocation operation according to a comparison result.
2. The method of claim 1, wherein the method further comprises:
carrying out data tiling processing on the cross quota condition not greater than 4 dimensions by using a Cartesian product method to obtain a corresponding one-dimensional array;
and storing the one-dimensional array in the quota check table.
3. The method of claim 1, wherein the preset rule comprises an option combination rule, the option combination rule representing that an option information combination exists in the option information of the plurality of quota conditions, the option combination rule comprising: and naturally sequencing and combining each option information in the option information combination with the option information of other quota conditions.
4. The method according to claim 1, wherein the comparing the quota condition number before updating with a preset threshold and performing quota allocation operation according to a comparison result includes:
if the quota condition number before updating is larger than or equal to the preset threshold, determining that the quota corresponding to the quota condition is full, and stopping continuing the quota;
and if the quota condition number before updating is smaller than the preset threshold, updating the remote version number and continuing quota operation.
5. The method of claim 1, wherein the updating the cached quota conditional quantity is to add 1 to the quota conditional quantity to obtain an updated quota conditional quantity.
6. The method of claim 1, wherein the method further comprises:
creating an index mark for each quota condition of the quota check table;
and carrying out positioning search on the quota condition by using a preset query symbol, wherein the preset query symbol is matched with the index mark.
7. A system quota real-time statistic device, comprising:
a check table establishing module, configured to create a quota check table, where the quota check table includes multiple quota conditions and option information corresponding to the multiple quota conditions, and the multiple quota conditions include a common quota condition and an intersection quota condition that is not greater than 4 dimensions;
the storage module is used for caching quota condition quantities of the quota conditions respectively and creating a local version number and a remote version number consistent with the local version number for the quota condition quantities;
the acquisition updating module is used for acquiring option information uploaded by a user, matching the option information with the quota condition according to a preset rule, checking the quota condition quantity according to a matching result, and updating the cached quota condition quantity and the local version number at the same time;
and the quota operation module is used for comparing the quota condition number before updating with a preset threshold value and performing quota allocation operation according to a comparison result.
8. The apparatus of claim 1, wherein the look-up table establishing module comprises:
the processing unit is used for carrying out data tiling processing on the cross quota condition not greater than 4 dimensions by using a Cartesian product method to obtain a corresponding one-dimensional array;
and storing the one-dimensional array in the quota check table.
9. An electronic device for real-time statistics of system quota, comprising:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the system quota real-time statistics method of any of claims 1-6.
10. A computer-readable storage medium, having stored thereon a computer program, which is loaded by a processor to perform the steps of the method for real-time statistics of system quotas according to any one of claims 1 to 6.
CN202011070201.0A 2020-09-30 2020-09-30 System quota real-time statistical method, device, equipment and storage medium Pending CN112131241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011070201.0A CN112131241A (en) 2020-09-30 2020-09-30 System quota real-time statistical method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011070201.0A CN112131241A (en) 2020-09-30 2020-09-30 System quota real-time statistical method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112131241A true CN112131241A (en) 2020-12-25

Family

ID=73844968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011070201.0A Pending CN112131241A (en) 2020-09-30 2020-09-30 System quota real-time statistical method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112131241A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818208A (en) * 2021-02-25 2021-05-18 长沙冉星信息科技有限公司 Method for realizing actual calculation of questionnaire quota
CN116485451A (en) * 2023-04-20 2023-07-25 苏州众言网络科技股份有限公司 Quota management and control method, system and device applied to online questionnaire

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104537013A (en) * 2014-12-18 2015-04-22 北京京东尚科信息技术有限公司 Data processing method and device
CN106603713A (en) * 2016-12-29 2017-04-26 深圳Tcl新技术有限公司 Session management method and system
CN107463511A (en) * 2017-01-23 2017-12-12 北京思特奇信息技术股份有限公司 A kind of data internationalization implementation method and device based on multi-level buffer
KR101896474B1 (en) * 2016-06-30 2018-09-07 삼성카드 주식회사 Survey method and apparatus
CN111142746A (en) * 2019-12-11 2020-05-12 上海众言网络科技有限公司 System quota calculation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104537013A (en) * 2014-12-18 2015-04-22 北京京东尚科信息技术有限公司 Data processing method and device
KR101896474B1 (en) * 2016-06-30 2018-09-07 삼성카드 주식회사 Survey method and apparatus
CN106603713A (en) * 2016-12-29 2017-04-26 深圳Tcl新技术有限公司 Session management method and system
CN107463511A (en) * 2017-01-23 2017-12-12 北京思特奇信息技术股份有限公司 A kind of data internationalization implementation method and device based on multi-level buffer
CN111142746A (en) * 2019-12-11 2020-05-12 上海众言网络科技有限公司 System quota calculation method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
施祖辉: "《市场调研实务》", 30 October 2002 *
许楠等: "《软件工程中数据库的设计与实现研究》", 30 March 2019 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112818208A (en) * 2021-02-25 2021-05-18 长沙冉星信息科技有限公司 Method for realizing actual calculation of questionnaire quota
CN116485451A (en) * 2023-04-20 2023-07-25 苏州众言网络科技股份有限公司 Quota management and control method, system and device applied to online questionnaire
CN116485451B (en) * 2023-04-20 2024-02-02 苏州众言网络科技股份有限公司 Quota management and control method, system and device applied to online questionnaire

Similar Documents

Publication Publication Date Title
CN110807041B (en) Index recommendation method and device, electronic equipment and storage medium
CN107958028A (en) Method, apparatus, storage medium and the terminal of data acquisition
CN102479255B (en) Optimizing database query
CN110909034B (en) Service data distribution method and device, terminal equipment and storage medium
CN112131241A (en) System quota real-time statistical method, device, equipment and storage medium
CN109885452A (en) Method for monitoring performance, device and terminal device
CN102004752A (en) Flexible cube data warehousing
CN109285586A (en) Chemical reagent inventory management method, electronic equipment and computer readable storage medium
CN109840257A (en) Data base query method, device, computer installation and readable storage medium storing program for executing
CN112396677B (en) Animation production method, electronic device, and storage medium
CN112783616A (en) Concurrent conflict processing method and device and computer storage medium
CN108153877A (en) Data dictionary methods of exhibiting, device, terminal device and storage medium
CN114371845A (en) Form generation method and device
CN112328616A (en) Data updating method, device and storage medium
CN111104418A (en) Text description processing method and device and electronic equipment
CN116089417A (en) Information acquisition method, information acquisition device, storage medium and computer equipment
CN111652281B (en) Information data classification method, device and readable storage medium
CN111539049A (en) Intelligent assembling system and method for electronic equipment
CN109857991A (en) Date storage method, device and electronic equipment
CN109828983A (en) PG data base processing method, device, electronic equipment and storage medium
CN114579193B (en) Multi-system loading method, device, equipment and storage medium
CN115796710B (en) Intelligent sampling inspection method and device for power supplies, electronic equipment and readable storage medium
CN113110868B (en) File merging method, device, computer equipment and storage medium
CN117435278A (en) Alarm clock generation method and device, electronic equipment and computer readable storage medium
CN113961585A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201225