CN117151046A - Business text generation method and device, electronic equipment and storage medium - Google Patents

Business text generation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117151046A
CN117151046A CN202311100647.7A CN202311100647A CN117151046A CN 117151046 A CN117151046 A CN 117151046A CN 202311100647 A CN202311100647 A CN 202311100647A CN 117151046 A CN117151046 A CN 117151046A
Authority
CN
China
Prior art keywords
text
template
target
field
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311100647.7A
Other languages
Chinese (zh)
Inventor
陈文森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202311100647.7A priority Critical patent/CN117151046A/en
Publication of CN117151046A publication Critical patent/CN117151046A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Machine Translation (AREA)

Abstract

The disclosure provides a service text generation method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: determining a service field related to a target service according to text demand information of the target service, wherein the text demand information is used for describing service text content required by the target service, generating a universal field text according to the related service field, generating a target text template corresponding to the target service according to the text demand information and the universal field text, and generating a service text of the target service according to the text demand information and the target text template. According to the method and the device, the text template editing of the conversation can be realized based on the rich text editor, the selection and the insertion of the business field are supported, the flexibility of the generation of the conversation text is effectively improved, and the business formatting expression definition corresponding to the business field is generated, so that the one-stop configuration of the business conversation template required by the business is realized.

Description

Business text generation method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and in particular, to a business text generation method, a device, an electronic device and a storage medium.
Background
Currently, with the development of economy and large retail credit businesses, the asset quality management and control work of the large retail credit businesses is under great pressure, the situation of collection is severe, differentiated speech collection needs to be carried out for clients facing different situations, and the economy situation is continuously changing, so that a text template for generating speech texts needs to be quickly responded and modified.
In the related technology, the modification of the conversation template generally requires the steps of cooperation of service and technology, testing, online and the like, which is time-consuming and labor-consuming, often meets the requirements, and the environment faced by the actual service is changed, so that the timeliness of the template modification is poor.
In this way, the timeliness of the modification of the speaking template is poor, which can influence the normal operation of the prompting and receiving service and influence the normal development of the service.
Disclosure of Invention
The present disclosure aims to solve, at least to some extent, one of the technical problems in the related art.
To this end, the present disclosure aims to propose a business text generation method, an apparatus, an electronic device, a storage medium and a computer program product.
An embodiment of a first aspect of the present disclosure provides a service text generating method, including: determining a service field related to a target service according to text demand information of the target service, wherein the text demand information is used for describing service text content required by the target service; generating a general field text according to the related service field; generating a target text template corresponding to the target service according to the text demand information and the universal field text; and generating a service text of the target service according to the text demand information and the target text template.
An embodiment of a second aspect of the present disclosure provides a service text generating device, including: the determining module is used for determining a service field related to the target service according to text demand information of the target service, wherein the text demand information is used for describing service text contents required by the target service; the first generation module is used for generating a general field text according to the related service field; the second generation module is used for generating a target text template corresponding to the target service according to the text demand information and the universal field text; and the third generation module is used for generating the business text of the target business according to the text demand information and the target text template.
An embodiment of a third aspect of the present disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the program to implement a service text generating method as set forth in the embodiment of the first aspect of the present disclosure.
An embodiment of a fourth aspect of the present disclosure proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a business text generation method as proposed by an embodiment of the first aspect of the present disclosure.
An embodiment of a fifth aspect of the present disclosure proposes a computer program product which, when executed by a processor, performs a business text generation method as proposed by an embodiment of the first aspect of the present disclosure.
The business text generation method, the device, the electronic equipment, the storage medium and the computer program product provided by the disclosure at least comprise the following beneficial effects: according to the text demand information of the target service, a service field related to the target service is determined, wherein the text demand information is used for describing service text content required by the target service, a general field text is generated according to the related service field, a target text template corresponding to the target service is generated according to the text demand information and the general field text, the service text of the target service is generated according to the text demand information and the target text template, the editing of a speech text template can be realized based on a rich text editor, the selection and the insertion of the service field are supported, the flexibility of speech text generation is effectively improved, and a service formatting expression definition corresponding to the service field is generated, so that the autonomous editing, testing and one-stop configuration of the speech template required by the service is realized.
Additional aspects and advantages of the disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the disclosure.
Drawings
The foregoing and/or additional aspects and advantages of the present disclosure will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of a business text generation method according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a speech text generation function of a business system in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a flow of speech text generation in an embodiment of the present disclosure;
fig. 4 is a flowchart of a business text generation method according to another embodiment of the present disclosure;
fig. 5 is a flowchart of a business text generation method according to another embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a service text generating device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a service text generating device according to another embodiment of the present disclosure;
fig. 8 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present disclosure and are not to be construed as limiting the present disclosure. On the contrary, the embodiments of the disclosure include all alternatives, modifications, and equivalents as may be included within the spirit and scope of the appended claims.
Fig. 1 is a flow chart illustrating a business text generation method according to an embodiment of the present disclosure.
It should be noted that, the execution body of the service text generating method in this embodiment is a service text generating device, which may be implemented in software and/or hardware, and the device may be configured in an electronic device, which is not limited thereto.
As shown in fig. 1, the service text generation method includes:
the business text generation method in the embodiment of the disclosure can be applied to the field of conversation-prompting text generation, and a conversation-prompting text template corresponding to the conversation-prompting text is generated to generate the required conversation-prompting text, or can be applied to any application scene in which related business texts need to be generated according to the template, and is not limited.
S101: and determining a service field related to the target service according to the text demand information of the target service, wherein the text demand information is used for describing the service text content required by the target service.
The target service is a credit service for generating a corresponding prompting short message template and prompting short message text by carrying out demand analysis on the target service.
The text requirement information is requirement information for describing the content of the conversation-prompting operation required by the target service, and a conversation field of the target service can be extracted from the text requirement information.
The related business fields refer to text fields possibly used in the credit-receiving text, and the related business fields can be the expiration date, credit balance, expiration amount, repayment date and the like in the credit-receiving field, or any business field related to the credit-receiving field, and are not limited.
In the embodiment of the disclosure, when determining the service field related to the target service according to the text demand information of the target service, the demand information of the required call-in content of the target service may be first obtained as the text demand information, and then the text demand information may be subjected to service attribute abstraction processing, that is, the service attribute possibly used for filling the call in the service field of the target service is abstracted, for example, the expiration date, credit balance, expiration amount, repayment date and the like of the credit call-in field, the abstracted service attribute is taken as the service field related to the target service, the extraction work of the service field related to the target service may be completed by inputting the text demand information at the front end of the service system, and the abstracted related service field and the corresponding back-end data source field are bound.
S102: and generating universal field text according to the related service fields.
The embodiment of the disclosure determines the service field related to the target service according to the text demand information of the target service, and then generates the universal field text according to the related service field.
The general field text refers to a general field text expression corresponding to the relevant service field, for example, the general field text of the date field may be: yyyy year, month M, day d.
In the embodiment of the disclosure, when generating a general field text according to a related service field, a rich text editor can be expanded on a service system, an insert service attribute button can be added in the rich text editor, a dialog box can be popped up after clicking, a service attribute field to be selected can be displayed in the dialog box, a service field related to a target service is selected from the service attribute fields to be selected displayed in the dialog box, the service attribute type (such as date, text and amount) of the service field related to the target service is defined in the dialog box, a formatting expression (such as yyyy year M month d day of a date field) corresponding to the related service field is determined according to formatting expressions corresponding to different service attribute types, and the formatting expression corresponding to the related service field is used as the general field text.
S103: and generating a target text template corresponding to the target service according to the text demand information and the universal field text.
The target text template refers to a text filling template into which specific field contents can be filled to generate a final aphrodisiac text.
The method and the device are implemented to determine the service field related to the target service according to the text demand information of the target service, and generate the universal field text according to the related service field, and then generate the target text template corresponding to the target service according to the text demand information and the universal field text.
In the embodiment of the disclosure, when generating the target text template corresponding to the target service according to the text demand information and the universal field text, the universal text template of the target service can be obtained according to the text demand information, the universal text template is a speaking text template which can be used for most of the target service, the universal text template does not contain specific field text, then the universal field text can be inserted into the obtained universal speaking template to obtain the initial text template of the target service, wherein the processing flow is performed in the front end interface of the service system, the inserting process of the universal field text is to process a hypertext editing language (Hyper Text Markup Language, HTML) inserting command for calling a rich text editor in a service system, the text template obtained after processing is an initial text template, the initial text template can be saved back to a database, the template content of the initial text template can be analyzed during saving, the HTML mark is removed, the restoring template is a text template of the freemaker language, for example, the universal field text "yyyy year, mmonth and d day" of the date field can be restored to $ { repayDatesting ("yyyy year, mmonth and d day") }, and the service text template subjected to language restoring conversion processing at the moment can be a target text template corresponding to a target service.
S104: and generating a service text of the target service according to the text demand information and the target text template.
According to the embodiment of the disclosure, after the target text template corresponding to the target service is generated according to the text demand information and the universal field text, the service text of the target service can be generated according to the text demand information and the target text template.
In the embodiment of the disclosure, when generating the business text of the target business according to the text demand information and the target text template, the target text template can be subjected to analysis processing to analyze and obtain the business attribute variable in the target text template, then the specific field content to be filled in the target text template is extracted from the text demand information, the specific field content is correspondingly input and filled in the business attribute variable obtained by analysis in the target text template, real-time rendering processing is performed to generate the rendered real-time conversation content text, and the real-time conversation content text is used as the business text of the target business.
For example, as shown in fig. 2, fig. 2 is a schematic diagram of a speech text generating function module of a service system in an embodiment of the disclosure, where the speech text generating function module includes: the system comprises a service definition module, a template verification module and a template application module, wherein the service definition module is used for abstracting and generating a conversation field corresponding to a target service according to text demand information of the target service, the template customization module is used for editing and generating a target text template corresponding to the target service, the template verification module is used for carrying out test processing before formal application of the target text template, the template application module is used for carrying out content filling on the target text template to generate a corresponding service text, as shown in fig. 3, fig. 3 is a conversation text generation flow diagram in the embodiment of the disclosure, carrying out abstract definition on common service attribute variables possibly used in the conversation according to the service demand, binding to a background data source field, customizing HTML attribute data-property, recording a formatting expression of the bound data source field data-format, realizing template content editing by adopting a rich text editor, simultaneously carrying out selection and insertion of the service field and service formatting expression definition on the target text template, and carrying out corresponding conversation text generation on the realization of a conversation language analysis and a conversation reader, and an automatic conversation editing algorithm configuration can be carried out on the realization from a template language reader to an effective test station.
In this embodiment, a service field related to a target service is determined according to text demand information of the target service, where the text demand information is used to describe service text content required by the target service, a general field text is generated according to the related service field, a target text template corresponding to the target service is generated according to the text demand information and the general field text, and the service text of the target service is generated according to the text demand information and the target text template, so that editing of a speech text template can be implemented based on a rich text editor, selection and insertion of service fields are supported, flexibility of speech text generation is effectively improved, and a service formatting expression definition corresponding to the service field is generated, thereby implementing autonomous editing, testing and one-stop configuration of the service demand speech template.
Fig. 4 is a flowchart of a business text generation method according to another embodiment of the present disclosure.
As shown in fig. 4, the service text generation method includes:
s401: and determining a service field related to the target service according to the text demand information of the target service, wherein the text demand information is used for describing the service text content required by the target service.
The specific description of S401 may be referred to the above embodiments, and will not be repeated here.
S402: candidate service fields matching the associated service field are obtained from the plurality of candidate service fields.
The candidate business fields refer to a plurality of business speech fields to be selected in a rich text editor stored in a business system.
In the embodiment of the disclosure, when candidate service fields matched with related service fields are obtained from a plurality of candidate service fields, an expansion process may be performed on a rich text editor in the service system, an insert service attribute button may be added in the rich text editor, a dialog box may be popped up after clicking, the dialog box includes a plurality of candidate service fields for selection, and candidate service fields matched with related service fields may be selected from the plurality of candidate service fields.
S403: the field type of the matching candidate service field is determined.
After the candidate service fields matched with the related service fields are obtained from the plurality of candidate service fields, the embodiment of the disclosure can determine the field types of the matched candidate service fields.
In the implementation of the present disclosure, when determining the field type of the matched candidate service field, the service system may define the field type of the matched candidate service field, for example, if the matched candidate service field corresponding to the target service is an expiration date, it may be determined that the matched candidate service field is a date field type, or if other matched candidate service fields are also an amount type, where different field types have corresponding different general field texts.
S404: and generating universal field text according to the field type.
After determining the field type of the matched candidate service field, the embodiment of the disclosure may generate a general field text according to the field type.
In the embodiment of the disclosure, the general field text is generated according to the field type, and the matching processing can be performed in the database storing various general field texts according to the field type, and the field text matched with the field type is selected as the required general field text.
In this embodiment, the candidate service fields matched with the relevant service fields are obtained from the plurality of candidate service fields, the field types of the matched candidate service fields are determined, and the universal field text is generated according to the field types, so that the selection of the conversation field can be realized by expanding the functions in the rich text editor, the universal field text corresponding to the conversation field is adaptively generated according to the field types of the selected conversation field, the quick and efficient conversation text template generation work is realized, and the visual effect of conversation text model generation is improved.
S405: and acquiring a universal text template matched with the text demand information.
The universal text template refers to a universal template which is universal in the service field corresponding to the target service and does not contain a specific service speaking field.
In the embodiment of the disclosure, when the universal text template matched with the text demand information is obtained, the service field to which the target service belongs can be determined according to the text demand information, and the universal text template which does not contain a concrete speaking field and is universal in the service field is obtained as the universal text template matched with the text demand information.
S406: and generating a target text template according to the universal text template and the universal field text.
After the universal field text is generated according to the field type and the universal text template matched with the text demand information is obtained, the embodiment of the disclosure can generate the target text template according to the universal text template and the universal field text.
In the embodiment of the disclosure, when the target text template is generated according to the universal text template and the universal field text, the universal field text can be inserted into the universal text template at an appropriate position so as to generate the target text template required by the target service.
In the embodiment, the target text template is generated according to the universal text template and the universal field text by acquiring the universal text template matched with the text demand information, so that the target text template can be generated efficiently by inserting the universal field text into the universal text template, and the generation efficiency of the speaking text template is improved effectively.
Optionally, in some embodiments, according to the general text template and the general field text, a target text template is generated, text position information of the general field text in the general text template can be determined, the general field text is inserted into the general text template according to the text position information to obtain an initial text template, and the initial text template is processed to obtain the target text template, so that the general field text can be inserted into a correct position of the general text template, and the accuracy of the target text template is ensured while the generation efficiency and flexibility of the target text are ensured.
Here, the text position information refers to position data information for describing an insertion position of the general field text in the general text, and the text position information may indicate, for example, that the general field text is inserted into the second row and the fifteenth column of the general speaking text.
In the embodiment of the disclosure, when generating a target text template according to a general text template and a general field text, the position coordinate information of the general field text inserted in the general text template can be determined, the position coordinate information is used as the text position information of the general field text in the general text template, then the general field text is inserted into the corresponding position of the general text template according to the text position information, the inserted text template is used as an initial text template, the initial text template at the moment is an HTML format text template, the initial text template needs to be processed, the HTML format initial text template is converted into a freemaker format text template, and the converted text template is used as the target text template.
Optionally, in some embodiments, processing the initial text template to obtain the target text template includes obtaining text template conversion information, where the text template conversion information is used to implement conversion processing between the initial text template and the target text template, and the target text template supports field content filling, and processing the initial text template according to the text template conversion information to obtain the target text template, so that the initial text template can be converted into the target text template supporting content filling on the service system based on the text template conversion information, and validity of the target text template is ensured.
The text template conversion information is used for realizing conversion processing between an initial text template and a target text template, can be a built-in conversion function of a service system, removes an HTML mark from the initial text template, restores the template to a freemaker language to obtain the target text template, enables the target text template to support the filling of the contents of a conversation field, and can restore the target text template from the freemaker language to the HTML language.
In the embodiment of the disclosure, when the initial text template is processed to obtain the target text template, text template conversion information can be obtained, and the text template conversion information can be a conversion function built in a service system and is used for realizing conversion processing between the initial text template and the target text template, processing the initial text template according to the text template conversion information, removing an HTML mark from the initial text template, and restoring the template to be a freemaker language to obtain the target text template, so that the target text template supports conversation field content filling to obtain the target text template.
S407: and generating a service text of the target service according to the text demand information and the target text template.
The specific description of S407 may be referred to the above embodiments, and will not be repeated here.
In this embodiment, a service field related to a target service is determined according to text demand information of the target service, where the text demand information is used to describe service text content required by the target service, a general field text is generated according to the related service field, a target text template corresponding to the target service is generated according to the text demand information and the general field text, and the service text of the target service is generated according to the text demand information and the target text template, so that editing of a speech text template can be implemented based on a rich text editor, selection and insertion of service fields are supported, flexibility of speech text generation is effectively improved, and a service formatting expression definition corresponding to the service field is generated, thereby implementing autonomous editing, testing and one-stop configuration of the service demand speech template.
Fig. 5 is a flowchart of a business text generating method according to another embodiment of the present disclosure.
As shown in fig. 5, the service text generation method includes:
S501: and determining a service field related to the target service according to the text demand information of the target service, wherein the text demand information is used for describing the service text content required by the target service.
S502: and generating universal field text according to the related service fields.
S503: and generating a target text template corresponding to the target service according to the text demand information and the universal field text.
The specific description of S501 and S503 may be referred to the above embodiments, and will not be repeated here.
S504: and acquiring field variables from the target text template.
Wherein, the field variable refers to a field filling variable into which actual specific field contents are to be filled to generate business text.
In the embodiment of the disclosure, when generating the business text of the target business according to the text demand information and the target text template, the target text template may be first parsed to obtain, as field variables, field filling variables in the target text template, into which actual specific field contents are to be filled to generate the business text.
S505: and acquiring a field to be filled from the text requirement information.
In the embodiment of the disclosure, the specific field content to be filled in actually can be obtained from the text requirement information, and the specific field content is used as the field to be filled in.
S506: and filling the field to be filled into the field variable to obtain the business text.
After the field variable is obtained from the target text template and the field to be filled is obtained from the text demand information, the embodiment of the disclosure can fill the field to be filled into the field variable to obtain the service text.
In this embodiment, a field variable is obtained from a target text template, a field to be filled is obtained from text demand information, and the field to be filled is filled into the field variable to obtain a service text, so that the target text template can be analyzed and content filling can be performed, the service text can be generated and released efficiently, and quick response release of the service text can be realized.
S507: and acquiring template updating information, wherein the template updating information is used for updating the target text template.
The template updating information is used for updating the target text template, and the template updating information can indicate a specific modification mode of the target text template when the target text needs to be edited and modified again.
In the embodiment of the disclosure, when the template updating information is acquired, a specific modification mode of the target text template when the target text needs to be edited and modified again can be acquired, and the specific modification mode is used for generating the corresponding template updating information so as to realize that the target text template is updated according to the template updating information.
S508: and updating the target text template according to the template updating information and the text template conversion information to obtain an updated text template.
After the template updating information is obtained, the embodiment of the disclosure can update the target text template according to the template updating information and the text template conversion information to obtain an updated text template.
In the embodiment of the disclosure, when the target text template is updated according to the template updating information and the text template conversion information to obtain an updated text template, the target text template can be restored to an editable text template according to the template updating information, the editable text template is edited and updated according to the template updating information, and the text template after the editing and updating is converted to a text template capable of being filled with actual fields according to the text template conversion information, so that the re-editing processing of the target text template is completed, and the updated text template is obtained.
In this embodiment, the template update information is obtained, and the target text template is updated according to the template update information and the text template conversion information, so as to obtain an updated text template, thereby realizing rapid response modification when the target text template needs to be edited and updated again, ensuring the real-time performance of the text modification during speech operation, and further ensuring that the text template meets the service requirement of the target service.
Optionally, in some embodiments, the target text template is updated according to the template updating information and the text template conversion information to obtain an updated text template, the target text template can be converted into an initial text template according to the text template conversion information, the initial text template is updated according to the template updating information to obtain a processed text template, and the processed text template is converted according to the text template conversion information to obtain an updated text template, so that the target text template can be updated in real time according to the template updating information and the text template conversion information, flexibility of speech operation template generation and modification is ensured, and quick response to speech operation text requirements of a target service is realized.
In the implementation of the disclosure, when the target text template is updated according to the template updating information and the text template conversion information to obtain the updated text template, since the target text template is the text template converted into the freemaker language version, the target text template cannot be directly edited at this time, the target text template can be converted into the initial text template according to the text template conversion information, the target text template can be restored into the HTML language format according to the text template conversion information, then the initial text template can be updated according to the template updating information, the initial text template can be edited and modified according to the specific modification mode of the target text template indicated in the template updating information to obtain the processed text template, then the processed text template can be converted according to the text template conversion information to obtain the updated text template, and the text template after modification processing can be converted into the text template in the freemaker language format according to the text template conversion information.
In the implementation of the disclosure, in order to solve the technical problem of poor timeliness of template modification in the related art, a full-automatic one-stop configuration method for realizing a conversation template based on a rich text editor and a custom HTML attribute method is provided, so that business personnel can customize, test and rapidly release the conversation template independently, and a specific processing flow comprises: abstract business attributes, namely abstract business attributes possibly used for filling a conversation in the business field, define binding with a back-end data source field, such as expiration date, credit balance, expiration amount, repayment date and the like in the credit collection field, expand a rich text editor in a business system, add an insert business attribute button, click a popup dialog box, select a business attribute field, define business attribute types (date, text and amount), define a business attribute formatting expression (such as yyyy year Mmonth d day of the date field), generate an HTML fragment for selecting the inserted business attributes, call an HTML insert command of the rich text editor, insert the corresponding business attributes, circulate a business attribute insert process until the template meets business requirements, at this time, the template can be saved back to the database, the content of the template can be analyzed during the saving, the HTML mark is removed, the template is restored to be the freemaker language, the conversation template can be verified, the business attribute variable in the template can be analyzed at this time for the operator to input, the real conversation content after rendering is generated in real time after the input is completed, if the conversation template is edited, the simulated operation is performed, namely, the freemaker template is analyzed, restored to be an HTML fragment and displayed to a rich text editing box for the business personnel to modify, at this time, the modification steps are repeated, so that the editing obtained by the conversation template can be obtained, the verification can be performed in real time, the purposes of saving and warehousing are achieved immediately, and the quick release can be achieved.
In this embodiment, a service field related to a target service is determined according to text demand information of the target service, where the text demand information is used to describe service text content required by the target service, a general field text is generated according to the related service field, a target text template corresponding to the target service is generated according to the text demand information and the general field text, and the service text of the target service is generated according to the text demand information and the target text template, so that editing of a speech text template can be implemented based on a rich text editor, selection and insertion of service fields are supported, flexibility of speech text generation is effectively improved, and a service formatting expression definition corresponding to the service field is generated, thereby implementing autonomous editing, testing and one-stop configuration of the service demand speech template.
Fig. 6 is a flowchart of a business text generating method according to an embodiment of the present disclosure.
As shown in fig. 6, the service text generation method includes:
a determining module 601, configured to determine a service field related to a target service according to text requirement information of the target service, where the text requirement information is used to describe service text content required by the target service;
A first generating module 602, configured to generate a general field text according to the related service field;
a second generating module 603, configured to generate a target text template corresponding to the target service according to the text requirement information and the universal field text;
and a third generating module 604, configured to generate a service text of the target service according to the text requirement information and the target text template.
In some embodiments of the present disclosure, the first generating module 602 is specifically configured to:
acquiring candidate service fields matched with the related service fields from a plurality of candidate service fields;
determining the field type of the matched candidate service field;
and generating universal field text according to the field type.
In some embodiments of the present disclosure, the second generating module 603 is specifically configured to:
acquiring a universal text template matched with the text demand information;
and generating a target text template according to the universal text template and the universal field text.
In some embodiments of the present disclosure, the second generating module 603 is further configured to:
determining text position information of the universal field text in a universal text template;
inserting the universal field text into a universal text template according to the text position information to obtain an initial text template;
The initial text template is processed to obtain a target text template.
In some embodiments of the present disclosure, the second generating module 603 is further configured to:
acquiring text template conversion information, wherein the text template conversion information is used for realizing conversion processing between an initial text template and a target text template, and the target text template supports field content filling;
and processing the initial text template according to the text template conversion information to obtain the target text template.
In some embodiments of the present disclosure, the third generating module 604 is specifically configured to:
acquiring field variables from a target text template;
acquiring a field to be filled from the text demand information;
and filling the field to be filled into the field variable to obtain the business text.
In some embodiments of the present disclosure, as shown in fig. 7, fig. 7 is a schematic structural diagram of a service text generating apparatus according to another embodiment of the present disclosure, where the apparatus further includes:
the obtaining module 605 is configured to obtain template update information, where the template update information is used to update the target text template;
and the processing module 606 is configured to update the target text template according to the template update information and the text template conversion information, so as to obtain an updated text template.
In some embodiments of the present disclosure, the processing module 606 is specifically configured to:
converting the target text template into an initial text template according to the text template conversion information;
updating the initial text template according to the template updating information to obtain a processed text template;
and converting the processed text template according to the text template conversion information to obtain an updated text template.
Corresponding to the service text generation method provided by the embodiments of fig. 1 to 5, the present disclosure further provides a service text generation device, and since the service text generation device provided by the embodiments of the present disclosure corresponds to the service text generation method provided by the embodiments of fig. 1 to 5, implementation of the service text generation method is also applicable to the service text generation device provided by the embodiments of the present disclosure, and detailed description thereof is omitted in the embodiments of the present disclosure.
In this embodiment, a service field related to a target service is determined according to text demand information of the target service, where the text demand information is used to describe service text content required by the target service, a general field text is generated according to the related service field, a target text template corresponding to the target service is generated according to the text demand information and the general field text, and the service text of the target service is generated according to the text demand information and the target text template, so that editing of a speech text template can be implemented based on a rich text editor, selection and insertion of service fields are supported, flexibility of speech text generation is effectively improved, and a service formatting expression definition corresponding to the service field is generated, thereby implementing autonomous editing, testing and one-stop configuration of the service demand speech template.
In order to implement the above-described embodiments, the present disclosure also proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a business text generation method as proposed in the foregoing embodiments of the present disclosure.
To achieve the above-mentioned embodiments, the present disclosure also proposes a computer program product which, when executed by an instruction processor in the computer program product, performs a business text generation method as proposed in the foregoing embodiments of the present disclosure.
Fig. 8 illustrates a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the present disclosure.
The electronic device 8 shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 8 is in the form of a general purpose computing device. Components of the electronic device 8 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that connects the various system components, including the memory 28 and the processing unit 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include industry Standard architecture (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Electronic device 8 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 8 and includes both volatile and non-volatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 30 and/or cache memory 32. The electronic device 8 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive").
Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter DVD-ROM), or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the various embodiments of the disclosure.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods in the embodiments described in this disclosure.
The electronic device 8 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a person to interact with the electronic device 8, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 8 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 8 may communicate with one or more networks, such as a local area network (Local Area Network; hereinafter: LAN), a wide area network (Wide Area Network; hereinafter: WAN) and/or a public network, such as the Internet, via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 8 over the bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 8, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and parameter information determination by running a program stored in the memory 28, for example, implementing the business text generation method mentioned in the foregoing embodiment.
It should be noted that in the description of the present disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present disclosure, unless otherwise indicated, the meaning of "a plurality" is two or more.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present disclosure in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present disclosure.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
Furthermore, each functional unit in the embodiments of the present disclosure may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present disclosure have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the present disclosure, and that variations, modifications, alternatives, and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the present disclosure.

