CN116822479A - Service report generation method, device, equipment and storage medium - Google Patents

Service report generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN116822479A
CN116822479A CN202310771551.7A CN202310771551A CN116822479A CN 116822479 A CN116822479 A CN 116822479A CN 202310771551 A CN202310771551 A CN 202310771551A CN 116822479 A CN116822479 A CN 116822479A
Authority
CN
China
Prior art keywords
target
field
fields
generating
prediction
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
CN202310771551.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.)
CCB Finetech Co Ltd
Original Assignee
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 CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202310771551.7A priority Critical patent/CN116822479A/en
Publication of CN116822479A publication Critical patent/CN116822479A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a service report generation method, a device, equipment and a storage medium, which can be applied to the technical field of natural language processing and the technical field of finance. The method comprises the following steps: responding to a received service report generation request of a target main body, and acquiring name information of the target main body and category information of the service report; according to the name information, obtaining historical management state information of a target main body from a target website by calling a query engine; determining a text template according to the category information of the service report; extracting a plurality of target fields from the historical management state information according to the text template; and generating a business report according to the plurality of target fields by calling a natural language processing engine.

Description

Service report generation method, device, equipment and storage medium
Technical Field
The present invention relates to the field of natural language processing technologies and financial technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a service report.
Background
At present, related information is mainly queried through a search engine, a corporate network or other related websites, and because the information acquisition channel is complex, manual information screening is needed, a great deal of time is often spent, and the efficiency of writing the business report is low.
Disclosure of Invention
In view of the above problems, the present invention provides a service report generating method, apparatus, device, medium and storage medium.
According to a first aspect of the present invention, there is provided a service report generating method, including: and responding to the received service report generation request of the target main body, and acquiring the name information of the target main body and the category information of the service report. And according to the name information, obtaining the historical management state information of the target main body from the target website by calling a query engine. And determining a text template according to the category information of the service report. And extracting a plurality of target fields from the historical management state information according to the text template. And generating a business report according to the plurality of target fields by calling a natural language processing engine.
According to an embodiment of the present invention, generating a service report from a plurality of target fields by invoking a natural language processing engine includes:
according to the multiple target fields, semantic association relations of the multiple target fields are obtained by calling a natural language processing model. And generating a plurality of prediction fields according to the semantic association relationship and the plurality of target fields, wherein the prediction fields represent fields with occurrence probabilities of the plurality of target fields in the same text greater than a preset threshold value. And generating a service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template.
According to an embodiment of the present invention, the plurality of target fields is M, M is an integer greater than 1, and the generating a plurality of prediction fields according to the semantic association relationship and the plurality of target fields includes:
generating an nth predicted field according to the semantic association relation aiming at the mth target field and the (m+1) th target field, wherein M is an integer which is more than or equal to 1 and less than or equal to M-1, and n is an integer which is more than or equal to 1; generating an n+1th predicted field according to the semantic association relation aiming at the n predicted field, the m target field and the m+1th target field; in the case where it is determined that M is less than M-1, returning to perform operations for the mth target field and the (m+1) th target field, and incrementing M; in the case where M is determined to be equal to M-1, a plurality of prediction fields are generated.
According to an embodiment of the present invention, generating a service report according to a semantic association relationship and a text template according to a target field and a plurality of prediction fields, includes:
generating a plurality of prediction texts according to the semantic association relation according to the target fields and the prediction fields; and generating a service report according to the text templates according to the plurality of predicted texts.
According to an embodiment of the present invention, generating a business report according to a text template from a plurality of predictive texts includes:
And determining keywords and the positions of the keywords according to the text template. And extracting target predictive text corresponding to the keyword from the plurality of predictive texts according to the keyword. And filling the target prediction text into a text template according to the position of the keyword, and generating a service report.
According to an embodiment of the present invention, for an nth predicted field, an mth target field, and an mth+1th target field, generating the nth+1th predicted field according to a semantic association relationship includes:
and generating a first prediction field set according to the nth prediction field and the mth target field according to the semantic association relation. And generating a second prediction field set according to the nth prediction field and the (m+1) th target field according to the semantic association relation. And generating an n+1th prediction field according to the intersection field of the first prediction field set and the second prediction field set.
According to an embodiment of the present invention, extracting a plurality of target fields from historical business status information according to a text template includes:
and determining field attribute information to be extracted according to the text template. And according to the field attribute information, searching the field content information to be extracted from the historical management state information. And extracting a plurality of target fields from the field content information according to the field attribute information.
According to an embodiment of the present invention, extracting a plurality of target fields from field content information includes:
and obtaining a target regular expression for extracting the field according to the field attribute information. A plurality of target fields are extracted from the field content information based on the target regular expression.
A second aspect of the present invention provides a service report generating apparatus, including: the device comprises an acquisition module, a determination module, an extraction module and a generation module.
And the acquisition module is used for responding to the received service report generation request of the target main body and acquiring the name information of the target main body and the category information of the service report. And the obtaining module is used for obtaining the historical management state information of the target main body from the target website by calling the query engine according to the name information. And the determining module is used for determining the text template according to the category information of the service report. The extraction module is used for extracting a plurality of target fields from the historical management state information according to the text template; and the generation module is used for generating a service report according to the plurality of target fields by calling the natural language processing engine.
According to an embodiment of the invention, the generation module comprises an acquisition sub-module, a first generation sub-module and a second generation sub-module. The obtaining sub-module is used for obtaining semantic association relations of the plurality of target fields by calling a natural language processing model according to the plurality of target fields. The first generation sub-module is used for generating a plurality of prediction fields according to the semantic association relation and the plurality of target fields, wherein the prediction fields represent fields with occurrence probability larger than a preset threshold value in the same text with the plurality of target fields. And the second generation sub-module is used for generating a service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template.
According to an embodiment of the present invention, the first generation sub-module includes a first generation unit, a second generation unit, an execution unit, and a third generation unit. The first generation unit is configured to generate, according to the semantic association relationship, an nth prediction field for an mth target field and an mth+1th target field, where M is an integer greater than or equal to 1 and less than or equal to M-1, and n is an integer greater than or equal to 1. The second generation unit is used for generating the n+1th predicted field according to the semantic association relation aiming at the n predicted field, the m target field and the m+1th target field. And the execution unit is used for returning to execute the operation aiming at the mth target field and the (m+1) th target field and increasing M in the case that M is determined to be smaller than M-1. And a third generation unit for generating a plurality of prediction fields in case that M is determined to be equal to M-1.
According to an embodiment of the present invention, the second generating unit includes: the device comprises a first generation subunit, a second generation subunit and a third generation subunit. The first generation subunit is configured to generate a first prediction field set according to the nth prediction field and the mth target field according to the semantic association relationship. And the second generation subunit is used for generating a second prediction field set according to the nth prediction field and the (m+1) th target field according to the semantic association relation. And the third generation subunit is used for generating an n+1th prediction field according to the intersection field of the first prediction field set and the second prediction field set.
According to an embodiment of the invention, the second generation submodule comprises a fourth generation unit and a fifth generation unit. The fourth generation unit is used for generating a plurality of prediction texts according to a semantic association relationship according to a plurality of target fields and a plurality of prediction fields; and a fifth generating unit for generating a service report according to the text templates according to the plurality of predicted texts.
According to an embodiment of the present invention, the fifth generating unit includes a determining subunit, an extracting subunit, and a generating subunit. The determining subunit is used for determining keywords and positions of the keywords according to the text template. And the extraction subunit is used for extracting target predicted texts corresponding to the keywords from the plurality of predicted texts according to the keywords. And the generating subunit is used for filling the target prediction text into the text template according to the position of the keyword to generate a service report.
According to an embodiment of the invention, the extraction module comprises a determination sub-module, a search sub-module and an extraction sub-module. The determining submodule is used for determining field attribute information to be extracted according to the text template. And the searching sub-module is used for searching the field content information to be extracted from the historical management state information according to the field attribute information. And the extraction sub-module is used for extracting a plurality of target fields from the field content information according to the field attribute information.
According to an embodiment of the invention, the extraction sub-module comprises an obtaining unit and an extraction unit. The obtaining unit is used for obtaining a target regular expression for extracting the field according to the field attribute information. And the extraction unit is used for extracting a plurality of target fields from the field content information based on the target regular expression.
A third aspect of the present invention provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method described above.
A fourth aspect of the invention also provides a computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the above method.
The fifth aspect of the invention also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the service report generation method, device, equipment, medium and program product provided by the invention, the name information of the target subject and the category information of the service report are acquired by responding to the received service report generation request of the target subject. And according to the name information, obtaining the historical management state information of the target main body from the target website by calling a query engine. And determining a text template according to the category information of the service report. And extracting a plurality of target fields from the historical management state information according to the text template. And finally, generating a service report according to the plurality of target fields by calling a natural language processing engine. The method comprises the steps of obtaining historical management state information related to enterprises from websites through a query engine, and extracting required fields from the historical management state information according to templates of trust reports. And calling a natural language processing engine, and generating a trust report according to the extracted fields. Therefore, the problem that a lot of time is spent for manually discriminating the information is at least partially solved, and the efficiency of writing the business report is improved.
Drawings
The foregoing and other objects, features and advantages of the invention will be apparent from the following description of embodiments of the invention with reference to the accompanying drawings, in which:
fig. 1 shows an application scenario diagram of a service report generating method, apparatus, device, medium and program product according to an embodiment of the present invention.
Fig. 2 shows a flow chart of a method of traffic report generation according to an embodiment of the invention.
Fig. 3 is a schematic diagram of logic for generating a plurality of prediction fields in a service report generating method according to an embodiment of the present invention.
FIG. 4 illustrates a flow diagram for generating a business report according to a text template from a plurality of predictive texts in accordance with an embodiment of the invention.
Fig. 5 shows a block diagram of a traffic report generating apparatus according to an embodiment of the present invention.
Fig. 6 shows a block diagram of an electronic device adapted to implement a service report generation method according to an embodiment of the invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be understood that the description is only illustrative and is not intended to limit the scope of the invention. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the present invention.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
In the technical scheme of the invention, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, invented, applied and the like, all meet the requirements of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
Currently, the service report is composed mainly by searching engine, company network or other related websites to inquire related information, and because of the complex information acquisition channel, the information needs to be manually screened, which often takes a lot of time, resulting in low efficiency of composing the service report.
In view of this, an embodiment of the present invention provides a service report generating method, including: and responding to the received service report generation request of the target main body, and acquiring the name information of the target main body and the category information of the service report. And according to the name information, obtaining the historical management state information of the target main body from the target website by calling a query engine. And determining a text template according to the category information of the service report. And extracting a plurality of target fields from the historical management state information according to the text template. By invoking a natural language processing engine, a business report is generated from the plurality of target fields.
Fig. 1 shows an application scenario diagram of a service report generating method, apparatus, device, medium and program product according to an embodiment of the present invention.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the method for generating a service report according to the embodiment of the present invention may be generally performed by the server 105. Accordingly, a service report generation provided by the embodiment of the present invention may be generally set in the server 105. A service report generating method provided by the embodiment of the present invention may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105. Accordingly, a service report generating apparatus provided by the embodiment of the present invention may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
A service report generation method according to an embodiment of the present invention will be described in detail below with reference to fig. 2 to 4 based on the scenario described in fig. 1.
Fig. 2 shows a flow chart of a method of traffic report generation according to an embodiment of the invention.
As shown in fig. 2, one service report generation of this embodiment includes operations S210 to S250.
In operation S210, name information of a target subject and category information of a service report are acquired in response to a received service report generation request of the target subject.
In operation S220, the historical business state information of the target subject is obtained from the target website by calling the query engine according to the name information.
In operation S230, a text template is determined according to the category information of the service report.
In operation S240, a plurality of target fields are extracted from the historical business status information according to the text template.
In operation S250, a service report is generated from a plurality of target fields by calling a natural language processing engine.
According to an embodiment of the invention, the target subject is the enterprise for which the business report is to be generated. For example, enterprise a.
According to an embodiment of the present invention, the name information of the target subject is the business for which the business report is to be generated. For example, the name of enterprise a is "a-responsibilities company".
According to the embodiment of the invention, the query engine is a program or script for automatically browsing and retrieving webpage information according to a certain rule. The query can automatically request the target website and grab down the required data. And extracting the historical operating state information of the target main body by processing the captured data.
According to the embodiment of the invention, the class information of the business report refers to business classes such as flow loans, project loans and the like. Different category information has different text templates.
According to the embodiment of the invention, the historical operating state information of the target main body refers to the historical operating state of the enterprise. For example, company a loans x tens of millions of yuan in 2020, returns on time in 2023, and is well credited.
According to an embodiment of the present invention, the text templates are of various types and are in one-to-one correspondence with the categories of the business report. The text template may include borrower information, borrower profile, and the like. For example, the project loan business category corresponds to a project loan text template. The project loan text template comprises borrower information, borrower profiles, borrowing requirements and purposes, guarantee measures, risk prompts, conclusion, advice and other related information.
According to an embodiment of the present invention, the target field refers to text information that is present in the text template. For example, borrower information includes target fields for company name, registration address, legal representative or responsible, registration capital, time of establishment, business scope, etc.
According to the embodiment of the invention, the natural language processing engine is used for processing information such as shapes, sounds, meanings and the like of natural language, namely, inputting, outputting, identifying, analyzing, understanding, generating and the like of characters, words, sentences and chapters by a computer.
For example, the received business report generation request of the target subject enterprise a, the acquired name information of the enterprise a is "a finite responsibility company", and the category information of the business report is an item loan. According to the name information "A finite liability company", the historical operation state information of the A enterprise is obtained from the target website "http:// A" by calling a query engine, wherein the historical operation state information comprises that the A enterprise registers in 2012A city, registers y hundred million funds, lends x ten thousand in 2017, and returns in 2020, and has good credit. And determining that the text template is an item loan text template according to the category information of the business report is the item loan. And extracting target fields such as 'enterprise', 'registration', 'borrowing', 'credit' and the like from the historical management state information according to the text template. And generating a service report according to the plurality of target fields by calling a natural language processing engine.
According to the embodiment of the invention, the name information of the target subject and the category information of the service report are acquired by responding to the received service report generation request of the target subject. And according to the name information, obtaining the historical management state information of the target main body from the target website by calling a query engine. And determining a text template according to the category information of the service report. And extracting a plurality of target fields from the historical management state information according to the text template. And finally, generating a service report according to the plurality of target fields by calling a natural language processing engine. The method comprises the steps of obtaining historical management state information related to enterprises from websites through a query engine, and extracting required fields from the historical management state information according to a template of a business report. And calling a natural language processing engine, and generating a service report according to the extracted fields. Therefore, the problem that a lot of time is spent for manually discriminating the information is at least partially solved, and the efficiency of writing the business report is improved.
According to an embodiment of the present invention, generating a service report from a plurality of target fields by invoking a natural language processing engine includes:
according to the multiple target fields, semantic association relations of the multiple target fields are obtained by calling a natural language processing model. And generating a plurality of prediction fields according to the semantic association relationship and the plurality of target fields, wherein the prediction fields represent fields with occurrence probabilities of the plurality of target fields in the same text greater than a preset threshold value. And generating a service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template.
According to the embodiment of the invention, the semantic association relationship not only analyzes the morphology and the syntax, but also analyzes the meaning contained in the word, the phrase, the sentence and the paragraph, thereby realizing the expression of the structure of the language by the semantic structure of the sentence. For example: the objective fields may be "enterprise", "register", "loan", and "company name" is "enterprise", "enterprise register is" month "day", "enterprise register capital is" element "and" enterprise loan is "element" in # year "by invoking the natural language processing model.
According to an embodiment of the present invention, the field of the predetermined threshold may be set to 70% of the length of the plurality of target fields. For example, the plurality of target fields include "business, registration, loan", the target field length of the removal statement symbol is 6, and the predetermined threshold value field may be set to 6×70% =4.2 fields.
For example, according to the three target fields of "enterprise", "register" and "loan", by invoking the natural language processing model, the semantic association relationship of "enterprise register in year", "enterprise register capital" is "and" enterprise loan in # year "is obtained. Based on the semantic association and the plurality of target fields, there are the following associated fields.
The enterprise is registered in the month of year, the registered capital is the element of the year, and the enterprise is loaned in the year # of year, "; the enterprise is registered in the month of year, and the registered capital is the element; company name is enterprise and registered capital is element.
If the field of the predetermined threshold is set to 100% of the length of the three target fields, the field of the predetermined threshold is set to 6 fields. The prediction field is "the enterprise registers for month and month, and the registered capital is" the element and the enterprise performs the loan in # # year. And generating a service report according to the three target fields and the prediction field, the semantic association relation and the text template.
According to the embodiment of the invention, semantic association relations of a plurality of target fields are obtained by calling a natural language processing model according to the plurality of target fields. And generating a plurality of prediction fields with high similarity according to the semantic association relationship and the target fields, so that a service report is generated according to the semantic association relationship and the text template. The semantic information with high relevance is obtained by the semantic association relation and the generation setting threshold value of the prediction field, and then the text template is determined according to the category information of the business report, so that the writing speed and accuracy of the business report are improved.
Fig. 3 is a schematic diagram of logic for generating a plurality of prediction fields in a service report generating method according to an embodiment of the present invention.
As shown in fig. 3, one service report generation of this embodiment includes operations S310 to S370.
In operation S310, for the mth target field and the (m+1) th target field, an nth predicted field is generated according to the semantic association relationship.
In operation S320, for the nth predicted field, the mth target field, and the (m+1) th target field, the (n+1) th predicted field is generated according to the semantic association relationship.
In operation S330, it is determined whether M is less than M-1, and if so, S340 is performed; if not, S350 is performed.
In operation S340, the operations for the mth target field and the (m+1) th target field are performed back and m is incremented.
In operation S350, it is determined whether M is equal to M-1, and if so, S360 is performed; if not, S370 is performed.
In operation S360, a plurality of prediction fields are generated.
In operation S370, the operation is stopped.
According to an embodiment of the present invention, M is a number value of a plurality of target fields, M is an integer greater than or equal to 1 and less than or equal to M-1, and n is an integer greater than or equal to 1.
It should be noted that n is independent of the number of M, since the number of fields associated with different fields may be different.
For example, the target field is 3, i.e., m=3. Starting m=1, n=1. The 1 st destination field is "enterprise", the 2 nd destination field is "registration" and the 3 rd destination field ". Times.. According to the 1 st target field 'enterprise' and the 2 nd target field 'registration', generating a 1 st prediction field 'enterprise registration in the form of semantic association relation'.
For the 1 st prediction field of 'enterprise registration in the x, the 1 st target field of' enterprise 'and the 2 nd target field of' registration ', generating the 2 nd prediction field of' enterprise registration in the x, the y of the year 'month' according to the semantic association relation.
And comparing the judgment value m=1 with the number value M-1=2 of the target fields to obtain that M is smaller than M-1, returning to execute the operation aiming at the mth target field and the (m+1) th target field, and increasing M and changing the value of M to 2.
For the 2 nd target field registration and the 3 rd target field registration, generating the 2 nd prediction field enterprise registration according to the semantic association relation.
For the 2 nd prediction field of "enterprise is registered in the place", the 2 nd target field of "registration" and the 3 rd target field of "place", the 3 rd prediction field of "enterprise is registered in the place # # year" is generated according to the semantic association relationship.
And comparing the judgment value m=2 with the number value M-1=2 of the target field to obtain that M is equal to M-1, and generating a plurality of prediction fields. According to the embodiment of the invention, the new predicted field is generated by iterating the predicted field through the semantic association relationship, the association of the written information is high, and the writing of the business report is improved.
The historical management state information can be applied to the fact that the target field for generating the business report is limited, and when the prediction field is generated by using the limited target field, the coverage range of the prediction field is larger. When the prediction of the next field is performed based on the predicted field and the target field, it is easy for a plurality of predicted fields and the target field to each have similar semantic relevance. Therefore, the prediction can be combined for any field in the plurality of fields, so that the prediction field with stronger semantic relevance is selected from the plurality of prediction fields to be used as the final prediction field.
According to an embodiment of the present disclosure, for an nth predicted field, an mth target field, and an mth+1th target field, generating the nth+1th predicted field according to a semantic association relationship includes: and generating a first prediction field set according to the nth prediction field and the mth target field according to the semantic association relation. And generating a second prediction field set according to the nth prediction field and the (m+1) th target field according to the semantic association relation. And generating an n+1th prediction field according to the intersection field of the first prediction field set and the second prediction field set.
For example: the mth target field may be "business", the mth+1th target field may be "credit", and the nth predicted field may be "loan". The resulting first set of predictive fields may include "financial institution", "pay-on-demand", based on the "business" field and the "loan" field. The resulting second set of predicted fields may include "pay-on-demand", "good", based on the "credit" field and the "loan" field. Thus, it may be determined that the n+1th prediction field may be "pay-on-schedule". Then, according to the fields of enterprise, loan, pay-off-schedule and credit, a prediction field of good is generated, so that a text with strong semantic relevance can be generated.
According to the embodiment of the invention, the prediction field is iteratively generated based on the limited target field, and then the new prediction field is continuously generated based on the semantic association relation between the prediction field and/or between the prediction field and the target field, so that the semantic integrity between the fields is increased, the service report with complete semantic can be efficiently generated under the condition of shortage of historical management state information, and the accuracy of the service report generation is improved.
According to an embodiment of the present invention, generating a service report according to a semantic association relationship and a text template according to a target field and a plurality of prediction fields, includes:
generating a plurality of prediction texts according to the semantic association relation according to the target fields and the prediction fields; and generating a service report according to the text templates according to the plurality of predicted texts.
For example, according to the three objective fields of "business," registered, "and" loan, "the generated prediction field includes"/business is registered for year/month/day, "" business registered capital is "meta" and "business is loaned for # year/meta". The prediction text generated according to the semantic association relationship may be "", "", and #, wherein the enterprise is registered in & #, the registered capital is #, and #, the # # is loaned to a financial institution for # # and #, and the credit records are good.
According to the embodiment of the invention, a plurality of prediction texts are generated according to semantic association relations according to a plurality of target fields and a plurality of prediction fields, so that a service report is generated according to a text template. The short target field is used for generating text information with tight semantic association, so that the workload of manually searching information is greatly reduced, and the quality and efficiency of service report are improved.
FIG. 4 illustrates a flow diagram for generating a business report according to a text template from a plurality of predictive texts in accordance with an embodiment of the invention.
As shown in fig. 4, generating a service report according to a text template according to a plurality of predicted texts of this embodiment includes operations S410 to S440.
In operation S410, a plurality of predicted texts are generated according to semantic association according to a plurality of target fields and a plurality of predicted fields.
In operation S420, keywords and locations of the keywords are determined according to the text template.
In operation S430, a target predicted text corresponding to the keyword is extracted from the plurality of predicted texts according to the keyword.
In operation S440, the target prediction text is filled into the text template according to the position of the keyword, and a service report is generated.
For example, the generated predictive text may be "/year @ month @ day @ company is registered in & & city @, registered capital is @ element, loan @ to a financial institution # # of # # element is performed in # # of #, and clear of credit records is performed in @ year @. The project loan text template comprises relevant information such as company names, registered capital, main business, operating conditions and the like. Keywords may be determined to be "company", "registration" and "business". According to the three keywords, extracting a target prediction text corresponding to the keywords from the prediction text, wherein the target test text may be "/company is registered in & & city, and the registered capital is:/element). And filling the target predicted text to the corresponding position according to the position of the keyword in the text template, thereby generating a service report.
According to the embodiment of the invention, the corresponding target prediction text is added to the text template by determining the keywords and the positions of the keywords, so that a service report is generated. The service report generated by the method is regular and orderly, and is beneficial to the staff to analyze the service information.
According to an embodiment of the present invention, extracting a plurality of target fields from historical business status information according to a text template includes:
and determining field attribute information to be extracted according to the text template. And according to the field attribute information, searching the field content information to be extracted from the historical management state information. And extracting a plurality of target fields from the field content information according to the field attribute information.
According to an embodiment of the present invention, the field attribute information is enterprise attribute information represented by a field. The enterprise attribute information may include company name, registered address, registered capital, established time, primary business, etc.
For example, according to the project loan text template, it is determined that the field attribute information to be extracted may be "company name". The field content information to be extracted is found from the historical management state information according to the company name, and the field content information to be extracted can be 'network information company established in 2019 in this city, wherein the company name is A finite responsibility company and occupied area is equal'. Based on the field attribute information, two target fields of "established" and "company name" can be extracted from the field content information.
According to the embodiment of the invention, the field content information to be extracted is searched from the historical management state information through the field attribute information in the text template, so that a plurality of target fields are obtained. The historical management state information obtained by inquiry is fully utilized, so that the content information of the predicted text is more sufficient, the difficulty of information synthesis can be reduced, and the efficiency of writing business reports is improved.
According to an embodiment of the present invention, extracting a plurality of target fields from field content information includes:
and obtaining a target regular expression for extracting the field according to the field attribute information. A plurality of target fields are extracted from the field content information based on the target regular expression.
According to an embodiment of the invention, the target regular expression is used for data preprocessing, and can be optionally configured through personalized regularization.
For example, different types of business reports (e.g., loans, item loans, group credit, etc.) have different text templates, so different text templates have different target regular expressions, and after processing is completed, the different text templates are placed in the corresponding template repository.
According to an embodiment of the present invention, a plurality of target fields are extracted from field content information by target regular expressions. The natural language processing engine trains the processed data more accurately, thereby improving the accuracy and efficiency of generating the service report.
Based on the service report generating method, the invention also provides a service report generating device. The device will be described in detail below in connection with fig. 5.
Fig. 5 shows a block diagram of a traffic report generating apparatus according to an embodiment of the present invention.
As shown in fig. 5, a service report generating apparatus 500 of this embodiment includes an acquisition module 510, an acquisition module 520, a determination module 530, an extraction module 540, and a generation module 550.
The obtaining module 510 is configured to obtain name information of a target subject and category information of a service report in response to a received service report generation request of the target subject. In an embodiment, the obtaining module 510 may be configured to perform the operation S210 described above, which is not described herein.
The obtaining module 520 is configured to obtain, from the target website, historical business status information of the target subject by calling the query engine according to the name information. In an embodiment, the obtaining module 520 may be configured to perform the operation S220 described above, which is not described herein.
The determining module 530 is configured to determine a text template according to the category information of the service report. In an embodiment, the determining module 530 may be configured to perform the operation S230 described above, which is not described herein.
The extraction module 540 is configured to extract a plurality of target fields from the historical business status information according to the text template. In an embodiment, the extracting module 540 may be used to perform the operation S240 described above, which is not described herein.
The generating module 550 is configured to generate a service report according to the plurality of target fields by calling a natural language processing engine. The generating module 550 may be configured to perform the operation S250 described above, which is not described herein.
According to an embodiment of the invention, the generation module 550 comprises an acquisition sub-module, a first generation sub-module and a second generation sub-module. The obtaining sub-module is used for obtaining semantic association relations of the plurality of target fields by calling a natural language processing model according to the plurality of target fields. The first generation sub-module is used for generating a plurality of prediction fields according to the semantic association relation and the plurality of target fields, wherein the prediction fields represent fields with occurrence probability larger than a preset threshold value in the same text with the plurality of target fields. And the second generation sub-module is used for generating a service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template.
According to an embodiment of the invention, the first generation sub-module comprises a first generation unit and a second generation unit. The first generation unit is used for generating an nth predicted field according to the semantic association relation aiming at the mth target field and the (m+1) th target field, wherein M is an integer which is greater than or equal to 1 and less than or equal to M-1. The second generation unit is used for generating the n+1th predicted field according to the semantic association relation aiming at the n predicted field, the m target field and the m+1th target field. And the execution unit is used for returning to execute the operation aiming at the mth target field and the (m+1) th target field and increasing M in the case that M is determined to be smaller than M-1. And a third generation unit for generating a plurality of prediction fields in case that M is determined to be equal to M-1.
According to an embodiment of the invention, the second generation submodule comprises a fourth generation unit and a fifth generation unit. The fourth generation unit is used for generating a plurality of prediction texts according to a semantic association relationship according to a plurality of target fields and a plurality of prediction fields; and a fifth generating unit for generating a service report according to the text templates according to the plurality of predicted texts.
According to an embodiment of the present invention, the fifth generating unit includes a determining subunit, an extracting subunit, and a generating subunit. The determining subunit is used for determining keywords and positions of the keywords according to the text template. And the extraction subunit is used for extracting target predicted texts corresponding to the keywords from the plurality of predicted texts according to the keywords. And the generating subunit is used for filling the target prediction text into the text template according to the position of the keyword to generate a service report.
According to an embodiment of the invention, the extraction module comprises a determination sub-module, a search sub-module and an extraction sub-module. The determining submodule is used for determining field attribute information to be extracted according to the text template. And the searching sub-module is used for searching the field content information to be extracted from the historical management state information according to the field attribute information. And the extraction sub-module is used for extracting a plurality of target fields from the field content information according to the field attribute information.
According to an embodiment of the invention, the extraction sub-module comprises an obtaining unit and an extraction unit. The obtaining unit is used for obtaining a target regular expression for extracting the field according to the field attribute information. And the extraction unit is used for extracting a plurality of target fields from the field content information based on the target regular expression.
Any of the acquisition module 510, the acquisition module 520, the determination module 530, the extraction module 540, and the generation module 550 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules, according to an embodiment of the present invention. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the acquisition module 510, the acquisition module 520, the determination module 530, the extraction module 540, and the generation module 550 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the acquisition module 510, the acquisition module 520, the determination module 530, the extraction module 540, and the generation module 550 may be at least partially implemented as a computer program module, which when executed, may perform the respective functions.
Fig. 6 shows a block diagram of an electronic device adapted to implement a service report generation method according to an embodiment of the invention.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present invention includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. Processor 601 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the invention.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to an embodiment of the present invention by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to embodiments of the present invention by executing programs stored in the one or more memories.
According to an embodiment of the invention, the electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present invention also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present invention.
According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the invention, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present invention also include a computer program product comprising a computer program containing program code for performing the method shown in the flowcharts. The program code means for causing a computer system to carry out the business report generating method provided by the embodiment of the present invention when the computer program product is run in the computer system.
The above-described functions defined in the system/apparatus of the embodiment of the present invention are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiment of the present invention are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the invention.
According to embodiments of the present invention, program code for carrying out computer programs provided by embodiments of the present invention may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or in assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the invention and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the invention. In particular, the features recited in the various embodiments of the invention and/or in the claims can be combined in various combinations and/or combinations without departing from the spirit and teachings of the invention. All such combinations and/or combinations fall within the scope of the invention.
The embodiments of the present invention are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the invention is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the invention, and such alternatives and modifications are intended to fall within the scope of the invention.

Claims (10)

1. A method for generating a service report, comprising:
responding to a received service report generation request of a target subject, and acquiring name information of the target subject and category information of a service report;
According to the name information, obtaining historical management state information of the target main body from a target website by calling a query engine;
determining a text template according to the category information of the service report;
extracting a plurality of target fields from the historical operating state information according to the text template;
generating a service report according to the target fields by calling a natural language processing engine;
wherein the generating a service report by calling a natural language processing engine according to the plurality of target fields includes:
obtaining semantic association relations of the target fields according to the target fields by calling a natural language processing engine;
iteratively generating a plurality of prediction fields according to the semantic association relationship and the plurality of target fields, wherein the prediction fields represent fields with occurrence probabilities of the plurality of target fields in the same text greater than a preset threshold; and
generating the service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template;
wherein the target fields are M, M is an integer greater than 1, and the generating a plurality of prediction fields according to the semantic association relationship and the target fields includes:
Generating an nth predicted field according to the semantic association relation aiming at an mth target field and an mth+1th target field, wherein M is an integer which is more than or equal to 1 and less than or equal to M-1, and n is an integer which is more than or equal to 1;
generating an n+1th predicted field according to the semantic association relation aiming at the n-th predicted field, the m-th target field and the m+1th target field;
in the case where it is determined that M is less than M-1, returning to perform operations for the mth target field and the (m+1) th target field, and incrementing M;
in the case where M is determined to be equal to M-1, the plurality of prediction fields are generated.
2. The method according to claim 1, wherein the generating the n+1th prediction field according to the semantic association relation for the n-th prediction field, the m-th target field, and the m+1th target field includes:
generating a first prediction field set according to the nth prediction field and the mth target field according to the semantic association relation;
generating a second prediction field set according to the nth prediction field and the (m+1) th target field according to the semantic association relation; and
Generating the (n+1) th prediction field according to an intersection field of the first prediction field set and the second prediction field set.
3. The method of claim 1, wherein generating the business report according to the semantic association and the text template based on the plurality of target fields and the plurality of predicted fields comprises:
generating a plurality of prediction texts according to the semantic association relation according to the target fields and the prediction fields; and
and generating the business report according to the text templates according to the plurality of predicted texts.
4. A method according to claim 3, wherein said generating said business report according to a text template from said plurality of predicted texts comprises:
determining keywords and the positions of the keywords according to the text template;
extracting target predictive texts corresponding to the keywords from the plurality of predictive texts according to the keywords;
and filling the target prediction text into the text template according to the position of the keyword, and generating the service report.
5. The method of claim 1, wherein extracting a plurality of target fields from the historical business status information according to the text template comprises:
Determining field attribute information to be extracted according to the text template;
according to the field attribute information, searching the field content information to be extracted from the historical management state information; and
and extracting the plurality of target fields from the field content information according to the field attribute information.
6. The method of claim 1, wherein said extracting said plurality of target fields from said field content information comprises:
obtaining a target regular expression for extracting the field according to the field attribute information;
the plurality of target fields are extracted from the field content information based on the target regular expression.
7. A traffic report generating apparatus, comprising:
the acquisition module is used for responding to the received service report generation request of the target main body and acquiring the name information of the target main body and the category information of the service report;
the obtaining module is used for obtaining the historical management state information of the target main body from the target website by calling a query engine according to the name information;
the determining module is used for determining a text template according to the category information of the service report;
The extraction module is used for extracting a plurality of target fields from the historical management state information according to the text template; and
the generation module is used for generating the service report according to the target fields by calling a natural language processing engine;
wherein the generating a service report by calling a natural language processing engine according to the plurality of target fields includes:
obtaining semantic association relations of the target fields according to the target fields by calling a natural language processing engine;
iteratively generating a plurality of prediction fields according to the semantic association relationship and the plurality of target fields, wherein the prediction fields represent fields with occurrence probabilities of the plurality of target fields in the same text greater than a preset threshold; and
generating the service report according to the plurality of target fields and the plurality of prediction fields, the semantic association relationship and the text template;
the number of the target fields is M, M is an integer greater than 1, and a plurality of prediction fields are generated iteratively according to the semantic association relationship and the target fields, including:
generating an nth predicted field according to the semantic association relation aiming at an mth target field and an mth+1th target field, wherein M is an integer which is more than or equal to 1 and less than or equal to M-1, and n is an integer which is more than or equal to 1;
Generating an n+1th predicted field according to the semantic association relation aiming at the n-th predicted field, the m-th target field and the m+1th target field;
in the case where it is determined that M is less than M-1, returning to perform operations for the mth target field and the (m+1) th target field, and incrementing M;
in the case where M is determined to be equal to M-1, the plurality of prediction fields are generated.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-6.
10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the method of any of claims 1-6.
CN202310771551.7A 2023-06-27 2023-06-27 Service report generation method, device, equipment and storage medium Pending CN116822479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310771551.7A CN116822479A (en) 2023-06-27 2023-06-27 Service report generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310771551.7A CN116822479A (en) 2023-06-27 2023-06-27 Service report generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116822479A true CN116822479A (en) 2023-09-29

Family

ID=88119787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310771551.7A Pending CN116822479A (en) 2023-06-27 2023-06-27 Service report generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116822479A (en)

Similar Documents

Publication Publication Date Title
US8868609B2 (en) Tagging method and apparatus based on structured data set
US11651015B2 (en) Method and apparatus for presenting information
US10699112B1 (en) Identification of key segments in document images
US11144569B2 (en) Operations to transform dataset to intent
US20120158742A1 (en) Managing documents using weighted prevalence data for statements
US11775504B2 (en) Computer estimations based on statistical tree structures
CN113986864A (en) Log data processing method and device, electronic equipment and storage medium
CN115392235A (en) Character matching method and device, electronic equipment and readable storage medium
CN111126073B (en) Semantic retrieval method and device
US20230359827A1 (en) Representing Confidence in Natural Language Processing
CN114036921A (en) Policy information matching method and device
CN117033431A (en) Work order processing method, device, electronic equipment and medium
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN116048463A (en) Intelligent recommendation method and device for content of demand item based on label management
CN116822479A (en) Service report generation method, device, equipment and storage medium
CN114020774A (en) Method, device and equipment for processing multiple rounds of question-answering sentences and storage medium
KR20230059364A (en) Public opinion poll system using language model and method thereof
CN113095078A (en) Associated asset determination method and device and electronic equipment
US11093784B2 (en) System for locating, interpreting and extracting data from documents
CN113391988A (en) Method and device for losing user retention, electronic equipment and storage medium
CN112133308A (en) Method and device for multi-label classification of voice recognition text
US20230033211A1 (en) Retrieving documents according to temporal similarity
CN115081450A (en) Text analysis method, apparatus, device, medium, and program product
CN115907442A (en) Business demand modeling method, device, electronic equipment and medium
CN114201964A (en) Public opinion risk identification method and device, electronic equipment and 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