Carbon emission report analysis method and system
By performing word segmentation and word frequency statistics on the text in the carbon emission report, and judging and processing incomplete words, the content generation quality problem caused by incomplete user input is solved and the generation quality is improved.
Patent Information
- Application Number
- CN202410424532.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-04-10
AI Technical Summary
In the prior art, the quality of content generation of carbon emission reports depends on the accuracy of user input, and when user input is incomplete, the accuracy of output will be affected.
By performing word segmentation processing and word frequency statistics on the text paragraphs in the carbon emission report, we can determine whether the candidate text fragments selected by the user contain incomplete words, and decide whether to discard or complete the incomplete words based on the word frequency statistics results.
Improve the quality of content generation and reduce the problem of declining content generation quality caused by user uncareful choices.
Smart Images

Figure CN118228700B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to natural language processing technology, and in particular to a carbon emission report analysis method and system. Background Art
[0002] As society places higher demands on environmental protection, more social activities such as bidding require participating companies or organizations to submit relevant carbon emission reports. These reports are used for evaluation by professionals and for other network users to browse.
[0003] In the related art, users are allowed to take notes on the contents of reports when browsing them. With the development of big model technology, it is possible to conduct questions and answers on related knowledge or make summaries based on the words selected by users.
[0004] However, the accuracy of the relevant model output depends on the accuracy of the user input. When incomplete content is extracted from the report, the accuracy of the output will be affected. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a carbon emission report analysis method and system to solve the above problems and improve the quality of content generation.
[0006] On the one hand, an embodiment of the present application provides a carbon emission report analysis method, comprising the following steps:
[0007] Get the original report file;
[0008] obtaining a plurality of text paragraphs from the original report file;
[0009] Performing word segmentation processing on each text paragraph to obtain a word segmentation result, wherein the word segmentation result includes a part of speech;
[0010] According to the word segmentation results, select some words of parts of speech for word frequency statistics;
[0011] Obtain the candidate text segment selected by the user through the input device;
[0012] When a user calls a content generation service based on a candidate text segment as input, a word segmentation result of a text segment involved in the candidate text segment is obtained, and whether the beginning and ending parts of the candidate text segment contain incomplete words is determined based on the word segmentation result;
[0013] Determine whether to discard or complete the incomplete words based on the result of the word frequency statistics.
[0014] In some embodiments, the word segmentation results and word frequency statistics results are stored in the server. When the user calls the content generation service based on the candidate text fragment as input, the server receives the information of the candidate text fragment from the user end to determine whether to discard or complete the incomplete words.
[0015] In some embodiments, when the candidate text segment is uploaded to the server, the starting position and the ending position of the text are sent to the server, and the server retrieves whether the starting position or the ending position is located between words based on the starting position and the ending position.
[0016] In some embodiments, determining whether to discard or complete an incomplete word according to the result of the word frequency statistics specifically includes:
[0017] Determine whether the incomplete word belongs to the part of speech type of word frequency statistics. If so, discard or complete the incomplete word according to its frequency of occurrence;
[0018] The frequency of each word is arranged in descending order, and when the position of an incomplete word in the arrangement is in the top N%, the incomplete word is completed; otherwise, the incomplete word is discarded.
[0019] In some embodiments, the method further comprises the following steps:
[0020] When the first word in the initial part of the candidate text segment is a preset part of speech or a preset word, the word in the initial part of the candidate text segment is deleted.
[0021] In some embodiments, the following steps are also included:
[0022] When the user selects the candidate text segment, a content generation service is actively invoked after a preset time has passed, wherein the content generation service includes a plurality of candidate services, wherein the order of appearance of the candidate services is determined according to the length of the candidate text segment.
[0023] In some embodiments, the candidate services include: summary services and explanation services;
[0024] Among them, when the length of the candidate text segment is greater than the first threshold, the summary business is ranked before the explanation business; when the length of the candidate text segment is less than or equal to the first threshold, the summary business is ranked before the summary business.
[0025] In some embodiments, the content generation business refers to a business involving calling a large language model to generate content based on input content.
[0026] On the other hand, an embodiment of the present application provides a carbon emission report analysis system, including:
[0027] Memory, used to store programs;
[0028] A processor is used to load the program to execute the carbon emission report analysis method.
[0029] On the other hand, an embodiment of the present application provides a carbon emission report analysis system, including:
[0030] A text acquisition unit, used to acquire an original report file; and acquire a plurality of text paragraphs from the original report file;
[0031] A word segmentation unit is used to perform word segmentation processing on each text paragraph to obtain a word segmentation result, wherein the word segmentation result includes a part of speech;
[0032] A statistical unit is used to select words of some parts of speech for word frequency statistics according to the word segmentation results;
[0033] A user input acquisition unit, used to acquire a candidate text segment selected by a user through an input device;
[0034] A judgment unit, configured to, when a user calls a content generation service according to a candidate text segment as input, obtain a word segmentation result of a text paragraph involved in the candidate text segment, and judge whether a starting part and an ending part of the candidate text segment contain incomplete words according to the word segmentation result;
[0035] A processing unit is used to determine whether to discard or complete the incomplete words according to the result of the word frequency statistics.
[0036] Through the embodiments of the present application, the importance of a word can be determined by analyzing the word frequency, so that when the user chooses to input, part of the word is intercepted. The system can judge the impact of such input on the generated content according to the importance of the word, and make a decision to complete or discard the incomplete word. Through the above scheme, the user can obtain higher generation quality when using the model to generate content, thereby reducing the problem of content generation quality decline due to careless selection by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments.
[0038] Figure 1 It is a flow chart provided by an embodiment of the present application;
[0039] Figure 2 It is a system framework diagram provided by the embodiment of the present application;
[0040] Figure 3 It is a schematic diagram of the selection results selected in the embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described through the implementation method with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0042] In the description of the embodiments of the present application, it should be noted that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the embodiments of the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0043] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.
[0044] In the embodiments of the present application, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0045] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0046] Reference Figure 1 , the present application embodiment discloses a carbon emission report analysis method, which is applied in Figure 2 In the system shown, in the system, the server is used to process text, respond to the client's request, and call the business model after processing the text fragment selected by the user, including the following steps:
[0047] S1. Obtain the original report file. In this solution, the original report file can be a file in a common text format, such as txt, doc, etc.
[0048] S2. Acquire multiple text paragraphs from the original report file. The original report file can be segmented into paragraphs using the paragraph separators in the original report file.
[0049] S3. Perform word segmentation on each text paragraph to obtain a word segmentation result, wherein the word segmentation result includes part of speech. It is understandable that the text paragraph can be segmented by a word segmentation model, and the word segmentation model can also mark the part of speech of various words obtained by word segmentation. Generally speaking, part of speech includes: noun, verb, adjective, conjunction, etc. Different parts of speech have different effects on the expression of sentence meaning.
[0050] S4. According to the word segmentation results, select some words of parts of speech for word frequency statistics. In this step, word frequency statistics are performed on some parts of speech such as nouns and verbs that mainly affect the expression of the sentence, and word frequency statistics are not performed on some parts of speech that have less influence on the expression of the sentence meaning. Of course, word frequency statistics can also be performed on all words. Words that are not subject to word frequency statistics may be words of specific parts of speech, or specific words under some specific parts of speech.
[0051] S5. Obtain the candidate text segment selected by the user through the input device. Figure 3, users can freely select part of the content in the text, and the selection can be made through touch input or mouse input. It is understandable that users are completely free to choose content, and users may and can choose any continuous content. Since there is a certain degree of arbitrariness in user selection, when the user's selection is inappropriate, the user may intercept part of some words. For example, the sentence: "The impact of automobile electrification on emissions", the user intercepts "the impact of electrification on emissions", which will result in the introduction of words that are completely irrelevant to the meaning of the sentence when the content is generated. At this time, it is necessary to consider whether the word has a more important impact in the article to decide whether to abandon or complete the word. This depends on the adjustment of the judgment conditions during use. After the user's selection, the corresponding content generation service can be selected through the menu.
[0052] S6. When the user calls the content generation service based on the candidate text segment as input, the word segmentation result of the text paragraph involved in the candidate text segment is obtained, and whether the starting part and the ending part of the candidate text segment contain incomplete words is determined based on the word segmentation result. It can be understood that the word segmentation result can be used to determine whether the starting part and the ending part of the text segment selected by the user contain incomplete words. For all users, the word segmentation results can be shared, so only one-time word segmentation processing is required for the file.
[0053] S7. Determine whether to discard or complete the incomplete words based on the result of the word frequency statistics. In this step, generally speaking, the word frequency reflects the importance of the words in expressing the meaning in the article or in the paragraph. Of course, the number of times some words such as conjunctions and modal particles appear does not reflect the actual meaning. Therefore, the word frequency statistics for words of some parts of speech can, to a certain extent, provide feedback on the importance of the words in the relevant text or paragraph. Decide whether to complete or discard the incomplete words based on the importance of the words. Regardless of whether to discard or complete, compared with the content of the words originally selected by the user, since it removes the erroneous meaning expressed by the incomplete words, the result obtained by calling the content generation service after completion or removal is better.
[0054] like Figure 2 As shown, in this embodiment, the word segmentation results and word frequency statistics results are stored in the server. When the user calls the content generation service based on the candidate text fragment as input, the server receives the information of the candidate text fragment from the user end to determine whether to discard or complete the incomplete words.
[0055] When uploading the candidate text segment to the server, the starting position and the ending position of the text are sent to the server, and the server searches whether the starting position or the ending position is between words based on the starting position and the ending position.
[0056] It is understandable that after the user selects the corresponding candidate text segment locally, the user sends the position information of the selected text segment to the server locally. The server records the above information and the results of word segmentation and word frequency statistics based on the article. The server further invokes the content generation service according to the position information of the candidate text segment selected by the user. For example, after the user selects a text segment, the summary service can be invoked, and the AI model corresponding to the service can output the summary of the above content according to the input content. The user can copy the summary content to a local document or perform online editing. After the user selects a text segment, the user can also expand it or generate a note title, etc. It is understandable that through the above solution, after the text is processed once, multiple users can reuse the results of the above word segmentation processing.
[0057] In some embodiments, determining whether to discard or complete an incomplete word according to the result of the word frequency statistics specifically includes:
[0058] Determine whether the incomplete word belongs to the part-of-speech type of the word frequency statistics. If so, discard or complete it according to the occurrence frequency of the incomplete word;
[0059] Among them, the word frequencies of each word are arranged in descending order. When the position of the incomplete word in the arrangement is the top N%, the incomplete word is completed; otherwise, it is discarded. It is understandable that different thresholds can be adopted for different parts of speech.
[0060] In some embodiments, it further includes the following steps:
[0061] When the first word at the starting part of the candidate text segment is a preset part of speech or a preset word, delete the word at the starting part of the candidate text segment. It is understandable that deleting the part of the text that is clearly not the beginning of the sentence can reduce the text that affects the overall meaning of the content. For example, some conjunctions, such as "de" (的), "ma" (吗), etc. If these words are used at the beginning of a sentence, it may cause the business model to segment words incorrectly when input into the subsequent business model, resulting in the entire sentence deviating from the meaning.
[0062] In some embodiments, it further includes the following steps:
[0063] After the user selects the candidate text segment, the preset time is exceeded, and the content generation service is actively awakened, wherein the content generation service includes multiple candidate services, wherein the order of appearance of the candidate services is determined according to the length of the candidate text segment. It is understandable that after the user selects the candidate text segment, the service list will be automatically awakened after a certain period of time, and the user can select a service in the service list for use. In this embodiment, when multiple candidate services are involved, the service that the user may use can be estimated based on the length of the text segment selected by the user. For example, when the user is summarizing, he may choose a longer content, while if the user is expanding or doing question-and-answer services, the user is more likely to choose a shorter text. Therefore, the order in which each service appears can be determined according to the length of the user's candidate text.
[0064] In some embodiments, the candidate services include: summary services and explanation services;
[0065] Among them, when the length of the candidate text segment is greater than the first threshold, the summary service is ranked before the interpretation service; when the length of the candidate text segment is less than or equal to the first threshold, the interpretation service is ranked before the summary service. It can be understood that in this solution, the summary service refers to the action of summarizing and simplifying a long text to obtain a shorter text. The interpretation service refers to the service of interpreting the meaning of the selected content or expanding the related content.
[0066] In some embodiments, the content generation service refers to a service involving calling a large language model to generate content based on input content. Large Language Model (LLM) is a deep learning algorithm that uses deep learning technology to learn a large amount of text data to establish a highly intelligent natural language processing model. This model can perform various natural language processing (NLP) tasks and is one of the most successful applications of the Transformer model.
[0067] The main function of large language models is to automatically process natural language and improve the quality of interaction between humans and computers through natural language generation, text prediction, etc. They have strong predictive capabilities and can accurately predict the content of the next word, sentence, or even article based on a large amount of text data.
[0068] This embodiment discloses a carbon emission report analysis system, including:
[0069] Memory, used to store programs;
[0070] A processor is used to load the program to execute the carbon emission report analysis method.
[0071] This embodiment discloses a carbon emission report analysis system, including:
[0072] The text acquisition unit is used to acquire the original report file and acquire multiple text paragraphs from the original report file. In this solution, the original report file can be a file in a common text format, such as txt, doc, etc.
[0073] The word segmentation unit is used to perform word segmentation processing on each text paragraph to obtain a word segmentation result, and the word segmentation result includes part of speech; the original report file can be segmented into paragraphs through the segmentation mark in the original report file. It can be understood that the text paragraph can be segmented through the word segmentation model, and the word segmentation model can also mark the part of speech of various words obtained by word segmentation. Generally speaking, the part of speech includes: noun, verb, adjective, conjunction, etc. Different parts of speech have different effects on the expression of sentence meaning.
[0074] The statistical unit is used to select words of some parts of speech for word frequency statistics based on the word segmentation results; in this unit, word frequency statistics are performed on some parts of speech such as nouns and verbs that mainly affect the expression of sentences, and word frequency statistics are not performed on some parts of speech that have little impact on the expression of sentence meaning. Of course, word frequency statistics can also be performed on all words. Words of specific parts of speech or specific words under some specific parts of speech may not be counted.
[0075] The user input acquisition unit is used to obtain the candidate text segment selected by the user through the input device. The user can freely select part of the content in the text, and the selection can be made by touch input or mouse input. It can be understood that the user is completely free to select content, and the user may and can select any continuous content. Since there is a certain degree of arbitrariness in user selection, when the user's selection is inappropriate, the user may intercept part of some words. For example, the sentence: "The impact of automobile electrification on emissions", the user intercepts "the impact of electrification on emissions", which will result in the introduction of words that are completely irrelevant to the meaning of the sentence when the content is generated. At this time, it is necessary to consider whether the word has a more important impact in the article to decide whether to abandon or complete the word. This depends on the adjustment of the judgment conditions during use.
[0076] The judgment unit is used to obtain the word segmentation result of the text paragraph involved in the candidate text segment when the user calls the content generation service according to the candidate text segment as input, and judge whether the starting part and the ending part of the candidate text segment contain incomplete words according to the word segmentation result; it can be understood that the word segmentation result can be used to judge whether the starting part and the ending part of the text segment selected by the user contain incomplete words. For all users, the word segmentation results can be shared, so only one-time word segmentation processing is required for the file.
[0077] The processing unit is used to determine whether to discard or complete the incomplete words according to the result of the word frequency statistics. In general, the word frequency reflects the importance of the word in expressing the meaning in the article or paragraph. Of course, the number of times some words such as conjunctions and modal particles appear does not reflect the actual meaning. Therefore, the word frequency statistics for words of some parts of speech can, to a certain extent, provide feedback on the importance of the words in the relevant text or paragraph. The decision to complete or discard the incomplete words is made based on the importance of the words. Regardless of whether to discard or complete, compared with the content of the words originally selected by the user to be cut off, the result obtained by calling the content generation service after completion or removal is better because it removes the completely different meanings expressed by the incomplete words.
[0078] It should be noted that the historical operation behavior data involved in this application (including but not limited to the historical operation behavior data of the target user, the historical operation behavior data of the sample user, etc.) are all information and data authorized by the user or fully authorized by all parties.
[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0080] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A carbon emission report analysis method, characterized in that: Applied in a system including a server and multiple clients, the server is used to process text, respond to requests from the client, and call a business model after processing a text segment selected by a user. The method includes the following steps: Get the original report file; obtaining a plurality of text paragraphs from the original report file; Performing word segmentation processing on each text paragraph to obtain a word segmentation result, wherein the word segmentation result includes a part of speech; According to the word segmentation results, words with at least some parts of speech are selected for word frequency statistics; Obtain the candidate text segment selected by the user through the input device; When a user calls a content generation service based on a candidate text segment as input, a word segmentation result of a text segment involved in the candidate text segment is obtained, and whether the beginning and ending parts of the candidate text segment contain incomplete words is determined based on the word segmentation result; Determining whether to discard or complete incomplete words according to the result of the word frequency statistics; The word segmentation results and word frequency statistics results are stored in the server. When the user calls the content generation service according to the candidate text segment as input, the server receives the information of the candidate text segment from the user end to determine whether to discard or complete the incomplete word; When uploading the candidate text segment to the server, the starting position and the ending position of the text are sent to the server, and the server searches whether the starting position or the ending position is between words according to the starting position and the ending position; The method of determining whether to discard or complete an incomplete word based on the result of the word frequency statistics specifically includes: judging whether the incomplete word belongs to the part-of-speech type of the word frequency statistics, and if so, discarding or completing the incomplete word based on the frequency of occurrence of the incomplete word; wherein the word frequency of each word is arranged in descending order, and when the position of the incomplete word in the arrangement is in the top N%, the incomplete word is completed; otherwise, the incomplete word is discarded.
2. The carbon emission report analysis method according to claim 1, characterized in that: include, The method also includes the following steps: when the first word in the initial part of the candidate text segment is a preset part of speech or a preset word, deleting the words in the initial part of the candidate text segment.
3. The carbon emission report analysis method according to claim 1, characterized in that: The following steps are also included: When the user selects the candidate text segment, a content generation service is actively invoked after a preset time has passed, wherein the content generation service includes a plurality of candidate services, wherein the order of appearance of the candidate services is determined according to the length of the candidate text segment.
4. The carbon emission report analysis method according to claim 3 is characterized in that: The candidate services include: summary services and explanation services; wherein, when the length of the candidate text segment is greater than a first threshold, the summary services are ranked before the explanation services; and when the length of the candidate text segment is less than or equal to the first threshold, the explanation services are ranked before the summary services.
5. The carbon emission report analysis method according to claim 1, characterized in that: The content generation business refers to a business involving calling a large language model to generate content based on input content.
6. A carbon emission report analysis system, characterized in that: include: Memory, used to store programs; A processor, used to load the program to execute the carbon emission report analysis method as described in any one of claims 1-5.
Citation Information
Patent Citations
Method for selecting text, electronic device, and computer-readable storage medium
WO2022135302A1