CN112307735A - Method, device and equipment for generating service text and storage medium - Google Patents
Method, device and equipment for generating service text and storage medium Download PDFInfo
- Publication number
- CN112307735A CN112307735A CN202011207400.1A CN202011207400A CN112307735A CN 112307735 A CN112307735 A CN 112307735A CN 202011207400 A CN202011207400 A CN 202011207400A CN 112307735 A CN112307735 A CN 112307735A
- Authority
- CN
- China
- Prior art keywords
- parameter
- parameter data
- calling
- service
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/3331—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/08—Insurance
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Data Mining & Analysis (AREA)
- Finance (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- General Business, Economics & Management (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the field of big data, and discloses a method, a device, equipment and a storage medium for generating a service text, which are used for improving the generation efficiency of the service text. The method for generating the service text comprises the following steps: acquiring a service parameter data set, and inputting the service parameter data set to a data calling end by adopting a general calling interface; in the data calling end, analyzing a preset generation rule to obtain a parameter calling request, wherein the parameter calling request is used for indicating target parameter data in a service parameter data set to be called; calling target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a reference calling function, a nested calling function and a simple query statement calling function; and inputting the target parameter data into a preset service text generation template to generate a target service text. The invention also relates to a block chain technology, and the service parameter data set can be stored in the block chain.
Description
Technical Field
The present invention relates to the field of big data, and in particular, to a method, an apparatus, a device, and a storage medium for generating a service text.
Background
Under the condition that a service text needs to be generated, such as an insurance policy or an express transportation policy, existing service parameters need to be filled in a preset template, and the existing service parameter adding mode is to fill the service parameters in the preset service text generating template by using a specific adding statement in a compiling language.
When the existing compiling language is used for filling the service parameters into the preset service text generation template, a large number of compiling languages are needed to compile parameter input sentences, the process of compiling the input sentences is complex, and redundant input sentences occupy a large amount of space, so that the generation efficiency of the service text is low.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for generating a service text, which are used for improving the generation efficiency of the service text.
The first aspect of the present invention provides a method for generating a service text, including: acquiring a service parameter data set, and inputting the service parameter data set to a data calling end by adopting a general calling interface; analyzing a preset generation rule in the data calling end to obtain a parameter calling request, wherein the parameter calling request is used for indicating that target parameter data in the service parameter data set need to be called; calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a reference calling function, a nested calling function and a simple query statement calling function; and inputting the target parameter data into a preset service text generation template to generate a target service text.
Optionally, in a first implementation manner of the first aspect of the present invention, the calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, where the preset configuration function at least includes a content calling function, a reference calling function, a nested calling function, and a simple query statement calling function, and includes: acquiring an attribute type corresponding to the parameter calling request; when the attribute type corresponding to the parameter calling request is a content attribute, calling first parameter data in the service parameter data set by using a content calling function; when the attribute type corresponding to the parameter calling request is a parameter entering attribute, calling second parameter data in the service parameter data set by using a parameter entering calling function; when the attribute type corresponding to the parameter calling request is a nested attribute, calling third parameter data in the service parameter data set based on a nested calling function; and when the attribute type corresponding to the parameter calling request is a query attribute, calling fourth parameter data in the service parameter data set through a simple query statement calling function, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
Optionally, in a second implementation manner of the first aspect of the present invention, when the attribute type corresponding to the parameter invocation request is a content attribute, invoking a first parameter data in the service parameter data set by using a content invocation function includes: when the attribute type corresponding to the parameter calling request is a content attribute, acquiring a preset calling name in a content calling function, searching a parameter name which is the same as the preset calling name in the service parameter data set, and determining the parameter data corresponding to the parameter name as screening parameter data; and acquiring a content key name in the content calling function, searching a parameter key name which is the same as the content key name in the screening parameter data, and taking service parameter value data corresponding to the parameter key name as first parameter data.
Optionally, in a third implementation manner of the first aspect of the present invention, when the attribute type corresponding to the parameter invocation request is a parameter entry attribute, invoking second parameter data in the service parameter data set by using a parameter entry invocation function includes: when the attribute type corresponding to the parameter calling request is a parameter entering attribute, acquiring a preset calling path address in a parameter entering calling function; searching a parameter path address which is the same as the preset calling path address in the service parameter data set, and determining service parameter value data corresponding to the parameter path address as second parameter data.
Optionally, in a fourth implementation manner of the first aspect of the present invention, when the attribute type corresponding to the parameter invocation request is a nested attribute, invoking third parameter data in the service parameter data set based on a nested invocation function includes: when the attribute type corresponding to the parameter calling request is a nested attribute, acquiring a preset outer layer path address and a preset inner layer path address in a nested calling function; searching a parameter outer layer address which is the same as the preset outer layer path address in the service parameter data set, and determining service parameter value data corresponding to the parameter outer layer address as candidate parameter data; searching a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, and determining the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
Optionally, in a fifth implementation manner of the first aspect of the present invention, when the attribute type corresponding to the parameter invocation request is a query attribute, invoking fourth parameter data in the service parameter data set by using a simple query statement invocation function, and merging the first parameter data, the second parameter data, the third parameter data, and the fourth parameter data to obtain target parameter data includes: when the attribute type corresponding to the parameter calling request is a query attribute, acquiring a preset query table name and a query column number in a simple query statement calling function; searching a parameter query table name which is the same as the preset query table name in the service parameter data set, and determining service parameter value data which are positioned on the query column number in the corresponding parameter query table as alternative parameter data, wherein each parameter query table corresponds to one parameter query table name; and performing format packaging on the alternative parameter data to obtain fourth parameter data, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after the target parameter data is input into a preset service text generation template and a target service text is generated, the method for generating a service text further includes: and displaying the target service text by using a display system.
A second aspect of the present invention provides a device for generating a service text, including: the acquisition module is used for acquiring a service parameter data set and inputting the service parameter data set to a data calling end by adopting a general calling interface; the analysis module is used for analyzing a preset generation rule in the data calling end to obtain a parameter calling request, and the parameter calling request is used for indicating that target parameter data in the service parameter data set need to be called; the calling module is used for calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a parameter entering calling function, a nested calling function and a simple query statement calling function; and the generating module is used for inputting the target parameter data into a preset service text generating template to generate a target service text.
Optionally, in a first implementation manner of the second aspect of the present invention, the invoking module includes: the obtaining unit is used for obtaining the attribute type corresponding to the parameter calling request; the first calling unit is used for calling first parameter data in the service parameter data set by using a content calling function when the attribute type corresponding to the parameter calling request is a content attribute; a second calling unit, configured to call, by using a parameter calling function, second parameter data in the service parameter data set when the attribute type corresponding to the parameter calling request is a parameter entering attribute; a third calling unit, configured to call third parameter data in the service parameter data set based on a nested calling function when the attribute type corresponding to the parameter calling request is a nested attribute; and a fourth calling unit, configured to, when the attribute type corresponding to the parameter calling request is a query attribute, call fourth parameter data in the service parameter data set through a simple query statement calling function, and merge the first parameter data, the second parameter data, the third parameter data, and the fourth parameter data to obtain target parameter data.
Optionally, in a second implementation manner of the second aspect of the present invention, the first invoking unit is specifically configured to: when the attribute type corresponding to the parameter calling request is a content attribute, acquiring a preset calling name in a content calling function, searching a parameter name which is the same as the preset calling name in the service parameter data set, and determining the parameter data corresponding to the parameter name as screening parameter data; and acquiring a content key name in the content calling function, searching a parameter key name which is the same as the content key name in the screening parameter data, and taking service parameter value data corresponding to the parameter key name as first parameter data.
Optionally, in a third implementation manner of the second aspect of the present invention, the second invoking unit is specifically configured to: when the attribute type corresponding to the parameter calling request is a parameter entering attribute, acquiring a preset calling path address in a parameter entering calling function; searching a parameter path address which is the same as the preset calling path address in the service parameter data set, and determining service parameter value data corresponding to the parameter path address as second parameter data.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the third invoking unit is specifically configured to: when the attribute type corresponding to the parameter calling request is a nested attribute, acquiring a preset outer layer path address and a preset inner layer path address in a nested calling function; searching a parameter outer layer address which is the same as the preset outer layer path address in the service parameter data set, and determining service parameter value data corresponding to the parameter outer layer address as candidate parameter data; searching a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, and determining the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the fourth invoking unit is specifically configured to: when the attribute type corresponding to the parameter calling request is a query attribute, acquiring a preset query table name and a query column number in a simple query statement calling function; searching a parameter query table name which is the same as the preset query table name in the service parameter data set, and determining service parameter value data which are positioned on the query column number in the corresponding parameter query table as alternative parameter data, wherein each parameter query table corresponds to one parameter query table name; and performing format packaging on the alternative parameter data to obtain fourth parameter data, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the apparatus for generating a service text further includes: and the display module is used for displaying the target service text by using the display system.
A third aspect of the present invention provides a device for generating a service text, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instructions in the memory to enable the service text generation device to execute the service text generation method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-described method for generating a service text.
In the technical scheme provided by the invention, a service parameter data set is obtained, and the service parameter data set is input to a data calling end by adopting a general calling interface; analyzing a preset generation rule in the data calling end to obtain a parameter calling request, wherein the parameter calling request is used for indicating that target parameter data in the service parameter data set need to be called; calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a reference calling function, a nested calling function and a simple query statement calling function; and inputting the target parameter data into a preset service text generation template to generate a target service text. In the embodiment of the invention, the target parameter data in the service parameter data set is called through the parameter calling requests with different attributes and the corresponding preset configuration functions, and then the target parameter data is input into the preset service text generation template to generate the target service text, so that the generation efficiency of the service text is improved.
Drawings
Fig. 1 is a schematic diagram of an embodiment of a method for generating a service text in an embodiment of the present invention;
fig. 2 is a schematic diagram of another embodiment of a method for generating a service text in the embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of a device for generating a service text in an embodiment of the present invention;
fig. 4 is a schematic diagram of another embodiment of a device for generating a service text in the embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a device for generating a service text in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for generating a service text, which are used for improving the generation efficiency of the service text.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of a method for generating a service text in the embodiment of the present invention includes:
101. acquiring a service parameter data set, inputting the service parameter data set to a data calling end by adopting a general calling interface to acquire the service parameter data set, and inputting the service parameter data set to the data calling end by adopting the general calling interface;
it is to be understood that the executing subject of the present invention may be a device for generating a service text, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
The server obtains a service parameter data set, where the service parameter data set includes service data with multiple attributes, and the content of the service data with each service attribute is different, taking an insurance scenario as an example, the service parameter data set includes: the policyholder: zhang III, sex: male, identification number: 123456789, contact phone: 10987654321, current address: the type of insurance in Jiamusi city, Heilongjiang province: risk of disease, etc.; taking an express scene as an example, the service parameter data set includes: the receiver: plum four, the sender: wangwu, addressee: heilongjiang province, chicken city, express delivery order number: 012345678910, Carrier: a certain express delivery, etc.
Under the condition that an insurance policy or an express delivery transport order needs to be generated, the service parameters need to be filled in a corresponding preset service text generation template in a preset template, but the existing service parameter adding mode is to fill the service parameters in the preset service text generation template by using specific adding sentences in a compiling language, and the adding mode has complicated steps and redundant programs and greatly reduces the service text generation efficiency.
It is emphasized that, in order to further ensure the privacy and security of the service parameter data sets, the service parameter data sets may also be stored in nodes of a block chain.
102. In the data calling end, analyzing a preset generation rule to obtain a parameter calling request, wherein the parameter calling request is used for indicating target parameter data in a service parameter data set to be called;
the data calling end specifically refers to a data processing module in the service system, and may be an arithmetic unit or a controller, or may be a processor capable of performing data processing. Here, the preset generation rule is used to indicate parameter data that needs to be filled in the preset service text generation template and a corresponding rule for filling in the parameter data, for example: under the condition of generating the express delivery bill, the preset generation rule stipulates that the generation parameters in the express delivery bill comprise: the receiver, the sender, the receiver address, the express bill number and the carrier, and the preset generation rule further stipulates that: the format of the preset business text generation template can be determined through preset generation rules.
The server analyzes the preset generation rule to obtain a parameter calling request, the parameter calling request is used for indicating target parameter data in the service parameter data set to be called, what target parameter data need to be called in the service parameter data set can be determined through the parameter calling request, and the server calls the target parameter data by using a preset configuration function after determining the target parameter data need to be called.
103. Calling target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a reference calling function, a nested calling function and a simple query statement calling function;
and the server calls the target parameter data in the service parameter data set according to the parameter calling request and the preset configuration function. The preset configuration function is set, the calling position of the target parameter data can be determined through the preset configuration function, and the technical means for calling the target parameter data is determined.
It should be noted that, because the attributes of the target parameter data to be called are different, the preset configuration functions used are different, and therefore, the preset configuration functions herein include at least a content call function, an entry call function, a nested call function, and a simple query statement call function, but are not limited to the above configuration functions.
104. And inputting the target parameter data into a preset service text generation template to generate a target service text.
The server inputs the acquired target parameter data into a preset service text generation model, namely, the preset service text generation template is completely filled, so that the target service text can be generated, and the efficiency of generating the target service text is improved.
For example, in the case of generating an express delivery slip, the server inputs the acquired target parameter data into a preset service text generation model, where the target parameter data is: li IV, Wang Wu, Heilongjiang province, Jixi city, 012345678910, some express, generate a target service text, the target service text includes: the receiver: plum four, the sender: wangwu, addressee: heilongjiang province, chicken city, express delivery order number: 012345678910, Carrier: and (3) some express, wherein the recording sequence in the target service text is from top to bottom: the system comprises a receiver, a sender, a receiver address, an express bill number and a carrier, wherein each target parameter data occupies a row of recording positions.
In the embodiment of the invention, the target parameter data in the service parameter data set is called through the parameter calling requests with different attributes and the corresponding preset configuration functions, and then the target parameter data is input into the preset service text generation template to generate the target service text, so that the generation efficiency of the service text is improved.
Referring to fig. 2, another embodiment of the method for generating a service text according to the embodiment of the present invention includes:
201. acquiring a service parameter data set, and inputting the service parameter data set to a data calling end by adopting a general calling interface;
the server obtains a service parameter data set, where the service parameter data set includes service data with multiple attributes, and the content of the service data with each service attribute is different, taking an insurance scenario as an example, the service parameter data set includes: the policyholder: zhang III, sex: male, identification number: 123456789, contact phone: 10987654321, current address: the type of insurance in Jiamusi city, Heilongjiang province: risk of disease, etc.; taking an express scene as an example, the service parameter data set includes: the receiver: plum four, the sender: wangwu, addressee: heilongjiang province, chicken city, express delivery order number: 012345678910, Carrier: a certain express delivery, etc.
Under the condition that an insurance policy or an express delivery transport order needs to be generated, the service parameters need to be filled in a corresponding preset service text generation template in a preset template, but the existing service parameter adding mode is to fill the service parameters in the preset service text generation template by using specific adding sentences in a compiling language, and the adding mode has complicated steps and redundant programs and greatly reduces the service text generation efficiency.
It is emphasized that, in order to further ensure the privacy and security of the service parameter data sets, the service parameter data sets may also be stored in nodes of a block chain.
202. In the data calling end, analyzing a preset generation rule to obtain a parameter calling request, wherein the parameter calling request is used for indicating target parameter data in a service parameter data set to be called;
the data calling end specifically refers to a data processing module in the service system, and may be an arithmetic unit or a controller, or may be a processor capable of performing data processing. Here, the preset generation rule is used to indicate parameter data that needs to be filled in the preset service text generation template and a corresponding rule for filling in the parameter data, for example: under the condition of generating the express delivery bill, the preset generation rule stipulates that the generation parameters in the express delivery bill comprise: the receiver, the sender, the receiver address, the express bill number and the carrier, and the preset generation rule further stipulates that: the format of the preset business text generation template can be determined through preset generation rules.
The server analyzes the preset generation rule to obtain a parameter calling request, the parameter calling request is used for indicating target parameter data in the service parameter data set to be called, what target parameter data need to be called in the service parameter data set can be determined through the parameter calling request, and the server calls the target parameter data by using a preset configuration function after determining the target parameter data need to be called.
203. Acquiring an attribute type corresponding to the parameter calling request;
before calling target parameter data by using a preset matching function, a server needs to acquire an attribute type corresponding to a parameter calling request, and the preset matching functions used correspondingly by the parameter calling requests of different attribute types are different, wherein the attribute type of the parameter calling request at least comprises the following steps: content attributes, join attributes, nested attributes, and query attributes.
It should be noted that the attribute type corresponding to the parameter invocation request is recorded in the parameter invocation request, and the server may directly obtain the corresponding attribute type in the parameter invocation request.
204. When the attribute type corresponding to the parameter calling request is a content attribute, calling first parameter data in the service parameter data set by using a content calling function;
specifically, when the attribute type corresponding to the parameter calling request is the content attribute, the server acquires a preset calling name in the content calling function, searches a parameter name same as the preset calling name in the service parameter data set, and determines the parameter data corresponding to the parameter name as screening parameter data; the server obtains the content key name in the content calling function, searches the parameter key name which is the same as the content key name in the screening parameter data, and takes the service parameter value data corresponding to the parameter key name as the first parameter data.
The content calling function calls the first parameter data in the service parameter data set through the content address and the content key name, and generally, the content calling function can be used for calling a constant in the service parameter data set. Part of the content calls the function program as follows:
for example, the following steps are carried out: when the attribute type corresponding to the parameter calling request is a content attribute, the server acquires a calling name 'constant' preset in a content calling function, inquires parameter data with the parameter name 'constant' in a service parameter data set, and determines the parameter data as screening parameter data; the server acquires the content key names 'applyNob' and 'custNob' in the content calling function, then the server inquires the parameter key names which are the same as the content key names in the content calling function in the screening parameter data, namely the parameter key names 'applyNob' and 'custNob', and takes the service parameter data corresponding to the parameter key names as first parameter data, namely the service parameter data 'applyNob: WX 1234567890' and 'custNob: 12345678' corresponding to the parameter key names as first parameter data.
205. When the attribute type corresponding to the parameter calling request is a parameter entering attribute, calling second parameter data in the service parameter data set by using a parameter entering calling function;
specifically, when the attribute type corresponding to the parameter calling request is a parameter entry attribute, the server acquires a preset calling path address in a parameter entry calling function; the server searches a parameter path address which is the same as the preset calling path address in the service parameter data set, and determines service parameter value data corresponding to the parameter path address as second parameter data.
The entry-reference calling function calls second parameter data in the service parameter data set through a preset calling path address, generally, the type of the entry-reference is a Map type in Java or a subclass thereof, the preset calling path address is a value-taking path for obtaining the second parameter data, and the service parameter value data extracted by adopting the preset calling path address can be assembled into the Map type. The partial join call function program is as follows:
for example, the following steps are carried out: when the attribute type corresponding to the parameter calling request is the parameter entering attribute, the server acquires a preset calling path address 'idCode' in the parameter entering calling function; the server searches a parameter path address which is the same as the preset calling path address in the service parameter data set, and determines service parameter value data corresponding to the parameter path address in the service parameter data set as second parameter data.
206. When the attribute type corresponding to the parameter calling request is a nested attribute, calling third parameter data in the service parameter data set based on a nested calling function;
specifically, when the attribute type corresponding to the parameter calling request is a nested attribute, the server acquires a preset outer layer path address and a preset inner layer path address in a nested calling function; the server searches a parameter outer layer address which is the same as a preset outer layer path address in the service parameter data set, and determines service parameter value data corresponding to the parameter outer layer address as candidate parameter data; the server searches a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, and determines the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
The nested call function calls third parameter data in the service parameter data set through a preset outer layer path address and a preset inner layer path address, generally, the third parameter data is indicated by nesting a parameter inner layer address and a parameter outer layer address, and therefore when a server needs to obtain the third parameter data, the server needs to query twice by using the nested call function. The partially nested calling function program is as follows:
for example, the following steps are carried out: when the attribute type corresponding to the parameter calling request is a nested attribute, the server obtains a preset outer layer path address 'idCode' and a preset inner layer path address 'applyNo' in a nested calling function, the server firstly searches a parameter outer layer address which is the same as the preset outer layer path address in a service parameter data set, namely the parameter outer layer address with the address of the idCode ', the server determines service parameter value data corresponding to the parameter outer layer address as candidate parameter data, then the server searches a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, namely the parameter inner layer address with the address of the applyNo', and the server directly determines the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
207. When the attribute type corresponding to the parameter calling request is a query attribute, calling fourth parameter data in the service parameter data set by a simple query statement calling function, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data;
specifically, when the attribute type corresponding to the parameter calling request is a query attribute, the server obtains a preset query table name and a query column number in a simple query statement calling function; the server searches a parameter query table name which is the same as the preset query table name in the service parameter data set, and determines service parameter value data which are positioned on the query column number in the corresponding parameter query table as alternative parameter data, wherein each parameter query table corresponds to one parameter query table name; and the server performs format packaging on the alternative parameter data to obtain fourth parameter data, and combines the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
The simple query statement call function calls the fourth parameter data in the service parameter data set through the preset name of the query table and the corresponding number of query columns, generally, the parameter query table is stored in the database, and a certain query condition needs to be met before the fourth parameter data is queried by using the parameter query table, that is, the preset name of the query table and the name of the parameter query table in the database need to be the same. In addition, after the alternative parameter data inquired by the parameter inquiry table is called by the simple inquiry statement calling function, the server packages the alternative parameter data in a format and packages the alternative parameter data into Map type data.
It should be noted that, the simple query statement call function not only performs query operation, but also performs update, insertion, or deletion operation according to the type of the statement. Part of the simple query statement calls the function program as follows:
for example, the following steps are carried out: when the attribute type corresponding to the parameter calling request is a query attribute, the server obtains a preset query table name "aps _ base _ common _ prop" and a query column number "attribute 1 in the simple query statement calling function: attr1 "with" attrib 2: attr2 ", searching the service parameter data set for the same parameter lookup table name as the preset lookup table name, namely the parameter lookup table with the parameter lookup table name "aps _ base _ common _ prop", the server then looks up the corresponding number of query columns in the parameter lookup table, i.e., "attribute 1: attr1 "with" attrib 2: attr2 ", and determining the service parameter value data on the query column number in the parameter query table as alternative parameter data, and finally, the server performs format encapsulation on the alternative parameter data, here, the server performs format encapsulation on the date type in the candidate parameter data to obtain fourth parameter data.
The server merges the parameter data called by different preset matching functions, that is, the server merges the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain the target parameter data.
208. And inputting the target parameter data into a preset service text generation template to generate a target service text.
The server inputs the acquired target parameter data into a preset service text generation model, namely, the preset service text generation template is completely filled, so that the target service text can be generated, and the efficiency of generating the target service text is improved.
For example, in the case of generating an express delivery slip, the server inputs the acquired target parameter data into a preset service text generation model, where the target parameter data is: li IV, Wang Wu, Heilongjiang province, Jixi city, 012345678910, some express, generate a target service text, the target service text includes: the receiver: plum four, the sender: wangwu, addressee: heilongjiang province, chicken city, express delivery order number: 012345678910, Carrier: and (3) some express, wherein the recording sequence in the target service text is from top to bottom: the system comprises a receiver, a sender, a receiver address, an express bill number and a carrier, wherein each target parameter data occupies a row of recording positions.
It can be understood that, after the server generates the target service text by using the preset service text generation template, the target service text can be displayed by using the display system, so that the service personnel operating the service can clearly observe the target service text, and further analyze the target service text.
In the embodiment of the invention, the target parameter data in the service parameter data set is called through the parameter calling requests with different attributes and the corresponding preset configuration functions, and then the target parameter data is input into the preset service text generation template to generate the target service text, so that the generation efficiency of the service text is improved.
In the above description of the method for generating a service text in the embodiment of the present invention, a device for generating a service text in the embodiment of the present invention is described below with reference to fig. 3, where an embodiment of the device for generating a service text in the embodiment of the present invention includes:
an obtaining module 301, configured to obtain a service parameter data set, and input the service parameter data set to a data calling end by using a general calling interface;
an analysis module 302, configured to analyze a preset generation rule in the data call end to obtain a parameter call request, where the parameter call request is used to indicate that target parameter data in the service parameter data set needs to be called;
a calling module 303, configured to call the target parameter data in the service parameter data set according to the parameter call request and a preset configuration function, where the preset configuration function at least includes a content call function, a parameter entry call function, a nested call function, and a simple query statement call function;
and the generating module 304 is configured to input the target parameter data into a preset service text generating template, so as to generate a target service text.
In the embodiment of the invention, the target parameter data in the service parameter data set is called through the parameter calling requests with different attributes and the corresponding preset configuration functions, and then the target parameter data is input into the preset service text generation template to generate the target service text, so that the generation efficiency of the service text is improved.
Referring to fig. 4, another embodiment of the apparatus for generating a service text according to an embodiment of the present invention includes:
an obtaining module 301, configured to obtain a service parameter data set, and input the service parameter data set to a data calling end by using a general calling interface;
an analysis module 302, configured to analyze a preset generation rule in the data call end to obtain a parameter call request, where the parameter call request is used to indicate that target parameter data in the service parameter data set needs to be called;
a calling module 303, configured to call the target parameter data in the service parameter data set according to the parameter call request and a preset configuration function, where the preset configuration function at least includes a content call function, a parameter entry call function, a nested call function, and a simple query statement call function;
and the generating module 304 is configured to input the target parameter data into a preset service text generating template, so as to generate a target service text.
Optionally, the invoking module 303 includes:
an obtaining unit 3031, configured to obtain an attribute type corresponding to the parameter invocation request;
a first calling unit 3032, configured to call, when the attribute type corresponding to the parameter calling request is a content attribute, first parameter data in the service parameter data set by using a content calling function;
a second calling unit 3033, configured to call, when the attribute type corresponding to the parameter calling request is an entry attribute, second parameter data in the service parameter data set by using an entry calling function;
a third calling unit 3034, configured to, when the attribute type corresponding to the parameter calling request is a nested attribute, call third parameter data in the service parameter data set based on a nested calling function;
a fourth calling unit 3035, configured to, when the attribute type corresponding to the parameter calling request is a query attribute, call fourth parameter data in the service parameter data set through a simple query statement calling function, and combine the first parameter data, the second parameter data, the third parameter data, and the fourth parameter data to obtain target parameter data.
Optionally, the first invoking unit 3032 is specifically configured to:
when the attribute type corresponding to the parameter calling request is a content attribute, acquiring a preset calling name in a content calling function, searching a parameter name which is the same as the preset calling name in the service parameter data set, and determining the parameter data corresponding to the parameter name as screening parameter data;
and acquiring a content key name in the content calling function, searching a parameter key name which is the same as the content key name in the screening parameter data, and taking service parameter value data corresponding to the parameter key name as first parameter data.
Optionally, the second invoking unit 3033 is specifically configured to:
when the attribute type corresponding to the parameter calling request is a parameter entering attribute, acquiring a preset calling path address in a parameter entering calling function;
searching a parameter path address which is the same as the preset calling path address in the service parameter data set, and determining service parameter value data corresponding to the parameter path address as second parameter data.
Optionally, the third invoking unit 3034 is specifically configured to:
when the attribute type corresponding to the parameter calling request is a nested attribute, acquiring a preset outer layer path address and a preset inner layer path address in a nested calling function;
searching a parameter outer layer address which is the same as the preset outer layer path address in the service parameter data set, and determining service parameter value data corresponding to the parameter outer layer address as candidate parameter data;
searching a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, and determining the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
Optionally, the fourth invoking unit 3035 is specifically configured to:
when the attribute type corresponding to the parameter calling request is a query attribute, acquiring a preset query table name and a query column number in a simple query statement calling function;
searching a parameter query table name which is the same as the preset query table name in the service parameter data set, and determining service parameter value data which are positioned on the query column number in the corresponding parameter query table as alternative parameter data, wherein each parameter query table corresponds to one parameter query table name;
and performing format packaging on the alternative parameter data to obtain fourth parameter data, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
Optionally, the apparatus for generating a service text further includes:
and a display module 305, configured to display the target service text by using a display system.
In the embodiment of the invention, the target parameter data in the service parameter data set is called through the parameter calling requests with different attributes and the corresponding preset configuration functions, and then the target parameter data is input into the preset service text generation template to generate the target service text, so that the generation efficiency of the service text is improved.
Fig. 3 and fig. 4 describe the apparatus for generating a service text in the embodiment of the present invention in detail from the perspective of a modular functional entity, and the apparatus for generating a service text in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 5 is a schematic structural diagram of a service text generating device according to an embodiment of the present invention, where the service text generating device 500 may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing applications 533 or data 532. Memory 520 and storage media 530 may be, among other things, transient or persistent storage. The program stored in the storage medium 530 may include one or more modules (not shown), and each module may include a series of instruction operations in the apparatus 500 for generating a service text. Further, the processor 510 may be configured to communicate with the storage medium 530, and execute a series of instruction operations in the storage medium 530 on the service text generation apparatus 500.
The business form generating device 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input-output interfaces 560, and/or one or more operating systems 531, such as Windows server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the business document generation apparatus architecture shown in fig. 5 does not constitute a limitation of the business document generation apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The invention further provides a device for generating a service text, where the computer device includes a memory and a processor, and the memory stores computer-readable instructions, and the computer-readable instructions, when executed by the processor, cause the processor to execute the steps of the method for generating a service text in the foregoing embodiments.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the method for generating a service text.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for generating a service text is characterized in that the method for generating the service text comprises the following steps:
acquiring a service parameter data set, and inputting the service parameter data set to a data calling end by adopting a general calling interface;
analyzing a preset generation rule in the data calling end to obtain a parameter calling request, wherein the parameter calling request is used for indicating that target parameter data in the service parameter data set need to be called;
calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a reference calling function, a nested calling function and a simple query statement calling function;
and inputting the target parameter data into a preset service text generation template to generate a target service text.
2. The method for generating service text according to claim 1, wherein the calling the target parameter data in the service parameter data set according to the parameter call request and a preset configuration function, where the preset configuration function at least includes a content call function, an entry call function, a nested call function, and a simple query statement call function, includes:
acquiring an attribute type corresponding to the parameter calling request;
when the attribute type corresponding to the parameter calling request is a content attribute, calling first parameter data in the service parameter data set by using a content calling function;
when the attribute type corresponding to the parameter calling request is a parameter entering attribute, calling second parameter data in the service parameter data set by using a parameter entering calling function;
when the attribute type corresponding to the parameter calling request is a nested attribute, calling third parameter data in the service parameter data set based on a nested calling function;
and when the attribute type corresponding to the parameter calling request is a query attribute, calling fourth parameter data in the service parameter data set through a simple query statement calling function, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
3. The method for generating a service text according to claim 2, wherein when the attribute type corresponding to the parameter invocation request is a content attribute, invoking a first parameter data in the service parameter data set by using a content invocation function includes:
when the attribute type corresponding to the parameter calling request is a content attribute, acquiring a preset calling name in a content calling function, searching a parameter name which is the same as the preset calling name in the service parameter data set, and determining the parameter data corresponding to the parameter name as screening parameter data;
and acquiring a content key name in the content calling function, searching a parameter key name which is the same as the content key name in the screening parameter data, and taking service parameter value data corresponding to the parameter key name as first parameter data.
4. The method for generating a service text according to claim 2, wherein when the attribute type corresponding to the parameter invocation request is an entry attribute, invoking the second parameter data in the service parameter data set by using an entry invocation function comprises:
when the attribute type corresponding to the parameter calling request is a parameter entering attribute, acquiring a preset calling path address in a parameter entering calling function;
searching a parameter path address which is the same as the preset calling path address in the service parameter data set, and determining service parameter value data corresponding to the parameter path address as second parameter data.
5. The method according to claim 2, wherein when the attribute type corresponding to the parameter call request is a nested attribute, calling third parameter data in the service parameter data set based on a nested call function includes:
when the attribute type corresponding to the parameter calling request is a nested attribute, acquiring a preset outer layer path address and a preset inner layer path address in a nested calling function;
searching a parameter outer layer address which is the same as the preset outer layer path address in the service parameter data set, and determining service parameter value data corresponding to the parameter outer layer address as candidate parameter data;
searching a parameter inner layer address which is the same as the preset inner layer path address in the candidate parameter data, and determining the candidate parameter data corresponding to the parameter inner layer address as third parameter data.
6. The method for generating a service text according to claim 2, wherein when the attribute type corresponding to the parameter invocation request is a query attribute, invoking fourth parameter data in the service parameter data set by a simple query statement invocation function, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data includes:
when the attribute type corresponding to the parameter calling request is a query attribute, acquiring a preset query table name and a query column number in a simple query statement calling function;
searching a parameter query table name which is the same as the preset query table name in the service parameter data set, and determining service parameter value data which are positioned on the query column number in the corresponding parameter query table as alternative parameter data, wherein each parameter query table corresponds to one parameter query table name;
and performing format packaging on the alternative parameter data to obtain fourth parameter data, and combining the first parameter data, the second parameter data, the third parameter data and the fourth parameter data to obtain target parameter data.
7. The method for generating service text according to any one of claims 1-6, wherein after the target service text is generated by inputting the target parameter data into a preset service text generation template, the method for generating service text further comprises:
and displaying the target service text by using a display system.
8. A service text generation apparatus, wherein the service text generation apparatus comprises:
the acquisition module is used for acquiring a service parameter data set and inputting the service parameter data set to a data calling end by adopting a general calling interface;
the analysis module is used for analyzing a preset generation rule in the data calling end to obtain a parameter calling request, and the parameter calling request is used for indicating that target parameter data in the service parameter data set need to be called;
the calling module is used for calling the target parameter data in the service parameter data set according to the parameter calling request and a preset configuration function, wherein the preset configuration function at least comprises a content calling function, a parameter entering calling function, a nested calling function and a simple query statement calling function;
and the generating module is used for inputting the target parameter data into a preset service text generating template to generate a target service text.
9. A device for generating a service text, the device comprising: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor invokes the instructions in the memory to cause the business text generation device to execute the business text generation method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement a method for generating a service text according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011207400.1A CN112307735A (en) | 2020-11-03 | 2020-11-03 | Method, device and equipment for generating service text and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011207400.1A CN112307735A (en) | 2020-11-03 | 2020-11-03 | Method, device and equipment for generating service text and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112307735A true CN112307735A (en) | 2021-02-02 |
Family
ID=74334016
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011207400.1A Pending CN112307735A (en) | 2020-11-03 | 2020-11-03 | Method, device and equipment for generating service text and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112307735A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781184A (en) * | 2019-09-16 | 2020-02-11 | 平安科技(深圳)有限公司 | Data table construction method, device, equipment and storage medium |
CN111061678A (en) * | 2019-12-10 | 2020-04-24 | 深圳奇迹智慧网络有限公司 | Service data processing method and device, computer equipment and storage medium |
CN111143352A (en) * | 2019-11-28 | 2020-05-12 | 泰康保险集团股份有限公司 | Data processing method and device, electronic equipment and storage medium |
-
2020
- 2020-11-03 CN CN202011207400.1A patent/CN112307735A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110781184A (en) * | 2019-09-16 | 2020-02-11 | 平安科技(深圳)有限公司 | Data table construction method, device, equipment and storage medium |
CN111143352A (en) * | 2019-11-28 | 2020-05-12 | 泰康保险集团股份有限公司 | Data processing method and device, electronic equipment and storage medium |
CN111061678A (en) * | 2019-12-10 | 2020-04-24 | 深圳奇迹智慧网络有限公司 | Service data processing method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020220638A1 (en) | Method and apparatus for associating link system with log system, and storage medium | |
CN109684607B (en) | JSON data analysis method and device, computer equipment and storage medium | |
CN106778351B (en) | Data desensitization method and device | |
WO2020015190A1 (en) | Method for generating business rule, electronic device, and readable storage medium | |
CN109062925B (en) | Method, device, computer equipment and storage medium for automatically generating insert sentences | |
CN111694613B (en) | Decoupling method between application program modules, electronic device and storage medium | |
CN103092599A (en) | Software develop kit | |
CN113703785B (en) | Component-based platform deployment method, device, equipment and storage medium | |
CN110764913B (en) | Data calculation method based on rule calling, client and readable storage medium | |
CN111881209A (en) | Data synchronization method and device for heterogeneous database, electronic equipment and medium | |
CN114035827A (en) | Application program updating method, device, equipment and storage medium | |
CN115599386A (en) | Code generation method, device, equipment and storage medium | |
CN113642025A (en) | Interface data processing method, device, equipment and storage medium | |
CN112286907A (en) | Database configuration method and device, electronic equipment and readable storage medium | |
CN113434582B (en) | Service data processing method and device, computer equipment and storage medium | |
CN113434311B (en) | Service data interaction method, device, equipment and storage medium | |
CN112069236A (en) | Associated file display method, device, equipment and storage medium | |
CN112307735A (en) | Method, device and equipment for generating service text and storage medium | |
CN115576624A (en) | Programming framework optimization method, system, terminal equipment and storage medium | |
CN110874365A (en) | Information query method and related equipment thereof | |
US11356853B1 (en) | Detection of malicious mobile apps | |
CN114327611A (en) | Interface description document generation method and device, computer equipment and storage medium | |
CN114547011A (en) | Data extraction method and device, electronic equipment and storage medium | |
CN113806111A (en) | Front-end and back-end interactive interface scheduling optimization method, device, equipment and storage medium | |
CN112527443A (en) | Prompt box display method and device, electronic equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |