Electronic receipt generation method and device, electronic equipment and storage medium

By generating electronic replies templates based on target parameter fields, signature placeholders and custom formats, the problems of low adaptability and filling efficiency of replies templates in the prior art are solved, and more efficient electronic replies generation is achieved.

CN119476240APending Publication Date: 2025-02-18LIANLIAN YINTONG ELECTRONIC PAYMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411529702.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, the adaptability and filling efficiency of the electronic return template are low, and the template configuration process is complicated, resulting in low electronic return generation efficiency.

Method used

By receiving the electronic reply generation request of the target account, you can obtain the target reply data, template identification and signature identification, and generate a reply template based on the target parameter field, signature placeholder and custom format, so as to achieve flexibility in the reply template. Customization and automatic replacement.

Benefits of technology

It improves the adaptability and scalability of the return order template, simplifies the operation process, reduces the system complexity and instability, and improves the overall generation efficiency of electronic return orders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476240A_ABST
    Figure CN119476240A_ABST
Patent Text Reader

Abstract

The invention relates to an electronic receipt generation method and device, electronic equipment and a storage medium, and the method comprises the steps: receiving an electronic receipt generation request of a target account for a target service, and obtaining target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target service, and a target signature identifier corresponding to the target account; the target receipt data comprises a target field value corresponding to at least one target field; obtaining a target receipt template corresponding to the target receipt template identifier and a target receipt signature corresponding to the target signature identifier; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a user-defined format; and generating a target electronic receipt based on the respective corresponding target field values, the target receipt signature and the target receipt template. According to the embodiment of the invention, the adaptability and filling efficiency of the receipt template can be improved, the configuration process of the receipt template is simplified, and the generation efficiency of the receipt template and the overall generation efficiency of the electronic receipt are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for generating an electronic receipt. Background Art

[0002] With the rise of e-commerce, merchants have an increasing demand for electronic receipts. How to meet the needs of different merchants for customized receipt templates has become the focus of improving the efficiency of electronic receipt generation and reducing electronic receipt research and development resources.

[0003] In the related art, data is often filled into the receipt template with the help of a third-party editing tool, wherein the receipt template is mostly a PDF template. However, in the related art, this operation process is complicated, the fields in the receipt template are fixed, and the structural scalability is poor. Furthermore, when the generated electronic receipt contains list-type data, the current receipt template structure and PDF template editing cannot quickly meet the changing needs of merchants, resulting in low adaptability and filling efficiency of the receipt template, and the receipt template configuration process is complicated to operate, and the receipt template generation efficiency is low, which in turn leads to problems such as low overall generation efficiency of electronic receipts. Summary of the invention

[0004] The present disclosure provides an electronic receipt generation method, device, electronic device and storage medium to at least solve the problems in the related art such as low adaptability and filling efficiency of receipt templates, complex operation of receipt template configuration process, low receipt template generation efficiency, and thus low overall generation efficiency of electronic receipts.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a method for generating an electronic receipt, comprising:

[0006] Receive a request for generating an electronic receipt for a target business from a target account, and obtain target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account; the target receipt data includes a target field value corresponding to at least one target field;

[0007] A target receipt template corresponding to the target receipt template identifier and a target receipt signature corresponding to the target signature identifier are obtained; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a custom format; the at least one target parameter field is configured based on at least one preset parameter field, and the at least one target field corresponds to the at least one target parameter field; the target receipt signature is generated based on the acquired signature parameters of the target account, and the target receipt signature corresponds to the signature placeholder; the custom format is obtained through custom editing;

[0008] A target electronic receipt is generated based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template.

[0009] In an optional embodiment, the method further includes:

[0010] In response to a template format editing instruction for the target business, editing the customized format through a rich text editor;

[0011] In response to the signature placeholder creation instruction, creating the signature placeholder by using the rich text editor;

[0012] In response to the receipt template creation instruction, obtaining the at least one target parameter field;

[0013] The target receipt template is generated based on the custom format and the at least one target parameter field.

[0014] In an optional embodiment, the method further includes:

[0015] A field configuration request for the field configuration page is received, and the at least one target parameter field is determined from at least one preset parameter field in the field configuration page.

[0016] In an optional embodiment, the method further includes:

[0017] Receive a signature configuration request for the target business, and obtain signature parameters corresponding to the target account;

[0018] Based on the signature parameters, the target receipt signature is generated.

