Fund data processing method, electronic device and program product
By receiving and processing business data packets, obtaining and analyzing metadata to determine the accounts of the payment solve the problem of lack of abnormal scenarios in the existing technology, and achieve accurate financial statistics.
Patent Information
- Application Number
- CN202411522550.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-24
AI Technical Summary
The existing technology lacks fault tolerance in abnormal scenarios, which leads to the inability to accurately determine the accounting period of a certain amount, which affects the accuracy of financial statistics.
By receiving the business data package pushed by the business party, the metadata of the payment is obtained, including the version identification, the data version is generated based on the metadata, and the payment data is generated based on the payment name, serial number and data version, and the payment operation is performed in response to the payment cycle. And determine the account period due based on the version identification in the payment data.
On the basis of re-payment of funds that have not been successfully paid, it is possible to accurately determine the account period that the payment should belong to, ensuring the accuracy of financial statistics.
Smart Images

Figure CN119359467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a payment data processing method, electronic equipment, and program product. Background Art
[0002] When processing payments, it's unrealistic to disburse every payment as it's generated. Finance typically schedules payments on a set payment cycle, such as the 25th of each month. If a payment from the previous period is returned due to a bank remittance or other factors, a new payment must be made. This traditional approach lacks the ability to handle abnormal scenarios, making it unclear to which specific payment period a payment should belong, leading to inaccurate financial statistics. Summary of the Invention
[0003] The present invention provides a payment data processing method, electronic equipment and program product, which are used to solve the defects in the existing technology that lack abnormal scenario fault tolerance and are unclear about the specific account period to which a certain payment should belong, thereby leading to inaccurate financial statistical results. It can achieve accurate determination of the account period to which the payment should belong on the basis of re-payment of the payment that has not been successfully paid, which is conducive to obtaining accurate financial statistical results.
[0004] The present invention provides a payment data processing method, comprising the following steps: receiving a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, and the payment information includes a payment name and a payment serial number; obtaining metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; generating a data version of the payment according to the metadata, and generating payment data of the payment according to the payment name, the payment serial number and the data version of the payment; in response to the payment cycle of the payment arriving, performing a payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time; obtaining the payment data of the payment including the same payment serial number, and determining the account period to which the payment should belong according to the version identifier in the payment data.
[0005] According to a payment data processing method provided by the present invention, obtaining the metadata of the payment includes: obtaining a first timestamp corresponding to the time when the business data packet pushed by the business party is received; obtaining a second timestamp that serves as the base time of the day when the business data packet pushed by the business party is received; subtracting the second timestamp from the first timestamp to obtain a timestamp difference; and obtaining the version identifier based on the timestamp difference.
[0006] According to a payment data processing method provided by the present invention, the business data packet also includes at least one service name, each of the service name is associated with at least one data source; the metadata also includes a business identifier, and the acquisition of the payment metadata also includes: generating the business identifier based on the at least one service name.
[0007] According to a payment data processing method provided by the present invention, the metadata also includes a data table, and the data table records the operators and operators of the payment; the acquisition of the metadata of the payment also includes: creating an empty symbol stack and an empty data table, and initializing the serial number of the data table; wherein the data table includes an operator column and a symbol column; and the data table of the payment is generated by scanning each character in the formula of the payment from left to right.
[0008] According to a method for processing payment data provided by the present invention, the method generates the data table of the payment by scanning each character in the formula of the payment from left to right, including: scanning each character in the formula of the payment from left to right; in response to scanning an operator, adding the operator to the operator column of the current sequence number of the data table, and increasing the sequence number by 1; in response to scanning a non-bracket operator and the symbol stack is empty, pushing the non-bracket operator into the symbol stack; in response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is less than the top operator of the symbol stack, popping the top operator from the symbol stack, and adding the top operator to the position corresponding to the current sequence number in the symbol column, and increasing the sequence number by 1; repeating the above steps until the symbol stack is empty, pushing the non-bracket operator into the symbol stack; or until the non-bracket operator The priority of the operator is greater than or equal to the top operator of the current symbol stack, and the non-bracket operator is pushed into the symbol stack; in response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is greater than or equal to the top operator of the symbol stack, the non-bracket operator is pushed into the symbol stack; in response to scanning a left bracket, the left bracket is pushed into the symbol stack; in response to scanning a right bracket, the non-bracket operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1, and the above steps are repeated until the top of the symbol stack is a left bracket of the corresponding type, and the left bracket is popped out; after the formula scan is completed, the operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1, and the above steps are repeated until the symbol stack is empty, thereby obtaining the data table of the item.
[0009] According to a payment data processing method provided by the present invention, before performing the payment operation on the payment, the method also includes: generating the payment amount corresponding to the payment by parsing the data table, and storing the payment amount in correspondence with the payment data.
[0010] According to a payment data processing method provided by the present invention, the payment amount corresponding to the payment is generated by parsing the data table, including: creating an empty digital stack; starting from the initial serial number of the data table, scanning the data table in sequence, and after scanning the data table, generating the payment amount corresponding to the payment according to the data at the top of the digital stack; wherein, in the process of scanning the data table: in response to the operator column of the current serial number being not empty, the operator of the operator column of the current serial number is pushed into the digital stack; in response to the symbol column of the current serial number being not empty, two operators are popped out from the digital stack in sequence, the operator popped out for the first time is used as the right operand, and the operator popped out for the second time is used as the left operand, and the calculation corresponding to the operator of the symbol column of the current serial number is performed using the left operand and the right operand to obtain a calculation result, and the calculation result is pushed into the digital stack.
[0011] According to a payment data processing method provided by the present invention, before performing the payment operation on the payment, the method also includes: in response to the payment corresponding to a plurality of payment data, analyzing the payment amount calculated based on the plurality of payment data and the data table, and determining the correctness of the payment amount calculated based on the latest payment data.
[0012] According to a payment data processing method provided by the present invention, the method further includes: performing a gross profit dashboard analysis based on at least one of the business identifier, the version identifier, the data table, and the payment amount corresponding to the payment.
[0013] According to a payment data processing method provided by the present invention, before generating the payment data of the payment based on the payment name, the payment serial number and the data version of the payment, the method also includes: performing Huffman compression encoding on the byte stream corresponding to the data version.
[0014] The present invention also provides a payment data processing device, comprising the following modules: a receiving module, used to: receive a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, and the payment information includes a payment name and a payment serial number; an acquisition module, used to: obtain metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; a generation module, used to: generate a data version of the payment according to the metadata, and generate payment data of the payment according to the payment name, the payment serial number and the data version of the payment; an operation module, used to: in response to the payment cycle of the payment arriving, perform a payment operation on the payment, and send the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time; a determination module, used to: obtain the payment data of the payment including the same payment serial number, and determine the account period to which the payment should belong according to the version identifier in the payment data.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, any one of the aforementioned methods for processing payment data is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned methods for processing payment data.
[0017] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for processing payment data.
[0018] The payment data processing method, electronic device and program product provided by the present invention receive a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, the payment information includes the payment name and the payment serial number, obtains the metadata of the payment, the metadata includes a version identifier, the version identifier is used to identify the time when the business data packet pushed by the business party is received, generates a data version of the payment according to the metadata, generates payment data of the payment according to the payment name, payment serial number and data version of the payment, performs a payment operation on the payment in response to the payment cycle of the payment, and sends the payment result of the payment to the business party, so that the business party includes the payment information of the payment that failed to be paid in the next business data packet pushed when the payment fails, obtains the payment data including the same payment serial number, determines the payment period to which the payment belongs according to the version identifier in the payment data, realizes the accurate determination of the payment period to which the payment belongs on the basis of re-paying the payment that failed to be successfully paid, and is conducive to obtaining accurate financial statistical results. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is one of the flow charts of the payment data processing method provided by the present invention.
[0021] Figure 2 It is a data structure diagram of payment data in the payment data processing method provided by the present invention.
[0022] Figure 3 This is the second flow chart of the payment data processing method provided by the present invention.
[0023] Figure 4 It is a structural diagram of the payment data processing device provided by the present invention.
[0024] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0026] Figure 1 This is one of the flow charts of the payment data processing method provided by the present invention. Figure 1 As shown, the method includes: Step S1: Receive a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be made, and the payment information includes the payment name and payment serial number.
[0027] The entity that executes the payment data processing method provided by the present invention is called a payment data processing device. The business party is the upstream system of the payment data processing device, such as external sales, control center, order center, freight center, etc.
[0028] The payment data processing device receives a business data packet pushed by the business party. The business data packet includes payment information for at least one payment to be transferred, including the payment name and payment serial number. The received payment information may include the latest payment to be transferred and payment information for previous payments that failed to be transferred and require retransmission.
[0029] Step S2: Obtain metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received.
[0030] For each payment, obtain the payment metadata. The payment metadata includes a version identifier, which identifies the time when the business data package pushed by the business party was received. Because the payment information for the unsuccessful payment had been pushed previously, but the two pushes were pushed at different times, the payment version identifiers were different.
[0031] Step S3: Generate a data version of the payment according to the metadata, and generate payment data of the payment according to the payment name, the payment serial number and the data version of the payment.
[0032] For unsuccessful payments, the data versions generated based on the metadata are different due to different version identifiers in different push processes. However, the payment name and payment serial number are the same. Based on the business data package currently received from the business party, the payment data is generated based on the payment name, payment serial number, and data version.
[0033] Step S4: In response to the payment cycle of the payment arriving, the payment operation is performed on the payment, and the payment result of the payment is sent to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time.
[0034] A payment cycle can be set for each payment. Upon reaching a payment cycle, a payment operation is performed on the payment, and the payment result is sent to the business party. The payment result is either a successful payment or an unsuccessful payment. For payments that were not successfully transferred, the business party will include the payment information in the next business data packet sent, allowing the payment data processing device to re-transfer the payment operation. This allows for re-transfer of unsuccessful payments.
[0035] It is understandable that if the payment attempt is still unsuccessful again, the payment data processing device will send the payment result of the failed payment to the business party again, so that the business party can include the payment information of the failed payment in the next business data packet pushed when the payment fails. After receiving the payment information, the payment data processing device will re-perform the payment operation.
[0036] Step S5: Obtain the payment data including the same payment serial number, and determine the payment period to which the payment should belong based on the version identifier in the payment data.
[0037] For a particular payment, the payment serial number remains the same across multiple payments, indicating the same account. However, these payments correspond to multiple payment data sets, each with a different version identifier. The version identifier identifies the time when the business data package pushed by the business party was received. Therefore, the earliest receipt time of the business data package containing payment information for a particular payment is determined based on the version identifier, and the payment's due date is determined based on this time.
[0038] The payment data processing method provided by the present invention receives a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, the payment information includes a payment name and a payment serial number, obtains metadata of the payment, the metadata includes a version identifier, the version identifier is used to identify the time when the business data packet pushed by the business party is received, generates a data version of the payment according to the metadata, generates payment data of the payment according to the payment name, payment serial number and data version of the payment, performs a payment operation on the payment in response to the payment cycle of the payment, and sends the payment result of the payment to the business party, so that the business party includes the payment information of the payment that failed to be paid in the next business data packet pushed when the payment fails, obtains payment data including the same payment serial number, determines the payment period to which the payment should belong according to the version identifier in the payment data, realizes the accurate determination of the payment period to which the payment should belong on the basis of re-paying the payment that failed to be successfully paid, and is conducive to obtaining accurate financial statistical results.
[0039] According to a payment data processing method provided by the present invention, obtaining the metadata of the payment includes: obtaining a first timestamp corresponding to the time when the business data packet pushed by the business party is received; obtaining a second timestamp that serves as the base time of the day when the business data packet pushed by the business party is received; subtracting the second timestamp from the first timestamp to obtain a timestamp difference; and obtaining the version identifier based on the timestamp difference.
[0040] The metadata includes a version identifier. The process of obtaining the version identifier includes: obtaining a first timestamp corresponding to the time when the business data packet pushed by the business party is received, obtaining a second timestamp that serves as the base time of the day when the business data packet pushed by the business party is received, subtracting the second timestamp from the first timestamp to obtain a timestamp difference, and obtaining a version identifier based on the timestamp difference. When obtaining the version identifier based on the timestamp difference, the numeric string corresponding to the timestamp difference can be directly used as the version identifier, or the numeric string corresponding to the timestamp difference can be added with an auto-increment ID corresponding to the day as the version identifier. Since time has granularity, the auto-increment ID is added to distinguish the version identifiers of different items at the same time.
[0041] For example, based on the time when the business data packet pushed by the business party is received, the corresponding unique number is generated by subtracting the millisecond timestamp of the day from the 0:00 timestamp of the day, and the unique number string is used as the version identifier.
[0042] Since the timestamp generation rule is the number of milliseconds remaining after subtracting the previously set base time from the current time, the generated digital strings have a size relationship in the time series. The digital strings generated at earlier times are smaller, and the digital strings generated at later times are larger. The generated digital strings are sorted by size to obtain data versions based on different times.
[0043] For example, at 10:56:44 on May 20, 2024, the unique number 1716173804 will be generated. At 09:56:40 on May 29, 2024, the unique number 1716947800 will be generated. Since 1716173804 <1716947>800, when calculating, the largest number is taken to obtain the latest data version, and the old version can be traced back by time for historical versions.
[0044] Similarly, based on the version identifier, the corresponding number of milliseconds can be obtained by subtracting the timestamp of the set reference time and then converted into a normal readable time.
[0045] The method for processing payment data provided by the present invention realizes the accurate determination of the version identifier by obtaining the first timestamp corresponding to the time when the business data packet pushed by the business party is received, obtaining the second timestamp as the reference time of the day when the business data packet pushed by the business party is received, calculating the difference between the second timestamp and the first timestamp to obtain the timestamp difference, and obtaining the version identifier according to the timestamp difference.
[0046] According to a method for processing payment data provided by the present invention, the business data packet further includes at least one service name, and each service name is associated with at least one data source; the metadata further includes a business identifier, and obtaining the metadata of the payment further includes: generating the business identifier according to the at least one service name.
[0047] The business data packet further includes at least one service name, and each service name is associated with at least one data source. The data source analysis of the payment can be carried out based on the service name in the business data packet. The business identifier can be used as another type of metadata. When obtaining the business identifier, the business identifier can be generated according to at least one service name. For example, a string formed by concatenating service names with a preset symbol can be used as the business identifier. Thus, the service name can be deduced from the business identifier, and the data source analysis of the payment can be carried out according to the service name.
[0048] The business data packet pushed by the business party can be received based on a subscription system. When the corresponding data packet information is received in the subscription mailbox, data is retrieved based on the data in the received data packet information to obtain the actual running service name. In theory, as many data sources can be distinguished as there are upstream applications, and the data origin can be directly traced according to the application name.
[0049] The payment data processing method provided by the present invention includes at least one service name in the business data packet, each service name is associated with at least one data source, and the metadata also includes a business identifier. The business identifier is generated based on the at least one service name, thereby including the business identifier in the data version. The service name can be further obtained based on the business identifier for data source analysis of the payment, and the content of the metadata for constructing the data version is enriched.
[0050] According to a payment data processing method provided by the present invention, the metadata also includes a data table, and the data table records the operators and operators of the payment; the acquisition of the metadata of the payment also includes: creating an empty symbol stack and an empty data table, and initializing the serial number of the data table; wherein the data table includes an operator column and a symbol column; and the data table of the payment is generated by scanning each character in the formula of the payment from left to right.
[0051] Metadata also includes data tables that record the operators and calculations for items. Operators include constants and variables, and the variables in an operator for an item can be other items.
[0052] The process of obtaining a data table includes: creating an empty symbol stack and an empty data table, and initializing the serial number of the data table, such as setting the initial serial number to 0; the data table includes an operator column and a symbol column, the operator column is used to store operators, and the symbol column is used to store operators; by scanning each character in the formula of the payment from left to right, a data table of the payment is generated.
[0053] The payment data processing method provided by the present invention includes a data table that records the operators and operators of the payment in the metadata, creates an empty symbol stack and an empty data table, and initializes the serial number of the data table. The data table includes an operator column and a symbol column, and generates a payment data table by scanning each character in the payment formula from left to right. This realizes the inclusion of the data table in the data version, provides a basis for using the data table to calculate the payment amount, and further enriches the content of the metadata for constructing the data version.
[0054] According to a method for processing payment data provided by the present invention, the method generates the data table of the payment by scanning each character in the formula of the payment from left to right, including: scanning each character in the formula of the payment from left to right; in response to scanning an operator, adding the operator to the operator column of the current sequence number of the data table, and increasing the sequence number by 1; in response to scanning a non-bracket operator and the symbol stack is empty, pushing the non-bracket operator into the symbol stack; in response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is less than the top operator of the symbol stack, popping the top operator from the symbol stack, and adding the top operator to the position corresponding to the current sequence number in the symbol column, and increasing the sequence number by 1; repeating the above steps until the symbol stack is empty, pushing the non-bracket operator into the symbol stack; or until the non-bracket operator The priority of the operator is greater than or equal to the top operator of the current symbol stack, and the non-bracket operator is pushed into the symbol stack; in response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is greater than or equal to the top operator of the symbol stack, the non-bracket operator is pushed into the symbol stack; in response to scanning a left bracket, the left bracket is pushed into the symbol stack; in response to scanning a right bracket, the non-bracket operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1, and the above steps are repeated until the top of the symbol stack is a left bracket of the corresponding type, and the left bracket is popped out; after the formula scan is completed, the operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1, and the above steps are repeated until the symbol stack is empty, thereby obtaining the data table of the item.
[0055] The following example introduces the process of building a data table: 1. Create an empty symbol stack to store operators and prepare an empty digital table with the serial number starting from 0; 2. Scan each character in the formula from left to right.
[0056] (1) Scan to a number: directly add it to the sequence number of the current operator column in the digital table and increase the sequence number by 1; (2) Scan to non-bracket operators: If the top of the stack is empty, push it directly onto the top of the stack.
[0057] The top of the stack is not empty, and its priority with the top operator of the stack is determined; If the priority is less than the top operator, pop the top operator from the stack and add it to the serial number in the symbol column in the number table, and increase the serial number by 1. Repeat the above steps until the top of the stack is empty, and then push the non-bracket operator to the top of the stack; or until the priority of the top operator is less than or equal to the priority of the non-bracket operator, and then push the non-bracket operator to the top of the stack; If the priority of the current non-bracket operator is greater than or equal to the top operator of the stack, push the current operator to the top of the stack; (3) Scan to a left bracket, including “{”, “[” or “(”, and push it into the stack.
[0058] (4) When the right bracket is found, the operator is popped from the stack and added to the serial number in the symbol column in the number table, and the serial number is increased by 1 until the operator at the top of the stack is the left bracket of the corresponding type, and then the left bracket is popped.
[0059] 3. After the formula scan of the amount is completed, pop the operator from the symbol stack and add it to the serial number in the symbol column in the digital table, and increase the serial number by 1 until the symbol stack is empty.
[0060] The priority of operators is shown in Table 1.
[0061] Table 1
[0062] For example, if the name of a certain amount is project manager labor management fee completion cost, the formula is: project manager labor management fee - invoice amount / (1.03 * 0.02 + 0.0103).
[0063] According to the above rules, by scanning each character in the formula of the payment from left to right, the steps to generate the payment data table are as follows: 1. Add the project manager's labor management fee to the operator column number 0 in the data table, and add 1 to the number.
[0064] 2. The top of the symbol stack is empty, and the minus sign is pushed directly into the stack.
[0065] 3. Add the invoice amount to operator column number 1 in the data table, with the number increased by 1.
[0066] 4. The / division sign has a higher priority than the minus sign at the top of the stack, so the / division sign is pushed onto the stack.
[0067] 5. (The left bracket is pushed directly onto the stack.
[0068] 6. Add 1.03 to the operator column number 2 in the data table, and increase the number by 1.
[0069] 7. * The multiplication sign has a higher priority than (. The left bracket pushes the * multiplication sign into the stack.
[0070] 8. Add 0.02 to the operator column number 3 in the data table, and increase the number by 1.
[0071] 9. The priority of the + sign is lower than the * multiplication sign. Pop the * multiplication sign and put it into the symbol column in the data table at position 4, with the number +1. The priority of the + sign is greater than the top of the stack (left bracket. Push the + sign into the stack.
[0072] 10. Add 0.0103 to the operator column number 5 in the data table, and increase the number by 1.
[0073] 11. Scan to the ) right bracket, and start popping elements from the symbol stack until the top operator is the corresponding type of left bracket. Here, the + plus sign is popped and placed in the symbol column at number 6 in the data table, number +1. The top operator is the corresponding type of ( left bracket, and the left bracket is popped.
[0074] 12. After the characters in the formula are scanned, the remaining elements in the symbol stack are popped out one by one. The / division sign popped out from the stack is placed at position 7 in the symbol column of the data table. The +1 and - minus signs are placed at position 8 in the symbol column of the data table. There are no elements in the stack, so stop.
[0075] For the completion cost of the project manager's labor management fee, the data table finally formed by scanning the corresponding formula is shown in Table 2.
[0076] Table 2
[0077] The payment data processing method provided by the present invention generates a payment data table by scanning each character in the payment formula from left to right, performing corresponding processing according to the scanned operator or operator, thereby improving the accuracy of the data table and saving storage space by storing it in the form of a data table.
[0078] According to a payment data processing method provided by the present invention, before performing the payment operation on the payment, the method also includes: generating the payment amount corresponding to the payment by parsing the data table, and storing the payment amount in correspondence with the payment data.
[0079] Before executing the payment operation, the method further includes: generating a payment amount corresponding to the payment by parsing the data table, making the payment based on the generated payment amount, and storing the payment amount and the payment data in correspondence for subsequent analysis.
[0080] The payment data processing method provided by the present invention generates the payment amount corresponding to the payment by parsing the data table, and stores the payment amount in correspondence with the payment data, thereby realizing the determination of the payment amount.
[0081] According to a payment data processing method provided by the present invention, the payment amount corresponding to the payment is generated by parsing the data table, including: creating an empty digital stack; starting from the initial serial number of the data table, scanning the data table in sequence, and after scanning the data table, generating the payment amount corresponding to the payment according to the data at the top of the digital stack; wherein, in the process of scanning the data table: in response to the operator column of the current serial number being not empty, the operator of the operator column of the current serial number is pushed into the digital stack; in response to the symbol column of the current serial number being not empty, two operators are popped out from the digital stack in sequence, the operator popped out for the first time is used as the right operand, and the operator popped out for the second time is used as the left operand, and the calculation corresponding to the operator of the symbol column of the current serial number is performed using the left operand and the right operand to obtain a calculation result, and the calculation result is pushed into the digital stack.
[0082] When parsing a data table to generate the corresponding payment amount, an empty digital stack is created. Starting from the initial sequence number of the data table, the data table is scanned sequentially. After scanning the data table, the corresponding payment amount is generated based on the data at the top of the digital stack. The initial sequence number of the data table is the result of initializing the sequence number of the data table, such as sequence number 0.
[0083] During the scanning of the data table: If the operator column of the current sequence number is not empty, push the operator of the operator column of the current sequence number into the digital stack; if the symbol column of the current sequence number is not empty, pop two operators from the digital stack in sequence, use the operator popped out for the first time as the right operand, and use the operator popped out for the second time as the left operand, use the left operand and the right operand to perform the calculation corresponding to the operator of the symbol column of the current sequence number, obtain the calculation result, and push the calculation result into the symbol stack.
[0084] Continuing with the above example, by parsing the data table, the process of obtaining the completion cost of the project manager's labor management fee is as follows: 1. The operator column at sequence number 0 in the data table is not empty, and the project manager's labor management fee is pushed into the digital stack.
[0085] 2. If the operator column at position 1 in the data table is not empty, the invoice amount is pushed into the digital stack.
[0086] 3. The operator column at position 2 in the data table is not empty, so 1.03 is pushed into the digital stack.
[0087] 4. The operator column at position 3 in the data table is not empty, so 0.02 is pushed into the digital stack.
[0088] 5. The symbol column at position 4 in the data table is not empty and is a * multiplication sign. 1.03 and 0.02 are popped out, and the calculation results of 1.03 and 0.02 are assigned to a variable temp, temp = 1.03 * 0.02, and temp is pushed into the digital stack.
[0089] 6. The operator column at position 5 in the data table is not empty, so 0.0103 is pushed into the digital stack.
[0090] 7. The symbol column at position 6 in the data table is not empty and contains a + sign. Temp and 0.0103 are popped out, the result of temp + 0.0103 is calculated, and the result is reassigned to temp. The updated temp is then stored in the stack.
[0091] 8. The symbol column at position 7 in the data table is not empty and is a / division sign. The invoice amount and temp are popped out, the result of invoice amount / temp is calculated, and the result is reassigned to temp. The updated temp is then stored in the stack.
[0092] 9. The symbol column at position 8 in the data table is not empty, but is a minus sign. The project manager's labor management fee and temp are popped up, the result of project manager's labor management fee - temp is calculated, and the result is reassigned to temp, and then the updated temp is stored in the stack.
[0093] 10. After the data table is traversed, the temp value at the top of the digital stack is output as the final formula calculation result.
[0094] The payment data processing method provided by the present invention starts with the initial serial number of the data table, scans the data table in sequence, and after scanning the data table, generates the payment amount corresponding to the payment based on the data at the top of the digital stack, and provides a specific processing method for scanning the data table, thereby improving the accuracy of the payment amount generated based on the analysis of the data table.
[0095] According to a payment data processing method provided by the present invention, before performing the payment operation on the payment, the method also includes: in response to the payment corresponding to a plurality of payment data, analyzing the payment amount calculated based on the plurality of payment data and the data table, and determining the correctness of the payment amount calculated based on the latest payment data.
[0096] Before making a payment, you can first reconcile your business transactions to confirm the accuracy of the final payment amount. If there are any discrepancies between the latest and older versions of a payment, a red mark will appear on the page indicating the change. The page information includes the new payment amount, the old payment amount, the difference between them, the payment formula, and any changed operators in the formula (only the variables in the operators in the formula change). Once the calculation results are confirmed to be correct, or when the system's set automatic transfer time arrives, a new payment order will be generated for the changed payment, with the payment cycle set to the same period as the previous payment. This new payment order will be sent to the payee for subsequent processing. If the payment amount is incorrect, the analysis results can be pushed to the relevant personnel for troubleshooting.
[0097] The payment data processing method provided by the present invention analyzes the payment amount and data table calculated based on the multiple payment data in response to the payment corresponding to the multiple payment data, determines the correctness of the payment amount calculated based on the latest payment data, and improves the accuracy of the payment amount.
[0098] According to a payment data processing method provided by the present invention, the method further includes: performing a gross profit dashboard analysis based on at least one of the business identifier, the version identifier, the data table, and the payment amount corresponding to the payment.
[0099] Based on the data version, various amount items of the payment are integrated together to record the complete capital chain information. By setting certain payment calculation rules, the corresponding gross profit of the payment can be obtained for management.
[0100] Based on the above process of parsing the data table, the relevant information for each data version can be displayed. Changes in the operators in the formula may not necessarily be due to an anomaly; they may also be caused by the finance department adjusting the calculation base of a certain amount. In this case, the finance department can observe the changes in the calculation of each amount between the versions before and after the adjustment on the dashboard, and determine the changes in the amount and gross profit before and after the payment of each category. At the same time, data source analysis can be performed based on business identifiers. Each amount can be clearly marked as a cost or reward, etc., for quick analysis.
[0101] The payment data processing method provided by the present invention improves the accuracy of the gross profit dashboard analysis by performing gross profit dashboard analysis based on at least one of the business identification, version identification, data table and payment amount corresponding to the payment.
[0102] According to a payment data processing method provided by the present invention, before generating the payment data of the payment based on the payment name, the payment serial number and the data version of the payment, the method also includes: performing Huffman compression encoding on the byte stream corresponding to the data version.
[0103] The data version may be compressed to generate the payment data of the payment based on the payment name, payment serial number and the compressed data version. The compressed data version may be obtained by performing Huffman compression coding on the byte stream corresponding to the data version.
[0104] Figure 2 This is a schematic diagram of the data structure of payment data in the payment data processing method provided by the present invention. The payment name and payment serial number can be provided in the form of a data payment table. The Huffman coding compression field is the compressed data version, including business identification, version identification, and data table information.
[0105] The payment data processing method provided by the present invention not only saves storage space but also improves data security by performing Huffman compression coding on the byte stream corresponding to the data version.
[0106] Figure 3 This is the second flow chart of the payment data processing method provided by the present invention. Figure 3 As shown, the payment data processing device pulls relevant data from upstream in a time-series manner, obtains metadata used to construct data versions, and constructs data versions based on the metadata. The data pulled from upstream in a time-series manner is divided into two types: one is information from the upstream system received in the subscription mailbox, and the other is information about changes to operator payments within the system. These two types are combined to form a metadata data structure according to the above data retrieval process and stored. When a certain operator changes, a message can be sent to the business side to prompt them to re-push the relevant data.
[0107] Metadata includes a business identifier, version identifier, and data table. A data version is generated based on the metadata and compressed to obtain a compressed data version. Payment data is generated based on the compressed data version and the corresponding payment name and payment serial number in the payment table.
[0108] Periodically summarize payment information and conduct business flow reconciliation based on payment data and payment amounts. Once reconciliation is successful, transfer and withdraw payments. Perform data restoration based on the data tables within the payment data and conduct relevant gross profit dashboard analysis.
[0109] The payment data processing method provided by the present invention can restore the data version to the normal time according to the version identifier after the data version is generated, which is convenient for visual analysis; by compressing and storing the data version, the space memory occupancy is small and the data security is high; the data source and calculation method are stored in the form of a data table, which saves space while being able to restore and analyze the data.
[0110] The payment data processing device provided by the present invention is described below. The payment data processing device described below and the payment data processing method described above can be referenced to each other.
[0111] Figure 4 This is a schematic diagram of the structure of the payment data processing device provided by the present invention. Figure 4 As shown, the device includes a receiving module 10, an acquisition module 20, a generation module 30, an operation module 40 and a determination module 50, wherein: the receiving module 10 is used to: receive a business data packet pushed by the business party; wherein, the business data packet includes payment information of at least one payment to be made, and the payment information includes the payment name and the payment serial number; the acquisition module 20 is used to: obtain the metadata of the payment; wherein, the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; the generation module 30 is used to: generate the The data version of the payment generates the payment data of the payment according to the payment name, the payment serial number and the data version of the payment; the operation module 40 is used for: in response to the payment cycle of the payment, performing the payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time; the determination module 50 is used for: obtaining the payment data of the payment including the same payment serial number, and determining the account period to which the payment should belong according to the version identifier in the payment data.
[0112] The payment data processing device provided by the present invention receives a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, the payment information includes the payment name and the payment serial number, obtains the metadata of the payment, the metadata includes a version identifier, the version identifier is used to identify the time when the business data packet pushed by the business party is received, generates a data version of the payment according to the metadata, generates payment data of the payment according to the payment name, payment serial number and data version of the payment, performs a payment operation on the payment in response to the payment cycle of the payment, and sends the payment result of the payment to the business party, so that the business party includes the payment information of the payment that failed to be paid in the next business data packet pushed when the payment fails, obtains the payment data including the same payment serial number, determines the payment period to which the payment belongs according to the version identifier in the payment data, realizes the accurate determination of the payment period to which the payment belongs on the basis of re-payment of the payment that failed to be successfully paid, and is conducive to obtaining accurate financial statistical results.
[0113] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5 As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the payment data processing method, which includes: receiving a business data packet pushed by the business party; wherein the business data packet includes payment information of at least one payment to be paid, and the payment information includes the payment name and payment serial number; obtaining metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; generating a data version of the payment according to the metadata, and generating payment data of the payment according to the payment name, the payment serial number and the data version of the payment; in response to the payment cycle of the payment arriving, performing a payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time; obtaining the payment data of the payment including the same payment serial number, and determining the account period to which the payment should belong according to the version identifier in the payment data.
[0114] Furthermore, the logic instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0115] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the payment data processing method provided by the above-mentioned methods, the method including: receiving a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, and the payment information includes a payment name and a payment serial number; obtaining metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; generating a data version of the payment based on the metadata, and generating payment data of the payment based on the payment name, the payment serial number and the data version of the payment; in response to reaching the payment cycle of the payment, performing a payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the next business data packet pushed; obtaining the payment data of the payment including the same payment serial number, and determining the account period to which the payment should belong based on the version identifier in the payment data.
[0116] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the payment data processing method provided by the above-mentioned methods, the method comprising: receiving a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be paid, and the payment information includes a payment name and a payment serial number; obtaining metadata of the payment; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; generating a data version of the payment according to the metadata, and generating payment data of the payment according to the payment name, the payment serial number and the data version of the payment; in response to the payment cycle of the payment arriving, performing a payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the next business data packet pushed; obtaining the payment data of the payment including the same payment serial number, and determining the account period to which the payment should belong according to the version identifier in the payment data.
[0117] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0118] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for processing payment data, characterized in that: include: Receive a business data packet pushed by a business party; wherein the business data packet includes payment information of at least one payment to be made, and the payment information includes a payment name and a payment serial number; Obtaining metadata of the item; wherein the metadata includes a version identifier, and the version identifier is used to identify the time when the business data packet pushed by the business party is received; Generate a data version of the payment according to the metadata, and generate payment data of the payment according to the payment name, the payment serial number and the data version of the payment; In response to reaching the payment cycle of the payment, performing a payment operation on the payment, and sending the payment result of the payment to the business party, so that the business party can include the payment information of the payment that failed to be paid in the business data packet pushed next time; The payment data including the same payment serial number is obtained, and the payment period to which the payment should belong is determined according to the version identifier in the payment data.
2. The payment data processing method according to claim 1, characterized in that: The step of obtaining metadata of the payment includes: Obtaining a first timestamp corresponding to the time when the business data packet pushed by the business party is received; Obtaining a second timestamp as a reference time of the day when the service data packet pushed by the service party is received; Subtract the second timestamp from the first timestamp to obtain a timestamp difference; The version identifier is obtained according to the timestamp difference.
3. The payment data processing method according to claim 1, characterized in that: The business data packet also includes at least one service name, each of which is associated with at least one data source; The metadata also includes a business identifier, and the step of obtaining the metadata of the payment further includes: generating the business identifier according to the at least one service name.
4. The payment data processing method according to claim 3, characterized in that: The metadata also includes a data table, wherein the data table records the operator and operator of the item; The step of obtaining the metadata of the payment further includes: Create an empty symbol stack and an empty data table, and initialize the sequence number of the data table; wherein the data table includes an operator column and a symbol column; The data table of the item is generated by scanning each character in the formula of the item from left to right.
5. The payment data processing method according to claim 4, characterized in that: The step of generating the data table of the item by scanning each character in the formula of the item from left to right includes: Scan each character in the formula of the term from left to right; In response to scanning an operator, the operator is added to the operator column of the current sequence number of the data table, and the sequence number is increased by 1; In response to scanning a non-bracket operator and the symbol stack being empty, pushing the non-bracket operator into the symbol stack; In response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is less than the top operator of the symbol stack, then pop the top operator from the symbol stack, add the top operator to the position corresponding to the current sequence number in the symbol column, and increase the sequence number by 1; repeat the above steps until the symbol stack is empty, and push the non-bracket operator into the symbol stack; or until the priority of the non-bracket operator is greater than or equal to the top operator of the current symbol stack, and push the non-bracket operator into the symbol stack; In response to scanning a non-bracket operator and the symbol stack is not empty, if it is known that the priority of the non-bracket operator is greater than or equal to the top operator of the symbol stack, pushing the non-bracket operator into the symbol stack; In response to scanning a left bracket, pushing the left bracket into the symbol stack; In response to scanning a right bracket, a non-bracket type operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1, and the above steps are repeated until the top of the symbol stack is a left bracket of the corresponding type, and the left bracket is popped out; After the formula scanning is completed, the operator is popped from the symbol stack and added to the position corresponding to the current serial number in the symbol column, and the serial number is increased by 1. The above steps are repeated until the symbol stack is empty to obtain the data table of the item.
6. The method for processing payment data according to claim 5, characterized in that: Before performing the payment operation on the funds, the method further includes: By parsing the data table, the payment amount corresponding to the payment is generated, and the payment amount and the payment data are stored in correspondence.
7. The method for processing payment data according to claim 6, characterized in that: The step of generating the payment amount corresponding to the payment by parsing the data table includes: Create an empty number stack; Starting from the initial sequence number of the data table, the data table is scanned in sequence, and after the data table is scanned, the payment amount corresponding to the payment is generated according to the data at the top of the digital stack; Wherein, in the process of scanning the data table: In response to the operator column of the current sequence number being not empty, pushing the operator of the operator column of the current sequence number into the digital stack; In response to the symbol column of the current sequence number being not empty, two operators are popped out from the digital stack in sequence, the operator popped out for the first time is used as the right operand, and the operator popped out for the second time is used as the left operand, the calculation corresponding to the operator of the symbol column of the current sequence number is performed using the left operand and the right operand, a calculation result is obtained, and the calculation result is pushed into the digital stack.
8. The method for processing payment data according to claim 6, characterized in that: Before performing the payment operation on the funds, the method further includes: In response to the payment corresponding to a plurality of payment data, the payment amount calculated based on the plurality of payment data and the data table are analyzed to determine the correctness of the payment amount calculated based on the latest payment data.
9. The method for processing payment data according to claim 1, characterized in that: Before generating the payment data of the payment according to the payment name, the payment serial number and the data version of the payment, the method further includes: The byte stream corresponding to the data version is Huffman compressed and encoded.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for processing payment data as described in any one of claims 1 to 9 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing payment data as claimed in any one of claims 1 to 9 is implemented.