The application is a divisional application of patent application with the application date of 2019.09.27 and the application number of 201910927944.6, and the application name of bill generation method and device.
Detailed Description
One or more embodiments of the present disclosure provide a method and an apparatus for generating a bill, so as to integrate a flow of bill generation into one device, thereby achieving an effect of generating a bill quickly and simply.
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive effort by one of ordinary skill in the art, are intended to be within the scope of the present disclosure.
Fig. 1 is a schematic flowchart of a bill generation method according to an embodiment of the present disclosure, as shown in fig. 1, the bill generation method is applied to a billing platform, and includes:
s102, relevant transaction data of the first user is called from at least one service node.
Wherein each service node may be configured as a domain for recording relevant transaction data generated during a user transaction. The related transaction data may include any one or more items of transaction data that may be generated during different types of transactions, such as transaction amounts, transaction times, transaction user information, and the like. Each service node may store transaction data of at least one transaction type, e.g., service node a for storing related transaction data during transfer, service node b for storing related transaction data during payment, service node c for storing related transaction data during collection, etc.
S104, determining bill request information of the first user, and processing related transaction data according to the bill request information to obtain first transaction data.
The bill request information may include preset bill output rules, a request for generating one or more bills, a bill storage address, and the like. The processing manner of the related transaction data is also different according to different information carried in the bill request information, and the specific processing manner will be described in detail in the following embodiments.
And S106, generating a bill of the first user according to the first transaction data.
By adopting the technical scheme of one embodiment of the specification, the generation flow of the bill can be integrated on one device without depending on other platforms, so that the generation of the bill is faster and unified; in addition, due to unification of bill generation links, the generation process of each bill is a clear linear link, so that various problems in the bill generation process are easy to check, and the error probability of the bill generation flow can be reduced.
In one embodiment, the relevant transaction data generated during the user transaction is recorded on each service node prior to performing the above steps. Since the service nodes are divided according to different transaction types, each service node is used for storing transaction data generated in different transaction processes, for example, the related transaction data in the transfer process is recorded in the service node a, the related transaction data in the payment process is recorded in the service node b, the related transaction data in the storage and collection process is recorded in the service node c, and the like.
In this embodiment, the related transaction data may be recorded according to the transaction information when the user transacts. For example, if the transaction information is "user a transfers 100 yuan to user B", the transaction data is analyzed to obtain that in the transaction process, the payment party is user a, the collection party is user B, the transaction amount is 100 yuan, and then the data of the payment party, the collection party, the transaction amount and the like are recorded on the service node corresponding to the transfer transaction type.
After the relevant transaction data are recorded in each service node, the relevant transaction data of the user can be obtained from at least one service node when the bill is required to be generated for the user, and then the bill of the user is generated.
In one embodiment, after retrieving the relevant transaction data of the first user from the at least one service node, the relevant transaction data may be checked to determine whether the relevant transaction data is accurate, and after determining that the relevant transaction data is accurate, the billing request information of the first user is determined (i.e., S104 is performed).
In this embodiment, the related transaction data may be checked from multiple aspects, for example, whether the transaction amount recorded in the related transaction data is accurate, whether the transaction time is accurate, whether the user information related to the transaction is accurate, whether the recording format of the transaction data is accurate, and the like. When data such as transaction amount, transaction time and user information related to transaction are checked, the transaction information of the user during the transaction can be acquired first, and the transaction information of the user during the transaction can be stored in a designated storage area of a billing platform or other servers.
For example, the transaction information is "user a transfers 100 yuan to user B", and the related transaction data obtained from the service node is: the paying party is user A, the receiving party is user B, and the transaction amount is 100 yuan. And analyzing the transaction information and comparing the transaction information with the acquired related transaction data so as to judge whether the acquired related transaction data is accurate. If there is at least one item of related transaction data that does not match the transaction information, it may be determined that the acquired related transaction data is inaccurate.
In this embodiment, before generating the bill, by checking the correctness of each item of relevant transaction data recorded on the service node, it is ensured that the correct relevant transaction data is obtained, thereby ensuring that an accurate bill is generated for the user.
In one embodiment, the billing request information includes preset billing output rules. Therefore, when relevant transaction data is processed according to bill request information, the relevant transaction data can be summarized first to obtain a data width table corresponding to the relevant transaction data; and further, aiming at each related transaction data in the data wide table, carrying out corresponding processing on each related transaction data according to the bill output rule to obtain first transaction data conforming to the bill output rule.
Wherein the bill output rule is used for restricting the data output format of each item of related transaction data. For example, the bill output rule includes a timestamp format corresponding to the transaction time, the timestamp format being in the form of yyyymmddhhmms, where "yyy" represents year, "MM" represents month, "dd" represents day, "HH" represents time, "MM" represents minutes, and "ss" represents seconds.
In this embodiment, the obtained related transaction data is processed according to a preset bill output rule to obtain first transaction data, and then a bill of the user is generated according to the first transaction data, so that each item of transaction data in the generated bill of the user accords with a certain rule, but not in a disordered form, thereby facilitating the user to check and the management of the transaction data by a bill platform.
In one embodiment, bill generation links for generating various bills to be executed respectively can be configured in advance, and respective node attributes are configured for each link node included in each bill generation link; the node attribute comprises information such as user information, operation types in the bill generation process and the like, and each bill generation link comprises at least one link node.
In this embodiment, each link node has configurability, which enables a configurator to configure each link node according to service requirements, so that the configurator can simply, clearly and clearly manage each link node included in the bill generation link. In addition, the bill generation flow is articulated, so that each operation step only needs to pay attention to the logic of the operation step and does not need to consider the environment, therefore, the operation logic of the operation step is simple and controllable for each independent link node, and each link node is mutually independent for the overall scheduling, thus the distributed scheduling is easy to realize, and the system resource is utilized maximally.
Based on the above embodiment, if the bill request information includes a request for generating a plurality of bills, when generating a plurality of bills, it is first required to determine bill generation links to be executed for generating each bill respectively; further determining node attributes of each link node; then comparing the link nodes corresponding to the bill generation links respectively to judge whether the node attributes of the link nodes corresponding to the bill generation links are the same or not; if the link nodes with the same node attribute exist in the link nodes corresponding to the bill generation links respectively, the link nodes with the same node attribute in the bill generation links are combined.
For example, the bill request information includes a request for generating a transaction detail bill and a summary bill of the user a, that is, two bills need to be generated simultaneously, and since the two bills are different, the link nodes corresponding to the bill generation links for generating each bill need to be executed are different. Specifically, the bill generation link of the transaction detail bill comprises a link node X, and node attributes of the link node X are as follows: the user information is user A, and the operation type is to acquire transaction detail data. The bill generation link of the summarized bill comprises a link node X and a link node Y, wherein the node attribute of the link node X is as follows: the user information is user A, the operation type is transaction detail data acquisition, and the node attribute of the link node Y is as follows: the user information is user A, and the operation type is summarizing all detail data. Therefore, the bill generation links of the transaction detail bill and the summarized bill comprise the same link node X, so that the link node X corresponding to the transaction detail bill and the link node X corresponding to the summarized bill can be combined.
In this embodiment, after combining the link nodes having the same node attribute, the output results of the combined link nodes in different bills are also combined. Along with the above example, after the link node X corresponding to the transaction statement and the link node X corresponding to the summary statement are combined (i.e., the operations of acquiring the statement data in the two statement generation processes are combined), only one statement data need to be output when the transaction statement and the summary statement are output, and the statement data corresponding to the transaction statement and the statement data need not to be output respectively, so that resources are saved greatly.
In this embodiment, by combining the link node X corresponding to the transaction detail bill and the link node X corresponding to the summary bill, the operation corresponding to the link node having the same node attribute is only executed once, so that the repeated execution of the same operation corresponding to the same link node by the bill platform is avoided, and the system load and the resource consumption are greatly reduced.
In one embodiment, the billing request information includes a billing store address, so that after the bill for the first user is generated, the bill may be output to the billing store address to facilitate the first user's viewing of the bill from the billing store address.
In summary, particular embodiments of the present subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may be advantageous.
The bill generating method provided for one or more embodiments of the present specification further provides a bill generating device based on the same thought.
Fig. 2 is a schematic structural diagram of a bill generating apparatus according to an embodiment of the present specification, and as shown in fig. 2, the bill generating apparatus 200 is applied to a billing platform, including:
a retrieving module 210 for retrieving relevant transaction data of the first user from the at least one service node; the service node is used for recording related transaction data generated in the user transaction process;
the processing module 220 determines bill request information of the first user, and processes related transaction data according to the bill request information to obtain first transaction data;
the generation module 230 generates a bill for the first user based on the first transaction data.
In one embodiment, the billing request information includes preset billing output rules;
the processing module 220 includes:
the summarizing unit summarizes the related transaction data to obtain a data width table corresponding to the related transaction data;
and the processing unit is used for correspondingly processing each related transaction data according to the bill output rule aiming at each related transaction data in the data wide table to obtain first transaction data conforming to the bill output rule.
In one embodiment, the apparatus 200 further comprises:
the checking module is used for checking the related transaction data after the related transaction data of the first user are called from at least one service node so as to judge whether the related transaction data are accurate or not;
the processing module 220 includes:
and the determining unit is used for determining bill request information of the first user after determining that the related transaction data are accurate.
In one embodiment, the billing request information includes a request to generate a plurality of bills;
the apparatus 200 further comprises:
the first determining module is used for determining bill generation links which are needed to be executed for generating each bill respectively; each bill generation link comprises at least one link node;
the second determining module is used for determining node attributes of all the link nodes; the node attribute comprises at least one item of information of user information and operation types in the bill generation process;
the comparison module is used for comparing the link nodes corresponding to the bill generation links respectively so as to judge whether the node attributes of the link nodes corresponding to the bill generation links are the same;
and the merging module is used for merging the link nodes corresponding to the bill generation links if the node attributes of the link nodes corresponding to the bill generation links are the same.
In one embodiment, the apparatus 200 further comprises:
the configuration module is used for configuring bill generation links which are needed to be executed respectively for generating various bills before determining the bill generation links which are needed to be executed respectively for generating the bills; and configuring respective node attributes for each link node included in the bill generation link.
In one embodiment, the billing request information further includes a billing storage address;
the apparatus 200 further comprises:
and the output module outputs the bill to the bill storage address.
By adopting the device of the embodiment of the specification, the generation flow of the bill can be integrated on one device without depending on other platforms, so that the generation of the bill is faster and unified; in addition, due to unification of bill generation links, the generation process of each bill is a clear linear link, so that various problems in the bill generation process are easy to check, and the error probability of the bill generation flow can be reduced.
It should be understood by those skilled in the art that the above bill generating device can be used to implement the bill generating method described above, and the detailed description thereof should be similar to that of the method described above, so as to avoid complexity, and is not repeated herein.
Based on the same considerations, one or more embodiments of the present disclosure also provide a bill generating apparatus, as shown in fig. 3. The bill generating means may be of a relatively large variety due to different configurations or capabilities, may comprise one or more processors 301 and memory 302, and may have one or more stored applications or data stored in memory 302. Wherein the memory 302 may be transient storage or persistent storage. The application program stored in memory 302 may include one or more modules (not shown in the figures), each of which may include a series of computer-executable instructions in the statement generating device. Still further, the processor 301 may be configured to communicate with the memory 302 and execute a series of computer executable instructions in the memory 302 on the billing device. The bill generating device may also include one or more power sources 303, one or more wired or wireless network interfaces 304, one or more input/output interfaces 305, one or more keyboards 306.
In particular, in this embodiment, the bill generating means includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the bill generating means, and the one or more programs configured to be executed by the one or more processors comprise computer executable instructions for:
retrieving relevant transaction data for the first user from the at least one service node; wherein the service node is used for recording the related transaction data generated in the user transaction process;
determining bill request information of the first user, and processing the related transaction data according to the bill request information to obtain first transaction data;
and generating a bill of the first user according to the first transaction data.
Optionally, the bill request information includes a preset bill output rule;
the computer executable instructions, when executed, may further cause the processor to:
summarizing the related transaction data to obtain a data width table corresponding to the related transaction data;
and for each related transaction data in the data wide table, carrying out corresponding processing on each related transaction data according to the bill output rule to obtain the first transaction data conforming to the bill output rule.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
after the related transaction data of the first user is called from at least one service node, the related transaction data is checked to judge whether the related transaction data is accurate or not;
and after determining that the related transaction data is accurate, determining bill request information of the first user.
Optionally, the bill request information includes a request to generate a plurality of bills;
the computer executable instructions, when executed, may further cause the processor to:
determining bill generation links which are needed to be executed for generating each bill respectively; each bill generation link comprises at least one link node;
determining node attributes of the link nodes; the node attribute comprises at least one item of information of user information and operation types in the bill generation process;
comparing the link nodes corresponding to the bill generation links respectively to judge whether the node attributes of the link nodes corresponding to the bill generation links are the same or not;
if yes, merging the link nodes corresponding to the bill generation links respectively.
Optionally, the computer executable instructions, when executed, may further cause the processor to:
before determining to generate bill generation links required to be executed by each bill, configuring bill generation links required to be executed by each bill; and configuring respective node attributes for each link node included in the bill generation link.
Optionally, the bill request information further includes a bill storage address;
the computer executable instructions, when executed, may further cause the processor to:
outputting the bill to the bill storage address.
One or more embodiments of the present specification also provide a computer-readable storage medium storing one or more programs, the one or more programs including instructions, which when executed by an electronic device comprising a plurality of application programs, enable the electronic device to perform the above-described bill generation method, and in particular to perform:
retrieving relevant transaction data for the first user from the at least one service node; wherein the service node is used for recording the related transaction data generated in the user transaction process;
determining bill request information of the first user, and processing the related transaction data according to the bill request information to obtain first transaction data;
and generating a bill of the first user according to the first transaction data.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
One skilled in the art will appreciate that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is merely one or more embodiments of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of one or more embodiments of the present disclosure, are intended to be included within the scope of the claims of one or more embodiments of the present disclosure.