[0019] In an optional embodiment, when the target receipt data includes multiple target field value groups, any target field value group corresponds to the at least one target parameter field; the generating the target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template includes:

[0020] Based on each target field value group, the target receipt signature and the target receipt template, generating a sub-electronic receipt corresponding to each target field value group;

[0021] The target electronic receipt is generated based on the sub-electronic receipts corresponding to the multiple target field value groups.

[0022] In an optional embodiment, the generating the target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template includes:

[0023] Generate an electronic receipt in a preset format based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template;

[0024] The electronic receipt in the preset format is format-converted to generate a target electronic receipt; the target electronic receipt is an electronic receipt in the target format.

[0025] In an optional embodiment, the method further includes:

[0026] In the case where the target receipt data has been updated, determining at least one update parameter field based on at least one update target field in the updated target receipt data;

[0027] Determining an update custom format based on the at least one update parameter field;

[0028] Based on the at least one updated parameter field and the updated custom format, an updated target receipt template is obtained.

[0029] According to a second aspect of an embodiment of the present disclosure, there is provided an electronic receipt generating device, comprising:

[0030] A first acquisition module is used to receive a target account's electronic receipt generation request for a target business, and acquire target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account; the target receipt data includes a target field value corresponding to at least one target field;

[0031] The second acquisition module is used to acquire the target receipt template corresponding to the target receipt template identifier and the target receipt signature corresponding to the target signature identifier; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a custom format; the at least one target parameter field is configured based on at least one preset parameter field, and the at least one target field corresponds to the at least one target parameter field; the target receipt signature is generated based on the acquired signature parameters of the target account, and the target receipt signature corresponds to the signature placeholder; the custom format is obtained by custom editing;

[0032] The target electronic receipt generation module is used to generate a target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template.

[0033] In an optional embodiment, the device further comprises:

[0034] A custom format editing module, configured to respond to a template format editing instruction for the target business and edit the custom format through a rich text editor;

[0035] A signature placeholder creation module, used to create the signature placeholder through the rich text editor in response to the signature placeholder creation instruction;

[0036] A third acquisition module, configured to acquire the at least one target parameter field in response to a receipt template creation instruction;

[0037] A target receipt template generation module is used to generate the target receipt template based on the custom format and the at least one target parameter field.

[0038] In an optional embodiment, the device further comprises:

[0039] The first determination module is used to receive a field configuration request for the field configuration page, and determine the at least one target parameter field from at least one preset parameter field in the field configuration page.

[0040] In an optional embodiment, the device further comprises:

[0041] A signature parameter acquisition module, used to receive a signature configuration request for the target business and obtain signature parameters corresponding to the target account;

[0042] The target receipt signature generation module is used to generate the target receipt signature based on the signature parameters.

[0043] In an optional embodiment, when the target receipt data includes multiple target field value groups, any one of the target field value groups corresponds to the at least one target parameter field; the target electronic receipt generation module includes:

[0044] A sub-electronic receipt generating unit, configured to generate a sub-electronic receipt corresponding to each target field value group based on each target field value group, the target receipt signature and the target receipt template;

[0045] The target electronic receipt generating unit is used to generate the target electronic receipt based on the sub-electronic receipts corresponding to the multiple target field value groups.

[0046] In an optional embodiment, the target electronic receipt generation module includes:

[0047] A preset generating unit, configured to generate an electronic receipt in a preset format based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template;

[0048] The target generation unit is used to convert the format of the electronic receipt in the preset format to generate a target electronic receipt; the target electronic receipt is an electronic receipt in the target format.

[0049] In an optional embodiment, the device further comprises:

[0050] A second determination module is used to determine at least one update parameter field based on at least one update target field in the updated target receipt data when the target receipt data has been updated;

[0051] An update format determination module, configured to determine an update custom format based on the at least one update parameter field;

[0052] The target receipt template updating module is used to obtain an updated target receipt template based on the at least one updated parameter field and the updated custom format.

[0053] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is used to execute the instructions to implement a method as described in any one of the above-mentioned first aspects.

[0054] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any method described in the first aspect of the embodiment of the present disclosure.

