[go: up one dir, main page]

CN119066084B - A data calculation method, system, intelligent terminal and storage medium - Google Patents

A data calculation method, system, intelligent terminal and storage medium Download PDF

Info

Publication number
CN119066084B
CN119066084B CN202411579257.7A CN202411579257A CN119066084B CN 119066084 B CN119066084 B CN 119066084B CN 202411579257 A CN202411579257 A CN 202411579257A CN 119066084 B CN119066084 B CN 119066084B
Authority
CN
China
Prior art keywords
snapshot
data
holding
file
holding data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411579257.7A
Other languages
Chinese (zh)
Other versions
CN119066084A (en
Inventor
白光宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Jincheng Bank Ltd By Share Ltd
Original Assignee
Tianjin Jincheng Bank Ltd By Share 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 Tianjin Jincheng Bank Ltd By Share Ltd filed Critical Tianjin Jincheng Bank Ltd By Share Ltd
Priority to CN202411579257.7A priority Critical patent/CN119066084B/en
Publication of CN119066084A publication Critical patent/CN119066084A/en
Application granted granted Critical
Publication of CN119066084B publication Critical patent/CN119066084B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • 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
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention belongs to the technical field of financial science and technology, and discloses a data calculation method, a system, an intelligent terminal and a storage medium, wherein in the method, after a first snapshot is carried out on original bin holding data to generate a first bin holding snapshot table, screening is carried out on the original bin holding data according to data updating time in the first bin holding snapshot table to obtain screening bin holding data; and after the snapshot synchronous task list is updated successfully, calculating according to smaller bin holding data in the first bin holding snapshot list and the second bin holding snapshot list to obtain rights and interests data corresponding to the non-automatically emptied bin holding data. And comparing the bin holding data in the two bin holding snapshot tables obtained by the two snapshots, and calculating according to the smaller bin holding data to obtain rights and interests data corresponding to the non-automatic emptied bin holding data so as to improve the accuracy of calculating the income data.

Description

Data computing method, system, intelligent terminal and storage medium
Technical Field
The present invention relates to the field of financial technologies, and in particular, to a data computing method, a system, an intelligent terminal, and a storage medium.
Background
When calculating the income in the financial science and technology field, the Internet core system can begin to calculate the income data of the daily financial products of the user at the right calculation time of the later moment after acquiring the holding data of the user at the previous moment through the asset snapshot technology. Then, the internet core system can incorporate the financial products with unqualified storage time into the calculation, so that the problem of large error of the income data is caused.
There is thus a need for improvements and improvements in the art.
Disclosure of Invention
The invention mainly aims to provide a data computing method, a system, an intelligent terminal and a storage medium, and aims to solve the problem that in the prior art, large computing errors occur when rights and interests data are acquired.
In order to achieve the above purpose, the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a data computing method, including:
after carrying out a first snapshot on the original holding data to generate a first holding snapshot table, screening the original holding data according to the data updating time in the first holding snapshot table to obtain screening holding data;
performing a second snapshot on the screening and holding data to generate a second holding snapshot table, generating a first file, and updating a snapshot synchronous task table after successful generation;
And after the snapshot synchronous task list is updated successfully, calculating to obtain rights and interests data corresponding to the non-automatic emptied holding data according to the smaller holding data in the first holding snapshot list and the second holding snapshot list.
In some embodiments, the data computing method further comprises:
Calculating to obtain rights and interests data of the automatically emptied holding data according to the holding data in the first holding snapshot table;
Wherein the automatically emptied holding data comprises historical holding data that expires between a first time and a second time of a first snapshot and has been automatically redeemed.
In some embodiments, after the first snapshot of the original holding data to generate a first holding snapshot table, screening the original holding data according to a data update time in the first holding snapshot table to obtain screened holding data, including:
performing a first snapshot on the original holding data at a first moment to generate a first holding snapshot table;
screening non-automatic emptying bin holding data from the original bin holding data to obtain screening bin holding data according to the data updating time of the original bin holding data in the first bin holding snapshot table at a second moment;
the non-automatic emptying bin holding data comprises unchanged original bin holding data and original bin holding data changed between the first moment and the second moment.
In some embodiments, the generating the first file after the second snapshot of the screening and taking the bin data to generate the second taking the bin snapshot table, and updating the snapshot synchronization task table after the generation is successful includes:
Writing the screening and holding data into a second file at the second moment, uploading the second file to a preset catalog after the writing is successful, and writing the second file into a second holding snapshot table when the uploading is successful so as to complete a second snapshot;
generating the first file when the writing is successful, and writing a current snapshot record in the snapshot synchronous task list after judging that the first file is successful to update the snapshot synchronous task list;
and the second moment is the rights and interests calculation time corresponding to the first snapshot and the second snapshot.
In some embodiments, the writing the screening holding data to a second file at the second time further comprises:
Judging whether the screening and holding data is successfully written into the second file, and generating alarm information when judging that the writing is failed;
wherein the second file is a plain text file.
In some embodiments, the uploading the second file to a preset directory after the writing is successful further includes:
judging whether the second file is successfully uploaded to the preset catalogue, and generating alarm information when judging that the uploading is failed.
In some embodiments, the writing the second file to the second taken snapshot table when the uploading is successful further includes:
Judging whether the second file is successfully written into the second holding snapshot table, and generating alarm information when judging that the writing fails;
the generating the first file when the writing is successful further comprises:
Judging whether the first file is successfully generated or not;
when judging that the generation fails, continuing to judge after waiting for the preset time, and generating alarm information when judging that the generation still fails;
wherein the first file is a record file.
In a second aspect, an embodiment of the present application provides a data computing system, including:
The screening module is used for screening the original holding data according to the data updating time in the first holding snapshot table after the first snapshot of the original holding data is carried out to generate the first holding snapshot table, so as to obtain screening holding data;
The snapshot module is used for carrying out a second snapshot on the screening and holding data to generate a second holding snapshot table, generating a first file, and updating a snapshot synchronous task table after the generation is successful;
And the calculation module is used for calculating and obtaining the rights and interests data corresponding to the non-automatic emptied holding data according to the smaller holding data in the first holding snapshot table and the second holding snapshot table after the snapshot synchronous task table is updated successfully.
In a third aspect, an embodiment of the present application provides an intelligent terminal, including a memory, a processor, a display, and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the data calculation method as described above when executed by the processor.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of a data calculation method as described above.
Compared with the prior art, the data calculation method, the system, the intelligent terminal and the storage medium provided by the invention have the advantages that after the first snapshot is carried out on the original bin holding data to generate the first bin holding snapshot table, the screening bin holding data is screened out from the original bin holding data according to the data updating time, the second snapshot is carried out on the screened bin holding data to generate the second bin holding snapshot table, and after the snapshot synchronous task table is updated, the rights data corresponding to the non-automatic emptied bin holding data are calculated according to the first bin holding snapshot table and the smaller bin holding data in the second bin holding snapshot table, so that the rights data of the non-automatic emptied bin holding data are accurately calculated, the rights calculation accuracy is improved, and the loss caused by the fact that financial products with the storage time not up to standard are calculated together is effectively reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related 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 computing method according to a preferred embodiment of the present invention;
FIG. 2 is a flowchart of step S100 in a preferred embodiment of the data computing method according to the present invention;
FIG. 3 is a flowchart of step S200 in a preferred embodiment of the data computing method according to the present invention;
FIG. 4 is a flowchart of a data calculation method according to the present invention for executing Datax tasks;
FIG. 5 is a flowchart of a method for updating a snapshot synchronization task table according to a preferred embodiment of the data computing method of the present invention;
FIG. 6 is a flowchart of S1000-S2000 in a preferred embodiment of the data calculation method according to the present invention;
FIG. 7 is a diagram illustrating a data computing system architecture according to the present invention;
Fig. 8 is a schematic diagram of an operation environment of a preferred embodiment of the intelligent terminal provided by the present invention.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments.
The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
The terms "comprises," "comprising," "including," or any other variation thereof, are intended to cover a specific feature, number, step, operation, element, component, or combination of the foregoing, which may be used in various embodiments of the present application, and are not intended to first exclude the presence of or increase the likelihood of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing. Furthermore, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the application belong. The terms (such as those defined in commonly used dictionaries) will be interpreted as having a meaning that is the same as the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in connection with the various embodiments of the application.
In order to facilitate understanding of the embodiments of the present application, the background art to which the embodiments of the present application relate is first described herein.
The Internet core system defaults to generating a user daily asset snapshot around 22:00 a day (i.e., the first time instant in the present application) and the equity calculation around 6:00 a day (i.e., the second time instant in the present application). However, in the interest calculation, there is a situation that the interest is maliciously obtained by using the calculation time error in the asset snapshot technology, that is, if the interest of the user is calculated by directly using the core snapshot, for example, the user stores funds in 21:50 points and takes funds in 22:10 points, the interest calculation task executed by 6:00 calculates the interest score corresponding to the interest, and the user only holds for 20 minutes, thereby causing economic loss of the finance company.
In order to prevent the above situation, the real-time money calculation of the deposit bill can prevent the problem of "wool-out" when the rights calculation task is executed at 6:00, but the calculation result is inaccurate and can not be repeatedly executed. The execution of the equity calculation task is a process, which takes about several minutes, if the state or amount of deposit change occurs in the calculation process, the statistical caliber of the deposit calculated first and the deposit calculated later are different, and even if unexpected situation occurs, the task execution time is delayed. At the same time, the publicity that the business department would benefit if it were held 6:00 the next day is also violated.
In order to solve the above prior art problems, the invention provides a data computing method, a system, an intelligent terminal and a storage medium. According to the invention, after the original holding data is subjected to the first snapshot to generate the first holding snapshot table, screening the holding data from the original holding data according to the data updating time, and carrying out the screening of the second holding data to generate the second holding snapshot table, and after the snapshot synchronous task table is updated, calculating the rights and interests data corresponding to the non-automatic emptied holding data according to the first holding snapshot table and the smaller holding data in the second holding snapshot table, thereby accurately calculating the rights and interests data of the holding data which is not up to the standard, improving the rights and interests calculation accuracy, and effectively reducing the losses caused by the calculation of financial products with the storage time which are not up to the standard.
The following description of the design scheme of the data computing method is given by way of specific exemplary embodiments, and it should be noted that the following embodiments are only for explaining the technical scheme of the present invention, and are not limited in particular:
referring to fig. 1, an embodiment of the present application provides a data computing method, including:
S100, after the original holding data is subjected to first snapshot to generate a first holding snapshot table, screening the original holding data according to the data updating time in the first holding snapshot table to obtain screening holding data.
Optionally, the premise of the implementation of the data computing method in the application is that on the basis of the core snapshot (corresponding to the first snapshot) of the internet core system, a benefit computing technical scheme that one snapshot (namely the second snapshot) forms double snapshots is added.
The holding snapshot list comprises holding amount, updating time fields, rights and interests, rights issuing period, product id, product type and the like. If the holding amount changes in the holding snapshot table, the data updating time is saved.
Then, the data calculation method is implemented as follows:
first, a first snapshot (i.e., a core snapshot) is performed on original holding data (in this embodiment, the holding data is a holding amount) to generate a first holding snapshot table (mainly including fields of holding amount and update time thereof, and rights interest rate, rights issuing period, product id, product type, etc.), and the updated data is screened according to the data update time in the first holding snapshot table, so as to obtain screening holding data (which may also be referred to as incremental holding snapshot data), so as to perform a second snapshot on the screening holding data. The screening condition is holding state after the core snapshot is reserved or holding data after the core snapshot is generated at the latest updating time.
According to the method and the device, the first holding snapshot table generated by the first snapshot is screened according to the data updating time, so that the change state of holding data is dynamically known, and the data for generating the second holding snapshot is reduced on the premise of not influencing a calculation result, so that the occupation of calculation resources is reduced.
Still further, referring to fig. 2, after performing a first snapshot on the original bin holding data to generate a first bin holding snapshot table, in step S100, screening the original bin holding data according to a data update time in the first bin holding snapshot table to obtain screened bin holding data, including:
S110, performing a first snapshot on original holding data at a first moment to generate a first holding snapshot table;
S120, screening non-automatic empty holding data from the original holding data according to the data updating time of the original holding data in the first holding snapshot table at the second moment to obtain screening holding data.
The non-automatic emptying bin holding data comprises unchanged original bin holding data and original bin holding data changed between a first moment and a second moment.
Optionally, the snapshot time of the core snapshot (first snapshot) is 22:00 (i.e. corresponds to the first time in the application), the corresponding equity calculation time is 6:00 in the morning of the next day (and is also the second time in the application), and the snapshot time and equity calculation time of the second snapshot are set to be 6:00 in the morning (i.e. the second time is the equity calculation time corresponding to the first snapshot and the second snapshot). Wherein, the first time and the second time can be set, but the second time is later than the first time.
Then, the specific implementation process of the data calculation method is as follows:
A first snapshot of the current holding amount is taken at a first time (e.g., 22 points) to generate a first holding snapshot table. And then, screening the non-automatically emptied holding data from the original holding data according to the data updating time of the original holding data in the first holding snapshot table at a second moment (for example, 6 days next), namely screening the holding state after the core snapshot is screened or the holding data with the latest updating time after the core snapshot is generated.
If the data updating time of the target holding data of the target product type does not exist in the first holding snapshot table, the target holding data can be judged to belong to unchanged original holding data, and according to the data updating time of the target holding data existing in the first holding snapshot table, the target holding data can be judged to belong to original holding data changed between the first moment and the second moment, and the target holding data are stored to obtain screening holding data.
Further, referring to fig. 1, s200, after performing a second snapshot on the screening and holding data to generate a second holding snapshot table, a first file is generated, and after the generation is successful, the snapshot synchronization task table is updated.
The first file is a record file.
Optionally, after obtaining the screening and holding data, performing a second snapshot on the screening and holding data to generate a second holding snapshot table, and after generating successfully, generating an OK file (i.e. the first file; the OK file is a record file corresponding to the data file, and data volume information is stored) to be used for confirming whether the snapshot file is successfully generated and is completely available. At the same time, the snapshot file generation record is updated in the snapshot synchronous task table.
According to the application, the screening and bin holding data are subjected to the second snapshot so as to accurately calculate the actual rights data according to the two bin holding data, the double-snapshot technical scheme is realized, the calculation of rights and interests is independent of the real-time data of the user bin holding table, and only the core snapshot data (obtained by the first snapshot) and the bin holding snapshot data (obtained by the second snapshot) are needed, so that no matter what time the rights and interests calculation task is executed, no matter how many times the rights and interests calculation task is executed, the calculation results are accurate and consistent.
Still further, referring to fig. 3, step S200, after performing a second snapshot on the filtered taken-in data to generate a second taken-in snapshot table, generating a first file, and updating the snapshot synchronization task table after the generation is successful, includes:
S210, writing screening and holding data into a second file at a second moment, uploading the second file to a preset catalog after the writing is successful, and writing the second file into a second holding snapshot table when the uploading is successful so as to complete a second snapshot;
s220, generating a first file when the writing is successful, and writing a current snapshot record in the snapshot synchronous task list after judging that the first file is successful in generation so as to update the snapshot synchronous task list.
The second time is the benefit computing time corresponding to the first snapshot and the second snapshot, and the second file is a plain text file.
Optionally, the tool for generating the taken snapshot in this embodiment adopts a data synchronization tool Datax (Datax is a heterogeneous data source offline synchronization tool, and is dedicated to implementing a data warehouse tool including a relational Database (MySQL is an open-source relational Database management system (RDBMS)), oracle (short for Oracle Database, also called Oracle RDBMS, a relational Database management system)), HDFS (Hadoop Distributed FILE SYSTEM, HDFS is a distributed file system for distributed read-write of large-scale data), hive (Hive is a data warehouse tool based on Hadoop (Hadoop is a distributed system infrastructure), and can map structured data files into a table), ODPS (ODPS (Open Data Processing Service) is a large-scale batch computing engine; ODPS is a large-data computing service, is an integrated component based on Hadoop, and provides a whole process integration from log collection, data computation, data presentation to data analysis), HBase (HBase is a non-file system running on HDFS), and the like, and is an efficient and stable data source synchronization function between heterogeneous data databases.
Wherein Datax supports data synchronization in various modes, such as table→table→file, wherein the application adopts the table→file mode, incremental bin holding snapshot data (i.e. screening bin holding data) is written to csv (cvs: comma Separate Values, which is a plain text file for storing table and electronic table information, the content is usually a table file composed of text, number or date), and is uploaded to ftp (ftp: FILE TRANSFER Protocol, chinese name is file transmission Protocol, which is a set of standard protocols for file transmission on a network) corresponding directory (i.e. preset directory, which is a directory with current date, test and production environment). And then, warehousing the cvs file into a holding snapshot table to form persistent traceable persistent data.
Then, referring to fig. 4 and fig. 5 together, the specific implementation process of performing the second snapshot on the screening and holding data is as follows:
First, a Datax task is performed, in which screening and binning data is written into a cvs file (i.e., a second file) by using a data synchronization tool Datax at 6 a.m. (i.e., a second time), and after the writing is successful, the second file is uploaded into an ftp directory (i.e., a preset directory) with the current date, test and production environment (corresponding to the uploading ftp in fig. 4). And after the uploading is successful, writing the second file into a second holding snapshot table to finish the second snapshot file warehousing task.
Then, to ensure that Datax successfully generates the file and that the file is complete, execution is completed at Datax, i.e., after the second file is successfully written to the second in-store snapshot table (corresponding to the data file being inserted into the snapshot table in fig. 5), a subtask is triggered, and the subtask generates an OK file (i.e., the first file) under the preset directory. The generation of the OK file represents that the extraction of the snapshot data of the holding bin is completed completely, so that the data cannot be lost when the rights and interests are calculated. The content of the OK file is not so-called, and the key is that the file with the file name and date is located under the corresponding directory (i.e. the preset directory).
And, if the OK file does not exist, representing that snapshot data extraction is not completed yet, the computing task needs to wait. While generating the first file, the current snapshot record is also written into the snapshot synchronization task table (corresponding to inserting the data file into the snapshot synchronization task table in fig. 5) to update the snapshot synchronization task table.
In the application, the snapshot time is very short when Datax is generated, the underlying logic is directly connected with the database, the data is queried into the memory in a multi-channel parallel mode and then written into the ftp catalog, and finally the data is finally prolonged to the local file, so that the problem of inconsistent statistical caliber caused by the change of the state of a branch stock of a user in the rights and interests calculation process is avoided, and the recalculation due to the unexpected situation is supported.
Further, the screening and holding data is written into the second file at the second moment, and then the method further comprises the following steps:
S10, judging whether the screening and holding data is successfully written into the second file, and generating alarm information when judging that the writing fails.
Optionally, after the screening and holding data is written into the second file at the second moment, judging whether the screening and holding data is written into the second file successfully or not:
if the screening and holding data is successfully written into the second file, the second file is uploaded into a preset catalog, but if the screening and holding data is failed to be written into the second file, alarm information is generated, and at the moment, the problem is required to be checked by manual intervention and is treated in time.
In another embodiment of the present application, if it is determined that the screening and holding data fails to be written into the second file, the method waits for a preset time and continues to determine, and generates the alarm information when it is determined that the writing still fails.
Further, after the writing is successful, uploading the second file to the preset directory, and then further including:
s20, judging whether the second file is successfully uploaded to a preset catalog, and generating alarm information when judging that the uploading fails.
Optionally, after the second file is uploaded to the preset directory after the writing is successful, judging whether the second file is uploaded to the preset directory successfully or not:
if the uploading of the second file to the preset catalog is successful, the second file is written into the second holding snapshot table, but if the uploading of the second file to the preset catalog is failed, alarm information is generated as well.
In another embodiment of the present application, if it is determined that the uploading of the second file to the preset directory fails, the method waits for a preset time and then continues to determine, and generates the alarm information when it is determined that the uploading still fails.
Further, when the uploading is successful, writing the second file into the second holding snapshot table, and then further comprising:
S30, judging whether the second file is successfully written into the second holding snapshot table, and generating alarm information when judging that the writing fails.
Optionally, after writing the second file into the second holding snapshot table when the uploading is successful, judging whether the second holding snapshot table is successfully written or not:
If the second file is successfully written into the second holding snapshot table, the first file is generated, but if the second file is failed to be written into the second holding snapshot table, the alarm information is also generated.
In another embodiment of the present application, if it is determined that writing the second holding snapshot table into the second holding snapshot table fails, the method waits for a preset time and continues to determine, and generates the alarm information when it is determined that writing still fails.
Still further, referring to fig. 6, when the writing is successful, a first file is generated, and then further includes:
s1000, judging whether the first file is successfully generated or not;
And S2000, when judging that the generation fails, continuing to judge after waiting for the preset time, and when judging that the generation still fails, generating alarm information.
Optionally, when the second snapshot file storage task is successful, a first file is generated, and whether the first file is successfully generated is judged:
If the first file is successfully generated, it represents that the taken snapshot file is available and complete. At this time, the current snapshot record is written into the snapshot synchronization task table to update the snapshot synchronization task table.
But will wait until generation if the first file is not generated, and if it is not generated within a preset time (configurable), the task is timed out, the task is terminated and an alarm is issued.
Further, referring to fig. 1, s300, after the snapshot synchronization task table is updated successfully, the rights data corresponding to the non-automatically emptied holding data is calculated according to the smaller holding data in the first holding snapshot table and the second holding snapshot table.
Optionally, before executing the equity calculation task, determining whether to execute equity calculation according to the result of the current snapshot record warehousing, namely, if the current snapshot record warehousing task is the necessary precondition of equity calculation, executing the equity calculation task only if the current snapshot record warehousing task is successful, and if the current snapshot record warehousing task is unsuccessful, giving an alarm.
Then, after the snapshot synchronous task list is updated successfully, the calculation of the deposit equity of the non-automatic emptied holding data is started:
The second snapshot is non-automatically emptied, that is, unchanged original bin holding data and original bin holding data changed between the first time and the second time (for example, a part of the bin holding amount is extracted or newly added in the time period), and if the automatically emptied bin holding data exists, the bin holding data in the second bin holding snapshot table is necessarily smaller than the bin holding data in the first bin holding snapshot table. And finally calculating rights and interests data according to smaller holding data in the first holding snapshot table and the second holding snapshot table, so that the rights and interests of the non-automatically emptied holding data are calculated.
When calculating the benefit data of the same basic amount of the receipt, the smaller values in the core snapshot and the holding snapshot are taken, namely, the smaller holding data in the first holding snapshot table and the second holding snapshot table are taken, so that if the user takes the value in advance before the second moment, the benefit is not obtained by taking part of the amount in advance, and the scene of 'sheep wool' is prevented. And the amount of the stored money increased between the first moment and the second moment is not calculated, so that the accuracy of rights and interests calculation is improved, and further, the loss of a finance company is avoided.
Still further, the data calculation method further includes:
S400, calculating to obtain the rights and interests data of the automatically emptied holding data according to the holding data in the first holding snapshot table.
Wherein the automatically emptied holding data comprises historical holding data that expires between a first time and a second time of the first snapshot and has been automatically redeemed.
Alternatively, for special scenarios, such as the day of a regular deposit expiration date or the day of notifying the expiration of a deposit reservation, when the yesterday equity is calculated, the deposit amount in the core snapshot table (i.e., the first hand-held snapshot table) is the amount before automatic redemption, and the next 6:00, the deposit amount in the hand-held snapshot table (i.e., the second hand-held snapshot table) is zero because the automatic redemption is successful, and this scenario is not the "wool" scenario, but is the normal, due redemption scenario, and then the day before expiration should have normal equity.
Then, for the equity calculation of the historical holding data (i.e., the periodic inventory) that expires between the first time and the second time of the first snapshot and that has been automatically redeemed, it is necessary to calculate the automatically emptied equity data of the holding data with the historical holding data that expires between the first time and the second time of the first snapshot in the first holding snapshot table and that has been automatically redeemed.
Further, referring to fig. 7, an embodiment of the present application provides a data computing system, including:
and the screening module 1 is used for screening the original holding data according to the data updating time in the first holding snapshot table after the first snapshot is carried out on the original holding data to generate the first holding snapshot table, so as to obtain screening holding data.
And the snapshot module 2 is used for generating a first file after performing a second snapshot on the screening and holding data to generate a second holding snapshot table, and updating the snapshot synchronous task table after the generation is successful.
And the calculating module 3 is used for calculating and obtaining the rights and interests data corresponding to the non-automatic emptied holding data according to the smaller holding data in the first holding snapshot table and the second holding snapshot table after the snapshot synchronous task table is updated successfully.
Optionally, the data computing method is applicable to a data computing system, and then the implementation process of the data computing system is as follows:
first, the original holding data is subjected to first snapshot at a first moment (for example, 22 points) to generate a first holding snapshot table, and the non-automatically emptied holding data in the original holding data is screened according to the data updating time in the first holding snapshot table to obtain screening holding data.
Then, after the screening and holding data is subjected to a second snapshot at a second moment (for example, 6 hours in the morning), a second holding snapshot table is generated, a subtask is triggered to generate a first file, and after the first file is successfully generated, a current snapshot record is written in the snapshot synchronous task table so as to update the snapshot synchronous task table.
Secondly, judging whether the current snapshot record is successfully put in storage, namely judging whether the snapshot synchronous task list is successfully updated or not:
if the warehouse entry is successful, the warehouse entry data in the first warehouse entry holding snapshot table and the second warehouse entry holding snapshot table are compared, and the rights and interests data corresponding to the non-automatic emptying warehouse entry holding data are calculated according to the smaller warehouse entry holding data in the first warehouse entry holding snapshot table and the second warehouse entry holding snapshot table.
However, if the warehouse-in fails, an alarm is sent out to prompt the staff to process.
Further, as shown in fig. 8, based on the above data calculation method, the present invention further provides an intelligent terminal, which includes a processor 10, a memory 20 and a display 30. Fig. 8 shows only some of the components of the intelligent terminal, but it should be understood that not all of the illustrated components are required to be implemented, and more or fewer components may alternatively be implemented.
The memory 20 may in some embodiments be an internal storage unit of the smart terminal, such as a hard disk or a memory of the smart terminal. The memory 20 may also be an external storage device of the smart terminal in other embodiments, such as a plug-in hard disk equipped on the smart terminal, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), etc. Further, the memory 20 may also include both an internal storage unit and an external storage device of the smart terminal. The memory 20 is used for storing application software installed in the smart terminal and various data, such as program codes for installing the smart terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 20 has stored thereon a computer program 40, which computer program 40 is executable by the processor 10 for implementing the data calculation method according to the application.
The processor 10 may in some embodiments be a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chip for executing program code or processing data stored in the memory 20, such as performing data calculation methods, etc.
The display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like in some embodiments. The display 30 is used for displaying information at the intelligent terminal and for displaying a visual user interface. The components 10-30 of the intelligent terminal communicate with each other via a system bus.
In an embodiment, the steps implemented when the processor 10 executes the computer program 40 in the memory 20 may refer to corresponding descriptions in the data calculation method described above, and will not be described herein.
In this embodiment, the specific functions of each module of the data computing system may refer to corresponding descriptions in the data computing method, which are not described herein.
Further, the present invention also provides a computer readable storage medium, wherein the computer readable storage medium stores the computer program 40, and the computer program 40 implements the steps of the data calculation method when executed by the processor, and since the steps of the data calculation method are described in detail, the detailed description is omitted herein.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flow diagrams and block diagrams in the figures, which illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules or units in various embodiments of the application may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. The storage medium includes a U disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, randomAccessMemory), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In summary, the method includes the steps of generating a first holding snapshot table by performing a first snapshot on original holding data, screening the original holding data according to data updating time in the first holding snapshot table to obtain screening holding data, generating a first file by performing a second snapshot on the screening holding data to generate a second holding snapshot table, updating a snapshot synchronization task table after the generation success, and calculating to obtain rights data corresponding to non-automatic emptying holding data according to smaller holding data in the first holding snapshot table and the second holding snapshot table after the snapshot synchronization task table is updated successfully. And comparing the bin holding data in the two bin holding snapshot tables obtained by the two snapshots, and calculating according to the smaller bin holding data to obtain rights and interests data corresponding to the non-automatic emptied bin holding data so as to improve the accuracy of calculating the income data.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application.

Claims (9)

1. A data computing method, comprising:
after carrying out a first snapshot on the original holding data to generate a first holding snapshot table, screening the original holding data according to the data updating time in the first holding snapshot table to obtain screening holding data;
performing a second snapshot on the screening and holding data to generate a second holding snapshot table, generating a first file, and updating a snapshot synchronous task table after successful generation;
after the snapshot synchronous task list is updated successfully, smaller holding data in the first holding snapshot list and the second holding snapshot list are taken, and rights and interests data corresponding to the non-automatic emptied holding data are obtained through calculation;
After the first snapshot is performed on the original bin holding data to generate a first bin holding snapshot table, the original bin holding data is screened to obtain screening bin holding data according to the data updating time in the first bin holding snapshot table, which comprises the following steps:
performing a first snapshot on the original holding data at a first moment to generate a first holding snapshot table;
screening non-automatic emptying bin holding data from the original bin holding data to obtain screening bin holding data according to the data updating time of the original bin holding data in the first bin holding snapshot table at a second moment;
the non-automatic emptying bin holding data comprises unchanged original bin holding data and original bin holding data changed between the first moment and the second moment.
2. The data computing method according to claim 1, characterized by further comprising:
Calculating to obtain rights and interests data of the automatically emptied holding data according to the holding data in the first holding snapshot table;
Wherein the automatically emptied holding data comprises historical holding data that expires between a first time and a second time of a first snapshot and has been automatically redeemed.
3. The method of claim 1, wherein generating the first file after generating the second snapshot table by performing the second snapshot on the screening and holding data, and updating the snapshot synchronization task table after the generation is successful, comprises:
Writing the screening and holding data into a second file at the second moment, uploading the second file to a preset catalog after the writing is successful, and writing the second file into a second holding snapshot table when the uploading is successful so as to complete a second snapshot;
generating the first file when the writing is successful, and writing a current snapshot record in the snapshot synchronous task list after judging that the first file is successful to update the snapshot synchronous task list;
and the second moment is the rights and interests calculation time corresponding to the first snapshot and the second snapshot.
4. The data computing method of claim 3, wherein the writing the screening binning data to a second file at the second time instant further comprises:
Judging whether the screening and holding data is successfully written into the second file, and generating alarm information when judging that the writing is failed;
wherein the second file is a plain text file.
5. The data computing method according to claim 3, wherein the uploading the second file to a preset directory after the writing is successful further comprises:
judging whether the second file is successfully uploaded to the preset catalogue, and generating alarm information when judging that the uploading is failed.
6. The data computing method of claim 3, wherein the writing the second file to the second taken snapshot table when the uploading is successful further comprises:
Judging whether the second file is successfully written into the second holding snapshot table, and generating alarm information when judging that the writing fails;
the generating the first file when the writing is successful further comprises:
Judging whether the first file is successfully generated or not;
when judging that the generation fails, continuing to judge after waiting for the preset time, and generating alarm information when judging that the generation still fails;
wherein the first file is a record file.
7. A data computing system, comprising:
The screening module is used for screening the original holding data according to the data updating time in the first holding snapshot table after the first snapshot of the original holding data is carried out to generate the first holding snapshot table, so as to obtain screening holding data;
The snapshot module is used for carrying out a second snapshot on the screening and holding data to generate a second holding snapshot table, generating a first file, and updating a snapshot synchronous task table after the generation is successful;
The calculation module is used for taking smaller holding data in the first holding snapshot table and the second holding snapshot table after the snapshot synchronous task table is updated successfully, and calculating to obtain rights and interests data corresponding to the non-automatically emptied holding data;
After the first snapshot is performed on the original bin holding data to generate a first bin holding snapshot table, the original bin holding data is screened to obtain screening bin holding data according to the data updating time in the first bin holding snapshot table, which comprises the following steps:
performing a first snapshot on the original holding data at a first moment to generate a first holding snapshot table;
screening non-automatic emptying bin holding data from the original bin holding data to obtain screening bin holding data according to the data updating time of the original bin holding data in the first bin holding snapshot table at a second moment;
the non-automatic emptying bin holding data comprises unchanged original bin holding data and original bin holding data changed between the first moment and the second moment.
8. An intelligent terminal comprising a memory, a processor, a display and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the data calculation method according to any one of claims 1-6 when executed by the processor.
9. A computer-readable storage medium, characterized in that a computer program is stored, which, when being executed by a processor, implements the steps of the data calculation method according to any one of claims 1-6.
CN202411579257.7A 2024-11-07 2024-11-07 A data calculation method, system, intelligent terminal and storage medium Active CN119066084B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411579257.7A CN119066084B (en) 2024-11-07 2024-11-07 A data calculation method, system, intelligent terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411579257.7A CN119066084B (en) 2024-11-07 2024-11-07 A data calculation method, system, intelligent terminal and storage medium

Publications (2)

Publication Number Publication Date
CN119066084A CN119066084A (en) 2024-12-03
CN119066084B true CN119066084B (en) 2025-03-18

Family

ID=93641691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411579257.7A Active CN119066084B (en) 2024-11-07 2024-11-07 A data calculation method, system, intelligent terminal and storage medium

Country Status (1)

Country Link
CN (1) CN119066084B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305173A (en) * 2018-01-31 2018-07-20 深圳壹账通智能科技有限公司 Transaction processing method, device, computer equipment and the storage medium of finance product
CN109658215A (en) * 2018-12-10 2019-04-19 平安科技(深圳)有限公司 Transaction account calculation method, device and computer readable storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108681876A (en) * 2018-05-11 2018-10-19 平安科技(深圳)有限公司 The automatic valuation accounting method of fund, device, computer equipment and storage medium
CN110414926A (en) * 2019-07-03 2019-11-05 平安科技(深圳)有限公司 Account management method, device and computer readable storage medium
CN114564445A (en) * 2022-03-01 2022-05-31 浪潮云信息技术股份公司 Method and system suitable for Hive data warehouse to write and update data
CN114693457A (en) * 2022-03-10 2022-07-01 中银金融科技有限公司 Profit calculation method and device for combined fund
CN115619568A (en) * 2022-09-28 2023-01-17 中国建设银行股份有限公司 Data processing method and device, electronic equipment and computer readable medium
CN116383161A (en) * 2023-01-06 2023-07-04 济南浪潮数据技术有限公司 File synchronization method, device and medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305173A (en) * 2018-01-31 2018-07-20 深圳壹账通智能科技有限公司 Transaction processing method, device, computer equipment and the storage medium of finance product
CN109658215A (en) * 2018-12-10 2019-04-19 平安科技(深圳)有限公司 Transaction account calculation method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN119066084A (en) 2024-12-03

