A method, device, electronic device and storage medium for generating a certificate

By acquiring business information and processing the relationship between services, and generating flexible electronic vouchers, the problem of low efficiency in adjusting electronic voucher templates in the prior art is solved, and the flexibility and efficiency of voucher generation are improved.

CN112906364BActive Publication Date: 2024-11-08CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110326675.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2024-11-08
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

Existing electronic vouchers only set up fixed voucher templates for single services. Once the business changes or the business is combined, the entire voucher template needs to be adjusted, reducing the flexibility and efficiency of voucher generation.

Method used

By responding to user selection operations, obtaining business information, determining credential element information, and generating credential content to be parsed based on credential element information and preset label rules, using preset content analysis method to obtain credential text content, generate business credentials, and support business The processing of inter-related relationships improves the flexibility and efficiency of voucher generation.

Benefits of technology

It realizes flexible voucher generation under business changes and combinations, improves efficiency and avoids the reduction in efficiency caused by template adjustment in the original technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112906364B_ABST
    Figure CN112906364B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a voucher generation method, device, electronic device and storage medium, which relate to the field of automatic program design. The method comprises: in response to a user's selection operation, obtaining business information of at least one business, and determining voucher element information according to the business information; wherein the business information includes business type and business content; generating voucher content to be parsed according to the voucher element information and preset tag rules; obtaining voucher text content according to the voucher content to be parsed and the preset content parsing method, so as to generate a voucher for the business according to the voucher text content. By running the technical solution provided by the embodiment of the present invention, it is possible to solve the problem that the existing electronic voucher only sets a fixed voucher template for a single business, and once the business changes or a combination occurs between businesses, the entire voucher template needs to be adjusted, which reduces the flexibility and efficiency of voucher generation, thereby achieving the effect of improving the flexibility and efficiency of voucher generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of automatic programming, and in particular to a credential generation method, device, electronic device and storage medium. Background Art

[0002] When conducting business in banks and other scenarios, traditional paper vouchers such as paper copies, application forms, receipts, etc. are required. As time goes by, paper vouchers will show corresponding limitations. First, the paper cost is too high; second, the storage cost is high; third, subsequent search is difficult and consumes a lot of manpower and time.

[0003] In the prior art, paper vouchers are reduced by introducing electronic voucher technology. However, the existing electronic vouchers only set fixed voucher templates for single businesses. Once the business changes or a combination of businesses occurs, the entire voucher template needs to be adjusted, which reduces the flexibility and efficiency of voucher generation. Summary of the invention

[0004] The embodiments of the present invention provide a credential generation method, device, electronic device and storage medium to improve the flexibility and efficiency of credential generation.

[0005] In a first aspect, an embodiment of the present invention provides a method for generating a credential, the method comprising:

[0006] In response to a user's selection operation, obtaining business information of at least one business, and determining credential element information according to the business information; wherein the business information includes a business type and business content;

[0007] Generate the credential content to be parsed according to the credential element information and preset tag rules;

[0008] The voucher text content is obtained according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0009] In a second aspect, an embodiment of the present invention further provides a credential generation device, the device comprising:

[0010] A credential element information determination module, configured to obtain service information of at least one service in response to a user's selection operation, and determine credential element information according to the service information; wherein the service information includes a service type and service content;

[0011] A module for generating credential content to be parsed, used for generating credential content to be parsed according to the credential element information and preset tag rules;

[0012] The voucher text content obtaining module is used to obtain the voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] a storage device for storing one or more programs,

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the credential generation method as described above.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the credential generation method as described above.

[0018] The embodiment of the present invention obtains business information of at least one business in response to a user's selection operation, and determines voucher element information according to the business information; wherein the business information includes business type and business content; generates voucher content to be parsed according to the voucher element information and preset tag rules; obtains voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate a voucher for the business according to the voucher text content. The problem that the existing electronic voucher only sets a fixed voucher template for a single business, and once the business changes or a combination occurs between businesses, the entire voucher template needs to be adjusted, which reduces the flexibility and efficiency of voucher generation, is solved, and the flexibility and efficiency of voucher generation are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flowchart of a method for generating a certificate provided in Embodiment 1 of the present invention;

