Newsprint generation method, electronic equipment and computer storage medium
By performing text annotation and semantic similarity calculation on multimodal data of power infrastructure projects, news articles are automatically generated, solving the problems of journalistic reliance on experience and inconsistent article quality, and achieving efficient and standardized news article generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-14
AI Technical Summary
Journalists or correspondents need a high level of experience to write news articles, which is inefficient and results in inconsistent quality.
Based on multimodal data of power infrastructure projects and manuscript requirements data, text is annotated by pre-defined infrastructure entities, annotation vectors are constructed and semantic similarity is calculated to generate target news articles.
It enables automated generation of press releases, improves writing efficiency and consistency in quality, and solves the problem of reliance on experience.
Smart Images

Figure CN121859899A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of press release generation technology, and more specifically, to a press release generation method, an electronic device, and a computer storage medium. Background Technology
[0002] In the field of journalism, news articles are typically written by reporters or correspondents based on various types of materials, such as interview recordings, on-site images, and technical reports. However, this method requires reporters or correspondents to have extensive experience in the news area being reported on. Furthermore, it is relatively inefficient, and the quality of news articles written by reporters or correspondents with varying levels of experience can vary significantly. Summary of the Invention
[0003] This disclosure provides a method for generating press releases, an electronic device, and a computer storage medium that can automatically generate target press releases matching the implementation status of power infrastructure projects. This solves the problems of journalists or correspondents needing high experience levels, low writing efficiency, and inconsistent quality when writing press releases.
[0004] In a first aspect, this disclosure relates to a method for generating press releases, the method comprising: acquiring multimodal data and press release requirement data, wherein the multimodal data characterizes the implementation status of a power infrastructure project, and the press release requirement data characterizes the requirements for generating press releases for the power infrastructure project; annotating the multimodal data with text based on at least one preset infrastructure entity to obtain annotated data, wherein the infrastructure entity is used to structurally describe key elements of the power infrastructure project; constructing multiple annotation vectors corresponding to the annotated data, and determining the association relationships between the multiple annotation vectors; calculating the semantic similarity between each annotation vector and its corresponding infrastructure vector, wherein the infrastructure vector is a vector corresponding to first infrastructure data in a preset power infrastructure knowledge graph, the first infrastructure data including key parameters for representing the resources, rules, and processes covered in the power infrastructure construction process; and processing the multiple annotation vectors based on the press release requirement data, the association relationships, and the semantic similarity to generate a target press release.
[0005] This application embodiment, after obtaining multimodal data characterizing the implementation status of power infrastructure projects and the manuscript requirement data for generating a press release matching the power infrastructure project, first labels the multimodal data based on infrastructure entities to identify data related to infrastructure entities within the multimodal data. Then, it determines the correlation between multiple labeled vectors corresponding to the labeled data to understand the degree of correlation between the data in the labeled data. Next, it calculates the semantic similarity between the labeled vectors and the infrastructure vectors to understand whether key parameters involved in the power infrastructure construction process exist in the standard vectors. Finally, based on the manuscript requirement data, correlations, and semantic similarity, it automatically generates a target press release matching the power infrastructure project. This solves the problems of journalists or correspondents needing high experience levels, low writing efficiency, and inconsistent manuscript quality when writing press releases.
[0006] Optionally, the step of text-annotating the multimodal data based on at least one preset infrastructure entity to obtain labeled data includes: vectorizing the multimodal data to obtain an embedding vector, wherein the embedding vector represents the distributed representation of each word in the multimodal data; obtaining a semantic vector based on the embedding vector, wherein the semantic vector represents the association relationship between multiple words in the multimodal data; calculating the association probability between each infrastructure entity and each word in the semantic vector; and obtaining the labeled data based on the association probability and the semantic vector.
[0007] Optionally, obtaining the semantic vector based on the embedding vector includes: performing masking processing on the embedding vector to obtain a mask vector, the mask vector representing the semantic representation of the masked word in the predicted multimodal data in the context; performing next sentence prediction processing on the embedding vector to obtain a prediction vector, the prediction vector representing the relationship between sentences in the predicted multimodal data; and obtaining the semantic vector based on the mask vector and the prediction vector.
[0008] Optionally, at least a portion of the multimodal data that matches the preset second infrastructure data is used as key data, where the second infrastructure data represents parameters that demonstrate the construction status of the power infrastructure project; the step of text-annotating the multimodal data based on at least one preset infrastructure entity to obtain annotated data includes: text-annotating the key data based on at least one of the infrastructure entities to obtain the annotated data.
[0009] Optionally, the multimodal data includes infrastructure text, infrastructure audio / video, and infrastructure images; before using at least a portion of the multimodal data that matches the preset second infrastructure data as key data, the method further includes: performing text processing on the infrastructure text, the infrastructure audio / video, and the infrastructure images respectively to obtain text data; converting the text data into time-series data; using at least a portion of the multimodal data that matches the preset second infrastructure data as key data includes: using at least a portion of the time-series data that matches the second infrastructure data as the key data.
[0010] Optionally, the step of processing multiple labeled vectors and generating a target news article based on the manuscript requirement data, the association relationship, and the semantic similarity includes: determining the weight value corresponding to each of the weight parameters based on the manuscript requirement data and multiple preset weight parameters; and generating the target news article based on the multiple weight values, the association relationship, and the semantic similarity.
[0011] Optionally, the step of processing multiple labeled vectors based on the manuscript requirement data, the correlation, and the semantic similarity to generate a target news article includes: processing multiple labeled vectors based on the manuscript requirement data, the correlation, and the semantic similarity to generate news content; evaluating the content evaluation data of the news content based on multiple preset evaluation indicators, wherein the content evaluation data is used to represent the evaluation value of the content quality of the news content; if the content evaluation data is not greater than a preset evaluation threshold, obtaining a manuscript template that matches the manuscript requirement data; and obtaining the target news article based on the manuscript template and the news content.
[0012] Optionally, after obtaining the target news article based on the article template and the news content, the method further includes: obtaining a revised news article and article evaluation data, wherein the revised news article is a revised version of the target news article by a target user, and the article evaluation data represents the target user's assessment information of the content quality of the target news article; comparing the revised news article and the target news article to obtain a comparative news article; and adjusting the model parameters of the article generation model based on the comparative news article and the article evaluation data, wherein the article generation model is used to generate the target news article based on the obtained multimodal data and the article requirement data.
[0013] Secondly, this disclosure also relates to an electronic device comprising: a memory storing computer-readable instructions; and a processor executing the computer-readable instructions stored in the memory to implement the press release generation method described above.
[0014] Thirdly, this disclosure also relates to a computer storage medium storing computer-readable instructions that are executed by a processor in an electronic device to implement the press release generation method described above. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating one step of a press release generation method according to an embodiment of this application.
[0016] Figure 2 This is a flowchart illustrating another step of the press release generation method according to an embodiment of this application.
[0017] Figure 3 This is a flowchart illustrating another step of the press release generation method according to an embodiment of this application.
[0018] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0020] It should be understood that the various steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0021] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0022] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0023] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0024] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0025] This application provides a method for generating press releases, an electronic device, and a computer storage medium.
[0026] The press release generation method of this application embodiment is applied within a press release generation system. The press release generation system of this embodiment can be deployed in one or more electronic devices.
[0027] The electronic device is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, processors, microprogrammed controllers (MCUs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0028] The press release generation method of this application embodiment can automatically generate target press releases that match power infrastructure projects based on the acquired multimodal data characterizing the implementation status of power infrastructure projects and the manuscript requirements data of press releases to be generated that match power infrastructure projects.
[0029] Specifically, when a press release needs to be generated, the operator uploads multimodal data to the press release generation system. At the same time, the press release generation system has an operation interface, where the operator can also input the content of the press release requirements. The press release generation system uses the data in the content of the press release requirements as the press release requirements data.
[0030] For example, the requirements for a press release can include the type of article, its nature, and the requirements for its generation. After the operator enters the type of article, its nature, and the requirements for its generation into the user interface, the press release generation system uses these information as the press release requirements data.
[0031] In this embodiment, when a press release generation system is needed to generate a press release, a press release generation method is executed. This method may include: acquiring multimodal data and press release requirement data, wherein the multimodal data represents the implementation status of power infrastructure projects, and the press release requirement data represents the requirements for generating press releases for power infrastructure projects; based on at least one preset infrastructure entity, text annotation is performed on the multimodal data to obtain annotated data, wherein the infrastructure entity is used to structurally describe the key elements of power infrastructure projects; multiple annotation vectors corresponding to the annotated data are constructed, and the association relationships between the multiple annotation vectors are determined; the semantic similarity between each annotation vector and its corresponding infrastructure vector is calculated, wherein the infrastructure vector is a vector corresponding to the first infrastructure data in a preset power infrastructure knowledge graph, and the first infrastructure data includes key parameters used to represent the resources, rules, and processes covered in the power infrastructure construction process; based on the press release requirement data, the association relationships, and the semantic similarity, the multiple annotation vectors are processed to generate the target press release.
[0032] Specifically, after acquiring multimodal data and manuscript requirement data, the press release generation system in this embodiment automatically generates the target press release using the included manuscript generation model. The manuscript generation model includes the Berta model, CRF model, and large language model. In other embodiments, the manuscript generation model may also include the Roberta model, CRF model, and large language model; or, the Berta model, BiLSTM model, CRF model, and large language model; or, the Roberta model, BiLSTM model, CRF model, and large language model. This application is not limited to these options.
[0033] The press release generation system in this embodiment can, after acquiring multimodal data characterizing the implementation status of power infrastructure projects and the manuscript requirements data for generating press releases matching the power infrastructure projects, first label the multimodal data based on infrastructure entities to identify data related to infrastructure entities within the multimodal data. Then, it determines the correlation between multiple labeled vectors corresponding to the labeled data to understand the degree of correlation between the data in the labeled data. Next, it calculates the semantic similarity between the labeled vectors and the infrastructure vectors to understand whether key parameters involved in the power infrastructure construction process exist in the standard vectors. Finally, based on the manuscript requirements data, correlations, and semantic similarity, it automatically generates target press releases matching the power infrastructure projects. This solves the problems of journalists or correspondents needing high experience levels, low writing efficiency, and inconsistent manuscript quality when writing press releases.
[0034] See Figure 1 As shown, Figure 1This is a flowchart illustrating one embodiment of the press release generation method of this application. Depending on different needs, the order of the steps in the flowchart can be changed, and some steps can be omitted. The press release generation method may include the following steps.
[0035] Step 101: Obtain multimodal data and manuscript requirement data.
[0036] Among them, multimodal data characterizes the implementation status of power infrastructure projects, and the manuscript requires data characterization of the requirements for generating press releases on power infrastructure projects.
[0037] Multimodal data refers to datasets composed of multiple different types of data forms. These data forms have different characteristics and expressions, and together describe multiple dimensions of the same object or scene.
[0038] In this embodiment, the multimodal data includes infrastructure text, infrastructure audio and video, and infrastructure images. The infrastructure text can be in Word or PDF format. In other embodiments, the multimodal data may also include sensor data, structured data, time-series data, or 3D data, etc., and this application is not limited thereto.
[0039] The manuscript requirement data refers to the data entered by the operator in the manuscript requirement content section of the operation interface. For example, the manuscript requirement content includes the manuscript type, manuscript nature, and manuscript generation requirements. The manuscript requirement data then includes the specific content of the manuscript type, manuscript nature, and the generated manuscript.
[0040] The nature of the articles can be categorized into dynamic articles, experience-based articles, problem-oriented articles, achievement-oriented articles, and predictive articles. Dynamic articles mainly report on events that are happening or have just happened, emphasizing timeliness and novelty; experience-based articles mainly summarize successful practices or typical experiences in a certain field for reference; problem-oriented articles mainly expose industry drawbacks and promote problem-solving; achievement-oriented articles mainly focus on the development results and major breakthroughs of projects; and predictive articles mainly analyze or predict future trends based on existing information.
[0041] Manuscript types can include project commencement, equipment commissioning, technological innovation, and safe construction. Project commencement reports mainly cover the project's commencement status; equipment commissioning reports focus on the equipment that needs to be put into operation at a specific implementation phase of the project; technological innovation reports showcase the innovative aspects of the technologies used at a specific implementation phase of the project; and safe construction reports highlight the safety requirements at a specific implementation phase of the project.
[0042] It should be noted that the above are merely examples illustrating the requirements, nature, and type of manuscripts, and do not impose any restrictions on them.
[0043] Step 102: Based on at least one pre-defined infrastructure entity, perform text annotation on the multimodal data to obtain annotated data.
[0044] Among them, infrastructure entities are used to structurally describe the key elements of power infrastructure projects.
[0045] In this embodiment, the press release generation system includes a power infrastructure entity database, which contains at least one infrastructure entity. Each infrastructure entity includes equipment name, technical parameters, and construction stage.
[0046] Text annotation is performed on multimodal data to determine whether there is data related to infrastructure entities in the multimodal data, thereby obtaining labeled data.
[0047] Specifically, based on at least one infrastructure entity, the BERT model + CRF model can be used to perform text annotation on multimodal data to obtain annotated data. The specific steps include:
[0048] (1) Vectorize the multimodal data to obtain the embedding vector, which represents the distributed representation of each word in the multimodal data.
[0049] In this embodiment, the BERT model in the manuscript generation model is used to vectorize the multimodal data to obtain character vectors, text vectors and position vectors respectively. The character vectors, text vectors and position vectors are used together as embedding vectors and then input into the BERT model.
[0050] BERT (Bidirectional Encoder Representations from Transformers) is an existing pre-trained model, essentially an encoder for bidirectional Transformers. The Transformer is a method that relies entirely on self-attention to compute input and output representations. BERT models aim to pre-train deep bidirectional representations by jointly tuning the context across all layers. Therefore, pre-trained BERT model representations can be fine-tuned with an additional output layer, making them suitable for building state-of-the-art models across a wide range of tasks, such as question answering and language inference, without requiring significant architectural modifications for specific tasks.
[0051] (2) Based on the embedding vector, the semantic vector is obtained.
[0052] Among them, semantic vectors represent the relationships between multiple words in multimodal data.
[0053] In this embodiment, the BERT model is used to mask the embedding vector to obtain a mask vector, which represents the semantic representation of the masked words in the predicted multimodal data within the context. The embedding vector is then used for next-sentence prediction to obtain a prediction vector, which represents the relationship between sentences in the predicted multimodal data. Based on the mask vector and the prediction vector, a semantic vector is obtained.
[0054] In other words, the BERT model uses the masked language model (MLM) method to mask the embedding vector to obtain the masked vector, and uses the "Next Sentence Prediction" method to predict the next sentence from the embedding vector to obtain the predicted vector.
[0055] In this process, the masked language model randomly masks some words (tokens) in the input of the model. The goal is to predict the original word ID based solely on the context of the masked word. Unlike the left-to-right language model pre-training, the training objective of the masked language model allows the representation to fuse the contexts of both sides, thereby pre-training a deep bidirectional Transformer.
[0056] "Next sentence prediction" refers to selecting two sentences during language model pre-training in two ways: one is to select two sentences that are truly sequentially connected in the corpus; the other is to randomly select a second sentence from the corpus by rolling a die and appending it to the first sentence. In addition to performing the masked language model task mentioned above, the model is also required to perform sentence relationship prediction to determine whether the second sentence is indeed a successor to the first sentence.
[0057] The output of the BERT model is used as a semantic vector. This semantic vector consists of vectors corresponding to multiple words.
[0058] (3) Calculate the association probability between each infrastructure entity and each word in the semantic vector.
[0059] In this embodiment, the CRF model in the manuscript generation model is used to calculate the association probability between each infrastructure entity and each word in the semantic vector.
[0060] The CRF model, also known as the Conditional Random Field model, calculates the association probability between each basic entity and each word in the semantic vector after the BERT model outputs a semantic vector. This facilitates the determination of the basic entity corresponding to each word in the semantic vector.
[0061] (4) Based on the association probability and semantic vector, the labeled data is obtained.
[0062] This embodiment determines the basic entity corresponding to each word in the semantic vector based on the association probability, and annotates the word to obtain labeled data.
[0063] For example, infrastructure entities can include equipment names, technical parameters, and construction stages. When labeling, the BIOES format is used, where B represents the beginning of an entity, I represents the middle of an entity, O represents a non-entity, E represents the end of an entity, and S represents a single-word entity. Each entity labeling corresponds to an entity category, which can be further refined into similar formats such as B-Equipment Name: the beginning of the equipment name entity. Here, we take equipment name and construction stage as an example. For instance, given the statement "This project is under construction, using transformer A," this sentence will be broken down into a sequence of words. Then, "This project is under construction" is labeled as O, "construction" is labeled as B (construction stage), "stage" is labeled as I (construction stage), "section" is labeled as E (construction stage), "using" is labeled as O, "transformer" is labeled as B (equipment name), "transformer" is labeled as I (equipment name), and "A" is labeled as E (equipment name).
[0064] It's worth noting that the BERT model based on the transformer, understanding the context, can determine the specific meaning of each word in the embedding vector through a masked language model, and determine the relationships between sentences in the embedding vector through a next-sentence prediction model. This makes the semantic relationships displayed in the output semantic vector more accurate. Furthermore, the CRF model is used to calculate the probability between each word in the semantic vector and multiple infrastructure entities, thereby determining the corresponding infrastructure entity for each word in the semantic vector. This ensures that the subsequently generated content is more closely aligned with the implementation of power infrastructure projects.
[0065] Step 103: Construct multiple annotation vectors corresponding to the annotation data, and determine the relationship between the multiple annotation vectors.
[0066] In this embodiment, since each word in the annotation data has been an entity-annotated, multiple corresponding annotation vectors can be determined from the annotation data. Each annotation vector corresponds to a word in the annotation data.
[0067] The BERT model can be used to determine the relationships between multiple labeled vectors. These relationships can include causal relationships and logical order among the labeled vectors.
[0068] Step 104: Calculate the semantic similarity between each labeled vector and its corresponding infrastructure vector.
[0069] Among them, the infrastructure vector is the vector corresponding to the first infrastructure data in the preset power infrastructure knowledge graph. The first infrastructure data includes key parameters used to represent the resources, rules and processes involved in the construction of power infrastructure.
[0070] For example, the first infrastructure data may include equipment type, technical standards, and construction specifications. In other embodiments, the first infrastructure data may also be configured with specific content based on the actual construction status of the power infrastructure project; this application does not limit this.
[0071] In this embodiment, cosine similarity and association can be used to calculate the semantic similarity between each labeled vector and its corresponding infrastructure vector.
[0072] Specifically, first calculate the dot product between the labeled vector and its corresponding base vector, then calculate the magnitude between the labeled vector and its corresponding base vector. Substituting the dot product and magnitude into the cosine formula yields the semantic similarity.
[0073] In other embodiments, semantic similarity can also be calculated using techniques other than cosine similarity. This application does not limit the specific method of calculating semantic similarity.
[0074] By using a pre-built knowledge graph of power infrastructure, the process of calculating semantic similarity can help the manuscript generation model to deeply understand the relevant terminology, technical parameters, and construction processes of the power industry. This enables the manuscript generation model to obtain accurate semantic relationships, thereby ensuring the quality of the subsequently generated manuscripts.
[0075] Step 105: Based on the manuscript requirements data, correlations, and semantic similarity, process multiple labeled vectors to generate the target news article.
[0076] Specifically, based on the manuscript requirements data and multiple preset weight parameters, the weight value corresponding to each weight parameter is determined. Based on multiple weight values, correlations, and semantic similarity, multiple labeled vectors are processed to generate the target news article.
[0077] In this embodiment, the weighting parameters may include importance, timeliness, professionalism, and readability. The specific content of the weighting parameters is set according to the actual situation, and this application does not limit this.
[0078] The large language model in the manuscript generation model can process multiple labeled vectors based on manuscript requirements, relationships, and semantic similarity to perform sentiment analysis, text clustering, or entity association mining on multiple labeled vectors, thereby generating the target news article. The large language model can be an LLM model or a GPT model; this application does not limit the specific type of large language model.
[0079] It should be noted that, based on the manuscript requirement data, the manuscript generation model can know the manuscript type and manuscript requirements of the news article to be generated. Based on this, it determines the weight value corresponding to each weight parameter, thereby ensuring the relevance and effectiveness of the content of the generated target news article.
[0080] Compared with the prior art, the embodiments of this application have at least the following advantages:
[0081] The press release generation method in this application, after obtaining multimodal data characterizing the implementation status of power infrastructure projects and the manuscript requirements data for generating press releases matching the power infrastructure projects, first labels the multimodal data based on infrastructure entities to identify data related to infrastructure entities within the multimodal data. Then, it determines the correlation between multiple labeled vectors corresponding to the labeled data to understand the degree of correlation between the data in the labeled data. Next, it calculates the semantic similarity between the labeled vectors and the infrastructure vectors to understand whether key parameters involved in the power infrastructure construction process exist in the standard vectors. Finally, based on the manuscript requirements data, correlations, and semantic similarity, it automatically generates target press releases matching the power infrastructure projects. Thus, on the one hand, it solves the problems of journalists or correspondents needing high experience levels, low writing efficiency, and inconsistent manuscript quality when writing press releases. On the other hand, it achieves standardized generation of press releases in the power infrastructure field, thereby facilitating the standardization and consistency of industry information dissemination.
[0082] See Figure 2 As shown, Figure 2 This is a flowchart of another embodiment of the press release generation method of this application.
[0083] Step 201: Obtain multimodal data and manuscript requirement data.
[0084] The manuscript requirements data in this step are the same as those in step 101, so they will not be repeated here to avoid duplication.
[0085] As described in step 101, multimodal data may include infrastructure text, infrastructure audio / video, and infrastructure images. After acquiring the multimodal data, to ensure the efficiency of subsequent data processing, different types of multimodal data need to be processed. Specific steps include: performing text processing on the infrastructure text, infrastructure audio / video, and infrastructure images respectively to obtain text data; and converting the text data into time-series data.
[0086] Specifically, in this embodiment, the Whisper model can be used for speech recognition to obtain text data matching the audio and video of the infrastructure. The core architecture of the Whisper model adopts an encoder-decoder Transformer model. The input audio is segmented into fixed-length segments, converted into log-Mel spectrograms, processed by the encoder, and then predicted by the decoder to obtain the corresponding text sequence. Furthermore, the Whisper model can also extract and convert audio from videos using relevant tools. For example, open-source tools like Buzz are based on the Whisper model and can quickly convert video content into timestamped subtitles.
[0087] Meanwhile, sliding window technology can be used to process infrastructure audio and video. By combining the timestamp information of infrastructure audio and video, a time stamp can be added to each identified audio segment to obtain audio and video time sequence data.
[0088] This embodiment can employ PaddleOCR or Tesseract technology for OCR recognition to obtain text data matching the infrastructure image. Furthermore, before performing text recognition on the infrastructure image, image processing can be performed on low-resolution infrastructure images to enhance their resolution, thereby ensuring the accuracy of subsequent text recognition. Additionally, the image capture timestamps can be obtained to add time information to each infrastructure image, resulting in image time-series data.
[0089] This embodiment can also use PyPDF2 technology or the pdfplumber library to parse PDFs, thereby obtaining text data that matches the infrastructure text. When the infrastructure text is not a PDF file, a format conversion tool can be used to convert the non-PDF format text into PDF format text, and then PDF parsing can be performed on the PDF format text to obtain text data that matches the infrastructure text. Simultaneously, the creation time of the PDF format text can be obtained, and time information can be added to each PDF format text to obtain format time-series data.
[0090] Audio and video time-series data, image time-series data, and formatted time-series data are treated as text time-series data.
[0091] It should be noted that the above are merely examples illustrating that the Whisper model can be used for speech recognition, PaddleOCR or Tesseract technology can be used for OCR recognition, and PyPDF2 or pdfplumber library can be used for PDF parsing. However, this does not mean that the technologies or models shown above must be used. In other embodiments, other technologies or models besides those described above can be used for speech recognition, OCR recognition, or PDF parsing. This application does not limit this.
[0092] Step 202: Select at least a portion of the multimodal data that matches the preset second infrastructure data as key data. The second infrastructure data represents parameters that demonstrate the construction status of the power infrastructure project.
[0093] In step 201, the multimodal data is converted into text time-series data. The text time-series data also displays time information, which makes it easier to take the time factor into account when understanding the semantic relationship of the text time-series data in the future, so as to obtain a more accurate semantic relationship.
[0094] Specifically, at least a portion of the time-series text data that matches the second infrastructure data is used as key data. This embodiment pre-constructs a professional dictionary for power infrastructure, which includes second infrastructure data within the power infrastructure field. For example, the second infrastructure data may include technical terms, data indicators, and time points.
[0095] The technical terms used are professional terms related to the power infrastructure field, and may include primary equipment, secondary equipment, main protection, backup protection, reclosing, distance protection, zero-sequence protection, and high-frequency protection. Data indicators may include power generation, average utilization hours of generating equipment, peak power load, minimum power load, average load, load factor, power plant utilization rate, and grid-connected power. Time nodes include time information for each stage of the power infrastructure project.
[0096] Based on actual electricity demand, the specific content of the second infrastructure data, technical terms, data indicators, and time nodes are set.
[0097] That is, identify whether there are technical terms, data indicators and time nodes related to the text time series data, and take the identified technical terms, data indicators and time nodes related to the text time series data as key data.
[0098] This embodiment can eliminate redundant data that is not related to the power infrastructure field by identifying at least a portion of the data in the text time series data that matches the second infrastructure data, thereby increasing the efficiency of subsequent data processing.
[0099] Step 203: Based on at least one infrastructure entity, perform text annotation on key data to obtain annotated data.
[0100] As described in the aforementioned embodiments, infrastructure entities may include equipment names, technical parameters, and construction stages; when annotating, the BIOES format is used, where B is the beginning of an entity, I is the middle of an entity, O is a non-entity, E is the end of an entity, and S is a single-word entity; and each entity annotation corresponds to an entity category, which can be further refined into similar forms such as B-Equipment Name: the beginning of the equipment name entity.
[0101] By annotating key data with text based on infrastructure entities, it is possible to determine which infrastructure entities are included in the key data.
[0102] Step 204: Construct multiple annotation vectors corresponding to the annotation data, and determine the relationship between the multiple annotation vectors.
[0103] Step 205: Calculate the semantic similarity between each labeled vector and its corresponding infrastructure vector.
[0104] Step 206: Based on the manuscript requirements data, correlations, and semantic similarity, process multiple labeled vectors to generate the target news article.
[0105] The content of steps 204 to 206 is the same as that of steps 103 to 105, and will not be repeated here to avoid repetition.
[0106] Compared with the prior art, the embodiments of this application have at least the following advantages:
[0107] The press release generation method in this application can acquire multimodal data of different formats and perform text processing on the multimodal data of different formats to obtain text data. To ensure the accuracy of the semantic relationships subsequently determined, the time information of the multimodal data of different formats is also acquired simultaneously. Based on the time information and text data, text time-series data is obtained, which facilitates the understanding of the semantic relationships of the text time-series data by taking the time factor into account, resulting in more accurate semantic relationships. Then, key data matching the second infrastructure data in the text time-series data is identified, which can remove redundant data that is not related to the power infrastructure field and increase the efficiency of subsequent data processing. Finally, the key data is annotated with text, and the correlation and semantic similarity are determined. Based on the manuscript requirements, correlation, and semantic similarity, multiple annotation vectors are processed, making the generated target press release more in line with the requirements of the power infrastructure field, and solving the problems of journalists or correspondents needing high experience, low writing efficiency, and inconsistent manuscript quality when writing press releases. At the same time, it realizes the standardized generation of press releases in the power infrastructure field, thereby facilitating the standardization and consistency of industry information dissemination.
[0108] See Figure 3 As shown, Figure 3 This is a flowchart illustrating the steps of another embodiment of the press release generation method of this application. This embodiment is a further description of step 105.
[0109] Step 301: Based on multiple preset evaluation indicators, evaluate the content evaluation data of the news content. The content evaluation data is used to represent the evaluation value of the content quality of the news content.
[0110] In this embodiment, multiple evaluation indicators include accuracy, completeness, professionalism, and readability. The specific content of these multiple evaluation indicators can be set according to the actual needs of the manuscript content evaluation; this application does not limit the multiple evaluation indicators to include the aforementioned content.
[0111] Specifically, the press release generation system evaluates news content based on accuracy to determine whether the content conforms to the content displayed in the multimodal data, thus obtaining an accuracy value; it evaluates news content based on completeness to determine whether the content omitted any content displayed in the multimodal data, thus obtaining a completeness value; it evaluates news content based on professionalism to determine whether the content contains any expressions that do not belong to the field of power infrastructure, thus obtaining a professionalism value; and it evaluates news content based on readability to determine whether the content conforms to the reader's reading habits, thus obtaining a readability value.
[0112] In this embodiment, the content evaluation data is the sum of the evaluation accuracy value, evaluation completeness value, evaluation professionalism value, and evaluation readability value. In other embodiments, the content evaluation data may also be the average of the evaluation accuracy value, evaluation completeness value, evaluation professionalism value, and evaluation readability value; this application is not limited to this.
[0113] Step 302: If the content evaluation data is not greater than the preset evaluation threshold, obtain a manuscript template that matches the manuscript requirement data.
[0114] In this embodiment, the content evaluation data is detected to be no greater than a preset evaluation threshold. If the content evaluation data is detected to be no greater than the preset evaluation threshold, it indicates that the generated news content meets the requirements of multiple evaluation indicators. At this time, a manuscript template that matches the manuscript requirement data is obtained so that the corresponding news article can be generated based on the manuscript template in the future.
[0115] Specifically, retrieve the manuscript template that matches the manuscript type in the manuscript requirements data. For example, when the manuscript type includes project commencement, equipment commissioning, technological innovation, and safe construction, the corresponding manuscript templates include project commencement template, equipment commissioning template, technological innovation template, and safe construction template.
[0116] Understandably, when the target user selects the "project commencement" type of article, the obtained article template will be the "project commencement template".
[0117] Step 303: Based on the manuscript template and news content, obtain the target news manuscript.
[0118] The news content is applied according to the template format of the article template to obtain the target news article.
[0119] Step 304: Obtain the revised press release and the press release evaluation data. The revised press release is the version of the target press release revised by the target user. The press release evaluation data is used to represent the target user's assessment of the content quality of the target press release.
[0120] After obtaining the target press release in step 303, to ensure that the subsequent press release generation system, based on multimodal data, more accurately reflects the actual situation of the power infrastructure project, it acquires the revised press release after the target user has modified the target press release, as well as the press release evaluation data obtained from the target user's assessment of the content quality of the target press release. This allows the press release generation system to learn the differences between the target press release and the revised press release, as well as the target user's feedback on the target press release, based on the revised press release and the press release evaluation data, and to optimize the relevant models accordingly.
[0121] In this embodiment, the article evaluation data refers to the data corresponding to the article evaluation indicators filled in by the target user in the operation interface of the news release generation system. These indicators may include whether the overall structure of the article content is reasonable, whether the layout of the article content is reasonable, and whether the article content showcases the main content of the power infrastructure project. The specific content of the article evaluation indicators can be set according to the actual situation; this application does not limit this.
[0122] After viewing the content of the target news article, target users can fill in the relevant content of the article evaluation indicators, so that the subsequent news article generation system can adjust the relevant parameters of the article generation model based on this.
[0123] Step 305: Compare the revised press release with the target press release to obtain a comparison press release.
[0124] By comparing the revised press release with the target press release, we can identify the content differences between the two, and then create a comparative press release based on these differences.
[0125] In this way, the press release generation system can directly obtain the textual differences between the corrected press release and the target press release from the comparison press releases.
[0126] Step 306: Based on the comparison of news articles and article evaluation data, adjust the model parameters of the article generation model.
[0127] The article generation model is used to generate target news articles based on the acquired multimodal data and article requirement data.
[0128] The manuscript generation model in this embodiment includes the Bert model + CRF model + large language model as described in the previous embodiments.
[0129] The press release generation system can directly obtain textual differences between the corrected press release and the target press release from comparative press release data, and obtain feedback information from target users regarding the target press release from press release evaluation data. In this way, the press release generation system can adjust the model parameters of the press release generation model, for example, adjusting the coverage ratio in the BERT model, thereby making the regenerated target press release more suitable for the requirements.
[0130] Compared with the prior art, the embodiments of this application have at least the following advantages:
[0131] In this embodiment, after obtaining the target press release, to ensure that subsequent target press releases better reflect the actual conditions of power infrastructure projects, a revised press release (after revisions by target users) and evaluation data obtained from target users' assessments of the content quality of the target press release are acquired. Then, the revised press release and the target press release are compared to identify content differences. Based on these differences, a comparative press release is generated. This allows the press release generation system to adjust the model parameters of the press release generation model based on the comparative press release and the evaluation data, thus fine-tuning the model. This ensures the accuracy of subsequently generated target press releases and makes them more aligned with the actual conditions of power infrastructure projects.
[0132] Figure 4 This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 100 includes a memory 20, a processor 30, and a computer program 40 stored in the memory 20 and executable on the processor 30. When the processor 30 executes the computer program 40, it implements the steps in the above-described method embodiments.
[0133] For example, computer program 40 can also be divided into one or more modules / units, which are stored in memory 20 and executed by processor 30. The one or more modules / units can be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 40 in electronic device 100.
[0134] Those skilled in the art will understand that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. It may include more or fewer components than shown in the diagram, or combine certain components, or different components. For example, the electronic device 100 may also include input / output devices, network access devices, buses, etc.
[0135] Processor 30 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors, single-chip microcomputers, or any conventional processor.
[0136] The memory 20 can be used to store computer programs 40 and / or modules / units. The processor 30 implements various functions of the electronic device 100 by running or executing the computer programs and / or modules / units stored in the memory 20 and by calling data stored in the memory 20. The memory 20 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 20 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0137] If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0138] This application also provides a computer-readable storage medium, which may include the above-described electronic device.
[0139] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and other division methods may be used in actual implementation.
[0140] Furthermore, the functional units in the various embodiments of this application can be integrated into the same processing unit, or each unit can exist physically separately, or two or more units can be integrated into the same unit. The integrated units described above can be implemented in hardware or in the form of hardware plus software functional modules.
[0141] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and not restrictive in all respects. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or electronic devices recited in the electronic device claims may also be implemented by the same unit or electronic device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A method for generating press releases, characterized in that, The method includes: Acquire multimodal data and press release requirements data, wherein the multimodal data characterizes the implementation status of power infrastructure projects, and the press release requirements data characterizes the requirements for generating press releases for the power infrastructure projects; Based on at least one pre-defined infrastructure entity, the multimodal data is annotated with text to obtain annotated data. The infrastructure entity is used to structurally describe the key elements of the power infrastructure project. Construct multiple annotation vectors corresponding to the annotation data, and determine the association relationship between the multiple annotation vectors; Calculate the semantic similarity between each of the labeled vectors and the corresponding infrastructure vectors. The infrastructure vectors are vectors corresponding to the first infrastructure data in the preset power infrastructure knowledge graph. The first infrastructure data includes key parameters used to represent the resources, rules and processes covered in the power infrastructure construction process. Based on the manuscript requirements data, the correlation, and the semantic similarity, multiple labeled vectors are processed to generate the target news article.
2. The method according to claim 1, characterized in that, The text annotation of the multimodal data based on at least one preset infrastructure entity, to obtain annotated data, includes: The multimodal data is vectorized to obtain an embedding vector, which represents the distributed representation of each word in the multimodal data; Based on the embedding vector, a semantic vector is obtained, which represents the association between multiple words in the multimodal data; Calculate the association probability between each of the infrastructure entities and each of the words in the semantic vector; The labeled data is obtained based on the association probability and the semantic vector.
3. The method according to claim 2, characterized in that, The process of obtaining a semantic vector based on the embedding vector includes: The embedding vector is masked to obtain a mask vector, which represents the semantic representation of the masked word in the predicted multimodal data in the context. The embedded vector is subjected to next sentence prediction processing to obtain a prediction vector, which represents the relationship between sentences in the predicted multimodal data; The semantic vector is obtained based on the mask vector and the prediction vector.
4. The method according to claim 1, characterized in that, After acquiring the multimodal data and manuscript requirement data, the method further includes: At least a portion of the multimodal data that matches the preset second infrastructure data is used as key data, whereby the second infrastructure data represents parameters that demonstrate the construction status of the power infrastructure project. The text annotation of the multimodal data based on at least one preset infrastructure entity, to obtain annotated data, includes: Based on at least one of the infrastructure entities, the key data is annotated with text to obtain the annotated data.
5. The method according to claim 4, characterized in that, The multimodal data includes infrastructure text, infrastructure audio and video, and infrastructure images; before using at least a portion of the multimodal data that matches preset second infrastructure data as key data, the method further includes: Text processing is performed on the infrastructure text, the infrastructure audio and video, and the infrastructure image respectively to obtain text data; Convert the text data into time-series data; The step of using at least a portion of the multimodal data that matches the preset second infrastructure data as key data includes: At least a portion of the time-series data that matches the second infrastructure data is used as the key data.
6. The method according to any one of claims 1 to 5, characterized in that, The process of processing multiple labeled vectors based on the manuscript requirement data, the correlation, and the semantic similarity to generate a target news article includes: Based on the manuscript requirements data and multiple preset weight parameters, determine the weight value corresponding to each weight parameter; Based on the weight values, the association relationships, and the semantic similarity, multiple labeled vectors are processed to generate the target news article.
7. The method according to any one of claims 1 to 5, characterized in that, The process of processing multiple labeled vectors based on the manuscript requirement data, the correlation, and the semantic similarity to generate a target news article includes: Based on the manuscript requirements data, the correlation, and the semantic similarity, multiple labeled vectors are processed to generate news content; Based on multiple preset evaluation indicators, the content evaluation data of the news content is evaluated, and the content evaluation data is used to represent the evaluation value of the content quality of the news content. If the content evaluation data is not greater than a preset evaluation threshold, obtain a manuscript template that matches the manuscript requirement data; The target news article is obtained based on the article template and the news content.
8. The method according to claim 7, characterized in that, After obtaining the target news article based on the article template and the news content, the method further includes: Obtain revised press releases and press release evaluation data. The revised press releases are the press releases revised by the target users. The press release evaluation data is used to represent the target users' assessment of the content quality of the target press releases. The revised press release and the target press release are compared to obtain a comparison press release. Based on the comparative news articles and the article evaluation data, the model parameters of the article generation model are adjusted. The article generation model is used to generate the target news article based on the acquired multimodal data and the article requirement data.
9. An electronic device, characterized in that, The electronic device includes: a memory storing computer-readable instructions; and a processor executing the computer-readable instructions stored in the memory to implement the press release generation method as described in any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions that are executed by a processor in an electronic device to implement the press release generation method as described in any one of claims 1 to 8.