[0055] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0056] Receive a request for generating an electronic receipt for a target business from a target account, obtain target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account, wherein the target receipt data includes a target field value corresponding to at least one target field, and based on the target receipt template identifier and the target signature identifier, obtain a target receipt template corresponding to the target receipt template identifier and a target receipt signature corresponding to the target signature identifier, wherein the target receipt template is generated based on at least one target parameter field, a signature placeholder, and a custom format, and at least one target parameter field is configured based on at least one preset parameter field, and the custom format is obtained through custom editing, which can meet the customized needs of different merchants for receipt templates and improve the adaptability and extensibility of receipt templates, and generate a target electronic receipt based on the target field value, target receipt signature, and target receipt template corresponding to at least one target field, which can realize automatic replacement of receipt template elements, simplify the operation process, reduce the complexity and instability of the system, and improve the overall generation efficiency of electronic receipts.

[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0059] Figure 1 is a schematic diagram of an application environment according to an exemplary embodiment;

[0060] Figure 2 is a flow chart of a method for generating an electronic receipt according to an exemplary embodiment;

[0061] Figure 3 is a schematic diagram of a field configuration page according to an exemplary embodiment;

[0062] Figure 4 is a schematic diagram of a signature configuration page according to an exemplary embodiment;

[0063] Figure 5 is a flow chart showing a method of generating a target receipt template according to an exemplary embodiment;

[0064] Figure 6 is a schematic diagram of a target receipt template according to an exemplary embodiment;

[0065] Figure 7 is a schematic diagram of a target electronic receipt according to an exemplary embodiment;

[0066] Figure 8 is a schematic diagram of another target electronic receipt according to an exemplary embodiment;

[0067] Fig. 9 is a block diagram of an electronic receipt generating device according to an exemplary embodiment;

[0068] Fig.10 The present invention is a block diagram of an electronic device for generating an electronic receipt according to an exemplary embodiment. DETAILED DESCRIPTION

[0069] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0070] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar different contents, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.

[0071] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0072] See also Figure 1 , Figure 1 is a schematic diagram of an application environment according to an exemplary embodiment. Figure 1 As shown, the application environment may include a terminal 100 and a server 200 .

[0073] In an optional embodiment, the terminal 100 can be used to provide services such as target parameter field configuration, target receipt signature configuration, and custom format editing. Specifically, the terminal 100 may include but is not limited to electronic devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, and smart wearable devices, and may also be software running on the above electronic devices, such as applications. Optionally, the operating system running on the electronic device may include but is not limited to Android, IOS, Linux, Windows, etc.

[0074] In an optional embodiment, the server 200 can provide background support for the terminal 100 and generate an electronic receipt. Optionally, the server 200 can pre-upload the receipt data, the receipt template and the receipt signature. Accordingly, the electronic receipt can be generated based on the receipt data, the receipt template corresponding to the receipt template and the receipt signature corresponding to the signature. Specifically, the server 200 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0075] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the present disclosure. In actual application, other application environments may also be included.

[0076] In the embodiments of this specification, the terminal 100 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in this disclosure.

[0077] Figure 2 is a flow chart of a method for generating an electronic receipt according to an exemplary embodiment. Figure 2 As shown, the electronic receipt generation method is used in electronic devices such as terminals and servers, and includes the following steps.

[0078] In step S201, a request for generating an electronic receipt from a target account for a target business is received, and target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account are obtained.

[0079] In a specific embodiment, the target account may be an account corresponding to different merchants, and the merchants may be banks, securities institutions, e-commerce merchants, etc. The target business may correspond to different businesses in combination with actual application needs. For example, the target business may be a bank transfer business, securities trading business, procurement business, etc.