[0020] Figure 2 A flowchart of a method for generating a voucher provided in Embodiment 2 of the present invention;

[0021] Figure 3 A schematic diagram of the structure of a credential generation device provided in Embodiment 3 of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0024] Embodiment 1

[0025] Figure 1 This is a flow chart of a method for generating a certificate provided in the first embodiment of the present invention. This embodiment is applicable to the case of generating an electronic certificate. The method can be executed by the certificate generating device provided in the embodiment of the present invention. The device can be implemented by software and / or hardware. Figure 1 The credential generation method provided in this embodiment includes:

[0026] Step 110: In response to the user's selection operation, obtain business information of at least one business, and determine credential element information according to the business information; wherein the business information includes business type and business content.

[0027] The user can select the service for which the credential needs to be generated through a web page, an application, a WeChat public account, etc. According to the user's selection and the acquisition of the user information, the service information of at least one service selected by the user is obtained, wherein the acquisition of the user information can be directly extracted from the user information database or actively input by the user, which is not limited in this embodiment.

[0028] Business type refers to the specific classification of the business, such as credit card repayment, e-banking contract signing, etc. Business content refers to the content related to the business, such as user account, user name, etc.

[0029] The voucher element information is the information displayed in the voucher, which may include the element name and element content. For example, in the element Name: Ma Xiaoming, Name is the element name and Ma Xiaoming is the element content.

[0030] Determining the voucher element information according to the business information may be directly determining the voucher element corresponding to each business and the element content according to the business information. If the business type is greater than one, the repeated element content may be merged, deleted, etc., which is not limited in this embodiment.

[0031] In this embodiment, optionally, determining the credential element information according to the business information includes:

[0032] If the number of the business types is greater than one, determining whether there is an association relationship between the businesses according to the business types;

[0033] If so, the credential element information is determined according to the association relationship and the business content.

[0034] If the number of business types selected by the user is greater than one, it is determined whether there is a corresponding association relationship between the business types. For example, after combining business A and business B, a new business C is formed, or after combining business A and business B, a new business C is added. The association relationship can be uniformly adjusted at a specified position, and this embodiment does not limit this.

[0035] If so, the corresponding credential element information is determined based on the association relationship and business content.

[0036] With the continuous innovation of business, users' service experience requirements are constantly improving. The original single-business service mode has become a multi-business and combined business form. Once the user selects multiple businesses, if the original fixed voucher template is used, multiple separate electronic vouchers may be generated, and the association between businesses may be ignored, or because once a business changes, the fixed voucher template of multiple businesses associated with the business needs to be modified, resulting in reduced efficiency in voucher generation. By determining voucher element information based on the association between businesses and business content, the above problems can be solved and the flexibility and efficiency of voucher generation can be improved.

[0037] Step 120: Generate credential content to be parsed according to the credential element information and preset tag rules.

[0038] The preset labeling rules are labeling rules pre-specified for different credential element information and are used to determine the position of the credential element in the credential.

[0039] The credential content to be parsed is generated according to the credential element information and the preset label rules, wherein the credential content to be parsed is a credential content language description, and the credential content that can be viewed by the user is obtained by parsing the credential content to be parsed.

[0040] In this embodiment, optionally, generating the credential content to be parsed according to the credential element information and the preset tag rule includes:

[0041] The credential element tag information is determined according to the credential element information and the preset tag rule; wherein the credential element tag information includes: a credential element tag type and a credential element tag content.

[0042] The credential content to be parsed is generated according to the credential element tag information and the credential element information.

[0043] The credential element tag information is used to identify the position of the credential element in the credential, so as to facilitate typeset the credential content according to the tag information during subsequent parsing.

