CN114648012A - Bill processing method and device, electronic equipment and computer readable medium - Google Patents
Bill processing method and device, electronic equipment and computer readable medium Download PDFInfo
- Publication number
- CN114648012A CN114648012A CN202210270432.9A CN202210270432A CN114648012A CN 114648012 A CN114648012 A CN 114648012A CN 202210270432 A CN202210270432 A CN 202210270432A CN 114648012 A CN114648012 A CN 114648012A
- Authority
- CN
- China
- Prior art keywords
- bill
- template
- display content
- field
- acquiring
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/04—Billing or invoicing
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Development Economics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Artificial Intelligence (AREA)
- Accounting & Taxation (AREA)
- Economics (AREA)
- Finance (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application discloses a bill processing method, a bill processing device, electronic equipment and a computer readable medium, which relate to the technical field of data processing, and the method comprises the following steps: receiving a bill processing request, and acquiring corresponding bill data and a home location identifier; acquiring corresponding bill template display content based on the attribution identification; calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field; acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values; and filling the configuration fields and the field values into the bill template display contents to generate corresponding bills. Code reuse can be realized, the code maintenance cost is reduced, and the complexity of a bill generation system is reduced.
Description
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing a ticket, an electronic device, and a computer-readable medium.
Background
At present, invoices which are commonly used comprise paper invoices and electronic invoices, and with the development of business, a set of special invoice templates needs to be customized according to different policies in each region, template frames are not universal, and the current maintenance cost can be increased due to the fact that common invoices or special parts are changed. The invoice function of every online area needs to be subjected to corresponding functional transformation, the production risk is increased, the rapid online of the current service is not met, meanwhile, along with the popularization and online of the electronic invoice, the electronic invoice coexists with the paper invoice, so that a large number of coexisting functions of system redundancy are caused, the service complexity cannot be met, the rapid iteration is realized, the code maintenance cost is high, and the complexity of the bill generation system is high.
In the process of implementing the present application, the inventor finds that at least the following problems exist in the prior art:
the invoice generation cannot meet the service complexity, the maintenance cost of a large number of codes is high, the system redundancy has a large number of coexisting functions, and the risk of invoice generation failure is high.
Disclosure of Invention
In view of this, embodiments of the present application provide a bill processing method, an apparatus, an electronic device, and a computer-readable medium, which can solve the problems that the existing invoice generation cannot meet the service complexity, a large number of codes have high maintenance cost, a large number of coexisting functions are redundant in a system, and the risk of invoice generation failure is high.
To achieve the above object, according to an aspect of an embodiment of the present application, there is provided a bill processing method including:
receiving a bill processing request, and acquiring corresponding bill data and a home location identifier;
acquiring corresponding bill template display content based on the attribution identification;
calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field;
acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values;
and filling the configuration field and the field value into the bill template display content to generate a corresponding bill.
Optionally, acquiring a corresponding parameter from the ticket data according to the implementation function includes:
acquiring format information of the bill template display content;
formatting the bill data based on the format information to obtain formatted data;
and acquiring corresponding parameters from the formatted data according to the implementation function.
Optionally, formatting the ticket data based on the format information to obtain formatted data, including:
extracting a parameter field and a parameter field value corresponding to the format information from the bill data;
and converting the parameter field and the parameter field value into a format corresponding to the format information, and further obtaining corresponding formatted data.
Optionally, obtaining corresponding bill template display content based on the home location identifier includes:
acquiring a bill template generated based on a universal template frame;
and acquiring a display content template corresponding to the attribution identification, and modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identification.
Optionally, the obtaining of the corresponding bill template display content based on the attribution identifier includes:
calling a template engine to acquire a corresponding template address according to the attribution identification;
and acquiring corresponding bill template display contents based on the template address.
Optionally, before generating the corresponding ticket, the method further comprises:
and responding to the remote service interface identification corresponding to the realization function, calling the remote service interface corresponding to the remote service interface identification to acquire the corresponding remote parameter, and further calculating according to the remote parameter to obtain the field value.
Optionally, the bill processing method further includes:
in response to the abnormal bill generation, terminating the bill generation process and calling an alarm program to generate alarm information;
and sending alarm information to offline nodes in the audit node pool for further executing bill processing.
Optionally, calculating a field value based on the parameter includes:
and according to the expression corresponding to the realization function, assembling and calculating the parameters to obtain the corresponding field value.
Optionally, each home identifier corresponding ticket data is not shared in the database.
In addition, this application still provides a bill processing apparatus, includes:
the receiving unit is configured to receive the bill processing request, and acquire corresponding bill data and a home location identifier;
the acquisition unit is configured to acquire corresponding bill template display contents based on the attribution identification;
the analysis unit is configured to call an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field;
the calculating unit is configured to acquire corresponding parameters from the bill data according to the implementation function, and further calculate a field value based on the parameters;
and the bill processing unit is configured to fill the configuration field and the field value into the bill template display content so as to generate a corresponding bill.
Optionally, the computing unit is further configured to:
acquiring format information of bill template display content;
formatting the bill data based on the format information to obtain formatted data;
and acquiring corresponding parameters from the formatted data according to the implementation function.
Optionally, the computing unit is further configured to:
extracting a parameter field and a parameter field value corresponding to the format information from the bill data;
and converting the parameter field and the parameter field value into a format corresponding to the format information, and further obtaining corresponding formatted data.
Optionally, the obtaining unit is further configured to:
acquiring a bill template generated based on a universal template frame;
and acquiring a display content template corresponding to the attribution identifier, and modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identifier.
Optionally, the obtaining unit is further configured to:
calling a template engine to acquire a corresponding template address according to the attribution identification;
and acquiring corresponding bill template display content based on the template address.
Optionally, the computing unit is further configured to:
and responding to the remote service interface identification corresponding to the realization function, calling the remote service interface corresponding to the remote service interface identification to acquire the corresponding remote parameter, and further calculating according to the remote parameter to obtain the field value.
Optionally, the bill handling apparatus further comprises an alarm unit configured to:
in response to the abnormal bill generation, terminating the bill generation process and calling an alarm program to generate alarm information;
and sending alarm information to offline nodes in the audit node pool for further executing bill processing.
Optionally, the computing unit is further configured to:
and according to the expression corresponding to the realization function, assembling and calculating the parameters to obtain the corresponding field value.
Optionally, each home identifier corresponding ticket data is not shared in the database.
In addition, the present application also provides a bill handling electronic device, comprising: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a ticket processing method as described above.
In addition, the present application also provides a computer readable medium, on which a computer program is stored, which when executed by a processor implements the ticket processing method as described above.
To achieve the above object, according to still another aspect of embodiments of the present application, there is provided a computer program product.
A computer program product according to an embodiment of the present application includes a computer program, and when the computer program is executed by a processor, the computer program implements a ticket processing method according to an embodiment of the present application.
One embodiment of the above invention has the following advantages or benefits: the method comprises the steps of receiving a bill processing request, and acquiring corresponding bill data and a home location identifier; acquiring corresponding bill template display content based on the attribution identification; calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field; acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values; and filling the configuration fields and the field values into the bill template display contents to generate corresponding bills. The ticket templates are the same, but the presentation of the ticket templates is different for each region. The configuration field and the realization function are obtained through analyzing the bill template display content corresponding to the attribution place identification, the independent variable parameter corresponding to the realization function is obtained from the bill data and is used as the field value, and then the field and the field value are filled into the corresponding bill template display content, so that code multiplexing can be realized, the code maintenance cost is reduced, and the complexity of a bill generation system is reduced.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a further understanding of the application and are not to be construed as limiting the application. Wherein:
fig. 1 is a schematic view of a main flow of a bill processing method according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of the main flow of a note processing method according to a second embodiment of the present application;
FIG. 3 is a functional schematic diagram of a ticket processing method according to a third embodiment of the present application;
FIG. 4 is a schematic diagram of a note processing method according to a fourth embodiment of the present application;
FIG. 5 is a flow chart of a method of ticket processing according to a fifth embodiment of the present application;
FIG. 6 is a schematic diagram of the main units of a document processing apparatus according to an embodiment of the present application;
FIG. 7 is an exemplary system architecture diagram to which embodiments of the present application may be applied;
fig. 8 is a schematic structural diagram of a computer system suitable for implementing the terminal device or the server according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. According to the technical scheme, the data acquisition, storage, use, processing and the like meet relevant regulations of national laws and regulations.
Fig. 1 is a schematic view of a main flow of a bill processing method according to a first embodiment of the present application, and as shown in fig. 1, the bill processing method includes:
step S101, receiving a bill processing request, and acquiring corresponding bill data and a home location identifier.
In this embodiment, an execution subject (for example, a server) of the ticket processing method may receive the ticket processing request through a wired connection or a wireless connection. Tickets, including but not limited to invoices, checks. The ticket processing request may specifically be a request for generating a ticket. After receiving the ticket processing request, the executing entity may obtain corresponding ticket data from a local or remote database (the remote database refers to a database running on other computers in the same network). And the bill data comprises expressions, SQL statements, reference variables, remote calling objects, basic variables and fixed constants. The enforcement agent may also obtain the carried home identifier from the ticket processing request. The attribution identifies the ticket used to characterize which region was generated. The framework of the base template used for the tickets in each region is the same, but the final presentation is different. In an example, the corresponding display content is added on the basis of the bill template P in both places a and B, so that bills containing different bill contents corresponding to each place are generated based on a common bill template, and bills containing the same bill contents corresponding to each place can also be generated, thereby reducing the code maintenance cost and the complexity of the bill generation system. In the embodiment of the application, the bill can be a bill corresponding to various maintenance funds.
And S102, acquiring corresponding bill template display contents based on the attribution identification.
Specifically, acquiring corresponding bill template display content based on the attribution identification comprises the following steps: acquiring a bill template generated based on a universal template frame; and acquiring a display content template corresponding to the attribution identification, and modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identification.
After obtaining the ticket data and the attribution identifier, the executing body may call a parsing engine to obtain a ticket template corresponding to the attribution identifier based on the attribution identifier. The bill template is generated based on a general template framework, and can be applied to the generation of bills with a plurality of different attributions identifying corresponding attributions. After the execution main body obtains the bill template P, the execution main body may obtain a display content template corresponding to the historical display content corresponding to the attribution identifier, the display content template includes some specific configuration fields corresponding to the attribution identifier, a field value corresponding to the specific configuration field is extracted from the obtained bill data, and then the specific configuration field and the corresponding field value are added into the bill template P, so as to modify the display content of the bill template P, and further generate a bill with attribution characteristics.
Specifically, acquiring corresponding bill template display content based on the attribution identification comprises the following steps: calling a template engine to acquire a corresponding template address according to the attribution identification; and acquiring corresponding bill template display content based on the template address.
The execution subject can call the template engine to respectively obtain the template address of the general bill template and the template address of the historical bill template with the specific configuration field according to the attribution identification, and then obtain the corresponding display content of the corresponding bill template according to the obtained template address. The bill template display content comprises display content of a general bill template and display content of a bill template containing a specific configuration field.
And step S103, calling an analysis engine to carry out field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field.
After acquiring the display content of the ticket template with the specific configuration field corresponding to the home location identifier, the execution subject may invoke an analysis engine to perform field analysis on the acquired display content of the ticket template, thereby determining all configuration fields included in the display content of the ticket template. And acquiring the implementation functions of the field values corresponding to all the contained configuration fields. The implementation function characterizes a calculation method of field values corresponding to all the contained configuration fields. An implementation function, configured to obtain a local variable or a remote variable required when calculating a field value, to assemble the ticket data based on the obtained local variable or remote variable, where a and b may be obtained variables (i.e., local variables or remote variables), such as date a and date b; amount a, amount b, etc.
And step S104, acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain a field value.
After obtaining the implementation function of the configuration field, the execution body may determine the type of the implementation function, so as to call the corresponding thread according to the type of the implementation function to obtain the required variable. In the embodiment of the present application, when the execution subject determines that the type of the implementation function is a local variable call, a corresponding parameter variable (that is, a parameter) is obtained from the obtained ticket data, and further, based on the obtained parameter variable (that is, a is 5-tuple and b is 7-tuple, a corresponding field value a + b is calculated to be 12-tuple.
In some embodiments, prior to generating the corresponding ticket, the ticket processing method further comprises: the execution main body responds to the remote service interface identifier corresponding to the implementation function, for example, the prefix of the implementation function contains the remote service identifier, for example, YC, and the execution main body may call the remote service interface corresponding to the remote service interface identifier to obtain the corresponding remote parameter, and then calculate the field value according to the remote parameter. Specifically, when the execution subject determines that the type of the implementation function is called by a remote variable, a remote service calling thread may be started to call a remote service, so as to obtain a variable required for calculating a field value, for example, call the remote service to obtain one or more parameter variables required for one or more of bill template display contents of other attributions, and further calculate a corresponding field value based on the remotely obtained parameter variables and the corresponding implementation function.
And step S105, filling the configuration field and the field value into the bill template display content to generate a corresponding bill.
After the execution main body calculates the field value corresponding to the presentation content of the ticket template, the configuration field corresponding to the field value can be filled into the obtained general ticket template, and the corresponding field value is filled in the corresponding position of the added configuration field, so that the one-to-one correspondence between the filled configuration field and the field value is realized in the general ticket template, and finally, the ticket in which the specific configuration field and the corresponding field value are filled in the general ticket template is generated. The generated ticket is a ticket having a characteristic that the attribution identifies the corresponding attribution.
Specifically, the method further comprises: in response to the abnormal bill generation, terminating the bill generation process and calling an alarm program to generate alarm information; and sending alarm information to offline nodes in the audit node pool for further executing bill processing.
For example, taking the generation of an invoice as an example, in the process of generating an invoice, if an exception occurs, the execution main body may terminate a process of currently generating the invoice, and in order to ensure uniqueness of the invoice, business personnel is required to intervene at this time, and the execution main body may generate a bill processing task and send the generated bill processing task to a node corresponding to the business personnel in the bill processing node pool, so that the business personnel manually operate through an interface.
In the embodiment, corresponding bill data and a home location identifier are acquired by receiving a bill processing request; acquiring corresponding bill template display content based on the attribution identification; calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field; acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values; and filling the configuration fields and the field values into the bill template display contents to generate corresponding bills. The ticket templates are the same, but the presentation of the ticket templates is different for each region. The configuration field and the realization function are obtained through the analysis of the bill template display content corresponding to the attribution place identification, the independent variable parameter corresponding to the realization function is obtained from the bill data and is used as the field value, and then the field and the field value are filled into the corresponding bill template display content, so that code multiplexing can be realized, the code maintenance cost is reduced, and the complexity of a bill generation system is reduced.
Fig. 2 is a schematic main flow chart of a bill processing method according to a second embodiment of the present application, and as shown in fig. 2, the bill processing method includes:
step S201, receiving a bill processing request, and acquiring corresponding bill data and a home identifier.
Specifically, the corresponding ticket data for each home identifier is not shared in the database. The invoice functions of all regions are isolated, and the invoice generation of one region is abnormal, so that all services cannot be stopped, the sustainability of the services is ensured, and the service isolation is realized.
And S202, acquiring corresponding bill template display contents based on the attribution identification.
Step S203, calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field.
And step S204, acquiring format information of the bill template display content.
Step S205, based on the format information, the bill data is formatted to obtain formatted data.
After the execution main body analyzes the realization function of the configuration field and the field value corresponding to the bill template display content corresponding to the attribution place identification, the execution main body can continue to analyze the realization function to obtain the format information of the bill template display content, and format processing is carried out on the obtained bill data based on the format information, namely processing is carried out according to a unified standard, and the unified standard is the format information of the bill template display content corresponding to the attribution place identification. Therefore, the bill data can adapt to each record of the bill template display content, the bill data can be split more simply and conveniently, each field or field value in the corresponding bill template display content is configured and correspondingly filled, the bill template display content corresponding to the acquired bill data and the attribution mark is generated, and a foundation is laid for modifying the general bill template. It can be understood that the format information corresponding to the general ticket template and the format information of the displayed content of the ticket template corresponding to the attribution identifier may be the same or different, and when they are different, the execution main body may perform a format conversion again to modify the content of the general ticket template based on the displayed content of the ticket template corresponding to the attribution identifier, so as to generate the correspondingly acquired ticket data and the ticket of the attribution identifier by using the format information corresponding to the general ticket template and the ticket data as the displayed content.
Specifically, formatting the bill data based on the format information to obtain formatted data, including: extracting parameter fields and parameter field values corresponding to the format information from the bill data; converting the parameter field and the parameter field value into a format corresponding to format information, for example, converting a document into a TXT format, a DOC format, an XLS format, a PPT format, a DOCX format, an XLSX format, or a PTX format, converting a picture into a JPG, PNG, PDF, TIFF, or SWF format, and the like, thereby obtaining uniform formatted data.
And step S206, acquiring corresponding parameters from the formatted data according to the implementation function.
After the execution main body obtains the formatted data, the execution main body can conveniently position and obtain the parameters corresponding to the implementation function, and the parameters include but are not limited to the price corresponding to a certain price field, the color corresponding to a certain color field, the length and the width corresponding to a certain size field and the like in the document.
In step S207, a field value is calculated based on the parameter.
Specifically, the field value is calculated based on parameters, and the calculation includes: and performing assembly calculation on the parameters according to the expressions corresponding to the implementation functions, such as a + b, a/b and the like, namely performing calculation on the parameters based on the expressions corresponding to the implementation functions to obtain corresponding field values.
And step S208, filling the configuration field and the field value into the bill template display content to generate a corresponding bill.
According to the invoice management system and the invoice management method, the invoice requirements based on all regions can be quickly brought on line, the occurrence of production accidents is reduced, the configuration is realized in the whole process, the code reuse is realized, and the uniform invoice management system is created.
Fig. 3 is a functional diagram of the bill processing method according to the third embodiment of the present application. The bill processing method can be applied to the scene of generating invoices of different attributions. The bill processing method according to the embodiment of the present application may be executed by a server (i.e., an execution agent) communicatively connected to the invoice management system shown in fig. 3. The execution main body can be arranged in the invoice management system, and can also be arranged outside the invoice management system and be in communication connection with the invoice management system so as to process the received bill processing request. The invoice management system consists of an invoice number management interface, a printing management interface, a file management interface, a routing management interface, an engine management interface, a controller management interface and a remote service calling interface, and all management modules have different functions. The ticket number management is responsible for tax ticket number management in each area, and comprises electronic ticket numbers and functions of getting, occupying and adding. The print management is mainly responsible for the print function and for the transition of the print state. The file management is mainly divided into two parts, namely file generation and file path acquisition. The generated file can be a local electronic invoice file or an invoice address provided remotely and is downloaded to the local for storage. The route management comprises a route configuration function and a distribution function, wherein the route configuration is to acquire a distribution object and a distribution parameter according to a request channel. Whether the distribution is to the request to a local or remote service invocation. The controller management corresponds to a control center, assembling data. The remote service call interface management is responsible for the management of all external interfaces, including signature requests and electronic invoice requests.
Fig. 4 is a schematic diagram of a bill processing method according to a fourth embodiment of the present application. For example, taking a bill processing request as an invoice generation request as an example, as shown in fig. 4, the receiver receives a bill processing request initiated by the service initiator, such as an invoice generation request, and then the execution subject calls the controller to generate a corresponding invoice according to the invoice generation request received by the receiver. The parsing engine and the template engine may be specifically invoked to generate a corresponding invoice based on the attribution identification in the received invoice generation request and the ticket data corresponding to the invoice generation request. Specifically, the receiver: the system is responsible for uniformly receiving http requests of an invoice system, recording request logs and verifying parameters. A controller: and the system is responsible for calling each component and controlling the flow. An analysis engine: and resolving the configured relevant parameters according to the template ID. A template engine: the matching template, the filling parameters, the three-party electronic invoice and the local invoice number are equivalent to a template. The invoice router: whether the invoice is generated locally or by a three-party electronic invoice. The local processor: and coordinating ticket number occupation, notifying printing management to generate a printing file, and sending a stamping request to a signing system. Ticket number management: according to the effective financial number issued by the financial bureau, the ticket number is managed and issued in the local system, the ticket number is managed and managed uniformly, and the functions of getting the ticket number and occupying the ticket number are realized. File management: and generating a local invoice file according to the template and the parameters. Printing management: and the printing management system is responsible for generating a printing file, including an electronic invoice generated by a third party and a local invoice, and managing the life cycle of a printing state. Printing: and generating a paper invoice. Remote invocation service: and providing external unified interface management, including integrating with a third party to generate an electronic invoice and calling back a local interface. And the three-party electronic invoice is used for generating the electronic invoice. And the signature system is used for stamping the generated bill.
The embodiment of the application adopts a componentization idea, and packages each module (namely, a receiver, a controller, an analysis engine, a template engine, an invoice router, a local processor, ticket number management, file management, printing and remote call service) forming the invoice management system in FIG. 4 into one component, and each component realizes respective functions according to functional division and is not limited to realization languages.
Fig. 5 is a flowchart of a bill processing method according to a fifth embodiment of the present application. As shown in fig. 5, taking a bill as an example for explanation, the invoice receiver receives an invoice generation request, then performs parameter verification, the parameter verification is security verification, after the verification is passed, the parsing engine is called to find a template ID according to an area code carried in the request, then the template engine is called, a template address is found through the template adapter, template content is found through the parameter adapter, the template content relates to parameter parsing, and then the main body is executed to call the parsing engine to parse the template content to obtain an expression, a reference variable, a fixed variable, a remote call variable, and an Sql statement. Wherein, the expression: the calculation criteria is assembled from two fields, for example: a + b, an aggregate assembly is made of two fields, and several values are pieced together into one value. An analysis engine: and the obtained invoice contents are converted into standardized invoice contents of each region through the template ID. Reference variables: variables from other systems, for example, variable a is assigned through other variables, and as a parameter of a, a reference variable can be provided for an expression and can be provided for an SQL statement. Fixed variables: number, string, date, some invariant data. Remote invocation of variables: the variable is a variable obtained from other system interfaces and can be provided for invoice content, expressions, SQL and reference variables. Then, the execution main body can generate a calling request based on the result obtained by analysis and send the calling request to the route distributor, after the route distributor receives the calling request, whether remote invoice calling exists is addressed through rule configuration information carried by the calling request, if not, local calling is initiated, a local processor is called to call file management, a local invoice file is generated according to the template and the result obtained by analysis, and then a corresponding printing manager is called to print the local invoice file; if the remote invoice is called, a remote service calling interface is initiated to call an external service, corresponding remote parameters are obtained, a corresponding remote invoice file is generated according to remote parameter calling file management, and a printing manager is called to print the remote invoice file. The local processor can receive the request of the local invoice, and can also receive the address returned by the callback after the remote generation of the electronic invoice. The remote service call may also generate a remote electronic invoice and perform a remote signature. The printing manager is also used for judging whether the invoice file needs the invoice number, if so, the invoice number management is called, so that the invoice number is managed and published in the local system according to the published effective financial number, the invoice number is managed in a unified way, and the invoice number and the occupied invoice number are received. In the process of generating the invoice, if an exception occurs, the current process is stopped, and in order to ensure the uniqueness of the invoice, business personnel are required to intervene at the moment and manually operate through an interface.
The invoice management system has the advantages that the invoice requirements of all regions are on line quickly, production accidents are reduced, configuration is realized in the whole process, code multiplexing is realized, and a uniform invoice management system is created. The robustness of the system can be protected, the system does not need to be released and deployed online every time, the releasing times are reduced, and the risk of human factors is reduced. The invoice functions in all regions are isolated, all services cannot be stopped, the sustainability of the services is guaranteed, and the service isolation is realized. The code reliability is realized, the dynamic automatic configuration is realized, a large amount of redundant codes cannot be generated, the later operation and maintenance are facilitated, and the maintenance cost is reduced. The code can be repeatedly used, and the dynamic configuration is realized in the whole bill generation process; through a design mode, codes are concise and standard, no redundant codes are generated, and wheels do not need to be repeatedly manufactured, so that the risk of code generation is avoided; the service isolation ensures the independence of service functions, the unavailability of services caused by other functions is avoided, and the coupling degree of the services is reduced to the minimum.
Fig. 6 is a schematic diagram of the main units of a bill handling apparatus according to an embodiment of the present application. As shown in fig. 6, the bill processing apparatus 600 includes a receiving unit 601, an acquiring unit 602, a parsing unit 603, a calculating unit 604, and a bill processing unit 605.
A receiving unit 601 configured to receive a ticket processing request, and obtain corresponding ticket data and a home identifier;
an obtaining unit 602 configured to obtain corresponding bill template display content based on the attribution identification;
the parsing unit 603 is configured to invoke a parsing engine to perform field parsing on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field;
a calculating unit 604 configured to obtain corresponding parameters from the bill data according to the implementation function, and further calculate a field value based on the parameters;
a ticket processing unit 605 configured to populate configuration fields and field values to the ticket template presentation content to generate corresponding tickets.
In some embodiments, the computing unit 604 is further configured to: acquiring format information of bill template display content; formatting the bill data based on the format information to obtain formatted data; and acquiring corresponding parameters from the formatted data according to the implementation function.
In some embodiments, the computing unit 604 is further configured to: extracting a parameter field and a parameter field value corresponding to the format information from the bill data; and converting the parameter field and the parameter field value into a format corresponding to the format information, and further obtaining corresponding formatted data.
In some embodiments, the obtaining unit 602 is further configured to: acquiring a bill template generated based on a universal template frame; and acquiring a display content template corresponding to the attribution identification, and modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identification.
In some embodiments, the obtaining unit 602 is further configured to: calling a template engine to acquire a corresponding template address according to the attribution identification; and acquiring corresponding bill template display content based on the template address.
In some embodiments, the computing unit 604 is further configured to: and responding to the remote service interface identification corresponding to the realization function, calling the remote service interface corresponding to the remote service interface identification to acquire the corresponding remote parameter, and further calculating according to the remote parameter to obtain the field value.
In some embodiments, the ticket processing apparatus further comprises an alarm unit, not shown in fig. 6, configured to: in response to the abnormal bill generation, terminating the bill generation process and calling an alarm program to generate alarm information; and sending alarm information to offline nodes in the audit node pool for further executing bill processing.
In some embodiments, the computing unit 604 is further configured to: and according to the expression corresponding to the realization function, assembling and calculating the parameters to obtain the corresponding field value.
In some embodiments, each home identification corresponds to a ticket data that is not shared in the database.
Note that, in the present application, the bill processing method and the bill processing apparatus have a corresponding relationship in the specific implementation contents, and therefore, the description of the repeated contents is omitted.
Fig. 7 shows an exemplary system architecture 700 to which the ticket processing method or ticket processing apparatus of the embodiments of the present application can be applied.
As shown in fig. 7, the system architecture 700 may include terminal devices 701, 702, 703, a network 704, and a server 705. The network 704 serves to provide a medium for communication links between the terminal devices 701, 702, 703 and the server 705. Network 704 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 701, 702, 703 to interact with a server 705 over a network 704, to receive or send messages or the like. The terminal devices 701, 702, 703 may have installed thereon various communication client applications, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only).
The terminal devices 701, 702, 703 may be various electronic devices having ticket processing screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 705 may be a server providing various services, such as a background management server (for example only) providing support for ticket processing requests submitted by users using the terminal devices 701, 702, 703. The background management server can receive the bill processing request and acquire corresponding bill data and a home location identifier; acquiring corresponding bill template display contents based on the attribution identification; calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field; acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values; and filling the configuration field and the field value into the bill template display content to generate a corresponding bill. The ticket templates are the same, but the presentation of the ticket templates is different for each region. The configuration field and the realization function are obtained through analyzing the bill template display content corresponding to the attribution place identification, the independent variable parameter corresponding to the realization function is obtained from the bill data and is used as the field value, and then the field and the field value are filled into the corresponding bill template display content, so that code multiplexing can be realized, the code maintenance cost is reduced, and the complexity of a bill generation system is reduced.
Note that, the ticket processing method provided in the embodiment of the present application is generally executed by the server 705, and accordingly, the ticket processing apparatus is generally disposed in the server 705.
It should be understood that the number of terminal devices, networks, and servers in fig. 7 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 8, shown is a block diagram of a computer system 800 suitable for use in implementing a terminal device of an embodiment of the present application. The terminal device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 8, the computer system 800 includes a Central Processing Unit (CPU)801 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the computer system 800 are also stored. The CPU801, ROM802, and RAM803 are connected to each other via a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, a mouse, and the like; an output section 807 including a signal such as a Cathode Ray Tube (CRT), a liquid crystal credit authorization query processor (LCD), and the like, and a speaker; a storage portion 808 including a hard disk and the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. A drive 810 is also connected to the I/O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as necessary, so that the computer program read out therefrom is mounted on the storage section 808 as necessary.
In particular, according to embodiments disclosed herein, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809 and/or installed from the removable medium 811. The computer program executes the above-described functions defined in the system of the present application when executed by the Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a receiving unit, an acquiring unit, an analyzing unit, a calculating unit, and a bill processing unit. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to receive ticket processing requests, obtain corresponding ticket data and a home identifier; acquiring corresponding bill template display content based on the attribution identification; calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field; acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain field values; and filling the configuration field and the field value into the bill template display content to generate a corresponding bill.
The computer program product of the present application includes a computer program, and the computer program realizes the bill processing method in the embodiment of the present application when being executed by a processor.
According to the technical scheme of the embodiment of the application, the bill templates are the same, but the display content of the bill templates in each region is different. The configuration field and the realization function are obtained through the analysis of the bill template display content corresponding to the attribution place identification, the independent variable parameter corresponding to the realization function is obtained from the bill data and is used as the field value, and then the field and the field value are filled into the corresponding bill template display content, so that code multiplexing can be realized, the code maintenance cost is reduced, and the complexity of a bill generation system is reduced.
The above-described embodiments should not be construed as limiting the scope of the present application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (16)
1. A method of processing a document, comprising:
receiving a bill processing request, and acquiring corresponding bill data and a home location identifier;
acquiring corresponding bill template display content based on the attribution identification;
calling an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field;
acquiring corresponding parameters from the bill data according to the implementation function, and further calculating based on the parameters to obtain a field value;
and filling the configuration field and the field value into the bill template display content to generate a corresponding bill.
2. The method of claim 1, wherein the obtaining corresponding parameters from the ticket data according to the realization function comprises:
acquiring format information of the bill template display content;
formatting the bill data based on the format information to obtain formatted data;
and acquiring corresponding parameters from the formatted data according to the realization function.
3. The method of claim 2, wherein the formatting the ticket data based on the format information to obtain formatted data comprises:
extracting a parameter field and a parameter field value corresponding to the format information from the bill data;
and converting the parameter field and the parameter field value into a format corresponding to the format information, thereby obtaining corresponding formatted data.
4. The method of claim 1, wherein the obtaining the corresponding ticket template presentation based on the home identifier comprises:
acquiring a bill template generated based on a universal template frame;
and acquiring a display content template corresponding to the attribution identifier, and correspondingly modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identifier.
5. The method of claim 1, wherein the obtaining the corresponding ticket template presentation based on the home identifier comprises:
calling a template engine to acquire a corresponding template address according to the attribution mark;
and acquiring corresponding bill template display content based on the template address.
6. The method of claim 1, wherein prior to said generating the corresponding ticket, the method further comprises:
and responding to the remote service interface identification corresponding to the implementation function, calling the remote service interface corresponding to the remote service interface identification to acquire the corresponding remote parameter, and further calculating according to the remote parameter to obtain a field value.
7. The method of claim 1, further comprising:
in response to the abnormal bill generation, terminating the bill generation process and calling an alarm program to generate alarm information;
and sending the alarm information to offline nodes in the audit node pool for further executing bill processing.
8. The method of claim 1, wherein said computing a field value based on said parameters comprises:
and according to the expression corresponding to the realization function, performing assembly calculation on the parameters to obtain a corresponding field value.
9. The method of any of claims 1-8, wherein each of the attribution identifications corresponding ticket data is not shared in a database.
10. A bill handling apparatus comprising:
the receiving unit is configured to receive the bill processing request, and acquire corresponding bill data and a home location identifier;
the acquisition unit is configured to acquire corresponding bill template display content based on the attribution identification;
the analysis unit is configured to call an analysis engine to perform field analysis on the bill template display content to obtain a configuration field of the bill template display content and an implementation function of a field value corresponding to the configuration field;
the calculating unit is configured to acquire corresponding parameters from the bill data according to the implementation function, and then calculate a field value based on the parameters;
and the bill processing unit is configured to fill the configuration field and the field value into the bill template display content so as to generate a corresponding bill.
11. The apparatus of claim 10, wherein the computing unit is further configured to:
acquiring format information of the bill template display content;
formatting the bill data based on the format information to obtain formatted data;
and acquiring corresponding parameters from the formatted data according to the realization function.
12. The apparatus of claim 11, wherein the computing unit is further configured to:
extracting a parameter field and a parameter field value corresponding to the format information from the bill data;
and converting the parameter field and the parameter field value into a format corresponding to the format information, thereby obtaining corresponding formatted data.
13. The apparatus of claim 10, wherein the obtaining unit is further configured to:
acquiring a bill template generated based on a universal template frame;
and acquiring a display content template corresponding to the attribution identification, and correspondingly modifying the display content of the bill template based on the display content template to obtain the bill template display content corresponding to the attribution identification.
14. A ticket processing electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
15. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-9.
16. A computer program product comprising a computer program, characterized in that the computer program realizes the method according to any of claims 1-9 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210270432.9A CN114648012A (en) | 2022-03-18 | 2022-03-18 | Bill processing method and device, electronic equipment and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210270432.9A CN114648012A (en) | 2022-03-18 | 2022-03-18 | Bill processing method and device, electronic equipment and computer readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114648012A true CN114648012A (en) | 2022-06-21 |
Family
ID=81996173
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210270432.9A Pending CN114648012A (en) | 2022-03-18 | 2022-03-18 | Bill processing method and device, electronic equipment and computer readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114648012A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115796142A (en) * | 2023-02-03 | 2023-03-14 | 北京四方启点科技有限公司 | Bill management method, system and equipment |
-
2022
- 2022-03-18 CN CN202210270432.9A patent/CN114648012A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115796142A (en) * | 2023-02-03 | 2023-03-14 | 北京四方启点科技有限公司 | Bill management method, system and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110795147A (en) | Interface protocol file management method and device | |
US11494552B2 (en) | System and method for implementing smart business intelligence testing tools | |
CN111127181A (en) | Voucher bookkeeping method and device | |
CN111460129A (en) | Method and device for generating identification, electronic equipment and storage medium | |
CN112132674A (en) | Transaction processing method and device | |
CN113673978A (en) | Transaction method, system, computer device and storage medium based on SWIFT system | |
CN114648012A (en) | Bill processing method and device, electronic equipment and computer readable medium | |
CN112990991B (en) | Method and device for combined invoicing | |
CN111126935B (en) | Method and device for processing security data, electronic equipment and storage medium | |
CN109683942B (en) | Script management method, script management device, script management medium and electronic equipment | |
CN115391343A (en) | Bill data processing method and device, electronic equipment and storage medium | |
CN116049099A (en) | Data processing method, device, electronic equipment and computer readable medium | |
CN113485902B (en) | Method, device, equipment and computer readable medium for testing service platform | |
CN115658127A (en) | Data processing method and device, electronic equipment and storage medium | |
CN114924937A (en) | Batch task processing method and device, electronic equipment and computer readable medium | |
CN114817347A (en) | Business approval method and device, electronic equipment and storage medium | |
CN111526184B (en) | Business auditing method and device | |
CN114374686A (en) | File processing method, device and equipment based on browser | |
CN114398376A (en) | Data processing method and device and readable storage medium | |
CN113704222A (en) | Method and device for processing service request | |
CN109376023B (en) | Method and equipment for generating calling information and issuing return code group | |
CN111383087A (en) | Report access method and device, storage medium and electronic equipment | |
CN110992118A (en) | Electronic invoice issuing method, device, storage medium, equipment and system | |
CN109542646A (en) | Method and apparatus for calling application programming interface | |
CN114997977B (en) | Data processing method, device, electronic equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |