Method, device and equipment for account processing of business data and storage medium
By obtaining the attribute information of the data to be processed, and using reflection and composite factory mechanisms, the automatic execution of the data dumping process is achieved, which solves the problem of data maintenance workload during database migration and improves business processing efficiency.
Patent Information
- Application Number
- CN202311257983.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-09-26
AI Technical Summary
When migrating the source database to other database platforms, existing technologies require rewriting or modifying the statements of stored procedures, which increases the workload of data maintenance and affects business processing efficiency.
By obtaining the attribute information of the data to be processed, the input parameters are determined using the reflection mechanism, and the accounting process is automatically executed based on the composite factory class mechanism, reducing manual intervention and errors and improving business processing efficiency.
It enables automated account dumping during database migration, reducing manual intervention and errors, and improving business processing efficiency.
Smart Images

Figure CN117251431B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, and particularly relates to a business data account throwing processing method and device, equipment and a storage medium. BACKGROUND
[0002] In the process of business docking between different departments, the business data between different departments needs to be processed.
[0003] In the prior art, according to the operation type of the to-be-processed data, the user needs to manually select the stored procedure statement stored in the source database, manually adjust the parameters of the stored procedure statement, and execute the stored procedure statement, so as to perform account throwing processing on the to-be-processed business data in the source database.
[0004] However, in the above-mentioned manner, when the source database is migrated to other database platforms, the statement of the stored procedure needs to be re-written or modified, which increases the workload of data maintenance, and further affects the efficiency of business processing. SUMMARY
[0005] The present application provides a business data account throwing processing method, device, equipment and storage medium, which solves the problem of increasing the workload of data maintenance caused by the need to re-write the statement of the stored procedure when the source database is migrated to other database platforms.
[0006] In a first aspect, the present application provides a business data account throwing processing method, which comprises:
[0007] obtaining a to-be-processed classification table; wherein the to-be-processed classification table comprises attribute information of at least one to-be-processed data in a source database, the to-be-processed data being business data of an account throwing business; and the attribute information comprises an execution time, which is the time of data processing on the to-be-processed data;
[0008] if it is determined that the current time is the execution time in the to-be-processed classification table, determining a transmission parameter based on a preset reflection mechanism; wherein the transmission parameter is a parameter used for an operation of data transfer on the to-be-processed data;
[0009] determining a first data type of target billing information according to the transmission parameter; wherein the target billing information is billing data of an account throwing business to which target data belongs, the target data being to-be-processed data corresponding to the current time in the source database, and the first data type being a structure type of the billing data;
[0010] performing account throwing processing on the target data according to the first data type of the target billing information based on a combination factory class mechanism.
[0011] In an example, based on the combination factory class mechanism, the target data is subjected to the account throwing processing according to the first data type of the target billing information, including:
[0012] Based on the combination factory class mechanism, the second data type of the target billing information is determined according to the first data type of the target billing information; wherein the second data type is the attribute type of the billing data represented by the target billing information;
[0013] According to the second data type of the target billing information, the target billing information and the target data are subjected to the calculation processing, and the corresponding account throwing detail information between the target billing information and the target data is obtained; wherein the account throwing detail information represents the billing detail data generated by the account throwing business to which the target data belongs;
[0014] Based on the combination factory class mechanism, the account throwing detail information is subjected to the account throwing processing.
[0015] In an example, based on the combination factory class mechanism, the account throwing detail information is subjected to the account throwing processing, including:
[0016] The account throwing detail information is subjected to the encapsulation processing, and the encapsulated account throwing detail information is obtained;
[0017] Based on the combination factory class mechanism, the encapsulated account throwing detail information is stored in a preset database.
[0018] In an example, the attribute information includes an operation type, and the operation type is the type of data operation for data processing of the to-be-processed data; based on a preset reflection mechanism, the incoming parameter is determined, including:
[0019] The operation type of the to-be-processed data corresponding to the current time in the source database is determined;
[0020] Based on the preset reflection mechanism, the instance information is obtained according to the operation type; and the instance information is executed to obtain the incoming parameter; wherein the instance information represents an operation for data transfer of the to-be-processed data.
[0021] In an example, the first data type of the target billing information is determined according to the incoming parameter, including:
[0022] The target data and the incoming parameter are subjected to the encapsulation processing, and the encapsulated data is obtained; wherein the encapsulated data has primary key information, and the primary key information represents the identification of the business data contained in the encapsulated data;
[0023] determine billing data corresponding to the primary key information in a master database as the target billing information; wherein the master database includes at least one billing data and primary key information of the billing data;
[0024] call a throw billing class file corresponding to the incoming parameter; and determine a first data type of the target billing information based on the throw billing class file; wherein the throw billing class file is used for data processing of billing data.
[0025] In one example, the method further includes:
[0026] verify the incoming parameter to obtain a verification result, wherein the verification result represents whether the incoming parameter is valid;
[0027] if it is determined that the verification result represents that the incoming parameter is valid, then perform the step of encapsulating the target data and the incoming parameter to obtain encapsulated data.
[0028] In one example, the method further includes:
[0029] update the to-be-processed classification table to obtain an updated to-be-processed classification table.
[0030] In one example, the method further includes:
[0031] classify the to-be-processed data in the source database to obtain attribute information of at least one to-be-processed data;
[0032] add the attribute information of the at least one to-be-processed data to the to-be-processed classification table.
[0033] In a second aspect, the present application provides a business data throw billing processing device, the device includes:
[0034] an acquisition unit configured to acquire a to-be-processed classification table; wherein the to-be-processed classification table includes attribute information of at least one to-be-processed data in a source database, the to-be-processed data is business data of a throw billing business; and the attribute information includes an execution time, the execution time is a time for data processing of the to-be-processed data;
[0035] a first determination unit configured to, if it is determined that a current time is the execution time in the to-be-processed classification table, determine an incoming parameter based on a preset reflection mechanism; wherein the incoming parameter is a parameter of an operation for data transfer of the to-be-processed data;
[0036] A second determining unit is configured to determine a first data type of target billing information according to the incoming parameter; the target billing information is billing data of a target data belonging to a billing service, the target data is to-be-processed data corresponding to a current time in the source database, and the first data type is a structure type of the billing data.
[0037] A billing unit is configured to perform billing processing on the target data according to the first data type of the target billing information based on a combined factory class mechanism.
[0038] In a third aspect, the present application provides an electronic device, comprising a processor and a memory connected to the processor in communication;
[0039] The memory stores computer execution instructions.
[0040] The processor executes the computer execution instructions stored in the memory to implement the method of the first aspect.
[0041] In a fourth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by a processor to implement the method of the first aspect.
[0042] In a fifth aspect, the present application provides a computer program product, comprising a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to execute the method of the first aspect.
[0043] The business data billing processing method, device, equipment and storage medium provided by the present application automatically execute the billing processing task by the attribute information of each to-be-processed data, that is, based on the reflection mechanism, determine the incoming parameter of the to-be-processed data, and according to the incoming parameter, determine the data type of the to-be-processed data, based on the combined billing factory class, according to the data type of the to-be-processed data, execute the internal logic of the combined billing factory class, and throw out the billing information corresponding to the to-be-processed data, to complete the billing processing process of the to-be-processed data; and then, the to-be-processed data can be automatically billed, reducing manual intervention and errors, and improving the efficiency of business processing. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.
[0045] Figure 1 An application scenario schematic diagram provided by the prior art;
[0046] Figure 2 An application scenario diagram is provided for the present application;
[0047] Figure 3 A flow diagram of a service data account throwing processing method is provided for the embodiments of the present application;
[0048] Figure 4 A flow diagram of another service data account throwing processing method is provided for the embodiments of the present application;
[0049] Figure 5 An interface-based account throwing flow diagram is provided for the embodiments of the present application;
[0050] Figure 6 A structure diagram of a service data account throwing processing device is provided for the embodiments of the present application;
[0051] Figure 7 A structure diagram of another service data account throwing processing device is provided for the embodiments of the present application;
[0052] Figure 8 A structure diagram of an electronic device is provided for the embodiments of the present application.
[0053] Through the above-mentioned drawings, the specific embodiments of the present application have been shown, and will be described in more detail hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application by any means, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0054] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same or similar components. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of devices and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0055] First, the terms involved in the present application are explained:
[0056] Account throwing: refers to the transfer of business data between different business departments.
[0057] Automatic task: refers to a series of operations or tasks automatically executed in a computer system triggered by a preset time, event or condition.
[0058] The factory design pattern is a creational design pattern that provides a generic interface for creating objects, but defers the instantiation process to a subclass or related factory class.
[0059] In the process of business docking between different departments, the business data between different departments needs to be accounted for processing.
[0060] In an example, Figure 1 An application scenario diagram provided by the prior art is shown in FIG. 1. Figure 1 As shown in the figure, the scenario includes an electronic device 101 and a user 102. The user 102 can input an instruction through the electronic device 101 to select business data to be processed in a source database and a stored procedure statement for processing the business data, and manually adjust parameters of the stored procedure statement. The electronic device 101 executes the stored procedure statement after receiving the instruction, and can perform accounting processing on the business data to be processed in the source database.
[0061] However, in the above manner, when the source database is migrated to other database platforms, the statements of the stored procedures need to be re-written or modified, increasing the workload of data maintenance, and further affecting the efficiency of business processing.
[0062] The present application provides a business data accounting processing method, device, equipment and storage medium, which aims to solve the above technical problems of the prior art.
[0063] Figure 2 An application scenario diagram provided by the present application is shown in FIG. 2. Figure 2 As shown in the figure, the scenario includes an electronic device 201 and a user 202. The user 202 can input an instruction through the electronic device 201 to set a task for automatically processing data. The electronic device 201 executes the set task automatically when a preset condition is met after receiving the instruction, and can perform accounting processing on the business data to be processed in the source database.
[0064] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for user to choose authorization or refusal.
[0065] It should be noted that the business data account throwing processing method, device and equipment and storage medium provided by the present application can be used in the field of big data technology, and can also be used in any field other than the field of big data technology. The application field of the business data account throwing processing method, device and equipment and storage medium provided by the present application is not limited.
[0066] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific examples. The following specific examples can be combined with each other, and the same or similar concepts or processes may not be described again in some examples. The embodiments of the present application will be described below with reference to the accompanying drawings.
[0067] Figure 3 A flowchart of a business data account throwing processing method provided by an embodiment of the present application is shown in FIG. 1, which includes the following steps. Figure 3
[0068] S101, obtaining a to-be-processed classification table; wherein the to-be-processed classification table includes attribute information of at least one to-be-processed data in a source database, the to-be-processed data being business data of account throwing business; the attribute information includes execution time, which is the time for data processing of the to-be-processed data.
[0069] Exemplarily, the execution subject of the present embodiment can be an electronic device. First, when a user needs to perform batch account throwing processing on one or more to-be-processed data included in a source database such as an open source distributed relational database, a preset to-be-processed classification table is obtained based on the electronic device, which includes attribute information of one or more to-be-processed data in the source database, i.e. attribute information of business data of each account throwing business, including the time for data processing of the to-be-processed data, i.e. execution time.
[0070] S102, if it is determined that the current time is the execution time in the to-be-processed classification table, determining an incoming parameter based on a preset reflection mechanism; wherein the incoming parameter is a parameter used for data transfer operation of the to-be-processed data.
[0071] Exemplarily, the automatic task framework scans the task instance, such as an open-source batch processing framework for writing and executing large-scale batch jobs, or an open-source distributed data processing framework that provides distributed storage and computing capabilities, or a serverless computing service for executing event-driven tasks that can automatically call and execute corresponding task functions according to the triggering of events, and when the set automatic task is invalid, an alarm is given. If the execution time meets the condition, that is, the current time is any one of the execution times included in the to-be-processed classification table, the reflection class is called based on the preset reflection mechanism, and the parameters for the operation of data transfer of the to-be-processed data, that is, the input parameters, can be obtained. It is worth noting that the automatic task can be easily integrated with other systems and services to realize the interaction between systems through the application programming interface (API) to send messages and other ways to achieve more complex business requirements; and the automatic task can run in different operating systems and environments, with better cross-platform and portability.
[0072] S103, determining a first data type of target billing information according to the input parameters; wherein the target billing information is billing data of a target data belonging to a billing business, the target data is to-be-processed data corresponding to the current time in the source database, and the first data type is a structure type of the billing data.
[0073] Exemplarily, according to the current time, the execution time consistent with the current time is found in the to-be-processed classification table, and then the to-be-processed data corresponding to the execution time consistent with the current time is determined from the source database, which is the target data, that is, the data that needs to be processed, and then the billing data of the target data belonging to the billing business is determined as the target billing information. According to the obtained input parameters, the structure type of the billing data corresponding to the target billing information, that is, the first data type, can be determined based on the preset mechanism.
[0074] S104, performing billing processing on the target data based on the combined factory class mechanism according to the first data type of the target billing information.
[0075] Exemplarily, based on the preset factory design pattern, such as a Java application framework, the factory design pattern is used to manage the creation and dependency of objects, and the relationship between the factory class and the object is defined and configured through a configuration file or an annotation. According to the first data type of the target billing information, the corresponding combined factory class is called to create an object, and based on the preset unified interface, the billing logic inside the object created by the combined factory class is executed to perform billing processing on the target data.
[0076] In the embodiment, a service data billing processing method is provided. The method automatically performs billing processing tasks on the basis of reflection mechanism by determining the incoming parameters of the to-be-processed data according to the attribute information of each to-be-processed data, determining the data type of the to-be-processed data according to the incoming parameters, executing the internal logic of the combined billing factory class according to the data type of the to-be-processed data on the basis of the combined billing factory class, and throwing the billing information corresponding to the to-be-processed data to complete the billing processing of the to-be-processed data. Thus, the billing processing of the to-be-processed data can be automatically performed, manual intervention and errors can be reduced, and the efficiency of service processing can be improved.
[0077] Figure 4 Another flowchart of a service data billing processing method provided by the embodiment is shown in FIG. 2. The method comprises the following steps. Figure 4
[0078] S201, classifying the to-be-processed data in the source database to obtain the attribute information of at least one to-be-processed data.
[0079] For example, the to-be-processed data to be processed is classified and paginated according to the billing types required by the batch job of billing processing of the to-be-processed data in the source database, wherein the billing types include financial billing, contract billing, quality inspection billing, etc. The attribute information of each to-be-processed data is obtained, including the number of pages, the primary key, the operation type of data transfer, the execution time, etc.
[0080] S202, adding the attribute information of at least one to-be-processed data to the to-be-processed classification table.
[0081] For example, the number of pages, the primary key, the operation type of data transfer, the execution time, etc. of each to-be-processed data are inserted into the preset to-be-processed classification table, and an automatic task is scheduled to automatically perform billing processing on the to-be-processed data.
[0082] S203, obtaining the to-be-processed classification table, wherein the to-be-processed classification table comprises the attribute information of at least one to-be-processed data in the source database, the to-be-processed data is the service data of billing service, and the attribute information comprises the execution time, which is the time of data processing of the to-be-processed data.
[0083] For example, this step can refer to step 101, and will not be described here.
[0084] S204, if it is determined that the current time is the execution time in the to-be-processed classification table, determining the operation type of the to-be-processed data corresponding to the current time in the source database.
[0085] In one example, the attribute information includes an operation type, which is a type of data operation for data processing on the to-be-processed data.
[0086] Exemplarily, Figure 5 A schematic diagram of a throw account process based on an interface is provided for the embodiments of the present application, as shown in the figure. Figure 5 Based on the automatic task interface, according to the attribute information of each to-be-processed data in the to-be-processed classification table, the type of data operation for data processing on the to-be-processed data, i.e., the operation type, is further included. Based on the automatic task framework, the task instance is scanned, and if the execution time meets the condition, i.e., the current time is any one of the execution times included in the to-be-processed classification table, then the execution time consistent with the current time is found from the to-be-processed classification table according to the current time, and then the operation type of the to-be-processed data corresponding to the execution time in the source database is found, such as Figure 5 Operation Type 1, Operation Type 2, and Operation Type 3 in the figure.
[0087] S205, based on a preset reflection mechanism, obtaining instance information according to the operation type; and executing the instance information to obtain the incoming parameter; wherein the instance information represents an operation for data transfer on the to-be-processed data.
[0088] Exemplarily, based on the preset reflection mechanism of the reflector, the reflection mechanism is run to scan the operation type of the to-be-processed data corresponding to the current time, obtain the instance information of the operation for data transfer, and execute the instance information to obtain the operation parameter for data transfer on the to-be-processed data, i.e., the incoming parameter.
[0089] S206, verifying the incoming parameter to obtain a verification result, wherein the verification result represents whether the incoming parameter is valid.
[0090] Exemplarily, in order to ensure the consistency and security of data, the incoming parameter needs to be verified. Based on a preset verification method, such as whether the field length of the incoming parameter is within the preset length, the verification result of the incoming parameter is obtained, and then it is known whether the incoming parameter is valid.
[0091] S207, if it is determined that the verification result represents that the incoming parameter is valid, the target data and the incoming parameter are encapsulated to obtain encapsulated data; wherein the encapsulated data has primary key information, and the primary key information represents the identification of the business data contained in the encapsulated data.
[0092] Exemplarily, if it is determined that the obtained check result represents that the incoming parameter is valid, the current time is obtained, and the target data corresponding to the current time in the to-be-processed classification table is obtained from the source database, that is, the target data, and the target data and the incoming parameter are encapsulated to obtain encapsulated data; the encapsulated data has the primary key information of the to-be-processed data, to represent the identifier of the business data contained in the encapsulated data.
[0093] In S208, the bill data corresponding to the primary key information in the master database is determined as the target bill information; the master database includes at least one bill data and the primary key information of the bill data.
[0094] Exemplarily, based on the electronic device, a master database is preset to store at least one bill data and the primary key information of each bill data; according to the primary key information of the encapsulated data, the primary key information consistent with the primary key information of the encapsulated data is determined from the preset master database, and the bill data corresponding to the primary key information is determined as the target bill information.
[0095] In S209, the throw account class file corresponding to the incoming parameter is called, and the first data type of the target bill information is determined based on the throw account class file; the throw account class file is used for data processing of the bill data.
[0096] Exemplarily, according to the obtained incoming parameter, a specific throw account class service is determined, and the throw account class file corresponding to the incoming parameter is called, such as the throw account class interface in Figure 5 , which is used for data processing of the bill data, processing of the bill data corresponding to the target bill information, and determination of the structure type of the bill data corresponding to the target bill information, that is, the first data type, such as data type 1 and data type 2.
[0097] In S210, the second data type of the target bill information is determined according to the first data type of the target bill information based on the combination factory class mechanism; the second data type is the attribute type of the bill data represented by the target bill information.
[0098] Exemplarily, based on the preset factory design pattern, the corresponding combination factory class object is created according to the first data type of the target bill information, such as the basic combination factory class interface in Figure 5 , which is used for analyzing the bill data in the target bill information to obtain the attribute type of the bill data represented by the target bill information, that is, the second data type, such as the sub-data type 1 and the sub-data type 2 in Figure 5 .
[0099] S211, performing calculation processing on the target billing information and the target data according to a second data type of the target billing information, to obtain corresponding billing detail information between the target billing information and the target data; wherein the billing detail information represents billing detail data generated by a billing business to which the target data belongs.
[0100] Illustratively, according to the attribute type of the billing data represented by the target billing information, i.e. the second data type, based on the operation logic of the abstractor in the combination factory class mechanism, the obtained target billing information and target data are calculated and processed to obtain corresponding billing detail information between the target billing information and the target data, including billing detail data generated by a billing business to which the target data belongs, such as principal, commission, transaction code and the like, such as a basic billing object class.
[0101] S212, performing billing processing on the billing detail information based on the combination factory class mechanism.
[0102] Illustratively, a preset interface, such as a basic billing interface in Figure 5 is called, and based on the combination factory class mechanism, the billing logic code inside the combination factory class is executed to perform billing processing on the calculated billing detail information.
[0103] In one example, step S212 includes the following steps:
[0104] The first step of step S212 is to perform encapsulation processing on the billing detail information to obtain encapsulated billing detail information.
[0105] The second step of step S212 is to store the encapsulated billing detail information in a preset database based on the combination factory class mechanism.
[0106] Illustratively, the calculated billing detail information, including principal, commission, transaction code and the like, is encapsulated to obtain encapsulated billing detail information. Then, based on the combination factory class mechanism, the billing logic code inside the combination factory class is executed to perform billing processing on the encapsulated billing detail information, i.e. to store the encapsulated billing detail information in a preset database or a preset target database for storage.
[0107] S213, updating the to-be-processed classification table to obtain an updated to-be-processed classification table.
[0108] Illustratively, after completing the billing processing on the to-be-processed data, the data in the master database will first be updated, i.e. the processed billing data in the master database is marked as having completed billing processing. The to-be-processed classification table is updated to mark that the record corresponding to the processed to-be-processed data has been successfully processed, to obtain an updated to-be-processed classification table.
[0109] In the embodiment, on the basis of the above embodiment, on the one hand, by the attribute information of each to-be-processed data, the account throwing processing task is automatically executed, based on the combined account throwing factory class, according to the data type of the to-be-processed data, the internal logic of the combined account throwing factory class is executed, the account information corresponding to the to-be-processed data is thrown, and the account throwing processing process of the to-be-processed data is completed; further, the to-be-processed data can be automatically processed, manual intervention and errors are reduced, and the efficiency of business processing is improved; on the other hand, based on the combined account throwing factory class, the account throwing processing task of multiple source databases can be supported, and the adaptation and switching of different data sources can be realized through simple configuration or extension.
[0110] Figure 6 A structural schematic diagram of a business data account throwing processing device provided in the embodiment of the application is shown in FIG. 1. Figure 6 As shown in the figure, the device 300 comprises:
[0111] The acquisition unit 301 is configured to acquire a to-be-processed classification table; wherein the to-be-processed classification table comprises attribute information of at least one to-be-processed data in a source database, the to-be-processed data is business data of an account throwing business, and the attribute information comprises an execution time, which is a time for data processing of the to-be-processed data.
[0112] The first determination unit 302 is configured to determine an incoming parameter based on a preset reflection mechanism if it is determined that the current time is the execution time in the to-be-processed classification table; wherein the incoming parameter is a parameter for an operation of data transfer of the to-be-processed data.
[0113] The second determination unit 303 is configured to determine a first data type of target account information according to the incoming parameter; wherein the target account information is account data of a target data belonging to the account throwing business, the target data is to-be-processed data corresponding to the current time in the source database, and the first data type is a structure type of the account data.
[0114] The account throwing unit 304 is configured to perform account throwing processing on the target data based on the first data type of the target account information according to a combined factory class mechanism.
[0115] The device of the embodiment can execute the technical solutions in the above method, and the specific implementation process and technical principles are the same, which will not be repeated here.
[0116] Figure 7 A structural schematic diagram of another business data account throwing processing device provided in the embodiment of the application is shown in FIG. 2. Figure 7 As shown in the figure, the device 400 comprises:
[0117] The acquisition unit 401 is configured to acquire a to-be-processed classification table; the to-be-processed classification table comprises attribute information of at least one to-be-processed data in a source database, the to-be-processed data is business data of a to-be-processed account, and the attribute information comprises an execution time, which is a time for data processing of the to-be-processed data.
[0118] The first determination unit 402 is configured to determine an incoming parameter based on a preset reflection mechanism if it is determined that the current time is the execution time in the to-be-processed classification table; the incoming parameter is a parameter of an operation for data transfer of the to-be-processed data.
[0119] The second determination unit 403 is configured to determine a first data type of target account information according to the incoming parameter; the target account information is account data of a target account to which target data belongs, the target data is to-be-processed data corresponding to the current time in the source database, and the first data type is a structure type of the account data.
[0120] The account throwing unit 404 is configured to perform account throwing processing on the target data according to the first data type of the target account information based on a combined factory class mechanism.
[0121] In one example, the account throwing unit 404 comprises:
[0122] The first determination module 4041 is configured to determine a second data type of the target account information according to the first data type of the target account information based on the combined factory class mechanism; the second data type is an attribute type of account data represented by the target account information.
[0123] The processing module 4042 is configured to perform calculation processing on the target account information and the target data according to the second data type of the target account information, to obtain account detail information corresponding between the target account information and the target data; the account detail information represents account detail data generated by the to-be-processed account to which the target data belongs.
[0124] The account throwing module 4043 is configured to perform account throwing processing on the account detail information based on the combined factory class mechanism.
[0125] In one example, the account throwing module 4043 is specifically configured to:
[0126] perform encapsulation processing on the account detail information to obtain encapsulated account detail information.
[0127] store the encapsulated account detail information in a preset database based on the combined factory class mechanism.
[0128] In one example, the attribute information comprises an operation type, the operation type is a type of data operation for data processing of the to-be-processed data, and the first determination unit 402 comprises:
[0129] The second determining module 4021 is configured to determine an operation type of the to-be-processed data corresponding to the current time in the source database.
[0130] The generating module 4022 is configured to obtain instance information according to the operation type based on a preset reflection mechanism, and execute the instance information to obtain the incoming parameter; wherein the instance information represents an operation for data transfer of the to-be-processed data.
[0131] In one example, the second determining unit 403 includes:
[0132] The packaging module 4031 is configured to perform packaging processing on the target data and the incoming parameter to obtain packaged data; wherein the packaged data has primary key information, and the primary key information represents an identifier of business data contained in the packaged data.
[0133] The third determining module 4032 is configured to determine billing data corresponding to the primary key information in the master database as target billing information; wherein the master database includes at least one billing data and primary key information of the billing data.
[0134] The fourth determining module 4033 is configured to call a throw account class file corresponding to the incoming parameter, and determine a first data type of the target billing information based on the throw account class file; wherein the throw account class file is used for data processing of the billing data.
[0135] In one example, the apparatus 400 further includes:
[0136] The checking unit 405 is configured to check the incoming parameter to obtain a checking result, wherein the checking result represents whether the incoming parameter is valid.
[0137] The executing unit 406 is configured to perform the step of performing packaging processing on the target data and the incoming parameter to obtain the packaged data, if it is determined that the checking result represents that the incoming parameter is valid.
[0138] In one example, the apparatus 400 further includes:
[0139] The updating unit 407 is configured to perform updating processing on the to-be-processed classification table to obtain an updated to-be-processed classification table.
[0140] In one example, the apparatus 400 further includes:
[0141] The classifying unit 408 is configured to perform classification processing on the to-be-processed data in the source database to obtain attribute information of at least one to-be-processed data.
[0142] The adding unit 409 is configured to add the attribute information of the at least one to-be-processed data to the to-be-processed classification table.
[0143] The device of the embodiment can execute the technical solutions in the above method, and the specific implementation process and technical principles are the same, which will not be repeated here.
[0144] Figure 8 A structural schematic diagram of an electronic device provided by the embodiment of the present application is shown in FIG. 5. As shown in FIG. 5, the electronic device 500 includes a memory 501 and a processor 502. The memory 501 is connected with the processor 502 through a system bus and completes communication between each other. The memory 501 is used to store computer program instructions. Figure 8
[0145] The processor 502 executes the computer program instructions stored in the memory 501, so that the processor 502 executes the solutions in the above embodiments. The processor 502 can be a general-purpose processor, including a central processing unit CPU, a network processor NP, etc. The processor 502 can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0146] The electronic device 500 further includes a receiver 503 and a transmitter 504. The receiver 503 is used to receive instructions and data sent by other devices, and the transmitter 504 is used to send instructions and data to external devices.
[0147] The system bus can be a peripheral component interconnect PCI bus or an extended industry standard architecture EISA bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries and read-only libraries). The memory can include a random access memory RAM, and can also include a non-volatile memory.
[0148] The electronic device provided by the embodiment of the present application can be a terminal device of the above embodiment.
[0149] The embodiment of the present application further provides a chip for running instructions, which is used to execute the technical solutions in the above embodiments.
[0150] The embodiment of the present application further provides a computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and the computer instructions enable a computer to execute the technical solutions of the above-mentioned embodiment when the computer instructions are run on the computer.
[0151] The embodiment of the present application further provides a computer program product, which comprises a computer program stored in a computer readable storage medium, and at least one processor can read the computer program from the computer readable storage medium, and the at least one processor can implement the technical solutions in the above-mentioned embodiment when executing the computer program.
[0152] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. For example, the above-mentioned device embodiments are merely schematic, and the division of the modules is merely a logical function division, and there can be another division manner in actual implementation. For example, a plurality of modules or features can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or modules, and can be electrical, mechanical or in other forms.
[0153] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to implement the embodiments of the present application.
[0154] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present separately, or two or more modules can be integrated in one unit. The above-mentioned units can be realized in the form of hardware, or in the form of hardware plus software function units.
[0155] The integrated modules realized in the form of software function modules can be stored in a computer readable storage medium. The software function modules stored in the storage medium comprise a plurality of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) or a processor to execute part of the steps of the methods of the embodiments of the present application.
[0156] It should be appreciated that the above processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the application can be directly embodied as hardware processor execution, or executed by a combination of hardware and software modules in the processor.
[0157] The memory can include a high-speed RAM memory, and can also include a non-volatile storage NVM, such as at least one disk memory, and can also be a U disk, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0158] The bus can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0159] The above storage medium can be realized by any type of volatile or non-volatile storage device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0160] An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a host device.
[0161] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware. The foregoing program can be stored in a computer readable storage medium. The program executes to perform the steps of the above-mentioned method embodiments; and the foregoing storage medium includes various storage media that can store program codes, such as ROM, RAM, magnetic disk or optical disk.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of processing a service data for a throw account, characterized by, The method comprises: acquiring a to-be-processed classification table; wherein the to-be-processed classification table comprises attribute information of at least one to-be-processed data in a source database, the to-be-processed data being business data of a cast account business; the attribute information comprises an execution time, the execution time being a time for data processing on the to-be-processed data; if it is determined that the current time is the execution time in the to-be-processed classification table, determining an incoming parameter based on a preset reflection mechanism; wherein the incoming parameter is a parameter of an operation for data transfer on the to-be-processed data; determining a first data type of target billing information according to the incoming parameter; wherein the target billing information is billing data of a cast account business to which target data belongs, the target data being to-be-processed data corresponding to the current time in the source database, and the first data type being a structure type of the billing data; performing cast account processing on the target data according to the first data type of the target billing information based on a combined factory class mechanism.
2. The method of claim 1, wherein, Performing cast account processing on the target data according to the first data type of the target billing information based on a combined factory class mechanism comprises: determining a second data type of the target billing information according to the first data type of the target billing information based on the combined factory class mechanism; wherein the second data type is an attribute type of billing data represented by the target billing information; performing calculation processing on the target billing information and the target data according to the second data type of the target billing information to obtain cast account detail information corresponding between the target billing information and the target data; wherein the cast account detail information represents billing detail data generated by the cast account business to which the target data belongs; performing cast account processing on the cast account detail information based on the combined factory class mechanism.
3. The method of claim 2, wherein, Performing cast account processing on the cast account detail information based on the combined factory class mechanism comprises: performing encapsulation processing on the cast account detail information to obtain encapsulated cast account detail information; storing the encapsulated cast account detail information in a preset database based on the combined factory class mechanism.
4. The method of claim 1, wherein, The attribute information comprises an operation type, the operation type being a type of data operation for data processing on the to-be-processed data; Determining an incoming parameter based on a preset reflection mechanism comprises: determining an operation type of to-be-processed data corresponding to the current time in the source database; obtaining instance information according to the operation type based on the preset reflection mechanism; and executing the instance information to obtain the incoming parameter; wherein the instance information represents an operation for data transfer on the to-be-processed data.
5. The method of claim 1, wherein, Determining a first data type of target billing information according to the incoming parameter comprises: performing encapsulation processing on the target data and the incoming parameter to obtain encapsulated data; wherein the encapsulated data has primary key information, and the primary key information represents an identifier of business data contained in the encapsulated data; determine billing data corresponding to the primary key information in the primary file database as the target billing information; wherein the primary file database includes at least one billing data and primary key information of the billing data; call a throw billing class file corresponding to the incoming parameter; and determine a first data type of the target billing information based on the throw billing class file; wherein the throw billing class file is used for data processing of billing data.
6. The method of claim 5, wherein, The method further includes: verifying the incoming parameter to obtain a verification result, wherein the verification result represents whether the incoming parameter is valid; if it is determined that the verification result represents that the incoming parameter is valid, performing the step of encapsulating the target data and the incoming parameter to obtain encapsulated data.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: updating the to-be-processed classification table to obtain an updated to-be-processed classification table.
8. The method according to any one of claims 1-6, characterized in that, The method further includes: classifying to-be-processed data in the source database to obtain attribute information of at least one to-be-processed data; adding the attribute information of the at least one to-be-processed data to the to-be-processed classification table.
9. A service data billing processing apparatus characterized by comprising: The apparatus includes: an obtaining unit configured to obtain a to-be-processed classification table; wherein the to-be-processed classification table includes attribute information of at least one to-be-processed data in a source database, the to-be-processed data being business data of a throw billing service, and the attribute information including an execution time, which is a time for data processing of to-be-processed data; a first determining unit configured to, if it is determined that a current time is the execution time in the to-be-processed classification table, determine an incoming parameter based on a preset reflection mechanism; wherein the incoming parameter is a parameter of an operation for data transfer of to-be-processed data; a second determining unit configured to determine a first data type of target billing information according to the incoming parameter; wherein the target billing information is billing data of a target service to which target data belongs, the target data being to-be-processed data in the source database corresponding to the current time, and the first data type being a structure type of billing data; a billing unit configured to perform throw billing processing on the target data according to the first data type of the target billing information based on a combination factory class mechanism.
10. An electronic device, comprising: include: a processor, and a memory in communication with the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium characterized by, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1 to 8.
12. A computer program product, characterised in that, include a computer program that is executed by the processor to implement the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Batch account throwing processing method and device
CN112927065A
Real-time financial account throwing method based on platform architecture in business
CN115760452A