[0044] The credential element label type is the classification of label usage, and the credential element label content is the actual content of the label, such as symbol representation.

[0045] The credential content to be parsed is generated according to the credential element tag information and the credential element information, the credential element information is the content part of the credential content to be parsed, and the credential element tag information is the format part of the credential content to be parsed.

[0046] The credential content to be parsed is generated by using the credential element tag information and the credential element information, thereby improving the uniformity and parsability of the credential content to be parsed. When the credential changes, only the credential element tag information or the credential element information can be modified, avoiding the need to modify all related content, thereby improving the efficiency of credential generation.

[0047] In this embodiment, optionally, the credential element tag type includes: at least one of a layout tag, an element tag, a style tag, and a line break tag.

[0048] The layout tag is used to determine the layout of the credential elements, such as which elements are in the same row and which elements are in the same column; the element tag is used to determine which content is an element; the style tag is used to determine the indentation format of the element; and the line break tag is used to specify the line break position of the element.

[0049] In this embodiment, optionally, the format of the credential content to be parsed is a domain-specific language format.

[0050] In order to display each credential element in the designated area of ​​the credential, each element needs to be described according to a unified rule. By using the domain-specific language format to describe the credential content to be parsed, the uniformity of content description is achieved. And because the domain-specific language syntax is a subset of the hypertext markup language tag syntax, some tag syntax in the hypertext markup language tag syntax can be used directly. For example, the layout tag content can be a horizontal tag or a vertical tag; the element tag content can be ; The content of the style tag can be style; The content of the line break tag can be , which improves the compatibility of subsequent content parsing.

[0051] In this embodiment, optionally, after generating the credential content to be parsed according to the credential element information and the preset tag rule, the method further includes:

[0052] Preview content in a hypertext markup language format is generated according to the credential content to be parsed, so as to adjust the credential content to be parsed according to the preview content.

[0053] Since the domain-specific language syntax is a subset of the HTML tag syntax, the preview function of the HTML format can be used to browse the credential content directly through the preview function before parsing the credential content to be parsed. Due to the characteristics of the HTML tag syntax, the preview content is consistent with the content generated after parsing, so it can be used for relevant staff to preview the credential content in the internal system before generating the credential, so as to make timely corrections to the credential content to be parsed according to the preview content, so as to achieve one-time writing and multi-end reuse.

[0054] Step 130: Obtain the voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0055] The voucher text content is obtained according to the voucher content to be parsed and the preset content parsing method, that is, the voucher content to be parsed is parsed by the preset content parsing method to obtain the voucher text content in a fixed format. The voucher text content can be drawn as a whole in the designated area of ​​the voucher template to obtain the business voucher, so that when the text content needs to be changed, only the voucher text in the area is configured to complete the configuration process, avoiding the need to configure each individual text, thereby improving the efficiency of voucher configuration.

[0056] In this embodiment, optionally, obtaining the voucher text content according to the voucher content to be parsed and a preset content parsing method includes:

[0057] Obtaining tag content, credential element name and credential element content according to the credential content to be parsed and a preset content parsing method;

[0058] The credential text content is obtained according to the tag content, the credential element name and the credential element content.

[0059] The tag content is obtained according to the credential content to be parsed and the preset content parsing method. The tag content can be obtained by regular processing. The tag content can include one of the layout tag content, element tag content, style tag content and line break tag content. Exemplarily, the content contained in all tags in the credential content syntax to be parsed is obtained. Because the tr tag represents a row, a line break character '\n' is added after each tr content; different contents encapsulated by td tags are determined as different columns; different span tags are replaced with different spacing between credential elements to distinguish different credential elements; br tags are used for automatic indentation after line breaks; when tags cannot be matched, the illegal tags are deleted or replaced.

[0060] The credential element name and credential element content are obtained according to the credential content to be parsed and the preset content parsing method, and then the credential text content is obtained according to the element name obtained through the tag content and the element content display format, thereby improving the accuracy of obtaining the credential text content.