Similar Documents

Publication Publication Date Title
CN108647357B (en) Data query method and device
US8938421B2 (en) Method and a system for synchronizing data
US20140289243A1 (en) Method and system for centralized issue tracking
CN112559641B (en) Pull chain table processing method and device, readable storage medium and electronic equipment
CN109949144A (en) Entry processing method, apparatus, device and computer-readable storage medium
CN113326401B (en) Method and system for generating field blood relationship
CN110781235A (en) Big data based purchase data processing method and device, terminal and storage medium
CN111125106A (en) Batch running task execution method, device, server and storage medium
CN114416891B (en) Method, system, apparatus and medium for data processing in a knowledge graph
CN115858548A (en) Metadata acquisition method, device, equipment and medium
CN119066084B (en) A data calculation method, system, intelligent terminal and storage medium
CN113656380B (en) Data lifecycle management method and device
CN116701355A (en) Data view processing method, device, computer equipment and readable storage medium
CN116069797A (en) Method, device, equipment and storage medium for generating timestamp of multi-version database
CN114511314A (en) Payment account management method and device, computer equipment and storage medium
CN110674214B (en) Big data synchronization method, device, computer equipment and storage medium
US20100257152A1 (en) Enhanced identification of relevant database indices
CN113239064A (en) Database updating method and device, electronic equipment and storage medium
CN113360452A (en) Distributed file generation method and device
CN114385267B (en) Data pushing method for cash transaction service
RU2833587C1 (en) Method and device for storing data
CN112561368B (en) Visual performance calculation method and device for OA approval system
CN116303593A (en) Transaction data real-time query method and device, electronic equipment and storage medium
CN117670240A (en) Method and device for managing tasks to be handled, readable storage medium and electronic equipment
CN117851426A (en) Method, system and storage medium for managing consumer position of logical copy slot

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