CN111143365B - Data sub-table method, device, computer equipment and storage medium - Google Patents
Data sub-table method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111143365B CN111143365B CN201911365773.9A CN201911365773A CN111143365B CN 111143365 B CN111143365 B CN 111143365B CN 201911365773 A CN201911365773 A CN 201911365773A CN 111143365 B CN111143365 B CN 111143365B
- Authority
- CN
- China
- Prior art keywords
- dimensional code
- code data
- time period
- transaction request
- request
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 238000012545 processing Methods 0.000 claims abstract description 45
- 238000004590 computer program Methods 0.000 claims description 10
- 238000003780 insertion Methods 0.000 claims description 2
- 230000037431 insertion Effects 0.000 claims description 2
- 230000009471 action Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 230000002354 daily effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000003203 everyday effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/32—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
- G06Q20/327—Short range or proximity payments by means of M-devices
- G06Q20/3274—Short range or proximity payments by means of M-devices using a pictured code, e.g. barcode or QR-code, being displayed on the M-device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computer Networks & Wireless Communication (AREA)
- Software Systems (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data sub-table method, a data sub-table device, computer equipment and a storage medium. The method comprises the following steps: pre-creating a first script and a second script; the first time period consists of a plurality of second time periods; when the first time period arrives, automatically creating a summary table corresponding to the first time period through the first script; when the second time period arrives, automatically creating a sub-table corresponding to the second time period through the second script; when a server receives a transaction request, inserting a record of the transaction request into a corresponding sub-table according to the time of the transaction request; when the server receives the processing result of the transaction request, updating the record in the corresponding sub-table; judging whether the processing result is successful, if so, inserting a corresponding record into the corresponding summary list. The method can reduce the data quantity contained in each table by automatically creating a plurality of tables, thereby effectively improving the speed of inquiring records and modifying records.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data splitting method, a data splitting device, a computer device, and a storage medium.
Background
With the development of technology, physical cards are slowly transformed into electronic cards, and with the popularization of electronic cards, transactions carried out by using electronic cards every day can reach millions. Especially during peak hours, the usage of electronic cards is very large, which also leads to a situation where a server crash is likely to occur. Current state of the art to address this situation is to increase the speed of processing transaction requests by adding servers, replacing faster databases, frame upgrades, and optimizing other functions. However, these methods are designed according to the actual service scenario, which is difficult to implement and consumes a lot of resources.
Disclosure of Invention
The embodiment of the invention provides a data sub-table method, a data sub-table device, computer equipment and a storage medium, which aim to reduce the data quantity contained in each table by automatically creating a plurality of tables so as to further effectively improve the speed of inquiring records and modifying records.
In a first aspect, an embodiment of the present invention provides a data splitting method, including:
a first script for automatically generating a summary list every first time period and a second script for automatically generating a sub-list every second time period are pre-created; the first time period consists of a plurality of second time periods;
when the first time period arrives, automatically creating a summary table corresponding to the first time period through the first script;
when the second time period arrives, automatically creating a sub-table corresponding to the second time period through the second script;
when a server receives a transaction request, inserting a record of the transaction request into a corresponding sub-table according to the time of the transaction request;
when the server receives the processing result of the transaction request, updating the record in the corresponding sub-table;
judging whether the processing result is successful, if so, inserting a corresponding record into the corresponding summary list.
In a second aspect, an embodiment of the present invention provides a data sub-table apparatus, including:
a script creation unit for creating in advance a first script for automatically generating a summary list every a first time period and a second script for automatically generating a sub-list every a second time period; the first time period consists of a plurality of second time periods;
the summary list creation unit is used for automatically creating a summary list corresponding to the first time period through the first script when the first time period arrives;
the sub-table creating unit is used for automatically creating a sub-table corresponding to the second time period through the second script when the second time period arrives;
the record inserting unit is used for inserting the record of the transaction request into the corresponding sub-table according to the time of the transaction request when the server receives the transaction request;
the record updating unit is used for updating the record in the corresponding sub-table when the server receives the processing result of the transaction request;
and the record summarizing unit is used for judging whether the processing result is successful, if so, inserting a corresponding record into the corresponding summary list.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the data splitting method described in the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores a computer program, where the computer program when executed by a processor causes the processor to perform the data splitting method described in the first aspect.
The embodiment of the invention provides a data sub-table method, a data sub-table device, computer equipment and a storage medium. The method comprises the following steps: a first script for automatically generating a summary list every first time period and a second script for automatically generating a sub-list every second time period are pre-created; the first time period consists of a plurality of second time periods; when the first time period arrives, automatically creating a summary table corresponding to the first time period through the first script; when the second time period arrives, automatically creating a sub-table corresponding to the second time period through the second script; when a server receives a transaction request, inserting a record of the transaction request into a corresponding sub-table according to the time of the transaction request; when the server receives the processing result of the transaction request, updating the record in the corresponding sub-table; judging whether the processing result is successful, if so, inserting a corresponding record into the corresponding summary list. The embodiment of the invention uses a data sub-table method, and reduces the data quantity contained in each table by automatically creating a plurality of tables, thereby effectively improving the speed of inquiring records and modifying records.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data sub-table method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a data sub-table device according to an embodiment of the present invention;
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1, fig. 1 is a flowchart of a data splitting method according to an embodiment of the invention.
The specific steps can include S101-S106:
s101: a first script for automatically generating a summary list every first time period and a second script for automatically generating a sub-list every second time period are pre-created; the first time period consists of a plurality of second time periods;
in an embodiment, in order to improve the efficiency of querying and modifying records in the table, a table with a relatively large data size needs to be split according to time, and a first script for automatically generating a summary table every first time period and a second script for automatically generating a sub-table every second time period can be created in advance to split the table. Wherein the first time period consists of a number of second time periods.
In this embodiment, the first time period is a month (i.e., 1 month), and the second time period is a day (i.e., 1 day).
In particular, the first time period may be set to a month and the second time period to a day, each first time period being composed of a different number of second time periods, as the case may be, for example: the current time is 12 months, and 31 second time periods corresponding to the current first time period are 31 because 31 days exist in 12 months. The first script will automatically create a 12 month summary table, and the second script will automatically create 31 12 month sub-tables, since the first time period consists of several second time periods, all records in the 12 month summary table can be queried in the corresponding 12 month sub-table.
S102: when the first time period arrives, automatically creating a summary table corresponding to the first time period through the first script;
when the current first time period is over and the next first time period arrives, a summary table corresponding to the next first time period can be automatically created through the first script. That is, the first script may be configured to automatically generate the summary table immediately before the end of the current first time period and before the start of the next first time period, or may be configured to automatically generate the summary table immediately after the end of the current first time period and before the start of the next first time period. However, in the embodiment of the present invention, it is preferable that the summary table is automatically generated immediately before the current first time period ends and the next first time period begins, so that it is ensured that the data generated in the next first time period can be recorded in the summary table.
In this embodiment, when the first time period is set to be a month, the first script may be set to automatically generate the summary table of the next month when the month is at the end of the month, or may be set to automatically generate the summary table of the next month when the month is at the beginning of the month. For example: when it is required to create a summary table of 12 months, the first script may be set to automatically create a summary table of 12 months on day 11 months 30 (immediately before the end of the current first time period and before the start of the next first time period), or may be set to automatically create a summary table of 12 months on day 12 months 1 (after the end of the current first time period and when the next first time period).
S103: when the second time period arrives, automatically creating a sub-table corresponding to the second time period through the second script;
when the current second time period is over and the next second time period arrives, a sub-table corresponding to the next second time period can be automatically created through the second script. That is, the second script may be configured to automatically generate the sub-table immediately before the end of the current second time period and the start of the next second time period, or may be configured to automatically generate the sub-table immediately after the end of the current second time period and the start of the next second time period. However, in the embodiment of the present invention, it is preferable that the summary table is automatically generated immediately before the end of the current second time period and before the start of the next second time period, so that it is ensured that the data generated in the next second time period can be recorded in the sub-table.
In this embodiment, if the second time period is set to be a day, the second script may be set to automatically generate the sub-table of the second day before the end of the day, or may be set to automatically generate the sub-table when the second day starts. For example: when it is required to create a 12 month 3 day sub-table, the second script may be set to automatically create a 12 month 3 day sub-table at the 12 month 2 day 23 point 59 minutes 59 seconds (immediately before the end of the current second time period and before the start of the next second time period), or may be set to automatically create a 12 month 3 day sub-table at the 12 month 3 day 0 point 0 minutes 0 seconds (after the end of the current second time period and when the next second time period).
S104: when a server receives a transaction request, inserting a record of the transaction request into a corresponding sub-table according to the time of the transaction request;
when the server receives the transaction request, the record of the transaction request is inserted into the sub-table corresponding to the time according to the time of the transaction request, for example, if the time of the transaction request is 12 months and 1 day, the server inserts the record of the transaction request into the sub-table of 12 months and 1 day after receiving the transaction request.
In one embodiment, when the server receives the transaction request, the method inputs the record of the transaction request into the corresponding sub-table according to the time of the transaction request, and includes:
when the server receives a transaction request, acquiring time and request data of the transaction request;
and inserting the request data as a record into a sub-table corresponding to the current second time period according to the time of the transaction request.
Specifically, after the server receives the transaction request, the time of the transaction request and the request data are acquired, and the request data are inserted into the sub-table corresponding to the current second time period as a record according to the acquired time of the transaction request. The request data may include a user of the request, content of the request, a result of processing after processing the request, and the like.
In one embodiment, when the server receives the transaction request, the obtaining the time and the request data of the transaction request includes:
when the server receives a transaction request, generating two-dimensional code data, and taking the generated two-dimensional code data as a part of request data;
and returning the two-dimensional code data to the front end.
In this embodiment, when the server receives the transaction request, corresponding two-dimensional code data is generated according to the transaction request, and the generated two-dimensional code data is used as a part of the request data and is inserted into the sub-table corresponding to the current second time period as a record together with other parts of the request data. For example, when the user clicks the electronic card to present the payment two-dimensional code, the server will receive the payment request, then generate corresponding payment two-dimensional code data according to the payment request, and insert the generated payment two-dimensional code data as a part of the request data, together with other parts of the request data, as a record into the sub-table corresponding to the current second time period, where the record contains the payment two-dimensional code data.
When the server receives the transaction request, generating two-dimensional code data, and taking the generated two-dimensional code data as a part of the request data, wherein the method comprises the following steps:
and automatically setting the validity period of the two-dimensional code data while generating the two-dimensional code data.
In this embodiment, when a server receives a transaction request and generates two-dimensional code data, the validity period of the two-dimensional code data is automatically set, and if the two-dimensional code data is not used in the validity period, the two-dimensional code data is indicated to be in a valid state; if the two-dimensional code data is still unused after reaching the validity period, the two-dimensional code data will automatically fail, that is, the state of the two-dimensional code data will automatically become a failure state. Different validity periods can be set for different two-dimensional code data according to different scenes, for example, when real-time transaction (code scanning and payment collecting) is carried out, the two-dimensional code data are dynamic two-dimensional codes, and a shorter validity period is set for the two-dimensional code data; if the two-dimensional code data is a static two-dimensional code when non-real-time transaction (verification of group purchase ticket) is performed, a longer validity period can be set for the two-dimensional code data.
In an embodiment, the data sub-table method further includes:
when a query request is received, acquiring two-dimensional code data in the query request;
inquiring the state of the two-dimensional code data in the corresponding sub-table;
if the two-dimensional code data are in the failure state, returning a corresponding failure prompt;
and if the two-dimensional code data is in a valid state, controlling to continue the transaction.
In this embodiment, the query request refers to a verification request, for example, when a client opens an electronic card, the server is requested, the server generates two-dimensional code data and inserts the two-dimensional code data into a daily sub-table, and then the two-dimensional code data is returned to the front end, so that the client can see the corresponding two-dimensional code data, and when a merchant scans the two-dimensional code data, the server is requested, and at this time, the server receives the query request, so that the server can acquire the two-dimensional code data in the query request. And then inquiring the state of the two-dimensional code data in the sub-table of the current time, wherein the validity period is set when each two-dimensional code data is generated, if the two-dimensional code data is in the validity period, the two-dimensional code data is in the validity state, and if the two-dimensional code data is not in the validity period, the two-dimensional code data is in the failure state. If the two-dimensional code data is in the invalid state, a corresponding invalid prompt can be returned to the merchant, and if the two-dimensional code data is in the valid state, the transaction can be controlled to be continued, such as deduction and the like.
In an embodiment, after returning the corresponding failure prompt if the two-dimensional code data is in the failure state, the method further includes:
when a server receives a new transaction request, generating new two-dimensional code data, taking the newly generated two-dimensional code data as a part of new request data, and inserting a record of the new transaction request into a corresponding sub-table;
and returning the new two-dimensional code data to the front end.
In this embodiment, if one two-dimensional code data is in a failure state and a corresponding failure prompt is returned, a merchant can know that the two-dimensional code data has failed, so that a customer can be informed to refresh the two-dimensional code data, and the server receives a new transaction request at this time, so as to generate new two-dimensional code data, take the newly generated two-dimensional code data as a part of the new request data, and insert a record of the new transaction request into a corresponding sub-table. That is, the previous two-dimensional code data is invalidated, and the refreshing operation corresponds to the re-opening of the electronic card to generate the two-dimensional code data, that is, the generation of a new transaction request, and other parts of the request data are basically unchanged except the updating of the two-dimensional code data.
S105: when the server receives the processing result of the transaction request, updating the record in the corresponding sub-table;
after the current transaction request is processed, a processing result, such as a deduction consumption success, is automatically generated, the processing result of the transaction request is a processing success, such as a deduction consumption failure, and the processing result of the transaction request is a processing failure.
Regardless of the result of the transaction request, the server updates the record in the corresponding sub-table after receiving the result of the transaction request, e.g., a field in the record is the result of the transaction, and then specific content is updated under the field. Thus, the situation of the transaction request can be conveniently called at any time.
S106: judging whether the processing result is successful, if so, inserting a corresponding record into the corresponding summary list.
In this step, it is determined whether the processing result is successful, and only if the processing result is successful, a corresponding record is inserted into the summary table.
That is, only records in the summary table, which are successful, are saved, while corresponding records are not saved for other processing results. The purpose of this is to facilitate statistics and queries, for example when a merchant needs to query for a successful record, the summary table need only be invoked for the query, and no query in each sub-table is required. Generally, successful records have greater meaning to merchants, while failed records occupy only a small number, and only a corresponding sub-table is required to be queried.
In the embodiment of the invention, all records of the corresponding time are stored in the sub-table of each second time period, the processing result of the corresponding time is the record of successful processing in the total table of each first time period, and the merchant can inquire the record of successful processing in the total table and the records of various states in the sub-table, thereby improving the speed of modifying the records and improving the speed of inquiring the records.
For example, if the merchant needs to collect, for example, collect sales for a month, statistics can be performed directly through the month table.
For the sub-tables with frequent access and large data volume, a brand new sub-table is generated every day through the improvement of the embodiment of the invention, the data volume of each sub-table is relatively reduced greatly, and the access speed is very high no matter the operations such as modification, inquiry and the like. And the corresponding sub-table is only required to be operated according to time.
In the above embodiment of the present invention, the design of the total table plus the sub-table is adopted, and the total table is automatically generated according to a first time period, the sub-table is generated according to a second time period, and the first time period is composed of a plurality of second time periods. For example, the summary table may be a monthly table and the sub-table may be a daily table for each day of the month. The embodiment of the invention can also increase the classification of the table based on the embodiment, namely, the table is not simply divided into a summary table and a sub-table. For example, a table of a third time period, a fourth time period, a fifth time period, and the like may be added, where the third time period may be longer than the first time period or shorter than the second time period, and specifically may be adjusted according to the needs of the service scenario, and the fourth time period, the fifth time period, and the like may be set as needed. For example, assuming that the summary table is a month table and the sub-table is a day table, a season table, a year table, a hour table, and the like may be added. Records for each quarter may be maintained for a quarter table therein, a year table therein may be maintained for a year, and a hour table therein may be maintained for a record for each hour. Of course, for these time period tables, the records of the corresponding processing results can be selected as required, and only the query and the summary are needed.
In addition, in the embodiment of the invention, a double-table or multi-table result can be adopted for the total table according to the condition of the processing result, for example, three total tables can be automatically generated in each first time period, one of the total tables is specially used for storing the processing result as a record of processing success, the other total table is specially used for storing the processing result as a record of processing failure, and the rest of the total tables are specially used for storing the processing result as a result of processing abnormality. Therefore, when the records of each first time period are required to be summarized, the records can be automatically summarized according to different processing results, the summarizing efficiency is greatly improved, the inquiry of a user is facilitated, and the management of information is facilitated.
Referring to fig. 2, fig. 2 is a block diagram illustrating a data sub-table device 200 according to an embodiment of the present invention;
the apparatus 200 may include:
a script creation unit 201 for creating in advance a first script for automatically generating a summary table every first time period and a second script for automatically generating a sub-table every second time period; the first time period consists of a plurality of second time periods;
a summary table creating unit 202, configured to automatically create a summary table corresponding to a first time period through the first script when the first time period arrives;
a sub-table creating unit 203, configured to automatically create, when the second time period arrives, a sub-table corresponding to the second time period through the second script;
a record inserting unit 204, configured to insert, when the server receives the transaction request, a record of the transaction request into a corresponding sub-table according to a time of the transaction request;
a record updating unit 205, configured to update a record in the corresponding sub-table when the server receives a processing result of the transaction request;
and the record summarizing unit 206 is configured to determine whether the processing result is successful, and if so, insert a corresponding record into the corresponding summary table.
In an embodiment, the record inserting unit 204 includes:
a transaction request receiving unit, configured to obtain time and request data of a transaction request when the server receives the transaction request;
and the data insertion unit is used for inserting the request data as a record into the sub-table corresponding to the current second time period according to the time of the transaction request.
In an embodiment, the transaction request receiving unit comprises:
the two-dimensional code data generating unit is used for generating two-dimensional code data when the server receives a transaction request, and taking the generated two-dimensional code data as a part of the request data;
and the two-dimensional code data return unit is used for returning the two-dimensional code data to the front end.
In one embodiment, the data sub-table device 200 further includes:
the two-dimension code data acquisition unit is used for acquiring the two-dimension code data in the query request when the query request is received;
the state query unit is used for querying the state of the two-dimensional code data in the corresponding sub-table;
the failure prompt return unit is used for returning a corresponding failure prompt if the two-dimensional code data is in a failure state;
and the transaction control unit is used for controlling to continue the transaction if the two-dimensional code data are in a valid state.
In an embodiment, the two-dimensional code data generating unit includes:
and the validity period setting unit is used for automatically setting the validity period of the two-dimensional code data while generating the two-dimensional code data.
In one embodiment, the data sub-table device 200 further includes:
the new record inserting unit is used for generating new two-dimensional code data when the server receives a new transaction request, taking the newly generated two-dimensional code data as a part of the new request data, and inserting the record of the new transaction request into the corresponding sub-table;
and the new two-dimensional code data return unit is used for returning the new two-dimensional code data to the front end.
In one embodiment, the first time period is 1 month and the second time period is 1 day.
Since the embodiments of the apparatus portion and the embodiments of the method portion correspond to each other, the embodiments of the apparatus portion are referred to the description of the embodiments of the method portion, and are not repeated herein.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements the method provided by the above embodiments.
The invention also provides a computer device which can comprise a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method provided by the embodiment when executing the computer program.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (5)
1. A method for tabulating data, comprising:
a first script for automatically generating a summary list every first time period and a second script for automatically generating a sub-list every second time period are pre-created; the first time period consists of a plurality of second time periods;
when the first time period arrives, automatically creating a summary table corresponding to the first time period through the first script;
when the second time period arrives, automatically creating a sub-table corresponding to the second time period through the second script;
when a server receives a transaction request, inserting a record of the transaction request into a corresponding sub-table according to the time of the transaction request;
when the server receives the processing result of the transaction request, updating the record in the corresponding sub-table;
judging whether the processing result is successful or not, if so, inserting a corresponding record into a corresponding summary table, and storing the processing result of the corresponding time in the summary table of each first time period as a record of successful processing;
when the server receives the transaction request, the record of the transaction request is input into the corresponding sub-table according to the time of the transaction request, and the method comprises the following steps:
when a server receives a transaction request, acquiring time and request data of the transaction request, wherein the request data comprises a requested user, requested content and a processing result after the request is processed;
inserting the request data as a record into a sub-table corresponding to the current second time period according to the time of the transaction request;
when the server receives the transaction request, acquiring the time and the request data of the transaction request, wherein the method comprises the following steps:
when the server receives a transaction request, generating two-dimensional code data, and taking the generated two-dimensional code data as a part of request data;
returning the two-dimensional code data to the front end;
when a query request is received, acquiring two-dimensional code data in the query request;
inquiring the state of the two-dimensional code data in the corresponding sub-table;
if the two-dimensional code data are in the failure state, returning a corresponding failure prompt;
if the two-dimensional code data is in a valid state, controlling to continue the transaction;
when the server receives the transaction request, generating two-dimensional code data, and taking the generated two-dimensional code data as a part of the request data, wherein the method comprises the following steps:
automatically setting the validity period of the two-dimensional code data while generating the two-dimensional code data;
and if the two-dimensional code data is in a failure state, returning a corresponding failure prompt, wherein the method comprises the following steps:
when a server receives a new transaction request, generating new two-dimensional code data, taking the newly generated two-dimensional code data as a part of new request data, and inserting a record of the new transaction request into a corresponding sub-table;
and returning the new two-dimensional code data to the front end.
2. The method of claim 1, wherein the first time period is 1 month and the second time period is 1 day.
3. A data sub-metering device, comprising:
a script creation unit for creating in advance a first script for automatically generating a summary list every a first time period and a second script for automatically generating a sub-list every a second time period; the first time period consists of a plurality of second time periods;
the summary list creation unit is used for automatically creating a summary list corresponding to the first time period through the first script when the first time period arrives;
the sub-table creating unit is used for automatically creating a sub-table corresponding to the second time period through the second script when the second time period arrives;
the record inserting unit is used for inserting the record of the transaction request into the corresponding sub-table according to the time of the transaction request when the server receives the transaction request;
the record updating unit is used for updating the record in the corresponding sub-table when the server receives the processing result of the transaction request;
the record summarizing unit is used for judging whether the processing result is successful or not, if so, inserting a corresponding record into a corresponding summary table, and storing the processing result of the corresponding time in the summary table of each first time period as the record of successful processing;
the transaction request receiving unit is used for acquiring the time and the request data of the transaction request when the server receives the transaction request, wherein the request data comprises a requested user, the requested content and a processing result after the request is processed;
the data insertion unit is used for inserting the request data as a record into the sub-table corresponding to the current second time period according to the time of the transaction request;
the two-dimensional code data generating unit is used for generating two-dimensional code data when the server receives a transaction request, and taking the generated two-dimensional code data as a part of the request data;
the two-dimensional code data return unit is used for returning the two-dimensional code data to the front end;
the two-dimension code data acquisition unit is used for acquiring the two-dimension code data in the query request when the query request is received;
the state query unit is used for querying the state of the two-dimensional code data in the corresponding sub-table;
the failure prompt return unit is used for returning a corresponding failure prompt if the two-dimensional code data is in a failure state;
the transaction control unit is used for controlling to continue the transaction if the two-dimensional code data are in a valid state;
the validity period setting unit is used for automatically setting the validity period of the two-dimensional code data while generating the two-dimensional code data;
the new record inserting unit is used for generating new two-dimensional code data when the server receives a new transaction request, taking the newly generated two-dimensional code data as a part of the new request data, and inserting the record of the new transaction request into the corresponding sub-table;
and the new two-dimensional code data return unit is used for returning the new two-dimensional code data to the front end.
4. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a data splitting method according to any of claims 1 to 2 when the computer program is executed.
5. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a data tabulation method according to any one of claims 1 to 2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911365773.9A CN111143365B (en) | 2019-12-26 | 2019-12-26 | Data sub-table method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911365773.9A CN111143365B (en) | 2019-12-26 | 2019-12-26 | Data sub-table method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111143365A CN111143365A (en) | 2020-05-12 |
CN111143365B true CN111143365B (en) | 2023-08-18 |
Family
ID=70520443
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911365773.9A Active CN111143365B (en) | 2019-12-26 | 2019-12-26 | Data sub-table method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111143365B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112632066B (en) * | 2020-12-18 | 2023-08-25 | 湖北华中电力科技开发有限责任公司 | Automatic sub-table data access method and device, electronic equipment and storage medium |
CN117874033A (en) * | 2024-01-15 | 2024-04-12 | 北京轻松怡康信息技术有限公司 | Database sub-table method and device, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1367899A (en) * | 1999-06-30 | 2002-09-04 | 西尔弗布鲁克研究股份有限公司 | Method and system for banking |
CN106445738A (en) * | 2016-09-13 | 2017-02-22 | 郑州云海信息技术有限公司 | Database backup method and device |
CN106599127A (en) * | 2016-12-01 | 2017-04-26 | 深圳市风云实业有限公司 | Log storage and query method applied to standalone server |
CN110597789A (en) * | 2019-09-19 | 2019-12-20 | 泰康保险集团股份有限公司 | Automatic generation method, device and equipment of architecture diagram and computer readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8720771B2 (en) * | 2012-03-23 | 2014-05-13 | Digital Retail Apps., Inc. | System and method for facilitating secure self payment transactions of retail goods |
-
2019
- 2019-12-26 CN CN201911365773.9A patent/CN111143365B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1367899A (en) * | 1999-06-30 | 2002-09-04 | 西尔弗布鲁克研究股份有限公司 | Method and system for banking |
CN106445738A (en) * | 2016-09-13 | 2017-02-22 | 郑州云海信息技术有限公司 | Database backup method and device |
CN106599127A (en) * | 2016-12-01 | 2017-04-26 | 深圳市风云实业有限公司 | Log storage and query method applied to standalone server |
CN110597789A (en) * | 2019-09-19 | 2019-12-20 | 泰康保险集团股份有限公司 | Automatic generation method, device and equipment of architecture diagram and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111143365A (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11567681B2 (en) | Method and system for synchronizing requests related to key-value storage having different portions | |
CN105827706B (en) | Message pushing device and method | |
CN110659971B (en) | Transaction data processing method and device | |
CN112637305A (en) | Data storage and query method, device, equipment and medium based on cache | |
CN111143365B (en) | Data sub-table method, device, computer equipment and storage medium | |
US11748357B2 (en) | Method and system for searching a key-value storage | |
CN111046041B (en) | Data processing method and device, storage medium and processor | |
CN110704486A (en) | Data processing method, device, system, storage medium and server | |
CN114358923A (en) | Business data processing method and device, storage medium and electronic equipment | |
US20180341709A1 (en) | Unstructured search query generation from a set of structured data terms | |
CN109447777B (en) | Financial data processing method and device, electronic equipment and readable medium | |
CN111913913B (en) | Access request processing method and device | |
US7693905B2 (en) | System and method for optimizing event predicate processing | |
CN112948441A (en) | Financial data-oriented multidimensional data aggregation method and equipment | |
WO2012070925A1 (en) | Method and system for asynchronous processing in a web application server | |
CN111309673B (en) | Snapshot data generation method and device for incremental data | |
US20070294285A1 (en) | System and Method for Processing Event Predicates | |
CN106874327B (en) | Counting method and device for business data | |
CN111131393B (en) | User activity data statistical method, electronic device and storage medium | |
CN108038121B (en) | Caching method and terminal | |
CN111814043B (en) | Query method, device and server for copyright information | |
CN117555883B (en) | Bank system data database separation method and device, memory and electronic equipment | |
CN114385267B (en) | Data pushing method for cash transaction service | |
US11500853B1 (en) | Virtual data store systems and methods | |
CN115687348A (en) | Data storage method and device for real-time data analysis |
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 |