[0061] In this embodiment, optionally, generating the voucher for the service according to the voucher text content includes:

[0062] The voucher for the business is generated according to the voucher text content and the voucher system.

[0063] The voucher system can be used to synthesize the voucher text content with other fixed formats to generate the final voucher, such as adding watermarks, special headers, etc., which are not limited in this embodiment, thereby improving the aesthetics and formality of the voucher.

[0064] The technical solution provided in this embodiment obtains business information of at least one business in response to a user's selection operation, and determines credential element information based on the business information; wherein the business information includes a business type and a business content; generates credential content to be parsed based on the credential element information and preset tag rules; obtains credential text content based on the credential content to be parsed and a preset content parsing method, so as to generate a credential for the business based on the credential text content, thereby solving the problem that existing electronic credentials only set a fixed credential template for a single business, and once the business changes or a combination occurs between businesses, the entire credential template needs to be adjusted, which reduces the flexibility and efficiency of credential generation, thereby achieving the effect of improving the flexibility and efficiency of credential generation.

[0065] Embodiment 2

[0066] Figure 2 This is a flowchart of a credential generation method provided in Embodiment 2 of the present invention. This technical solution is to supplement the process after the credential text content is obtained according to the credential content to be parsed and the preset content parsing method. Compared with the above solution, this solution is specifically optimized to include: after the credential text content is obtained according to the credential content to be parsed and the preset content parsing method, the following is further included:

[0067] The text format of the voucher text content is determined according to the length of the voucher text content and the length of the region where the voucher text content is located. Specifically, the flowchart of the voucher generation method is as follows: Figure 2 As shown:

[0068] Step 210: In response to the user's selection operation, obtain business information of at least one business, and determine credential element information according to the business information; wherein the business information includes business type and business content.

[0069] Step 220: Generate credential content to be parsed according to the credential element information and preset tag rules.

[0070] Step 230: Obtain the voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0071] Step 240: Determine the text format of the voucher text content according to the length of the voucher text content and the area length of the area where the voucher text content is located.

[0072] The length of the voucher text content may be the length of a single line of voucher text content, and the region where the voucher text content is located may be a canvas in a hypertext markup language in the voucher, which is not limited in this embodiment. The region length is the length of the region where the voucher text content is located, and the text format of the voucher text content is determined according to the length of the voucher text content and the region length of the region where the voucher text content is located, such as whether to wrap and how to wrap.

[0073] In this embodiment, optionally, determining the text format of the voucher text content according to the length of the voucher text content and the length of the region where the voucher text content is located includes:

[0074] Determine whether there is a single-line text content in the voucher text content whose first content length is greater than the region length;

[0075] If yes, then obtain the text information of the single line of text content; wherein the text information includes: text name and text content;

[0076] The text format of the voucher text content is determined according to the text name and the text content.

[0077] It is determined whether there is a single-line text content in the voucher text content whose first content length is greater than the region length, wherein the single-line text content is a single-line content in the voucher text content, and the first content length of the single-line text content is obtained by performing a boundary check on the single-line text content. The region length can be preset, and this embodiment does not limit this.

[0078] If the first content length is greater than the region length, then the text information exceeding the single-line text content is obtained; wherein the text information includes: a text name and text content. For example, the text name is a customer account number, and the text content is the specific content of the account.

[0079] Determine the text format of the voucher text content based on the text name and text content, such as whether to wrap and how to wrap.

[0080] In this embodiment, optionally, determining the text format of the voucher text content according to the text name and the text content includes:

[0081] Determine the splitting range of the single-line text content according to the text name;

[0082] Split the single-line text content according to the split range to obtain split text content;

[0083] Obtaining the second content length of the split text content, and adding the second content lengths according to the order of the split text content to obtain a third content length;

[0084] If the third content length is greater than the region length, determining the target split text content according to the third content length;