Claims (19)

1. A business text generation method, comprising:
determining a service field related to a target service according to text demand information of the target service, wherein the text demand information is used for describing service text content required by the target service;
generating a general field text according to the related service field;
generating a target text template corresponding to the target service according to the text demand information and the universal field text;
and generating service text of the target service according to the text demand information and the target text template.
2. The method of claim 1, wherein generating universal field text from the related service fields comprises:
acquiring candidate service fields matched with the related service fields from a plurality of candidate service fields;
Determining the field type of the matched candidate service field;
and generating the universal field text according to the field type.
3. The method of claim 1, wherein the generating a target text template corresponding to the target service according to the text demand information and the general field text comprises:
acquiring a universal text template matched with the text demand information;
and generating the target text template according to the universal text template and the universal field text.
4. The method of claim 3, wherein the generating the target text template from the generic text template and the generic field text comprises:
determining text position information of the universal field text in the universal text template;
inserting the universal field text into the universal text template according to the text position information to obtain an initial text template;
and processing the initial text template to obtain the target text template.
5. The method of claim 4, wherein the processing the initial text template to obtain the target text template comprises:
Acquiring text template conversion information, wherein the text template conversion information is used for realizing conversion processing between the initial text template and the target text template, and the target text template supports field content filling;
and processing the initial text template according to the text template conversion information to obtain the target text template.
6. The method of claim 1, wherein the generating the business text of the target business based on the text demand information and the target text template comprises:
acquiring field variables from the target text template;
acquiring a field to be filled from the text demand information;
and filling the field to be filled into the field variable to obtain the business text.
7. The method of claim 5, wherein the method further comprises:
template updating information is obtained, wherein the template updating information is used for updating the target text template;
and updating the target text template according to the template updating information and the text template conversion information to obtain an updated text template.
8. The method of claim 7, wherein updating the target text template according to the template update information and the text template conversion information to obtain an updated text template, comprises:
Converting the target text template into the initial text template according to the text template conversion information;
updating the initial text template according to the template updating information to obtain a processed text template;
and converting the processed text template according to the text template conversion information to obtain the updated text template.
9. A business text generation device, characterized by comprising:
the determining module is used for determining a service field related to a target service according to text demand information of the target service, wherein the text demand information is used for describing service text contents required by the target service;
the first generation module is used for generating a general field text according to the related service field;
the second generation module is used for generating a target text template corresponding to the target service according to the text demand information and the universal field text;
and the third generation module is used for generating the business text of the target business according to the text demand information and the target text template.
10. The apparatus of claim 9, wherein the first generation module is specifically configured to:
Acquiring candidate service fields matched with the related service fields from a plurality of candidate service fields;
determining the field type of the matched candidate service field;
and generating the universal field text according to the field type.
11. The apparatus of claim 9, wherein the second generating module is specifically configured to:
acquiring a universal text template matched with the text demand information;
and generating the target text template according to the universal text template and the universal field text.
12. The apparatus of claim 11, wherein the second generation module is further to:
determining text position information of the universal field text in the universal text template;
inserting the universal field text into the universal text template according to the text position information to obtain an initial text template;
and processing the initial text template to obtain the target text template.
13. The apparatus of claim 12, wherein the second generation module is further to:
acquiring text template conversion information, wherein the text template conversion information is used for realizing conversion processing between the initial text template and the target text template, and the target text template supports field content filling;
And processing the initial text template according to the text template conversion information to obtain the target text template.
14. The apparatus of claim 9, wherein the third generation module is specifically configured to:
acquiring field variables from the target text template;
acquiring a field to be filled from the text demand information;
and filling the field to be filled into the field variable to obtain the business text.
15. The apparatus of claim 13, wherein the apparatus further comprises:
the acquisition module is used for acquiring template updating information, wherein the template updating information is used for updating the target text template;
and the processing module is used for updating the target text template according to the template updating information and the text template conversion information to obtain an updated text template.
16. The apparatus of claim 15, wherein the processing module is specifically configured to:
converting the target text template into the initial text template according to the text template conversion information;
updating the initial text template according to the template updating information to obtain a processed text template;
And converting the processed text template according to the text template conversion information to obtain the updated text template.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium storing computer instructions, wherein the computer instructions are for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-8.
CN202311100647.7A 2023-08-29 2023-08-29 Business text generation method and device, electronic equipment and storage medium Pending CN117151046A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311100647.7A CN117151046A (en) 2023-08-29 2023-08-29 Business text generation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311100647.7A CN117151046A (en) 2023-08-29 2023-08-29 Business text generation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117151046A true CN117151046A (en) 2023-12-01

Family

ID=88905413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311100647.7A Pending CN117151046A (en) 2023-08-29 2023-08-29 Business text generation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117151046A (en)

Similar Documents

Publication Publication Date Title
CN101122899B (en) Report generation method and device
TWI416342B (en) Designating, setting, and discovering parameters for spreadsheet documents
US20030158969A1 (en) Authoring of media content and dissemination via an information technology network
US20050147946A1 (en) Automatic object generation and user interface identification
US20180189249A1 (en) Providing application based subtitle features for presentation
KR101331337B1 (en) Alternative graphics pipe
CN113505082B (en) Application program testing method and device
US8839251B2 (en) Automating sequential cross-application data transfer operations
JP2022041865A (en) Online working system for template-based excel documents
CN113590102A (en) Zero-code rapid software development method, system, medium and equipment
CN111782117A (en) Interface display method and device, storage medium and electronic device
KR101809460B1 (en) Client terminal device capable of pasting external content to a web document according to a style attribute supported by the web document editing tool and operating method thereof
US8024158B2 (en) Management system and management method of CAD data used for a structural analysis
CN117151046A (en) Business text generation method and device, electronic equipment and storage medium
CN108536715B (en) Preview page generation method, device, equipment and storage medium
CN113296759B (en) User interface processing method, user interface processing system, device and storage medium
Bocevska et al. An example of application design using solidworks application programming interface
KR102282159B1 (en) Multilingual manual authoring apparatus based on XML and method thereof
CN113704650A (en) Information display method, device, system, equipment and storage medium
JP2003006001A (en) Test device of job processing software
KR100400360B1 (en) System for automatic generating program products and method thereof
EP1014262A2 (en) Localization of software products
JP6827610B1 (en) Development support equipment, programs and development support methods
JPH0773030A (en) Dynamic model design support method
JP2007094453A (en) Program development support system, program development support method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination