Data processing method and device, electronic device and storage medium
By grouping and calculating the aggregated values of transaction data between subsidiaries of the same financial institution, target printing data is generated and only bills with the netting amount are printed, thus solving the problem of resource waste caused by printing multiple invoices and improving processing efficiency and resource utilization.
Patent Information
- Application Number
- CN202311000241.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-08-09
AI Technical Summary
When the number of transactions between multiple subsidiaries of the same financial institution is huge, existing technologies require a lot of computing power to output and print a large number of invoices, resulting in waste of resources and inefficiency.
By generating M data to be printed, grouping and processing to obtain a first array and a second array, calculating a summary value and generating target printing data, only the bills with the netting amount are printed to reduce duplicate printing.
It saves computer computing power and printing equipment consumables, improves processing efficiency and reduces resource consumption.
Smart Images

Figure CN119311230B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of big data technology and financial technology, and specifically to a data processing method, device, equipment, medium and program product. Background Art
[0002] In a scenario where income is transferred between multiple subsidiaries of the same financial institution that transact with each other, the income-receiving institution needs to issue a value-added tax invoice to the income-receiving institution for the incoming income.
[0003] In the process of realizing the concept of the present disclosure, the inventors found that there are at least the following problems in the relevant technology: when the number of transactions is huge, the number of invoices issued to each other by subsidiaries is huge, which requires a lot of computing power to output print data for invoice printing. Summary of the Invention
[0004] In view of the above problems, the present disclosure provides a data processing method, apparatus, device, medium and program product.
[0005] One aspect of the present disclosure provides a data processing method, comprising:
[0006] M data to be printed are generated by executing a scheduled task, wherein the data to be printed include at least a printing amount field, a debiting agency field, and a crediting agency field, and M is a positive integer; the M data to be printed are processed to obtain a first array including N first data to be printed, and a second array including L second data to be printed, wherein the value of the debiting agency field of the first data to be printed is the same as the value of the crediting agency field of the second data to be printed, and the value of the crediting agency field of the first data to be printed is the same as the value of the debiting agency field of the second data to be printed, N≤M, L≤M; a first summary value is calculated based on the values of the printing amount fields of the N first data to be printed, and a second summary value is calculated based on the values of the printing amount fields of the L second data to be printed; target printing data is generated according to the first summary value and the second summary value; the target printing data is sent to a printing device, so that the printing device prints out a target ticket based on the target printing data.
[0007] According to an embodiment of the present disclosure, after generating M data to be printed, the method further includes:
[0008] A statistical label is generated for each data to be printed, wherein the statistical label includes a first identification bit and a second identification bit, the first identification bit and the second identification bit are connected by a separator, the first identification bit is associated with the value of the outgoing organization field, and the second identification bit is associated with the value of the incoming organization field.
[0009] According to an embodiment of the present disclosure, processing the M data to be printed to obtain the first array and the second array includes: processing the M data to be printed based on statistical labels to obtain the first array and the second array.
[0010] According to an embodiment of the present disclosure, processing M data to be printed based on statistical tags includes: receiving target data to be printed; reading a first target value of a first identification bit from the statistical tag of the target data to be printed, and reading a second target value of a second identification bit; querying from the M data to be printed and obtaining multiple data to be printed whose values of the first identification bit of the statistical tag are the first target value and whose values of the second identification bit of the statistical tag are the second target value, and combining them to obtain a first array; querying from the M data to be printed and obtaining whose values of the first identification bit of the statistical tag are the second target value and whose values of the second identification bit of the statistical tag are the first target value, and combining them to obtain a second array.
[0011] According to an embodiment of the present disclosure, processing M data to be printed to obtain a first array and a second array includes: grouping the M data to be printed based on a predetermined query field to obtain multiple category arrays, the predetermined query field at least including a delimited organization field, an incoming organization field and at least one auxiliary field; based on statistical labels, determining the first array and the second array from multiple category arrays.
[0012] According to an embodiment of the present disclosure, at least one auxiliary field includes at least one of the following: a printing month field, a printing currency field, a reference tax rate field, and an invoicing item field. According to an embodiment of the present disclosure, the target printing data includes at least target printing amount information and target printing agency information; generating the target printing data based on the first summary value and the second summary value includes: calculating a target difference between the first summary value and the second summary value; when the first summary value is greater than the second summary value, generating the target printing amount information based on the target difference, and generating the target printing agency information based on the value of the transfer-in agency field of the first data to be printed; when the first summary value is less than the second summary value, generating the target printing amount information based on the target difference, and generating the target printing agency information based on the value of the transfer-in agency field of the second data to be printed; when the first summary value is equal to the second summary value, not generating the target printing data.
[0013] Another aspect of the present disclosure provides a data processing device, including: a first generating module, a processing module, a calculating module, a second generating module, and a sending module.
[0014] The first generation module is used to generate M data to be printed by executing a scheduled task, wherein the data to be printed include at least a printing amount field, a debiting agency field, and a crediting agency field, and M is a positive integer; the processing module is used to process the M data to be printed to obtain a first array including N first data to be printed, and a second array including L second data to be printed, wherein the value of the debiting agency field of the first data to be printed is the same as the value of the crediting agency field of the second data to be printed, and the value of the crediting agency field of the first data to be printed is the same as the value of the debiting agency field of the second data to be printed, N≤M, L≤M; the calculation module is used to calculate a first summary value based on the values of the printing amount fields of the N first data to be printed, and to calculate a second summary value based on the values of the printing amount fields of the L second data to be printed; the second generation module is used to generate target printing data according to the first summary value and the second summary value; the sending module is used to send the target printing data to the printing device, so that the printing device prints out the target bill based on the target printing data.
[0015] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned data processing method.
[0016] Another aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the above-mentioned data processing method.
[0017] Another aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above data processing method when executed by a processor.
[0018] According to the embodiments of the present disclosure, by processing M data to be printed to obtain a first array and a second array, the plurality of data to be printed is grouped and processed, extracting the data to be printed for each two institutions involved in a counter-transaction, further calculating a first summary value and a second summary value, and generating target print data based on the first and second summary values, i.e., performing a netting calculation for the printed amount on the ticket. In this way, only one ticket is printed for the netting amount, eliminating the need to generate print data and print a ticket for each receipt. Since only one ticket needs to be printed, computer computing power is saved, processing efficiency is improved, and equipment and consumables consumption of the printing device are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 Schematically illustrates an application scenario diagram of a data processing method, apparatus, device, medium, and program product according to an embodiment of the present disclosure;
[0021] Figure 2 The following schematically shows a flow chart of a data processing method according to an embodiment of the present disclosure;
[0022] Figure 3 A flowchart of processing M data to be printed based on statistical tags according to the present disclosure is schematically shown;
[0023] Figure 4 A flowchart schematically illustrates processing M data to be printed to obtain a first array and a second array according to an embodiment of the present disclosure;
[0024] Figure 5 A block diagram schematically illustrates a structure of a data processing device according to an embodiment of the present disclosure; and
[0025] Figure 6 The block diagram schematically shows an electronic device suitable for implementing the data processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0029] When expressions such as "at least one of A, B and C, etc." are used, they should generally be interpreted in accordance with the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] In the technical solution of the present invention, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0031] It should be noted that the data processing methods and devices, electronic devices and storage media of the embodiments of the present disclosure can be used in the fields of big data technology and financial technology, and can also be used in any field other than the fields of big data technology and financial technology. The embodiments of the present disclosure do not limit the application fields of the above-mentioned data processing methods and devices, electronic devices and storage media.
[0032] An embodiment of the present disclosure provides a data processing method, including:
[0033] M data to be printed are generated by executing a scheduled task, the M data to be printed are processed to obtain a first array including N first data to be printed, and a second array including L second data to be printed, a first summary value is calculated based on the values of the print amount fields of the N first data to be printed, and a second summary value is calculated based on the values of the print amount fields of the L second data to be printed; target printing data are generated according to the first summary value and the second summary value; the target printing data are sent to a printing device, so that the printing device prints out a target ticket based on the target printing data.
[0034] Figure 1 The application scenario diagram of the data processing method, apparatus, device, medium and program product according to the embodiments of the present disclosure is schematically shown.
[0035] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, a server 105, and a printing device 106. The network 104 is used as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The printing device 106 is used to receive print information sent by the server 105 and print it.
[0036] The user can use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. The first terminal device 101, the second terminal device 102, and the third terminal device 103 may have a data processing program installed thereon.
[0037] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0038] Server 105 can be a server that provides various services. The backend management server can analyze and process the received bank transaction data and feed back the processing results (e.g., web pages, information, or data obtained or generated according to user requests) to printing device 106. Printing device 106 then prints the corresponding receipt based on the data information sent by server 105.
[0039] In the application scenario of the embodiment of the present disclosure, the user can use at least one of the first terminal device 101, the second terminal device 102, and the third terminal device 103 to initiate a request for printing a ticket to the server 105. In response to the user request, the server 105 can be used to execute the data processing method of the embodiment of the present disclosure: generate M data to be printed by executing a scheduled task; process the M data to be printed to obtain a first array including N first data to be printed, and a second array including L second data to be printed; calculate a first summary value based on the values of the print amount fields of the N first data to be printed, and calculate a second summary value based on the values of the print amount fields of the L second data to be printed; the server 105 generates target printing data based on the first summary value and the second summary value, and sends the target printing data to the printing device 106, and the printing device 106 prints out the target ticket based on the target printing data.
[0040] It should be noted that the data processing method provided in the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the data processing device provided in the embodiments of the present disclosure can generally be set in the server 105. The data processing method provided in the embodiments of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the data processing device provided in the embodiments of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0042] The following will be based on Figure 1 The scene described by Figures 2 to 6 The data processing method of the disclosed embodiment is described in detail.
[0043] Figure 2 The flowchart of the data processing method according to the embodiment of the present disclosure is schematically shown.
[0044] like Figure 2 As shown, the data processing method of this embodiment includes operations S210 to S250.
[0045] In operation S210, M data to be printed are generated by executing a scheduled task, wherein the data to be printed at least includes a printing amount field, a debiting organization field, and a crediting organization field, and M is a positive integer.
[0046] In operation S220, M data to be printed are processed to obtain a first array including N first data to be printed, and a second array including L second data to be printed, wherein the value of the delimiting mechanism field of the first data to be printed is the same as the value of the delimiting mechanism field of the second data to be printed, and the value of the delimiting mechanism field of the first data to be printed is the same as the value of the delimiting mechanism field of the second data to be printed, and N≤M, L≤M.
[0047] In operation S230 , a first summary value is calculated based on the values of the print amount fields of the N first data to be printed, and a second summary value is calculated based on the values of the print amount fields of the L second data to be printed.
[0048] In operation S240 , target print data is generated according to the first summary value and the second summary value;
[0049] In operation S250, the target printing data is transmitted to the printing device, so that the printing device prints out a target ticket based on the target printing data.
[0050] According to an embodiment of the present disclosure, there is a situation of income allocation between multiple sub-institutions of the same financial institution that transact with each other. For example: multiple sub-institutions of the same financial institution jointly provide external services, and one of the sub-institutions acts as a collection agency that directly transacts with customers. After the sub-institution receives the payment from the customer, it needs to allocate part of the income to other sub-institutions. Therefore, there is a situation of income allocation between multiple sub-institutions of the same financial institution that transact with each other. Furthermore, the collection agency needs to issue a value-added tax invoice to the customer based on the full amount of the collection. After the collection agency allocates part of the income to other sub-institutions, the other sub-institutions need to issue a value-added tax invoice to the collection agency based on the amount of the collection, in order to offset the tax amount that the collection agency over-calculated in excess of the actual income. It can be seen that there is a situation of issuing value-added tax invoices to each other between multiple sub-institutions of the same financial institution that transact with each other.
[0051] According to an embodiment of the present disclosure, in operation S210, M data to be printed are generated by executing a scheduled task. For example, the scheduled task may be used to execute the operation once a day or multiple times a day.
[0052] According to an embodiment of the present disclosure, the data to be printed includes at least an amount field, a debiting institution field, and a receiving institution field for transactions between multiple institutions, but is not limited thereto. It may also include one or more of a taxpayer identification number, a bill printing institution tax identification number, a currency, a tax rate, etc.
[0053] According to an embodiment of the present disclosure, the transferring institution is an institution that transfers funds. For example, when financial institution A transfers funds to financial institution B, financial institution A is the transferring institution.
[0054] According to an embodiment of the present disclosure, the receiving institution is an institution that receives funds. For example, Bank A transfers money to Bank B, and Bank B is the receiving institution.
[0055] According to an embodiment of the present disclosure, the target bill may be an invoice of different tax types, for example, a value-added tax invoice, an income tax invoice, a business tax invoice, etc.
[0056] According to an embodiment of the present disclosure, the scenario of the above-mentioned operation S210 may be, for example, generating M data to be printed based on transaction information between multiple subsidiaries of a financial institution over a period of time. For example, a financial institution has subsidiaries A and B. Organization A transfers 50,000 yuan to Organization B, generating a set of data to be printed. The printing amount corresponding to this data is 50,000 yuan. The transferring institution is Organization A, and the receiving institution is Organization B. Organization B needs to print a receipt based on the data to be printed. The data required for the receipt includes the amount, taxpayer identification number, the transferring institution, the receiving institution, etc.
[0057] According to an embodiment of the present disclosure, in operation S220, M data to be printed are processed to obtain a first array and a second array, in order to extract the data to be printed of every two institutions having opposite transactions for subsequent processing through data grouping processing.
[0058] The M data to be printed are processed to obtain the first array and the second array, for example, by the following method:
[0059] After obtaining M data to be printed, N first arrays and L second arrays are selected. The first array's outgoing and incoming organizations are the same, and the first array's incoming and outgoing organizations are the same. For example, Institution A transfers 40,000 yuan to Institution B, which then transfers 50,000 yuan to Institution B; and Institution B transfers 30,000 yuan to Institution A. The first and second arrays are selected from the data to be printed corresponding to these three exchanges. The first array contains two first data items to be printed (corresponding to the transactions: Institution A transfers 40,000 yuan to Institution B; and Institution A transfers 50,000 yuan to Institution B), and the second array corresponds to one second data item to be printed (corresponding to the transaction: Institution B transfers 30,000 yuan to Institution A). The outgoing organization for the first array is always Institution A, and the incoming organization for the second array is always Institution A. The incoming organization for the first array is always Institution B, and the outgoing organization for the second array is Institution B.
[0060] According to an embodiment of the present disclosure, in operation S230, the first summary value may be the total amount of transactions corresponding to the N first data to be printed; and the second summary value may be the total amount of transactions corresponding to the L second data to be printed.
[0061] In operation S230, based on the values of the print amount fields of the N first data to be printed and the L second data to be printed, the first summary value and the second summary value are calculated. For example, the total transaction amount of the N first data to be printed and the L second data to be printed are calculated respectively, thereby obtaining the first summary value and the second summary value respectively.
[0062] For example, if the first array corresponds to two first data items to be printed, with the corresponding amounts being 50,000 yuan and 40,000 yuan respectively; and the second array corresponds to the second data item to be printed, with the amount being 30,000 yuan. Therefore, the total transaction amount of the two first data items to be printed is 90,000 yuan, resulting in a first summary value of 90,000 yuan; and the total transaction amount of the second data item to be printed is 30,000 yuan, resulting in a second summary value of 30,000 yuan.
[0063] According to an embodiment of the present disclosure, in operation S240, the target printing data is data information necessary for the bill, including the amount, taxpayer identification number, debiting bank, crediting bank, and other data information necessary for the bill.
[0064] In operation S240 , after obtaining the first summary value and the second summary value, a difference between the first summary value and the second summary value is calculated, and target printing data is generated based on the difference. The amount included in the target printing data is the difference between the first summary value and the second summary value.
[0065] For example, the first summary value is 90,000 yuan; the second summary value is 30,000 yuan, and the difference between the first summary value and the second summary value is 60,000 yuan. Therefore, the corresponding amount of the target printing data is 60,000 yuan.
[0066] According to an embodiment of the present disclosure, in operation S250 , after generating target printing data, the system sends the target printing data to the printing device, so that the printing device prints out a target ticket based on the target printing data.
[0067] According to an embodiment of the present disclosure, in the related art, two institutions with a counter-trading relationship need to issue an invoice for each income. In the above method of the embodiment of the present disclosure, M data to be printed are processed to obtain a first array and a second array. This realizes that by grouping the multiple data to be printed, the data to be printed of any two institutions with a counter-trading relationship are extracted, and a first summary value and a second summary value are further calculated. Based on the first summary value and the second summary value, the target printing data is generated, that is, the netting calculation of the face printing amount is performed. In this way, only one bill is printed for the netting amount, and there is no need to generate print data and print the bill for each income. Since only one bill needs to be printed, computer computing power is saved, processing efficiency is improved, and equipment and consumables consumption of printing equipment are reduced.
[0068] According to an embodiment of the present disclosure, after generating M data to be printed, it also includes: generating a statistical label for each data to be printed, wherein the statistical label includes a first identification bit and a second identification bit, the first identification bit and the second identification bit are connected by a separator, the first identification bit is associated with the value of the out-of-organization field, and the second identification bit is associated with the value of the in-organization field.
[0069] According to an embodiment of the present disclosure, the first identification bit is used to identify the draw-out mechanism of each data to be printed, and the second identification bit is used to identify the draw-in mechanism of each data to be printed.
[0070] According to an embodiment of the present disclosure, the statistical tag includes a first identification bit and a second identification bit, which are used to identify the draw-out mechanism and the draw-in mechanism of each data to be printed.
[0071] According to an embodiment of the present disclosure, a separator is used to separate the first identification digit from the second identification digit. The separator can be a symbol that serves as a separator, such as "-", ".", "×", etc., but is not limited thereto. It can also be any symbol that can separate the first identification digit from the second identification digit. It should be noted that the identification digits (including the first identification digit and the second identification digit) and the separator use different symbol types.
[0072] For example: a data to be printed is generated, where the leaving organization is organization A and the receiving organization is organization B. Then the first identification bit is A and the second identification bit is B. The statistical label of the data to be printed can be expressed as: AB.
[0073] According to an embodiment of the present disclosure, setting a statistical label for each data to be printed can intuitively reflect the division mechanism and the division mechanism of each data to be printed, which facilitates subsequent data grouping and positioning based on the statistical label, thereby improving data processing efficiency.
[0074] According to an embodiment of the present disclosure, processing the M data to be printed to obtain the first array and the second array includes: processing the M data to be printed based on statistical labels to obtain the first array and the second array.
[0075] Figure 3 The flowchart of processing M to-be-printed data based on statistical tags according to an embodiment of the present disclosure is schematically shown.
[0076] like Figure 3 As shown, the data processing method of this embodiment includes operations S310 to S340.
[0077] In operation S310, target data to be printed is received. The target data to be printed can be the data to be printed currently being processed, or any data to be printed specified by the user. For example, if the user specifies that a bill with institution B as the receiving institution is to be printed, the data to be printed associated with institution B as the target data to be printed.
[0078] In operation S320, the first target value of the first identification bit is read from the statistical tag of the target data to be printed, and the second target value of the second identification bit is read; the first target value can be the draw-out mechanism of the target data to be printed; the second target value can be the draw-in mechanism of the target data to be printed.
[0079] In operation S330, multiple data to be printed whose first identification bit value of the statistical tag is the first target value and whose second identification bit value is the second target value are queried from the M data to be printed are combined to obtain a first array. For example, after receiving the target data to be printed, a statistical tag is set for each target data to be printed, and the first target value of the first identification bit is read, i.e., a sweep-out mechanism; and the second target value of the second identification bit is read, i.e., a sweep-in mechanism. Multiple data to be printed whose first identification bit value of each data to be printed is the first target value and whose second identification bit value is the second target value are queried from the data to be printed are combined to obtain the first array.
[0080] In operation S340, the M data to be printed are combined with the first identification bit of the statistical tag whose value is the second target value and the second identification bit of the statistical tag whose value is the first target value to obtain a second array. For example, the second array may be obtained by combining the first identification bit of the statistical tag of each data to be printed with the second target value and the second identification bit of the statistical tag whose value is the first target value.
[0081] For example, the statistical label of the target data to be printed is AB, so the first target value of the first identifier of the target data to be printed is A, and the second target value of the second identifier is B. It is necessary to filter out multiple data to be printed whose first identifier is A and whose second identifier is B from the data to be printed, and combine them to obtain a first array; it is also necessary to filter out multiple data to be printed whose first identifier is B and whose second identifier is A, and combine them to obtain a second array.
[0082] According to the embodiments of the present disclosure, by setting identifying statistical tags for the data to be printed, data processing speed can be accelerated and workload can be reduced. Without setting statistical tags, when a user wants to query a certain associated field, they must first search for the relevant field in the field data table and then perform table association, resulting in a large workload and complex operations.
[0083] Figure 4 The flowchart of processing M data to be printed to obtain a first array and a second array according to an embodiment of the present disclosure is schematically shown.
[0084] like Figure 4 As shown, the data processing method of this embodiment includes operations S410 to S430.
[0085] In operation S410, a reservation query field is determined;
[0086] In operation S420, the M data to be printed are grouped based on predetermined query fields to obtain multiple category arrays, wherein the predetermined query fields include at least a zone-out organization field, a zone-in organization field, and at least one auxiliary field.
[0087] In operation S430 , a first array and a second array are determined from a plurality of category arrays based on the statistical labels.
[0088] According to an embodiment of the present disclosure, in operation S420 , the auxiliary fields include at least one of the following: a printing month field, a printing currency field, a reference tax rate field, and a billing item field.
[0089] According to an embodiment of the present disclosure, in operation S420, the system can group the M data to be printed not only by the withdrawing institution and the receiving institution, but also by the withdrawing institution, the receiving institution, and other auxiliary fields, which can be one or more. For example, the system can group the data by the withdrawing institution, the receiving institution, and the month. For example, if Bank A transferred 40,000 yuan to Bank B in July and another 40,000 yuan to Bank B in August, the data to be printed can be divided into two groups. The withdrawing institution for Group 1 is Institution A, the receiving institution is Institution B, and the month is July. The withdrawing institution for Group 2 is Institution A, the receiving institution is Institution B, and the month is August.
[0090] The specific processing method for determining the first array and the second array from multiple category arrays based on statistical labels refers to the method for processing M to-be-printed data to obtain the first array and the second array in the aforementioned embodiment, which will not be repeated here.
[0091] According to the embodiments of the present disclosure, a plurality of print data may be divided into a plurality of groups and printed in groups, thereby saving computer computing power and improving processing efficiency.
[0092] According to an embodiment of the present disclosure, the target printing data includes at least target printing amount information and target printing organization information.
[0093] Based on this, generating target print data according to the first summary value and the second summary value includes the following operations:
[0094] Operation 11: Calculate the target difference between the first summary value and the second summary value. For example, after obtaining N first arrays and L second arrays, calculate the total transaction amount of the N first arrays to obtain the first summary value, and calculate the total transaction amount of the L second arrays to obtain the second summary value. Then calculate the difference between the first summary value and the second summary value, specifically, subtract the second summary value from the first summary value to obtain the target difference.
[0095] Operation 12. When the first summary value is greater than the second summary value (i.e., the target difference is greater than zero), generate target printing amount information based on the target difference, and generate target printing agency information based on the value of the transfer-in agency field of the first data to be printed; wherein, generating the target printing amount information based on the target difference specifically means directly using the target difference as the target printing amount information; the target printing agency information can be information of the transfer-in agency, including the agency name, the agency taxpayer identification number, etc.
[0096] Operation 13: When the first summary value is less than the second summary value (i.e., the target difference is less than zero), generating target printing amount information based on the target difference, and generating target printing organization information based on the value of the designated organization field of the second data to be printed; wherein generating the target printing amount information based on the target difference specifically comprises: using the absolute value of the target difference as the target printing amount information;
[0097] Operation 14: When the first summary value is equal to the second summary value, the target print data is not generated.
[0098] For example, two first arrays are obtained, corresponding to amounts of 50,000 yuan and 40,000 yuan respectively; one second array is obtained, corresponding to an amount of 30,000 yuan. The total transaction amount of the first array is calculated as 90,000 yuan, resulting in a first summary value of 90,000 yuan; and the total transaction amount of the second array is calculated as 30,000 yuan, resulting in a second summary value of 30,000 yuan. The difference between the first and second summary values is calculated to be 60,000 yuan. Therefore, the target amount to be printed is 60,000 yuan. Since the first summary value of 90,000 yuan is greater than the second summary value of 60,000 yuan, the target institution to be printed is the receiving institution in the first array, namely institution B.
[0099] According to an embodiment of the present disclosure, through the above method, the printing amount can be accurately determined based on the difference between the first summary value and the second summary value; based on whether the difference between the first summary value and the second summary value is greater than zero, the printing mechanism that ultimately prints the ticket can be accurately and quickly determined, thereby achieving accurate determination of key printing information on the ticket surface for ticket printing in different scenarios.
[0100] Based on the above data processing method, the present disclosure also provides a data processing device. Figure 5 The device is described in detail.
[0101] Figure 5 The structural block diagram of the data processing device according to an embodiment of the present disclosure is schematically shown.
[0102] like Figure 5 As shown, the data processing device 500 of this embodiment includes a first generating module 510 , a processing module 520 , a calculating module 530 , a second generating module 540 and a sending module 550 .
[0103] The first generation module 510 is configured to generate M data to be printed by executing a scheduled task, wherein the data to be printed includes at least a print amount field, a debiting organization field, and a crediting organization field, and M is a positive integer. In one embodiment, the first generation module 510 can be configured to execute operation S210 described above, which will not be further described herein.
[0104] The processing module 520 is configured to process the M data to be printed to obtain a first array including N first data to be printed and a second array including L second data to be printed, wherein the value of the "Outbound Mechanism" field of the first data to be printed is the same as the value of the "Inbound Mechanism" field of the second data to be printed, and the value of the "Inbound Mechanism" field of the first data to be printed is the same as the value of the "Outbound Mechanism" field of the second data to be printed, and N ≤ M, L ≤ M. In one embodiment, the processing module 520 may be configured to execute operation S220 described above, which will not be further described here.
[0105] The calculation module 530 is configured to calculate a first summary value based on the values of the print amount fields of the N first data to be printed, and to calculate a second summary value based on the values of the print amount fields of the L second data to be printed. In one embodiment, the calculation module 530 can be configured to perform operation S230 described above, which will not be further described herein.
[0106] The second generating module 540 is used to generate target printing data according to the first summary value and the second summary value. In one embodiment, the processing module 520 can be used to perform the operation S240 described above, which will not be repeated here.
[0107] The sending module 550 is used to send the target printing data to the printing device so that the printing device prints out the target ticket based on the target printing data. In one embodiment, the processing module 520 can be used to perform the operation S250 described above, which will not be repeated here.
[0108] According to an embodiment of the present disclosure, after the first generation module 510 executes a scheduled task and generates M data to be printed, the processing module 520 processes the M data to be printed to obtain a first array and a second array, thereby achieving data integration and data positioning processing for multiple data to be printed. The calculation module 530 generates target printing data based on the first summary value and the second summary value, performs amount summary statistics and netting calculations, and thus only prints one bill for the netting amount, eliminating the need to generate print data and print bills for each income. This saves computer computing power, improves processing efficiency, and reduces equipment and consumables consumption of printing equipment. According to an embodiment of the present disclosure, the first generation module includes a first generation submodule.
[0109] The first generation submodule is used to generate statistical labels for each data to be printed, wherein the statistical labels include a first identification bit and a second identification bit, the first identification bit and the second identification bit are connected by a separator, the first identification bit is associated with the value of the outgoing organization field, and the second identification bit is associated with the value of the incoming organization field.
[0110] According to an embodiment of the present disclosure, the processing module includes a first processing sub-module.
[0111] The first processing submodule is used to process the M to-be-printed data based on the statistical labels to obtain a first array and a second array.
[0112] According to an embodiment of the present disclosure, the first processing submodule includes a receiving unit, a reading unit, a first combining unit, and a second combining unit.
[0113] The receiving unit is used for receiving target data to be printed;
[0114] The reading unit is used to read a first target value of a first identification bit and a second target value of a second identification bit from the statistical tag of the target data to be printed;
[0115] The first combining unit is used to query and obtain, from M pieces of data to be printed, a plurality of data to be printed whose values of the first identification bit of the statistical tag are the first target value and whose values of the second identification bit of the statistical tag are the second target value, and combine them to obtain a first array;
[0116] The second combining unit is used to query and obtain from M data to be printed the value of the first identification bit of the statistical tag being the second target value, and to combine multiple data to be printed whose value of the second identification bit of the statistical tag being the first target value to obtain a second array.
[0117] According to an embodiment of the present disclosure, the processing module further includes a second processing submodule and a determination submodule.
[0118] The second processing submodule is used to group the M to-be-printed data based on a predetermined query field to obtain a plurality of category arrays, wherein the predetermined query field at least includes a zone-out organization field, a zone-in organization field, and at least one auxiliary field;
[0119] The determination submodule is used to determine a first array and a second array from a plurality of category arrays based on statistical labels.
[0120] According to an embodiment of the present disclosure, the second generation module includes a calculation submodule, a second generation submodule, and a third generation submodule.
[0121] The calculation submodule is used to calculate the target difference between the first summary value and the second summary value;
[0122] The second generating submodule is used for generating target printing amount information based on the target difference when the first summary value is greater than the second summary value, and generating target printing organization information based on the value of the allocated organization field of the first data to be printed;
[0123] The third generating submodule is used for generating target printing amount information based on the target difference when the first summary value is less than the second summary value, and generating target printing organization information based on the value of the transfer organization field of the second data to be printed;
[0124] According to an embodiment of the present disclosure, any multiple modules among the first generation module 510, the processing module 520, the calculation module 530, the second generation module 540 and the sending module 550 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first generation module 510, the processing module 520, the calculation module 530, the second generation module 540 and the sending module 550 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or can be implemented in any one of the three implementation methods of software, hardware and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the first generation module 510, the processing module 520, the calculation module 530, the second generation module 540 and the sending module 550 can be at least partially implemented as a computer program module, which can perform corresponding functions when executed.
[0125] Figure 6 The block diagram schematically shows an electronic device suitable for implementing the data processing method according to an embodiment of the present disclosure.
[0126] like Figure 6As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for executing different actions of the method flow according to an embodiment of the present disclosure.
[0127] Various programs and data required for the operation of the electronic device 600 are stored in the RAM 603. The processor 601, ROM 602, and RAM 603 are connected to each other via a bus 604. The processor 601 executes the programs in the ROM 602 and / or RAM 603 to perform various operations of the method flow according to the embodiment of the present disclosure. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and RAM 603. The processor 601 may also execute the programs stored in one or more memories to perform various operations of the method flow according to the embodiment of the present disclosure.
[0128] According to an embodiment of the present disclosure, electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to bus 604. Electronic device 600 may further include one or more of the following components connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or modem. Communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. Removable media 611, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 610 as needed, so that computer programs read from the removable media can be installed into storage section 608 as needed.
[0129] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0130] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, such as but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 602 and / or RAM 603 described above and / or one or more memories other than ROM 602 and RAM 603.
[0131] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the data processing method provided by the embodiments of the present disclosure.
[0132] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 601 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0133] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0134] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0135] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0137] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.
[0138] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data processing method, comprising: Generate M data to be printed by executing a scheduled task, wherein the data to be printed at least includes a printing amount field, a transfer-out institution field, and a transfer-in institution field, and M is a positive integer; Processing the M data to be printed to obtain a first array including N first data to be printed and a second array including L second data to be printed, wherein a value of a delimiting mechanism field of the first data to be printed is the same as a value of a delimiting mechanism field of the second data to be printed, and a value of a delimiting mechanism field of the first data to be printed is the same as a value of a delimiting mechanism field of the second data to be printed, and N≤M, and L≤M; Calculating a first summary value based on the values of the print amount fields of the N first data to be printed, and calculating a second summary value based on the values of the print amount fields of the L second data to be printed; generating target print data according to the first summary value and the second summary value; The target printing data is sent to a printing device, so that the printing device prints out a target ticket based on the target printing data.
2. The method according to claim 1, wherein After generating M data to be printed, it also includes: A statistical label is generated for each of the data to be printed, wherein the statistical label includes a first identification bit and a second identification bit, the first identification bit and the second identification bit are connected by a separator, the first identification bit is associated with the value of the transfer-out organization field, and the second identification bit is associated with the value of the transfer-in organization field.
3. The method according to claim 2, wherein: Processing the M data to be printed to obtain the first array and the second array includes: The M data to be printed are processed based on the statistical labels to obtain the first array and the second array.
4. The method according to claim 3, wherein: Processing the M to-be-printed data based on the statistical labels includes: Receive target data to be printed; Reading a first target value of the first identification bit from the statistical tag of the target data to be printed, and reading a second target value of the second identification bit; The first array is obtained by querying from the M pieces of data to be printed that the value of the first identification bit of the statistical tag is the first target value and the value of the second identification bit of the statistical tag is the second target value, and combining multiple pieces of data to be printed to obtain the first array; The second array is obtained by querying from the M data to be printed that the value of the first identification bit of the statistical tag is the second target value, and combining multiple data to be printed whose value of the second identification bit of the statistical tag is the first target value.
5. The method according to claim 2, wherein: Processing the M data to be printed to obtain the first array and the second array includes: performing grouping processing on the M data to be printed based on a predetermined query field to obtain a plurality of category arrays, wherein the predetermined query field at least includes a zone-out organization field, a zone-in organization field, and at least one auxiliary field; Based on the statistical labels, the first array and the second array are determined from the multiple category arrays.
6. The method according to claim 5, wherein: The at least one auxiliary field includes at least one of the following: a printing month field, a printing currency field, a reference tax rate field, and a billing item field.
7. The method according to claim 1, wherein The target printing data at least includes target printing amount information and target printing organization information; Generating target print data according to the first summary value and the second summary value includes: Calculating a target difference between the first summary value and the second summary value; In the case where the first summary value is greater than the second summary value, generating the target printing amount information based on the target difference, and generating the target printing organization information based on the value of the transfer organization field of the first data to be printed; When the first summary value is less than the second summary value, generating the target printing amount information based on the target difference, and generating the target printing organization information based on the value of the transfer organization field of the second data to be printed; If the first summary value is equal to the second summary value, the target print data is not generated.
8. A data processing device comprising: A first generating module is configured to generate M data to be printed by executing a scheduled task, wherein the data to be printed at least includes a printing amount field, a transfer-out institution field, and a transfer-in institution field, and M is a positive integer; a processing module configured to process the M data to be printed to obtain a first array including N first data to be printed and a second array including L second data to be printed, wherein a value of a delimiting mechanism field of the first data to be printed is the same as a value of a delimiting mechanism field of the second data to be printed, and a value of a delimiting mechanism field of the first data to be printed is the same as a value of a delimiting mechanism field of the second data to be printed, and N≤M, and L≤M; a calculation module, configured to calculate a first summary value based on the values of the print amount fields of the N first data to be printed, and to calculate a second summary value based on the values of the print amount fields of the L second data to be printed; a second generating module, configured to generate target printing data according to the first summary value and the second summary value; The sending module is configured to send the target printing data to a printing device, so that the printing device prints out a target ticket based on the target printing data.
9. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, wherein when the instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Multifunctional printing method and device, multifunctional printer and storage medium
CN111638858A
Data printing control method and system and electronic equipment
CN116414324A