[0085] The text content is split according to the target, and the text format of the voucher text content is determined.

[0086] Determine the split range of a single line of text content based on each text name, and split the text name and the text content corresponding to the text name as a whole to avoid line breaks.

[0087] Split the single-line text content according to the split range, obtain the split text content consisting of the text name and the text content corresponding to the text name, obtain the second content length of each split text content, and add the second content lengths according to the original order of the split text content in the single-line text content to obtain the third content length. Each time the second content length is added, the current third content length obtained can be compared with the region length. Once the current third content length is greater than the region length, the split text content corresponding to the last second content length that constitutes the third content length at this time is used as the target split text content.

[0088] The target split text content and the content after the target split text content are split out from the voucher text content as another line to determine the text format of the voucher text content, thereby improving the accuracy of the voucher text content splitting.

[0089] In this embodiment, optionally, splitting the text content according to the target and determining the text format of the voucher text content includes:

[0090] A line break is added before the target split text content to determine the text format of the voucher text content.

[0091] By adding a line break before the target split text content, the target split text content and the content after the target split text content are made into separate lines to determine the text format of the voucher text content, thereby improving the accuracy of the voucher text content splitting.

[0092] The embodiment of the present invention determines the text format of the voucher text content according to the length of the voucher text content and the area length of the area where the voucher text content is located, thereby solving the problem that due to the non-fixed text length in the voucher text content, the content that is smaller than the area length of the area where the voucher text content is located can be displayed normally, but the content that is larger than the area length of the area where the voucher text content is located may have disordered line breaks, thereby affecting the overall display of the entire voucher. The embodiment of the present invention achieves the effect of dynamically adjusting the text format of the voucher text content, thereby improving the aesthetics of the display of the voucher content.

[0093] Embodiment 3

[0094] Figure 3 This is a schematic diagram of the structure of a credential generation device provided in Embodiment 3 of the present invention. The device can be implemented by hardware and / or software, can execute a credential generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 3 As shown, the device comprises:

[0095] The credential element information determination module 310 is used to obtain business information of at least one business in response to a user's selection operation, and determine the credential element information according to the business information; wherein the business information includes a business type and business content;

[0096] The credential content to be parsed generating module 320 is used to generate the credential content to be parsed according to the credential element information and the preset tag rule;

[0097] The voucher text content obtaining module 330 is used to obtain the voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0098] The embodiment of the present invention obtains business information of at least one business in response to a user's selection operation, and determines voucher element information according to the business information; wherein the business information includes business type and business content; generates voucher content to be parsed according to the voucher element information and preset tag rules; obtains voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate a voucher for the business according to the voucher text content. The problem that the existing electronic voucher only sets a fixed voucher template for a single business, and once the business changes or a combination occurs between businesses, the entire voucher template needs to be adjusted, which reduces the flexibility and efficiency of voucher generation, is solved, and the flexibility and efficiency of voucher generation are improved.

[0099] On the basis of the above technical solutions, optionally, the credential element information determination module includes:

[0100] an association determination unit, configured to determine whether there is an association relationship between the services according to the service types if the service types are greater than one;

[0101] The credential element information determining unit is configured to determine the credential element information according to the association relationship and the business content if the association relationship determining unit determines that the credential element information exists.

[0102] On the basis of the above technical solutions, optionally, the module for generating the content of the credential to be parsed includes:

[0103] The credential element tag information determining unit is used to determine the credential element tag information according to the credential element information and the preset tag rule; wherein the credential element tag information includes: credential element tag type and credential element tag content.

[0104] The credential content to be parsed generating unit is used to generate the credential content to be parsed according to the credential element tag information and the credential element information.

[0105] On the basis of the above technical solutions, optionally, the type of the credential element tag includes at least one of a layout tag, an element tag, a style tag and a line break tag.

[0106] On the basis of the above technical solutions, optionally, the voucher text content obtaining module includes:

