Disclosure of Invention
In view of this, the present application provides a method and an apparatus for processing service data.
Specifically, the method is realized through the following technical scheme:
a method for processing service data is applied to a first service system in a service processing process, and the method comprises the following steps:
after receiving service data, adding a time tag for the service data, and processing the service data;
sending the service data with the time tag and the processing result thereof to a related second service system, wherein the time tag is a reference for the second service system to carry out service data statistics;
and counting the service data according to the time tag.
Optionally, the adding a time tag to the service data includes:
determining the statistical time of the service data according to a preset time calculation rule and the time information of the service data;
and adding a time label to the service data according to the statistical time.
Optionally, the method further includes:
synchronizing the service data carrying the time labels to a third service system for service statistics;
the time tag is a reference for the third service system to perform service data statistics, and the third service system is different from the second service system.
Optionally, the synchronizing the service data with the time tag to a third service system for service statistics includes:
sending the service data carrying the time tag to the third service system according to the registration information of the third service system; or
And after receiving a service data request sent by the third service system, sending the service data carrying the time tag to the third service system.
Optionally, the statistics include: settlement of transaction, settlement of interest, settlement of commission;
the time label is an accounting date label.
A device for processing service data, which is applied to a first service system in a service processing process, comprises:
the adding unit is used for adding a time tag to the service data after receiving the service data and processing the service data;
the sending unit is used for sending the service data with the time tag and the processing result thereof to a related second service system, wherein the time tag is the reference for the second service system to carry out service data statistics;
and the statistical unit is used for performing statistics on the service data according to the time labels.
Optionally, the adding unit determines statistical time of the service data according to a preset time calculation rule and the time information of the service data, and adds a time tag to the service data according to the statistical time.
Optionally, the apparatus further comprises:
the synchronization unit synchronizes the service data carrying the time labels to a third service system for service statistics;
the time tag is a reference for the third service system to perform service data statistics, and the third service system is different from the second service system.
Optionally, the synchronization unit sends the service data carrying the time tag to the third service system specifically according to the registration information of the third service system; or
And after receiving a service data request sent by the third service system, sending the service data carrying the time tag to the third service system.
Optionally, the statistics include: settlement of transaction, settlement of interest, settlement of commission;
the time label is an accounting date label.
It can be seen from the above description that, in the service processing process of the present application, the first service system may add a time tag to the service data, and send the service data carrying the time tag and the processing result thereof to the related second service system, so that the first service system and the second service system in the service processing process perform service statistics according to the time tag added by the first service system, thereby achieving uniform statistical time among the service systems, further ensuring that the statistical results of the service systems are consistent, and improving the use experience of the user.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1 is a flowchart illustrating a method for processing service data according to an exemplary embodiment of the present application.
In this embodiment, the method for processing service data may be applied to a first service system in a service processing process, where the first service system is a necessary service system in the service processing process, that is, in the service processing process, corresponding processing must be performed on the service data through the first service system. The first service system may be an upstream service system in a service processing process, or may be a downstream service system in the service processing process, which is not particularly limited in this application. In this application, for the sake of distinction, other service systems except the first service system in the service processing process may be referred to as second service systems, and thus, in a complete service processing process, one first service system and one or more second service systems are included.
Referring to fig. 1, the method for processing service data may include the following steps:
step 101, after receiving service data, adding a time tag to the service data, and processing the service data.
In this embodiment, when the first service system is a first service system in a service processing process, the first service system may receive service data from a client, and when the first service is not the first service system in the service processing process, the first service system may receive service data from a second service system upstream of the first service system. The service data may include: trade orders, interest lists, commission lists, and the like, financial related business data.
In this embodiment, after receiving the service data, the first service system may add a time tag to the service data, where the time tag is used to identify statistical time of service data statistics. The time tag can be an accounting date tag for identifying the accounting date of business data statistics, for example, the time tag can be the accounting date of the current business data, the time tag can also be an identification of an accounting date calculation mode, and the like, and the application does not specially limit the time tag.
In this embodiment, the first service system may determine the statistical time of the service data according to a preset time calculation rule and the time information of the service data, and add a time tag to the service data according to the statistical time. Wherein the time calculation rule can be set by a manager. Use the time stamp is accounting day label, the statistics time is the accounting day, time calculation rule describes for the example accounting day calculation rule, accounting day calculation rule can be for the day time of cutting at 23 evening of every day, accounting day calculation rule also can be for the day time of cutting at 24 evening of every day. The time information of the service data can also be set by a manager, such as: the time information of the service data may be a time point of generation of the service data, and the time information of the service data may also be a time point of receiving the service data.
Assuming that the business data is a transaction order, the accounting date calculation rule may be day-to-day time at 23 nights each day, the time information of the business data is a time point of generation of the transaction order, and the accounting date label is an accounting date of the current transaction order. If the order generation time point of the trade order received by the first business system is 2015-09-2022:54:20, the accounting date of the trade order is 2015-09-20, and the first business system may add 20150920 an accounting date label to the trade order. If the order generation time point of the trade order received by the first business system is 2015-09-2023:01:20, the accounting date of the trade order is 2015-09-21, and the first business system may add 20150921 an accounting date label to the trade order.
In this embodiment, besides adding the time tag to the service data, the first service system needs to process the service data according to the functions of the system, such as: if the first service system is a fund settlement system, the first service system needs to perform fund settlement on service data, and the like, which is not described in detail herein.
And 102, sending the service data with the time tag and the processing result thereof to a related second service system, wherein the time tag is a reference for performing service data statistics by the second service system.
Based on the foregoing step 101, in this step, the first service system may send the service data carrying the time tag and the processing result thereof to the relevant second service system. The related second service system may be a second service system downstream of the first service system in the service processing process, and the related second service system may also be a second service system upstream of the first service system in the service processing process, which may specifically refer to a service processing flow.
For example, suppose that the service processing needs to pass through three systems, respectively: the system comprises an order generation system, a charge generation system and a fund settlement system, wherein the order generation system and the charge generation system are second business systems, the fund settlement system is a first business system, business data firstly generate business orders through the order generation system, then the charge generation system carries out charging, and then the business data reach the fund settlement system to carry out fund settlement. In this embodiment, the fund settlement system adds a time tag to the service order and performs fund settlement on the service order, and in this step, after settlement, the fund settlement system sends the service order carrying the time tag to the order generation system and the cost generation system. Certainly, in practical implementation, there may be other second service systems downstream of the fund settlement system, and after settlement, the fund settlement system sends the service order carrying the time tag to the downstream second service system again.
And 103, counting the service data according to the time labels.
In this embodiment, the statistics on the service data may include: the transaction settlement, interest settlement, commission settlement, etc. can be specifically counted according to the functions of the related business system, and the application does not specially limit the statistics.
In this embodiment, the time tag is a reference for performing service data statistics on the first service system and the second service system. Specifically, when the first service system performs service data statistics, the service statistics may be performed according to the time tag of each service data. Meanwhile, in this embodiment, when the related second service system performs service statistics, the service statistics may also be performed according to the time tag of each service data.
Still taking the time label as the fiscal date label as an example, assuming that the fiscal date label of a certain business data is 20150920, the first business system will count the business data as the business data of 2015, 9, month and 20 days, and the other related second business systems will also count the business data as the business data of 2015, 9, month and 20 days.
It can be seen from the above description that, in the service processing process of the present application, the first service system may add a time tag to the service data, and send the service data carrying the time tag and the processing result thereof to the related second service system, so that the first service system and the second service system in the service processing process perform service statistics according to the time tag added by the first service system, thereby achieving uniform statistical time among the service systems, further ensuring that the statistical results of the service systems are consistent, and improving the use experience of the user.
Optionally, in another embodiment of the present application, in addition to the first service system and the second service system in the service processing process, there may be another third service system for service statistics, where the third service system is not a service system in the service processing process. The first service system synchronizes the service data with a time tag to the third service system, where the time tag is also a reference for service data statistics of the third service system, that is, the third service system can also perform statistics on the service data according to the time tag, so as to ensure the unification of statistical time among the first service system, the second service system, and the third service system, and further ensure the consistency of statistical results of the service systems.
In this embodiment, the first service system may synchronize the service data carrying the time tag to the third service system in the following two ways.
In the first mode, the first service system sends service data carrying a time tag to the third service system according to the registration information of the third service system. In this way, a third service system that needs to perform service statistics may register in the first service system first, and customize the registration information of the service data acquisition mode during registration, such as: all traffic data for the previous cycle is acquired 24 hours a day or 24 days a week, etc. The first service system may send service data carrying a time tag to the third service system according to the registration information, for example: the first service system can send the day service data carrying the time tag to the third service system at 24 pm each day.
In the second mode, after receiving a service data request sent by a third service system, the first service system sends service data carrying a time tag to the third service system. In this way, a third service system that needs to perform service statistics may send a service data request to the first service system when service statistics needs to be performed, where the service data request may carry time period information of required service data, and the first service system may send service data in a relevant time period that carries a time tag to the third service system according to the service data request.
Of course, in actual implementation, the first service system may also synchronize the service data carrying the time tag to the third service system in other manners, which is not described herein any more.
Corresponding to the foregoing embodiment of the method for processing service data, the present application also provides an embodiment of a device for processing service data.
The embodiment of the processing device of the business data can be applied to the server. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the server where the device is located. In terms of hardware, as shown in fig. 2, the hardware structure diagram of the server where the service data processing device of the present application is located is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 2, the server where the device is located in the embodiment may also include other hardware according to the actual function of the server, which is not described again.
Fig. 3 is a schematic structural diagram of a service data processing apparatus according to an exemplary embodiment of the present application.
Referring to fig. 3, the apparatus 200 for processing service data may include: adding unit 201, transmitting unit 202, counting unit 203 and synchronizing unit 204.
The adding unit 201 adds a time tag to the service data after receiving the service data, and processes the service data;
the sending unit 202 is configured to send the service data with a time tag and a processing result thereof to a second service system, where the time tag is a reference for service data statistics of the second service system;
the counting unit 203 counts the service data according to the time tag.
Optionally, the adding unit 201 determines the statistical time of the service data according to a preset time calculation rule and the time information of the service data, and adds a time tag to the service data according to the statistical time.
The synchronization unit 204 synchronizes the service data carrying the time tag to a third service system for service statistics;
the time tag is a reference for the third service system to perform service data statistics, and the third service system is different from the second service system.
The synchronization unit 204 is specifically configured to send service data carrying a time tag to the third service system according to the registration information of the third service system; or
And after receiving a service data request sent by the third service system, sending the service data carrying the time tag to the third service system.
Optionally, the statistics include: settlement of transaction, settlement of interest, settlement of commission;
the time label is an accounting date label.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.