Method and device for generating digital report, storage medium, and electronic device
By calculating the similarity of semantic embedding vectors of target information and query statements, recalling similar text paragraphs, and using the AIGC model to generate a digital transformation rating report, the problems of low efficiency and poor accuracy of digital transformation rating methods in the existing technology are solved, and the problem of low efficiency and poor accuracy of digital transformation rating methods is improved. The efficiency and intelligence of the consulting process.
Patent Information
- Application Number
- CN202311810308.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2043-12-26
AI Technical Summary
The digital transformation rating method in the prior art is inefficient and has poor accuracy, and cannot be effectively adapted to consulting companies, resulting in low efficiency and poor accuracy, and cannot provide useful reference value.
By obtaining the semantic embedding vector of the target information and the semantic embedding vector of the query statement set generated by the pre-trained AIGC model, the similarity between the two is calculated, similar target text paragraphs are recalled, and a digital transformation rating report is generated using the AIGC model.
It improves the efficiency and accuracy of the digital transformation consulting process, enhances the automation and intelligence capabilities of consulting work, and solves the problem of low efficiency in generating digital reports in the existing technology.
Smart Images

Figure CN117875280B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method and device for generating a digital report, a storage medium, and an electronic device. Background Art
[0002] Among the relevant technologies, the digital transformation rating method is mainly based on national standards and conducts manual rating through questionnaire surveys.
[0003] In the relevant technology, the data collection method is that enterprises fill out questionnaires by themselves, which requires a lot of manpower to evaluate the reliability and validity of the collected data and process the data. In addition, the data used for rating diagnosis is in a relatively simple form, which is a pre-set multi-level scale representing the degree of digital transformation, and there is a problem of low adaptability to consulting companies. Ultimately, it leads to low efficiency and poor accuracy, and cannot provide useful reference value.
[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for generating a digital report, a storage medium, and an electronic device.
[0006] According to one aspect of an embodiment of the present application, a method for generating a digital report is provided, including: obtaining a first semantic embedding vector of target information, and obtaining a second semantic embedding vector of a set of query statements generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to perform digital transformation rating; calculating the similarity between the first semantic embedding vector and the second semantic embedding vector; recalling a target text paragraph similar to the query statement from the target information based on the similarity; and using the target text paragraph and the query statement to generate a digital transformation rating report for the target information through the AIGC model.
[0007] Furthermore, obtaining the first semantic embedding vector of the target information includes: collecting unstructured text information, wherein the target information includes the text information; converting the text information into structured target text data; dividing the target text data into multiple text paragraphs to obtain preprocessed text data; performing semantic extraction on the preprocessed text data to obtain a first semantic embedding vector.
[0008] Furthermore, obtaining a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model includes: determining a rating standard for the target enterprise; using the AIGC model to construct a query statement set that matches the rating standard; and performing semantic extraction on the query statement set to obtain a second semantic embedding vector.
[0009] Furthermore, recalling target text paragraphs similar to the query statement set from the target information based on the similarity includes: reading the segmented text set of the target information; for each query statement in the query statement set, searching for a similarity set between the query statement and all text paragraphs of the target information; selecting the most similar K target similarities from the similarity set, and obtaining K target segmented texts corresponding to the K target similarities, wherein K is a positive integer greater than 0; reading the context texts of the K target segmented texts from the target information respectively to obtain 2K adjacent texts; and recalling the K target similarities and the 2K adjacent texts as target text paragraphs similar to the query statement set, wherein each query statement in the query statement set corresponds to K target segmented texts and 2K adjacent texts.
[0010] Furthermore, using the target text paragraph and the query statement to generate a digital transformation rating report of the target information through the AIGC model includes: using the target text paragraph and the query statement to construct an initial model prompt word prompt; using the initial prompt to fill in the insertion items of the preset prompt template to generate the target prompt of the AIGC model; using the target prompt to call the AIGC model and the local knowledge base, and using the AIGC model to generate a digital transformation rating report of the target information, wherein the local knowledge base stores all text paragraphs of the target information.
[0011] Furthermore, using the target text paragraph and the query statement to construct an initial prompt includes: extracting query intent after semantic recognition of the query statement; and using the query intent and the target text paragraph to construct an initial prompt.
[0012] Furthermore, the target prompt is used to call the AIGC model and the local knowledge base, and the AIGC model is used to generate a digital transformation rating report for the target information, including: splitting the target prompt into multiple sub-prompts according to the rating dimension; inputting the multiple sub-prompts into the AIGC model respectively to obtain multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; and integrating the multiple single-dimensional rating results to generate a digital transformation rating report for the target information.
[0013] According to another aspect of an embodiment of the present application, a digital report generation device is also provided, including: an acquisition module, used to acquire a first semantic embedding vector of target information, and a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to perform digital transformation rating; a calculation module, used to calculate the similarity between the first semantic embedding vector and the second semantic embedding vector; a recall module, used to recall target text paragraphs similar to the query statement from the target information based on the similarity; and a generation module, used to generate a digital transformation rating report of the target information through the AIGC model using the target text paragraph and the query statement.
[0014] Furthermore, the acquisition module includes: a collection unit, used to collect unstructured text information, wherein the target information includes the text information; a conversion unit, used to convert the text information into structured target text data; a segmentation unit, used to segment the target text data into multiple text paragraphs to obtain preprocessed text data; and a first generation unit, used to perform semantic extraction on the preprocessed text data to obtain a first semantic embedding vector.
[0015] Furthermore, the acquisition module includes: a determination unit, used to determine the rating criteria of the target enterprise; a query unit, used to construct a set of query statements matching the rating criteria using the AIGC model; and a second generation unit, used to perform semantic extraction on the query statement set to obtain a second semantic embedding vector.
[0016] Furthermore, the recall module includes: a reading unit, which is used to read the segmented text set of the target information; a searching unit, which is used to search for a similarity set between each query statement in the query statement set and all text paragraphs of the target information; a selecting unit, which is used to select the most similar K target similarities from the similarity set, and obtain K target segmented texts corresponding to the K target similarities, wherein K is a positive integer greater than 0; a reading unit, which is used to read the context texts of the K target segmented texts from the target information respectively, and obtain 2K adjacent texts; a recall unit, which is used to recall the K target similarities and the 2K adjacent texts as target text paragraphs similar to the query statement set, wherein each query statement in the query statement set corresponds to K target segmented texts and 2K adjacent texts.
[0017] Furthermore, the generation module includes: a construction unit, used to construct an initial model prompt word prompt using the target text paragraph and the query statement; a first generation unit, used to use the initial prompt to fill in the insertion items of the preset prompt template to generate the target prompt of the AIGC model; a second generation unit, used to use the target prompt to call the AIGC model and the local knowledge base, and use the AIGC model to generate a digital transformation rating report of the target information, wherein the local knowledge base stores all text paragraphs of the target information.
[0018] Furthermore, the construction unit includes: an extraction subunit, which is used to extract the query intent after semantic recognition of the query statement; and a construction subunit, which is used to construct an initial prompt using the query intent and the target text paragraph.
[0019] Furthermore, the second generating unit includes: a splitting unit, used to split the target prompt into multiple sub-prompts according to the rating dimension; an extraction unit, used to input the multiple sub-prompts into the AIGC model respectively, and obtain multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; a generating unit, used to integrate the multiple single-dimensional rating results to generate a digital transformation rating report of the target information.
[0020] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0021] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0022] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0023] Through the present invention, a first semantic embedding vector of the target information is obtained, and a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model is obtained, and the similarity between the first semantic embedding vector and the second semantic embedding vector is calculated; based on the similarity, a target text paragraph similar to the query statement is recalled from the target information; a digital transformation rating report of the target information is generated through the AIGC model using the target text paragraph and the query statement, by calculating the similarity between the semantic embedding vector of the original target information and the semantic embedding vector of the model query statement, and recalling the target text paragraph according to the similarity, and finally generating a digital transformation rating report based on the target text paragraph and the query statement in the AIGC model, thereby solving the technical problem of low efficiency in generating digital reports in related technologies, improving the efficiency and accuracy of the digital transformation consulting process, and improving the automation and intelligent capabilities of digital transformation consulting work. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0025] Figure 1 is a hardware structure block diagram of a computer according to an embodiment of the present invention;
[0026] Figure 2 is a flow chart of a method for generating a digital report according to an embodiment of the present invention;
[0027] Figure 3 is a flow chart of generating a digital transformation rating report of target information according to an embodiment of the present invention;
[0028] Figure 4 is an overall flow chart of digital transformation consulting according to an embodiment of the present invention;
[0029] Figure 5 It is a structural block diagram of a digital report generating device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Example 1
[0033] The method embodiment provided in the first embodiment of the present application can be executed in a server, a computer, or a similar computing device. Taking running on a computer as an example, Figure 1 is a hardware structure block diagram of a computer according to an embodiment of the present invention. Figure 1 As shown, the computer may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the computer may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for generating a digital report in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, i.e., the computer program corresponding to a method for generating a digital report in an embodiment of the present invention, i.e., implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory, for storing a database, the database including high-dimensional data in the search space, and storing the search results of each iteration cycle and the final search results. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly, and is used to transmit the digital report generation instruction from the human-computer interaction device to the processor 102, and to transmit the search result from the processor 102 to the display device.
[0036] In this embodiment, a method for generating a digital report is provided. Figure 2 is a flow chart of a method for generating a digital report according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0037] Step S202, obtaining a first semantic embedding vector of target information, and obtaining a second semantic embedding vector of a query statement set generated by a pre-trained generative artificial intelligence AIGC (Artificial Intelligence Generated Content) model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to perform digital transformation rating;
[0038] Step S204, calculating the similarity between the first semantic embedding vector and the second semantic embedding vector;
[0039] Optionally, in this embodiment, the similarity between vectors is cosine similarity, wherein the first semantic embedding includes M sub-vectors, each sub-vector corresponds to a text paragraph of the target information, and the second semantic embedding vector includes N sub-vectors, each sub-vector corresponds to a query statement in the query statement set.
[0040] Step S206, recalling target text paragraphs similar to the query sentence from the target information based on the similarity;
[0041] By calculating the cosine similarity between the embedding vector of the enterprise information and the embedding vector of the query statement, based on the above example, the first semantic embedding includes M sub-vectors and the second semantic embedding vector includes N sub-vectors, then M*N similarities need to be calculated, and the top-K similar to the query statement and its context are recalled from the structured segmented text of the target information. For example, "To summarize, what is the development strategy of xx enterprise", the text content related to the development strategy of xx enterprise is recalled from the segmented text.
[0042] Step S208, using the target text paragraph and query statement to generate a digital transformation rating report of the target information through the AIGC model.
[0043] Through the above steps, the first semantic embedding vector of the target information is obtained, and the second semantic embedding vector of the query statement set generated by the pre-trained AIGC model is obtained, and the similarity between the first semantic embedding vector and the second semantic embedding vector is calculated; based on the similarity, the target text paragraphs similar to the query statement are recalled from the target information; the target text paragraphs and the query statement are used to generate a digital transformation rating report for the target information through the AIGC model, by calculating the similarity between the semantic embedding vector of the original target information and the semantic embedding vector of the model query statement, and recalling the target text paragraphs according to the similarity, and finally generating a digital transformation rating report based on the target text paragraphs and the query statement in the AIGC model, which can extract and summarize effective information from internally provided information and externally disclosed information, solve the technical problem of low efficiency in generating digital reports by related technologies, improve the efficiency and accuracy of the digital transformation consulting process, and improve the automation and intelligent capabilities of digital transformation consulting work.
[0044] In an example of the present embodiment, obtaining a first semantic embedding vector of target information includes: collecting unstructured text information, wherein the target information includes text information; converting the text information into structured target text data; dividing the target text data into multiple text paragraphs to obtain preprocessed text data; performing semantic extraction on the preprocessed text data to obtain a first semantic embedding vector.
[0045] By collecting the text information required for the digital transformation consulting work of enterprises, including public information of enterprises obtained from annual reports, news reports, etc.; internal documents such as rules and regulations, strategic plans, etc. provided by enterprises according to consulting requirements; unstructured text information such as interview minutes obtained during the consulting process, and then manually sorting the above unstructured text information, by dividing paragraphs and adding hierarchical titles to form structured text data related to digital transformation rating. The structured text data is divided into multiple text paragraphs, and the file name and corresponding title are set as index tags and stored on the server. The pre-processed text data stored above is semantically extracted using algorithms such as Sentence-BERT to obtain the embedded vector of enterprise information, that is, the first semantic embedded vector.
[0046] In an example of this embodiment, obtaining a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model includes: determining the rating criteria for the target enterprise; using the AIGC model to construct a query statement set that matches the rating criteria; and performing semantic extraction on the query statement set to obtain a second semantic embedding vector.
[0047] Select standards applicable to enterprise digital transformation rating, including national standards, group standards or local standards. For example, refer to the group standard "Digital Transformation Reference Architecture" (T / AIITRE 10001-2021) to divide enterprise digital transformation rating into specification level, scenario level, field level, platform level, and ecosystem level. Combine the assessment criteria for different digital levels in the standard to find matching query statements. For example, the group standard "Digital Transformation Reference Architecture" (T / AIITRE 10001-2021) evaluates the digital transformation level in five main dimensions, including development strategy, new capabilities, solutions, governance system, and business transformation. The query statements are "Summarize the development strategy / new capabilities / solutions / governance system / business innovation of xx enterprise". Use algorithms such as Sentence-BERT to perform semantic extraction on the query statement to obtain the rating standard embedding vector, that is, the second semantic embedding vector.
[0048] In one implementation of the present embodiment, recalling target text paragraphs similar to a query statement set from target information based on similarity includes: reading a segmented text set of the target information; for each query statement in the query statement set, searching for a similarity set between the query statement and all text paragraphs of the target information; selecting the most similar K target similarities from the similarity set, and obtaining K target segmented texts corresponding to the K target similarities, wherein K is a positive integer greater than 0; reading context texts of the K target segmented texts from the target information respectively to obtain 2K adjacent texts; and recalling the K target similarities and 2K adjacent texts as target text paragraphs similar to the query statement set, wherein each query statement in the query statement set corresponds to K target segmented texts and 2K adjacent texts.
[0049] Figure 3 : is a flowchart of an embodiment of the present invention for generating a digital transformation rating report of target information. In one implementation of this embodiment, using a target text paragraph and a query statement to generate a digital transformation rating report of target information through an AIGC model includes:
[0050] S31, using the target text paragraph and query sentence to construct the initial model prompt word;
[0051] Optionally, using the target text paragraph and the query statement to construct the initial prompt includes: extracting the query intent after semantic recognition of the query statement; and constructing the initial prompt using the query intent and the target text paragraph.
[0052] S32, using the initial prompt to fill the insertion items of the preset prompt template to generate the target prompt of the AIGC model;
[0053] In an implementation scenario, configure the prompt template for calling the generative AI model, and the target prompt is as follows:
[0054] "Classify the text of the following article [insert information]. Based on the above content, please tell me which category the digital transformation of this article belongs to: specification level, scenario level, field level, platform level, or ecosystem level, and give the analysis process."
[0055] system_context = "Assume that you are an expert in enterprise digital transformation classification and you have the following five criteria:\
[0056] 1. Standard level\
[0057] a) Development strategy: Digital transformation strategy has not yet been clarified\
[0058] b) New capabilities: New capabilities that support the digitalization and flexible operation of key businesses within the scope of the main business have not yet been built.
[0059] c) Solution: Standardize the application of information (digital) technology\
[0060] d) Governance system: The management model is function-driven\
[0061] e) Industry transformation: Business innovation based on new capabilities has not yet been achieved\
[0062] 2. Scene Level
[0063] a) Development strategy: Construction of digital scenarios for key business activities\
[0064] b) New capabilities: Scenario-level capabilities that support the digitalization, scenario-based and flexible operation of key businesses within the scope of the main business\
[0065] c) Solution: Tool-level digitization based on key business data\
[0066] d) Governance system: The management model is technology-enabled\
[0067] e) Business transformation: digitalization, scenario-based and flexible operation of main businesses\
[0068] 3. Field Level\
[0069] a) Development strategy: Focus on building a digital organization (enterprise)
[0070] b) New capabilities: Field-level capabilities that support the integration, dynamic coordination and integrated operation of key businesses in the main business areas\
[0071] c) Solution: Organization (enterprise) level digitization + sensor network\
[0072] d) Governance system: The management model is knowledge-driven\
[0073] e) Business transformation: business integration, dynamic collaboration and integrated operation\
[0074] 4. Platform level\
[0075] a) Development strategy: Focus on building platform organizations (enterprises)
[0076] b) New capabilities: Platform-level capabilities that support networked collaboration and social collaboration between organizations (enterprises) and between organizations (enterprises)
[0077] c) Solution: Platform-level digitalization + industrial Internet\
[0078] d) Governance system: data-driven management
[0079] e) Business transformation: business model innovation based on digital means\
[0080] 5. Ecological level
[0081] a) Development strategy: Focusing on building an ecological organization\
[0082] b) New capabilities: Ecosystem-level capabilities that support open value creation\
[0083] c) Solution: Ecological-level digitalization + ubiquitous Internet of Things\
[0084] d) Governance system: The management model is intelligent driven\
[0085] e) Business transformation: Digital business development
[0086] You will receive information about the current status of different companies and give your opinion on the classification of the company according to the five criteria.
[0087] S33, using the target prompt to call the AIGC model and the local knowledge base, and using the AIGC model to generate a digital transformation rating report for the target information, wherein the local knowledge base stores all text paragraphs of the target information.
[0088] In an example, the target prompt is used to call the AIGC model and the local knowledge base, and the AIGC model is used to generate a digital transformation rating report of the target information, including: splitting the target prompt into multiple sub-prompts according to the rating dimension; inputting the multiple sub-prompts into the AIGC model respectively, and obtaining multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; and integrating the multiple single-dimensional rating results to generate a digital transformation rating report of the target information.
[0089] Based on the above example, the target prompt is split into sub-prompts corresponding to the specification level, scenario level, field level, platform level, and ecosystem level, respectively.
[0090] Combine the recalled context with the query statement to get the initial prompt, insert it into the [Insert Information] item in the template, generate the final target prompt, input it into the AIGC model, and then call the AIGC model and local knowledge base through the prompt. Use the AIGC model to automatically generate rating diagnosis results, extract enterprise information from each dimension in the template step by step, and then comprehensively generate a detailed digital transformation rating report.
[0091] Figure 4It is an overall flow chart of the digital transformation consulting of an embodiment of the present invention, including: collecting internal information provided by digital transformation enterprises and external public information, filtering, segmenting and storing unstructured information, extracting and constructing semantic embedding vectors from preprocessed texts, AIGC learning digital transformation rating models and indicators of corresponding industries, query statements, extracting and constructing semantic embedding vectors for query statements; recalling contexts similar to query statements from segmented texts based on embedding vector similarity; constructing prompts by recalling contexts + query statements; and inputting them into the AIGC model, and AIGC automatically generates rating diagnosis results and reports.
[0092] The solution of this embodiment is adopted to extract effective text data related to the digital transformation dimension from the enterprise information, combine it with the key evaluation indicators in the digital transformation rating standard to generate prompts, and use AIGC technology to automatically generate enterprise digital transformation rating diagnosis reports. Using privately deployed AIGC technology, combined with target information such as enterprise interview minutes and internal data, an automated rating diagnosis platform based on the AIGC model is established, and a new digital automatic evaluation and diagnosis method is proposed. Combined with the local digital transformation knowledge base and natural language processing methods, effective information extraction and summary of a large amount of text data generated in the digital transformation consulting process are performed. The AIGC model is used to understand and automatically generate the enterprise's digital transformation rating report in accordance with the digital transformation standards, which saves a lot of manpower and labor costs while improving the efficiency and objectivity of the digital transformation consulting process and the automation and intelligence capabilities of digital transformation consulting work.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0094] Example 2
[0095] In this embodiment, a digital report generation device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0096] Figure 5 is a structural block diagram of a digital report generating device according to an embodiment of the present invention, such as Figure 5 As shown, the device comprises:
[0097] An acquisition module 50 is used to acquire a first semantic embedding vector of target information and a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to rate the digital transformation;
[0098] A calculation module 52, configured to calculate a similarity between the first semantic embedding vector and the second semantic embedding vector;
[0099] A recall module 54, configured to recall target text paragraphs similar to the query sentence from the target information based on the similarity;
[0100] A generation module 56 is used to generate a digital transformation rating report of the target information through the AIGC model using the target text paragraph and the query statement.
[0101] Optionally, the acquisition module includes: a collection unit for collecting unstructured text information, wherein the target information includes the text information; a conversion unit for converting the text information into structured target text data; a segmentation unit for segmenting the target text data into multiple text paragraphs to obtain preprocessed text data; and a first generation unit for performing semantic extraction on the preprocessed text data to obtain a first semantic embedding vector.
[0102] Optionally, the acquisition module includes: a determination unit, used to determine the rating criteria of the target enterprise; a query unit, used to construct a set of query statements matching the rating criteria using the AIGC model; and a second generation unit, used to perform semantic extraction on the query statement set to obtain a second semantic embedding vector.
[0103] Optionally, the recall module includes: a reading unit, used to read a set of segmented texts of the target information; a searching unit, used to search, for each query statement in the query statement set, a set of similarities between the query statement and all text paragraphs of the target information; a selecting unit, used to select the most similar K target similarities from the similarity set, and obtain K target segmented texts corresponding to the K target similarities, wherein K is a positive integer greater than 0; a reading unit, used to read the context texts of the K target segmented texts from the target information respectively, to obtain 2K adjacent texts; and a recall unit, used to recall the K target similarities and the 2K adjacent texts as target text paragraphs similar to the query statement set, wherein each query statement in the query statement set corresponds to K target segmented texts and 2K adjacent texts.
[0104] Optionally, the generation module includes: a construction unit, used to construct an initial model prompt word prompt using the target text paragraph and the query statement; a first generation unit, used to use the initial prompt to fill in the insertion items of the preset prompt template to generate the target prompt of the AIGC model; a second generation unit, used to use the target prompt to call the AIGC model and the local knowledge base, and use the AIGC model to generate a digital transformation rating report of the target information, wherein the local knowledge base stores all text paragraphs of the target information.
[0105] Optionally, the construction unit includes: an extraction subunit, used to extract the query intent after semantic recognition of the query statement; and a construction subunit, used to construct an initial prompt using the query intent and the target text paragraph.
[0106] Optionally, the second generating unit includes: a splitting unit, used to split the target prompt into multiple sub-prompts according to the rating dimension; an extraction unit, used to input the multiple sub-prompts into the AIGC model respectively, to obtain multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; a generating unit, used to integrate the multiple single-dimensional rating results to generate a digital transformation rating report for the target information.
[0107] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0108] Example 3
[0109] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0110] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0111] S1, obtaining a first semantic embedding vector of target information and a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to rate the digital transformation;
[0112] S2, calculating the similarity between the first semantic embedding vector and the second semantic embedding vector;
[0113] S3, recalling target text paragraphs similar to the query sentence from the target information based on the similarity;
[0114] S4, using the target text paragraph and the query statement to generate a digital transformation rating report of the target information through the AIGC model.
[0115] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0116] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0117] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0118] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0119] S1, obtaining a first semantic embedding vector of target information and a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, and the AIGC model is used to rate the digital transformation;
[0120] S2, calculating the similarity between the first semantic embedding vector and the second semantic embedding vector;
[0121] S3, recalling target text paragraphs similar to the query sentence from the target information based on the similarity;
[0122] S4, using the target text paragraph and the query statement to generate a digital transformation rating report of the target information through the AIGC model.
[0123] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0124] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0125] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0127] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0129] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0130] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating a digital report, characterized in that: include: Obtaining a first semantic embedding vector of target information, and obtaining a second semantic embedding vector of a set of query statements generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, the AIGC model is used to rate the digital transformation, and the query statement is a specific question or instruction constructed based on the rating criteria for the digital transformation of the target enterprise; Calculating the similarity between the first semantic embedding vector and the second semantic embedding vector; Recalling target text paragraphs similar to the query sentence from the target information based on the similarity; Generate a digital transformation rating report of the target information through the AIGC model using the target text paragraph and the query statement; Among them, using the target text paragraph and the query statement to generate the digital transformation rating report of the target information through the AIGC model includes: using the target text paragraph and the query statement to construct an initial model prompt word prompt; using the initial model prompt word prompt to fill the insertion item of the preset prompt template to generate the target prompt of the AIGC model; using the target prompt to call the AIGC model and the local knowledge base, and using the AIGC model to generate the digital transformation rating report of the target information, wherein the local knowledge base stores all text paragraphs of the target information; Among them, using the target prompt to call the AIGC model and the local knowledge base, and using the AIGC model to generate a digital transformation rating report for the target information includes: splitting the target prompt into multiple sub-prompts according to the rating dimension; inputting the multiple sub-prompts into the AIGC model respectively to obtain multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; and integrating the multiple single-dimensional rating results to generate a digital transformation rating report for the target information.
2. The method according to claim 1, characterized in that Obtaining the first semantic embedding vector of the target information includes: Collecting unstructured text information, wherein the target information includes the text information; Converting the text information into structured target text data; Dividing the target text data into a plurality of text paragraphs to obtain preprocessed text data; Semantic extraction is performed on the preprocessed text data to obtain a first semantic embedding vector.
3. The method according to claim 1, characterized in that Obtaining the second semantic embedding vector of the query statement set generated by the pre-trained AIGC model includes: Determine the rating criteria for the target enterprise; Using the AIGC model to construct a set of query statements matching the rating criteria; Semantic extraction is performed on the query statement set to obtain a second semantic embedding vector.
4. The method according to claim 1, characterized in that Recalling target text paragraphs similar to the query sentence set from the target information based on the similarity includes: Read the segmented text set of the target information; For each query statement in the query statement set, searching for a similarity set between the query statement and all text paragraphs of the target information; Selecting the most similar K target similarities from the similarity set, and obtaining K target segmentation texts corresponding to the K target similarities, where K is a positive integer greater than 0; Reading context texts of the K target segmented texts from the target information respectively to obtain 2K adjacent texts; The K target similarities and the 2K adjacent texts are recalled as target text paragraphs similar to the query statement set, wherein each query statement in the query statement set corresponds to K target segmented texts and 2K adjacent texts.
5. The method according to claim 1, characterized in that: The target text paragraph and the query sentence are used to construct an initial model prompt word prompt, which includes: Extracting the query intent after semantic recognition of the query statement; An initial model prompt word prompt is constructed using the query intent and the target text paragraph.
6. A digital report generating device, characterized in that: include: An acquisition module, used to acquire a first semantic embedding vector of target information, and to acquire a second semantic embedding vector of a query statement set generated by a pre-trained AIGC model, wherein the target information includes internally provided information and externally disclosed information of the target enterprise for digital transformation, the AIGC model is used to rate the digital transformation, and the query statement is a specific question or instruction constructed based on the rating standard of the digital transformation of the target enterprise; A calculation module, used to calculate the similarity between the first semantic embedding vector and the second semantic embedding vector; A recall module, configured to recall target text paragraphs similar to the query sentence from the target information based on the similarity; A generation module, configured to generate a digital transformation rating report of the target information by using the target text paragraph and the query statement through the AIGC model; The generation module includes: a construction unit, which is used to construct an initial model prompt word prompt using the target text paragraph and the query statement; a first generation unit, which is used to fill the insertion item of the preset prompt template with the initial model prompt word prompt to generate the target prompt of the AIGC model; a second generation unit, which is used to call the AIGC model and the local knowledge base using the target prompt, and use the AIGC model to generate a digital transformation rating report of the target information, wherein the local knowledge base stores all text paragraphs of the target information; Among them, the second generating unit includes: a splitting unit, used to split the target prompt into multiple sub-prompts according to the rating dimension; an extraction unit, used to input the multiple sub-prompts into the AIGC model respectively, and obtain multiple single-dimensional rating results extracted and output by the AIGC model from the local knowledge base; a generating unit, used to integrate the multiple single-dimensional rating results to generate a digital transformation rating report for the target information.
7. A storage medium, characterized in that: The storage medium stores a program, wherein the program executes the steps of the method described in any one of claims 1 to 5 when it is run.
8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface, and the memory communicate with each other via a communication bus; wherein: Memory, used to store computer programs; A processor, configured to execute the steps of the method according to any one of claims 1 to 5 by running a program stored in a memory.
Citation Information
Patent Citations
Form filling method and system applied to power grid field and electronic equipment
CN117057325A
Patent query report generation method based on large language model and graph algorithm
CN117151052A