[0107] A name content obtaining unit, used to obtain the tag content, the credential element name and the credential element content according to the credential content to be parsed and a preset content parsing method;

[0108] The voucher text content obtaining unit is used to obtain the voucher text content according to the tag content, the voucher element name and the voucher element content.

[0109] On the basis of the above technical solutions, optionally, the device further includes:

[0110] The text format determination module is used to determine the text format of the voucher text content according to the length of the voucher text content and the area length of the area where the voucher text content is located after the voucher text content acquisition module obtains the voucher text content according to the voucher content to be parsed and the preset content parsing method.

[0111] Based on the above technical solutions, optionally, the text format determination module includes:

[0112] A length judgment submodule, used for judging whether there is a single-line text content in the voucher text content whose first content length is greater than the region length;

[0113] A text information acquisition submodule, used for acquiring text information of the single-line text content if the length judgment submodule judges that it is yes; wherein the text information includes: text name and text content;

[0114] The text format determination submodule is used to determine the text format of the voucher text content according to the text name and the text content.

[0115] Based on the above technical solutions, optionally, the text format determination submodule includes:

[0116] A split range determination unit, used to determine the split range of the single-line text content according to the text name;

[0117] A split text content obtaining unit, used for splitting the single line text content according to the split range to obtain split text content;

[0118] a content length acquisition unit, configured to acquire a second content length of the split text content, and add the second content lengths according to the order of the split text content to obtain a third content length;

[0119] a target split text content acquisition unit, configured to determine the target split text content according to the third content length if the third content length is greater than the region length;

[0120] The text format determination unit is used to split the text content according to the target and determine the text format of the voucher text content.

[0121] Based on the above technical solutions, optionally, the text format determination unit includes:

[0122] The text format determination subunit is used to add a line break before the target split text content to determine the text format of the voucher text content.

[0123] Based on the above technical solutions, optionally, the format of the credential content to be parsed is a domain-specific language format.

[0124] On the basis of the above technical solutions, optionally, the device further includes:

[0125] The preview content generation module is used to generate preview content in a hypertext markup language format according to the credential content to be parsed after the credential content generation module to be parsed, so as to adjust the credential content to be parsed according to the preview content.

[0126] On the basis of the above technical solutions, optionally, the voucher text content obtaining module includes:

[0127] The voucher generation module is used to generate the voucher for the business according to the voucher text content and the voucher system.

[0128] Embodiment 4

[0129] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the electronic device includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the electronic device can be one or more. Figure 4 A processor 40 is taken as an example; the processor 40, the memory 41, the input device 42 and the output device 43 in the electronic device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0130] The memory 41 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the credential generation method in the embodiment of the present invention. The processor 40 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 41, that is, implements the above-mentioned credential generation method.

[0131] The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] Embodiment 5

[0133] Embodiment 5 of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a credential generation method when executed by a computer processor, the method comprising:

[0134] In response to a user's selection operation, obtaining business information of at least one business, and determining credential element information according to the business information; wherein the business information includes a business type and business content;

[0135] Generate the credential content to be parsed according to the credential element information and preset label rules;

[0136] The voucher text content is obtained according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content.

[0137] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided in an embodiment of the present invention are not limited to the operations of the method described above, and can also execute related operations in the credential generation method provided in any embodiment of the present invention.