[0080] In a specific embodiment, the target receipt data includes target field values corresponding to at least one target field. Taking the application scenario of electronic payment as an example, the target receipt data may include {\"userPsettleBalance\" (user's balance to be settled): \"0.00\", \"receiptNo\" (receipt number): \"202409230016587341\", \"merName\" (merchant name): \"******** Co., Ltd.\", \"userAvailableBalance\" (user's available balance): \"6000.00\", \"reqTime\" (request time): \"2024-09-23 09:45:22\", \"userName\" (user name): \"Wang*\","user Id\" (user number): \"ys_ar_154700****_1157\", \"userIdNo\" (user ID number): \"445***********308X\"}. Specifically, \"userPsettleBalance\" can be the target field, and \"0.00\" is the corresponding target field value.

[0081] In a specific embodiment, different target services correspond to different target receipt template identifiers. Specifically, when receiving an electronic receipt generation request for a target service from a target account, the service system will upload the target receipt template identifier corresponding to the target service.

[0082] In a specific embodiment, different target accounts correspond to different target signature identifiers. Specifically, when receiving an electronic receipt generation request for a target service from a target account, the service system will upload the target signature identifier corresponding to the target account.

[0083] In step S203, obtain the target receipt template corresponding to the target receipt template identifier and the target receipt signature corresponding to the target signature identifier.

[0084] In a specific embodiment, the target receipt template can be generated based on at least one target parameter field, signature placeholder, and custom format. Specifically, at least one target parameter field can be configured based on at least one preset parameter field. At least one target field can correspond to at least one target parameter field. The target receipt signature can be generated based on the signature parameters of the obtained target account. The target receipt signature can correspond to the signature placeholder, and the custom format can be obtained through custom editing.

[0085] In an alternative embodiment, the above method may further include:

[0086] A field configuration request for a field configuration page is received, and at least one target parameter field is determined from at least one preset parameter field in the field configuration page.

[0087] In a specific embodiment, a field configuration page may be displayed on a terminal. Specifically, the field configuration page may be used to configure at least one target parameter field, including at least one preset parameter field. The at least one preset parameter field may be a business parameter field pre-configured by the platform for at least one preset business. The at least one preset business includes a target business. The at least one preset business may be a business involved in the platform, such as a bank transfer business, a securities trading business, a procurement business, etc. The field configuration page may have corresponding buttons or options, etc., so that the user can configure the at least one target parameter field by selection, etc. Exemplarily, the field configuration page may be as follows: Figure 3 In the page shown, the first column may be a field identifier corresponding to at least one preset parameter field, the second column may be field information corresponding to at least one preset parameter field, and the third column may be at least one preset parameter field.

[0088] In the above embodiment, at least one target parameter field is configured through at least one preset parameter field in the field configuration page. The user does not need to manually enter the detailed information of each target parameter field, but only needs to select from the preset parameter field list. The operation is simple, which greatly saves configuration time and improves the efficiency of receipt template configuration. The preset parameter fields are pre-defined by system design and specifications. Selecting from the field configuration page can reduce the error rate. When the system's preset parameter fields change or new fields need to be added, the developer only needs to update or expand the preset parameter field list, which improves the maintainability and flexibility of the receipt template configuration system.

[0089] In a specific embodiment, when at least one preset parameter field is ${receiptNo!} (receipt number), ${createTime!} (receipt generation time), ${platformTxno!} (ACCP order number), ${payerAcctName!} (user name), ${payerAcctid!} (user number), ${amount!} (transaction amount (yuan)), ${reqTime!} (application time), and ${upTime!} (update time), the corresponding at least one target parameter field may include {\“receiptNo\” (receipt number):\“202409230016587341\”,\“createTime\” (receipt generation time):\“2024-09-20 08:30:02\”,“\platformTxno\” (ACCP order number):\“TR20240918***0000005\”,\“payerAcctName\” (user name):\“Wang*\”,\“userPsettleBalance\” (user's unsettled balance):\“0.00\”,\“payerAcctid\” (user number):\“ys_ar_154700****_1157\”,\“amount\” (transaction amount):\“6000.00\”,\“reqTime\” (request time):\“2024-09-21 09:45:22\”,\“upTime\” (update time):\“2024-09-23 07:43:11\”}.

[0090] In an alternative embodiment, the above method may further include:

[0091] Receiving a signature configuration request for a target service and obtaining signature parameters corresponding to the target account;

[0092] Generating a target receipt signature based on the signature parameters.

[0093] In a specific embodiment, the signature parameters may be the signature information required during the configuration process of the target receipt signature. For example, the signature parameters may include the signature name, signature type, and signature identification information corresponding to the target receipt signature. Specifically, as Figure 4 shown, the signature configuration page can be used to configure the signature parameters corresponding to the target account. The signature configuration page may have corresponding buttons, options, input boxes, etc., so that the signature parameters can be input by means of selection or input to configure the target receipt signature and generate the target receipt signature.

[0094] In a specific embodiment, the input signature parameters can be processed in combination with the preset receipt signature generation model, including formatting text, converting date format, encoding special characters, etc. The processed signature parameters are input into the signature generation tool or the preset programming algorithm to generate the target receipt signature.

[0095] In the above embodiment, the signature parameters corresponding to the target account are configured through the signature configuration page to generate the target receipt signature. The signature configuration page has clear input boxes and prompt information, which can guide the user to accurately enter the signature parameters and ensure the accuracy of the signature parameters. Different target accounts may have different signature requirements. The corresponding signature parameters can be flexibly entered through the signature configuration page to meet the needs of different target accounts, thereby improving the applicability and practicality of the receipt template configuration system.

[0096] In an optional embodiment, the above method may further include: a step of generating a target receipt template, specifically, Figure 5 As shown, the following steps may be included:

[0097] In step S501, in response to a template format editing instruction for a target business, a custom format is obtained by editing with a rich text editor;

[0098] In a specific embodiment, the template format editing instruction can be triggered by the user editing text in a rich text editor. The rich text editor can be a text editor that supports text input and formatting, allowing the user to insert media elements such as pictures, videos, and tables.

[0099] In a specific embodiment, the customized format can be edited by a user through a rich text editor based on at least one target parameter field.

[0100] In step S503, in response to the signature placeholder creation instruction, a signature placeholder is created through a rich text editor;

[0101] In a specific embodiment, the signature placeholder creation instruction can be triggered by the user adding a signature placeholder to the receipt template in a rich text editor. Specifically, the position of the signature placeholder in the receipt template can be set through the rich text editor.

[0102] In step S505, in response to the receipt template creation instruction, at least one target parameter field is obtained;

[0103] In a specific embodiment, the receipt template creation instruction can be triggered by the user creating the receipt template in a rich text editor.

[0104] In step S507, a target receipt template is generated based on the custom format and at least one target parameter field.

[0105] In a specific embodiment, for example, at least one target parameter field may be ${receiptNo!} (receipt number), ${createTime!} (receipt generation time), ${platformTxno!} (ACCP order number), ${payerAcctName!} (user name), ${payerAcctid!} (user number), ${amount!} (transaction amount (yuan)), ${reqTime!} (application time) and ${upTime!} (update time). By combining the rich text editor with at least one target parameter field to set a custom format for the target receipt template, and referencing at least one target parameter field in the rich text editor, the following can be obtained: Figure 6 The target receipt template shown.

[0106] In the above embodiment, based on the custom format obtained by editing through the rich text editor, the added signature placeholder and at least one target parameter field, a target receipt template is generated, and the format can be flexibly set to meet the diverse needs of different target businesses. The addition of signature placeholders is also very flexible, and the size and style of the target receipt signature can be adjusted according to actual conditions, so that the receipt template can better adapt to various business situations, thereby improving the adaptability and practicality of the receipt template.

[0107] In step S205, a target electronic receipt is generated based on the target field value, the target receipt signature and the target receipt template corresponding to at least one target field.

[0108] In a specific embodiment, the target electronic receipt may be an electronic receipt obtained by replacing the target field value and target receipt signature corresponding to at least one target field with the corresponding at least one target parameter field and signature replacement character in the target receipt template.

[0109] In an optional embodiment, the generating of the target electronic receipt based on the target field value, the target receipt signature and the target receipt template corresponding to each of the at least one target field includes:

[0110] Generate an electronic receipt in a preset format based on the target field value, the target receipt signature and the target receipt template corresponding to at least one target field;

[0111] Convert the electronic receipt in the preset format to generate the target electronic receipt.

[0112] In a specific embodiment, the electronic receipt in a preset format may be an electronic receipt obtained by replacing at least one target parameter field and a signature placeholder in a target receipt template with at least one corresponding target field value and a target receipt signature through a template engine. Specifically, the template engine may be FreeMarker, and the preset format may be HTML format.

[0113] In a specific embodiment, the target electronic receipt may be an electronic receipt in a target format, and the target format may be a PDF format. Specifically, the electronic receipt in a preset format may be converted into an electronic receipt in a target format by using the HTML2PDF tool. For example, Figure 6 The target receipt template shown can generate Figure 7 Target electronic receipt shown.

[0114] In the above embodiment, the electronic receipt in a preset format is converted through a format conversion tool to obtain a target electronic receipt. Converting the electronic receipt in HTML format to PDF format can make the electronic receipt more in line with the requirements of document archiving, prevent the integrity and standardization of the electronic receipt from being affected by accidental modifications, and improve the security and consistency of the document.

[0115] In an optional embodiment, when the target receipt data includes multiple target field value groups, and any target field value group corresponds to at least one target parameter field, the target electronic receipt is generated based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template, including:

[0116] Generate a sub-electronic receipt corresponding to each target field value group based on each target field value group, target receipt signature and target receipt template;

[0117] Generate a target electronic receipt based on the sub-electronic receipts corresponding to the multiple target field value groups.

[0118] In a specific embodiment, the target field value group can be {\"amtBalcur\"(current account balance):\"1299074.09\",\"dateAcct\"(accounting date):\"20240918\",\"merOrderNo\"(merchant order number):\"TR202409180000000005\",\"typeBal\"(account type):\"user's own available account\",\"bizCode\"(business code):\"external account transfer\",\"amtPayBil l\"(payment amount):\"124044.44\",\"jnoAcct\"(accounting serial number):\"20240918002783575862\",\"oidAcctno\"(external account number):\"20230920000093130823\",\"outInType\"(income and expenditure type):\"outgoing account\",\"payBillno\"(payment order number):\"2024091800653921\"}, corresponding to at least one target parameter field ${amtBalcur!}(account current balance), ${dateAcct!}(accounting date), ${merOrderNo!}(merchant order number), ${typeBal!}(account type), ${bizCode!}(business code), ${amtPayBill!}(payment amount), ${jnoAcct!}}(accounting serial number), ${oidAcctno!}(external account number), ${outInType!}(income and expenditure type) and ${payBillno!}(payment order number), each of the multiple target field value groups corresponds to the same at least one target parameter field.

[0119] In a specific embodiment, the sub-electronic receipt may be an electronic receipt obtained by replacing each target field value group and the target receipt signature with at least one corresponding target parameter field and signature replacement symbol in the target receipt template. Specifically,

[0120] In a specific embodiment, each target field value group corresponds to a sub-electronic receipt. Specifically, in at least one target field value group, \"detailList\":[{\"payBillno\":\"2024091800653921\",\"dateAcct\":\"20240918\",\"merOrderNo\":\"TR20240918000000005\",\"typeBal\":\"User's Own Available Account\",\"bizC ode\":\"External Account Transfer\",\"amtPayBill\":\"124044.44\",\"jnoAcct\":\"20240918002783575862\",\"oidAcctno\":\"20230920000093130823\",\"outInType\":\"Outgoing Account\",\"amtBalcur\":\"1299074.09\"},{\"payBillno\":\"2024091800633980\",\"dateAcct\":\"20240918\",\"merOrderNo\":\"TR 202409180000000004\",\"typeBal\":\"User's own available account\",\"bizCode\":\"Cross-platform transfer\",\"amt PayBill\":\"1407769.30\",\"jnoAcct\":\"20240918002783548049\",\"oidAcctno\":\"20230920000093130823\",\"outInType\":\"Outgoing account\",\"amtBa lcur\":\"1423118.53\"},{\"payBillno\":\"2024091800606494\",\"dateAcct\":\"20240918\",\"merOrderNo\":\"TR202409180000000002\",\"typ eBal\":\"User's own available account\",\"bizCode\":\"Internal account transfer\",\"amtPayBill\":\"361903.79\",\"jnoAcct\":\"20240918002783511362\",\"oidAcctno\":\"20230920000093130823\",\"outInType\":\"Into account\",\"amtBalcur\":\"2830887.83\”}], traverse each target field group in turn, replace at least one target field value in each target field group with at least one target parameter field, and generate a sub-electronic receipt, wherein each target field group corresponds to at least one target parameter field. Based on multiple sub-electronic receipts, a sub-electronic receipt such as . Figure 8 Target electronic receipt shown.

[0121] In the above embodiment, by generating sub-electronic receipts corresponding to multiple target field value groups and then generating a target electronic receipt, the customization requirements of the target receipt template can be well met when the target receipt data is list data. By using traversal operations, list data of various lengths and complexities can be processed, which greatly simplifies the amount of code. If different types of list data need to be processed, it is only necessary to modify the target parameter field in the target receipt template. It has strong scalability and can adapt to changing business needs.

[0122] In an optional embodiment, the above method may further include:

[0123] In the case where the target receipt data has been updated, determining at least one update parameter field based on at least one update target field in the updated target receipt data;

[0124] Determining an update custom format based on at least one update parameter field;

[0125] Based on at least one updated parameter field and an updated custom format, an updated target receipt template is obtained.

[0126] In a specific embodiment, at least one updated target field can be at least one target field updated by the updated target receipt data compared to the target receipt data. Accordingly, at least one updated parameter field corresponds to at least one updated target field. At least one updated parameter field can be updated by Figure 3 The field configuration page is configured.

[0127] In a specific embodiment, the updated custom format may be a custom format obtained by updating the custom format based on at least one update parameter field. Accordingly, the custom format may be updated through a rich text editor.

[0128] In a specific embodiment, based on at least one updated parameter field and an updated custom format, at least one target parameter field and a custom format in the target receipt template may be updated to obtain an updated target receipt template.

[0129] In the above embodiment, through the field configuration page and the rich text editor, when the target receipt data has been updated, at least one target parameter and a custom format can be updated, and then the target receipt template can be updated. When the target receipt data changes, there is no need to perform complex code modifications or redesign the entire target receipt template, so that the template can be quickly adjusted, so that the target receipt template can keep up with business changes in a timely manner, thereby improving the adaptability and practicality of the receipt template configuration system and ensuring the timeliness and accuracy of electronic receipts.

[0130] It can be seen from the technical solutions provided in the above embodiments of this specification that this specification receives an electronic receipt generation request for a target business from a target account, obtains the target receipt data corresponding to the target account, the target receipt template identifier corresponding to the target business, and the target signature identifier corresponding to the target account, the target receipt data includes at least one target field value corresponding to each target field, and can obtain the target receipt template corresponding to the target receipt template identifier and the target receipt signature corresponding to the target signature identifier based on the target receipt template identifier and the target signature identifier, wherein the target receipt template is generated based on at least one target parameter field, a signature placeholder, and a custom format, at least one target parameter field is configured based on at least one preset parameter field, and the custom format is obtained through custom editing, which can meet the customized needs of different merchants for receipt templates, improve the adaptability and extensibility of receipt templates, and generate a target electronic receipt based on the target field value, target receipt signature, and target receipt template corresponding to at least one target field, which can realize automatic replacement of receipt template elements, simplify the operation process, reduce the complexity and instability of the system, and improve the overall generation efficiency of electronic receipts.

[0131] Fig. 9 is a block diagram of an electronic receipt generation device according to an exemplary embodiment. Fig. 9 , the device comprises:

[0132] The first acquisition module 910 is used to receive a request for generating an electronic receipt for a target business from a target account, and acquire target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account; the target receipt data includes a target field value corresponding to at least one target field;

[0133] The second acquisition module 930 is used to acquire a target receipt template corresponding to a target receipt template identifier and a target receipt signature corresponding to a target signature identifier; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a custom format; at least one target parameter field is configured based on at least one preset parameter field, and at least one target field corresponds to at least one target parameter field; the target receipt signature is generated based on the acquired signature parameters of the target account, and the target receipt signature corresponds to the signature placeholder; the custom format is obtained through custom editing;

[0134] The target electronic receipt generating module 950 is used to generate a target electronic receipt based on the target field value corresponding to at least one target field, the target receipt signature and the target receipt template.

[0135] In an optional embodiment, the above device further includes:

[0136] A custom format editing module, used to respond to a template format editing instruction for a target business and edit the custom format through a rich text editor;

[0137] A signature placeholder creation module, used to create a signature placeholder through a rich text editor in response to a signature placeholder creation instruction;

[0138] A third acquisition module, configured to acquire at least one target parameter field in response to a receipt template creation instruction;

[0139] The target receipt template generation module is used to generate a target receipt template based on a custom format and at least one target parameter field.

[0140] In an optional embodiment, the above device further includes:

[0141] The first determination module is used to receive a field configuration request for a field configuration page, and determine at least one target parameter field from at least one preset parameter field in the field configuration page.

[0142] In an optional embodiment, the above device further includes:

[0143] The signature parameter acquisition module is used to receive the signature configuration request for the target business and obtain the signature parameters corresponding to the target account;

[0144] The target receipt signature generation module is used to generate the target receipt signature based on the signature parameters.

[0145] In an optional embodiment, when the target receipt data includes multiple target field value groups, any target field value group corresponds to at least one target parameter field; the target electronic receipt generation module 950 includes:

[0146] A sub-electronic receipt generating unit, used to generate a sub-electronic receipt corresponding to each target field value group based on each target field value group, the target receipt signature and the target receipt template;

[0147] The target electronic receipt generating unit is used to generate a target electronic receipt based on the sub-electronic receipts corresponding to the multiple target field value groups.

[0148] In an optional embodiment, the target electronic receipt generation module 950 includes:

[0149] A preset generating unit, configured to generate an electronic receipt in a preset format based on a target field value, a target receipt signature and a target receipt template respectively corresponding to at least one target field;

[0150] The target generation unit is used to convert the format of the electronic receipt in a preset format to generate a target electronic receipt; the target electronic receipt is an electronic receipt in a target format.

[0151] In an optional embodiment, the above device further includes:

[0152] A second determination module is used to determine at least one update parameter field based on at least one update target field in the updated target receipt data when the target receipt data has been updated;

[0153] An update format determination module, configured to determine an update custom format based on at least one update parameter field;

[0154] The target receipt template updating module is used to obtain an updated target receipt template based on at least one updated parameter field and an updated custom format.

[0155] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0156] Fig.10 is a block diagram of an electronic device for generating an electronic receipt according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig.10As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an electronic receipt generation method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0157] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In an exemplary embodiment, an electronic device is also provided, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is used to execute the instructions to implement the electronic receipt generation method as in the embodiment of the present disclosure.

[0159] In an exemplary embodiment, a computer-readable storage medium is also provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the electronic receipt generation method in the embodiment of the present disclosure.

[0160] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0161] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for generating an electronic receipt, characterized in that: The method comprises: Receive a request for generating an electronic receipt for a target business from a target account, and obtain target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account; the target receipt data includes a target field value corresponding to at least one target field; A target receipt template corresponding to the target receipt template identifier and a target receipt signature corresponding to the target signature identifier are obtained; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a custom format; the at least one target parameter field is configured based on at least one preset parameter field, and the at least one target field corresponds to the at least one target parameter field; the target receipt signature is generated based on the acquired signature parameters of the target account, and the target receipt signature corresponds to the signature placeholder; the custom format is obtained through custom editing; A target electronic receipt is generated based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template.

2. The method for generating an electronic receipt according to claim 1, characterized in that: The method further comprises: In response to a template format editing instruction for the target business, editing the customized format through a rich text editor; In response to the signature placeholder creation instruction, creating the signature placeholder by using the rich text editor; In response to the receipt template creation instruction, obtaining the at least one target parameter field; The target receipt template is generated based on the custom format and the at least one target parameter field.

3. The method for generating an electronic receipt according to claim 2, characterized in that: The method further comprises: A field configuration request for the field configuration page is received, and the at least one target parameter field is determined from at least one preset parameter field in the field configuration page.

4. The method for generating an electronic receipt according to claim 1, characterized in that: The method further comprises: Receive a signature configuration request for the target business, and obtain signature parameters corresponding to the target account; Based on the signature parameters, the target receipt signature is generated.

5. The method for generating an electronic receipt according to claim 1, characterized in that: When the target receipt data includes multiple target field value groups, any one of the target field value groups corresponds to the at least one target parameter field; The generating the target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template comprises: Based on each target field value group, the target receipt signature and the target receipt template, generating a sub-electronic receipt corresponding to each target field value group; The target electronic receipt is generated based on the sub-electronic receipts corresponding to the multiple target field value groups.

6. The method for generating an electronic receipt according to claim 1, characterized in that: The generating the target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template comprises: Generate an electronic receipt in a preset format based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template; The electronic receipt in the preset format is format-converted to generate a target electronic receipt; the target electronic receipt is an electronic receipt in the target format.

7. The method for generating an electronic receipt according to claim 1, characterized in that: The method further comprises: In the case where the target receipt data has been updated, determining at least one update parameter field based on at least one update target field in the updated target receipt data; Determining an update custom format based on the at least one update parameter field; Based on the at least one updated parameter field and the updated custom format, an updated target receipt template is obtained.

8. An electronic receipt generating device, characterized in that: The device comprises: A first acquisition module is used to receive a target account's electronic receipt generation request for a target business, and acquire target receipt data corresponding to the target account, a target receipt template identifier corresponding to the target business, and a target signature identifier corresponding to the target account; the target receipt data includes a target field value corresponding to at least one target field; The second acquisition module is used to acquire the target receipt template corresponding to the target receipt template identifier and the target receipt signature corresponding to the target signature identifier; the target receipt template is generated based on at least one target parameter field, a signature placeholder and a custom format; the at least one target parameter field is configured based on at least one preset parameter field, and the at least one target field corresponds to the at least one target parameter field; the target receipt signature is generated based on the acquired signature parameters of the target account, and the target receipt signature corresponds to the signature placeholder; the custom format is obtained by custom editing; The target electronic receipt generation module is used to generate a target electronic receipt based on the target field value corresponding to each of the at least one target field, the target receipt signature and the target receipt template.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to execute the instructions to implement the electronic receipt generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the electronic receipt generating method as described in any one of claims 1 to 7.