[0138] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0139] It is worth noting that in the embodiment of the above-mentioned credential generating device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0140] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for generating a voucher, characterized in that: include: In response to a user's selection operation, obtaining business information of at least one business, and determining credential element information according to the business information; wherein the business information includes a business type and business content; Generate the credential content to be parsed according to the credential element information and preset tag rules; Obtaining voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate a voucher for the business according to the voucher text content; Wherein, obtaining the voucher text content according to the voucher content to be parsed and a preset content parsing method includes: Obtaining tag content, credential element name, and credential element content according to the credential content to be parsed and the preset content parsing method; Obtain the credential text content according to the tag content, the credential element name and the credential element content; Wherein, after obtaining the voucher text content according to the voucher content to be parsed and the preset content parsing method, it also includes: Determine whether there is a single-line text content in the voucher text content whose first content length is greater than the region length; If yes, then obtain the text information of the single-line text content; wherein the text information includes: text name and text content; Determine the splitting range of the single-line text content according to the text name; Split the single-line text content according to the split range to obtain split text content; Obtaining the second content length of the split text content, and adding the second content lengths according to the order of the split text content to obtain a third content length; If the third content length is greater than the region length, determining the target split text content according to the third content length; The text content is split according to the target, and the text format of the voucher text content is determined.

2. The method according to claim 1, characterized in that The determining of credential element information according to the business information includes: If the number of the business types is greater than one, determining whether there is an association relationship between the businesses according to the business types; If so, the credential element information is determined according to the association relationship and the business content.

3. The method according to claim 1, characterized in that The step of generating the credential content to be parsed according to the credential element information and the preset tag rule includes: Determine the credential element tag information according to the credential element information and the preset tag rule; wherein the credential element tag information includes: the credential element tag type and the credential element tag content; The credential content to be parsed is generated according to the credential element tag information and the credential element information.

4. The method according to claim 3, characterized in that The types of credential element tags include: at least one of layout tags, element tags, style tags and line break tags.

5. The method according to claim 1, characterized in that The step of splitting the text content according to the target and determining the text format of the voucher text content includes: A line break is added before the target split text content to determine the text format of the voucher text content.

6. The method according to claim 1, characterized in that The format of the credential content to be parsed is a domain specific language format.

7. The method according to claim 6, characterized in that After generating the credential content to be parsed according to the credential element information and the preset tag rule, the method further includes: Preview content in a hypertext markup language format is generated according to the credential content to be parsed, so as to adjust the credential content to be parsed according to the preview content.

8. The method according to claim 1, characterized in that The step of generating the voucher for the service according to the voucher text content includes: The voucher for the business is generated according to the voucher text content and the voucher system.

9. A credential generating device, characterized in that: include: A credential element information determination module, configured to obtain service information of at least one service in response to a user's selection operation, and determine credential element information according to the service information; wherein the service information includes a service type and service content; A module for generating credential content to be parsed, used for generating credential content to be parsed according to the credential element information and preset tag rules; A voucher text content obtaining module, used to obtain the voucher text content according to the voucher content to be parsed and a preset content parsing method, so as to generate the voucher for the business according to the voucher text content; The voucher text content obtaining module includes: a name content obtaining unit, a voucher text content obtaining unit and a text format determining module; The name content obtaining unit is used to obtain the tag content, the credential element name and the credential element content according to the credential content to be parsed and the preset content parsing method; The voucher text content obtaining unit is used to obtain the voucher text content according to the tag content, the voucher element name and the voucher element content; The text format determination module includes: a length determination submodule, a text information acquisition submodule and a text format determination submodule; The length judgment submodule is used to judge whether there is a single-line text content in the voucher text content, and the first content length is greater than the region length; The text information acquisition submodule is used to acquire the text information of the single-line text content; wherein the text information includes: text name and text content; The text format determination submodule includes: a split range determination unit, a split text content acquisition unit, a content length acquisition unit, a target split text content acquisition unit and a text format determination unit; The split range determination unit is used to determine the split range of the single-line text content according to the text name; The split text content obtaining unit is used to split the single-line text content according to the split range to obtain the split text content; The content length acquisition unit is used to acquire the second content lengths of the split text contents, and add the second content lengths according to the order of the split text contents to obtain a third content length; The target split text content acquisition unit is used to determine the target split text content according to the third content length if the third content length is greater than the region length; The text format determination unit is used to determine the text format of the voucher text content according to the target split text content.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the credential generation method as described in any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the credential generation method as described in any one of claims 1 to 8 is implemented.