Article outline extraction method, device and equipment

Through segmentation processing and traversal judgment of outline judgment rules, article outlines are quickly obtained, which solves the resource consumption and time-consuming problems of natural language processing models in long articles, and achieves efficient article outline extraction.

CN119358543AInactive Publication Date: 2025-01-24BEIJING SUWELL TECHNOLOGY CO LTD +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411886674.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, when using natural language processing models for semantic extraction outlines, long articles will lead to resource consumption and time being too long, and the article outline cannot be quickly and efficiently obtained.

Method used

By obtaining the content of the target article, it is processed into multiple paragraphs in sections, and arranged according to the data format of the preset application interface, and determines whether each paragraph is an outline according to the outline judgment rules, so as to quickly obtain the article outline.

Benefits of technology

The outline of the article is achieved quickly and effectively, reducing resource consumption and time cost, especially when processing the long text significantly reduced computing resources and time consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358543A_ABST
    Figure CN119358543A_ABST
Patent Text Reader

Abstract

The invention provides an article outline extraction method, apparatus and device. The method comprises the steps of obtaining target article content; segmenting the target article content to obtain a plurality of target paragraphs; arranging the plurality of target paragraphs according to a data format of a preset application program interface to obtain a paragraph array; performing traversal judgment on a plurality of target paragraphs in the paragraph array according to an outline judgment rule to obtain a judgment result of whether each target paragraph is an outline or not; and obtaining the outline of the target article according to the at least one target paragraph whose judgment result is yes. According to the scheme, the article outline can be quickly and effectively obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer information technology processing technology, and in particular to a method, device and equipment for extracting article outlines. Background Art

[0002] In the era of artificial intelligence, AI writing functions are becoming increasingly popular. When AI is polishing articles, it is necessary to obtain accurate information and descriptions, such as titles, outlines, etc. If a natural language processing model is used to semantically extract an outline, an overly long article will result in resource consumption and excessive time, and it will be impossible to quickly and effectively obtain the article outline. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method, device and equipment for extracting an article outline, which can quickly and effectively obtain the article outline.

[0004] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0005] A method for extracting an article outline, comprising:

[0006] Get the target article content;

[0007] Segmenting the target article content to obtain multiple target paragraphs;

[0008] Arranging the plurality of target paragraphs according to a data format of a preset application program interface to obtain a paragraph array;

[0009] According to the outline judgment rule, multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline;

[0010] According to at least one target paragraph whose judgment result is yes, an outline of the target article is obtained.

[0011] Optionally, the target article content is segmented to obtain multiple target paragraphs, including:

[0012] Parsing the target article content into string content;

[0013] The string content is segmented according to a preset separator to obtain multiple target paragraphs.

[0014] Optionally, the plurality of target paragraphs are arranged according to a data format of a preset application program interface to obtain a paragraph array, including:

[0015] Each target paragraph of the plurality of target paragraphs is arranged as an element of a preset array of a preset application program interface to obtain a paragraph array.

[0016] Optionally, according to the outline judgment rule, multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline, including:

[0017] According to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result;

[0018] According to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline.

[0019] Optionally, according to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result, including:

[0020] The multiple target paragraphs are looped through, and the target paragraphs satisfying any one of the multiple regular rules in the first preset rule are output to obtain a first matching result, wherein the regular rule includes: a paragraph beginning with at least one character that appears in the outline at a frequency higher than a preset value.

[0021] Optionally, according to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline, including:

[0022] The multiple target paragraphs of the first matching result are judged in turn according to the punctuation mark number threshold in the second preset rule, and at least one target paragraph that is less than or equal to the punctuation mark number threshold is output to obtain a judgment result of whether the target paragraph is an outline.

[0023] Optionally, the punctuation mark quantity threshold in the second preset rule is 3.

[0024] The present invention also provides a device for extracting an article outline, comprising:

[0025] Acquisition module, used to obtain the target article content;

[0026] The processing module is used to segment the content of the target article to obtain multiple target paragraphs; arrange the multiple target paragraphs according to the data format of the preset application program interface to obtain a paragraph array; traverse and judge the multiple target paragraphs in the paragraph array according to the outline judgment rule to obtain a judgment result of whether each target paragraph is an outline; and obtain the outline of the target article according to at least one target paragraph whose judgment result is yes.

[0027] The present invention also provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is run by the processor, the method as described above is executed.

[0028] The present invention also provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method.

[0029] The above solution of the present invention includes at least the following beneficial effects:

[0030] The above scheme of the present invention obtains the target article content; segments the target article content to obtain multiple target paragraphs; arranges the multiple target paragraphs according to the data format of the preset application program interface to obtain a paragraph array; traverses and judges the multiple target paragraphs in the paragraph array according to the outline judgment rule to obtain a judgment result of whether each target paragraph is an outline; and obtains the outline of the target article according to at least one target paragraph with a judgment result of yes. The article outline can be obtained quickly and effectively. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 1 is a flow chart of a method for extracting an article outline according to an embodiment of the present invention;

[0032] Figure 2 It is a structural diagram of a device for extracting article outlines according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0034] like Figure 1 As shown, an embodiment of the present invention provides a method for extracting an article outline, comprising:

[0035] Step 11, obtaining the target article content;

[0036] Step 12, segmenting the target article content to obtain multiple target paragraphs;

[0037] Step 13, arranging the plurality of target paragraphs according to a data format of a preset application program interface to obtain a paragraph array;

[0038] Step 14, according to the outline judgment rule, traverse and judge the multiple target paragraphs in the paragraph array to obtain a judgment result of whether each target paragraph is an outline;

[0039] Step 15, obtaining the outline of the target article according to at least one target paragraph for which the judgment result is yes.

[0040] In this embodiment, the outline refers to a programmatic document composed of paragraphs that play a summarizing or commanding role in the article, and the outline content can be subheadings in the article. For articles with outline extraction requirements, the article content is first obtained, and then the article content is segmented to facilitate judgment of which paragraphs belong to the outline paragraphs and which paragraphs belong to the specific content paragraphs. The obtained multiple target paragraphs are sorted according to the preset data format to obtain a paragraph array. The paragraph array is input into a preset application program interface, and the application program traverses and judges whether each target paragraph is an outline according to the preset outline judgment rules, and finally outputs the judgment result of each target paragraph. The outline of the target article can be obtained by integrating all the target paragraphs judged as "yes".

[0041] Specifically, the input parameter format of the application program interface is shown in Table 1 below:

[0042] Table 1, Input parameters

[0043]

[0044] Where contentArry is an array containing content, and Arry is an array. The input parameter of the application API interface is an array consisting of the target article content, where each paragraph is an item in the array.

[0045] The output parameter format of the application program interface is shown in Table 2 below:

[0046] Table 2, parameters

[0047]

[0048] Json is a lightweight data exchange format. The application judges each target paragraph in turn according to the preset regular rules and outputs the judgment result of whether each target paragraph is an outline. In the output parameter design of this embodiment, an identifier is added before each target paragraph. The text identifier indicates that the target paragraph belongs to the article content, not the outline; the isOutline identifier indicates that the target paragraph is an outline paragraph. The outline of the target article can be obtained by integrating all the target paragraphs with the isOutline identifier.

[0049] In an optional embodiment of the present invention, step 12 may include:

[0050] Step 121, parsing the target article content into a string content;

[0051] Step 122, segmenting the string content according to preset delimiters to obtain multiple target paragraphs.

[0052] In this embodiment, the target segmentation function is called to break the target article content in string format at the specified position. The paragraphs are marked in the form of a preset separator, and the preset separator may be ",". Of course, it is not limited to using "," to separate multiple target paragraphs, and "." or other symbols may also be used to separate paragraphs.

[0053] Specifically, the target paragraphs after segmentation may be as shown in Table 3 below.

[0054] Table 3, Article segmentation

[0055]

[0056] The content between “,” and “,” is the target paragraph after segmentation.

[0057] In an optional embodiment of the present invention, step 13 may include:

[0058] Step 131 , arranging each of the plurality of target paragraphs as an element of a preset array of a preset application program interface to obtain a paragraph array.

[0059] In this embodiment, each segmented target paragraph is taken as an element in an array, and all target paragraphs are arranged in order according to the content of the article, so as to obtain a paragraph array. Here, each target paragraph can also be arranged in a matrix to implement a traversal operation to determine whether the paragraph is an outline.

[0060] In an optional embodiment of the present invention, step 14 may include:

[0061] Step 141, according to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result;

[0062] Step 142, according to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline.

[0063] In this embodiment, all target paragraphs are sequentially matched in the order of the first preset rule and the second preset rule. First, the first preset rule is matched to obtain multiple target paragraphs that meet the first preset rule. The multiple target paragraphs that meet the first preset rule are used as the first matching result. Then, the multiple target paragraphs that meet the first preset rule are continuously matched with the second preset rule, and finally, paragraphs that meet both the first preset rule and the second preset rule are obtained. When a paragraph meets both the first preset rule and the second preset rule, it is considered an outline paragraph, and an isOutline identifier is added to this paragraph. In contrast, when a certain paragraph does not meet any one of the first preset rule or the second preset rule, it is considered not an outline paragraph, and a text identifier is added to this paragraph.

[0064] In an alternative embodiment of the present invention, step 141 may include:

[0065] Step 1411, loop through the multiple target paragraphs, output the target paragraphs that meet any one of the multiple regular rules in the first preset rule to obtain the first matching result. The regular rules include: paragraphs starting with at least one character that appears in the outline with a frequency higher than a preset value. Here, for example, based on a preset number of outline-containing articles as a data set for statistics, it is obtained that characters such as "its", "the", characters representing sequence numbers, and some other special characters that appear with a higher frequency in the outline can be determined that the text containing these special characters will also be outline text. The statistical method here may include: the char_frequency function in the Python language accepts a text (article) as a parameter. It traverses each character in the string. If the character already exists in the dictionary frequency_dict, the corresponding value (i.e., the number of occurrences) is incremented by 1; if the character does not exist in the dictionary, it is added to the dictionary and its number of occurrences is initialized to 1. Finally, this dictionary is returned, where the key is the character and the value is the frequency of the character's occurrence. Or use the Counter class in the collections module in the Python language. This function accepts a string text and directly uses the Counter class to count the character frequencies and return the result. These characters that appear with a higher frequency in the outline are used as the basis for determining the regular rules.

[0066] In this embodiment, the first preset rule includes multiple regular rules, and each regular rule summarizes an outline situation according to the common outline-term usage habits in Chinese articles. Preferably, the regular rule is summarized according to the first character at the beginning of the outline and the following several characters. When a target paragraph meets any one of the multiple regular rules in the first preset rule, it is considered that the target paragraph meets the first preset rule.

[0067] Specifically, the regular rule in this embodiment can be as follows:

[0068] (^[Qi][OneTwoThreeFourFiveSixSevenEightNineTen]+[Shi])

[0069] The specific meaning of this regular rule is: match the lines that start with "Qi", followed by one or more Chinese numerals (OneTwoThreeFourFiveSixSevenEightNineTen), and end with "Shi".

[0070] The outline paragraphs that conform to this regular rule can be:

[0071] One refers to the relevant laws, regulations and industry standards that must be strictly observed during the project implementation process to ensure the compliance and safety of the project.

[0072] The code of this regular rule is:

[0073] / / Define the regular expression

[0074] const regex = / ^(Qi)[OneTwoThreeFourFiveSixSevenEightNineTen]+[Shi] / ;

[0075] / Example:

[0076] const text = `

[0077] One refers to the relevant laws, regulations and industry standards that must be strictly observed during the project implementation process to ensure the compliance and safety of the project.

[0078] Two should focus on the selection and evaluation of suppliers to ensure the stability and reliability of the supply chain.

[0079] Other content: This line will not be matched.

[0080] `;

[0081] / / Use the regular expression to match and extract the segments that meet the conditions

[0082] const lines = text.split('\n');

[0083] const matchedLines = lines.filter(line => regex.test(line));

[0084] / / Output the matched segments

[0085] matchedLines.forEach((line, index) => {

[0086] console.log(`Matched line ${index + 1}: ${line}`);

[0087] });

[0088] In this embodiment, the regular rules further include various rules such as the following examples:

[0089] 2. (^[Article][1-9][0-9]?[0-9]?[.])

[0090] Interpretation: Matches lines that start with "Article", followed by 1 to 3 digits, and end with ".".

[0091] Example: Article 1. Project Background: This project aims to address the supply chain bottlenecks in the current market and improve overall operational efficiency.

[0092] 3. (^[Article][1-9][0-9]?[0-9]?[,])

[0093] Interpretation: Matches lines that start with "Article", followed by 1 to 3 digits, and end with ",".

[0094] Example: Article 1, Project Objectives: By introducing an advanced logistics management system, optimize inventory management and distribution processes to reduce operational costs.

[0095] 4. (^[Its][one|two|three|four|five|six|seven|eight|nine|ten]+[should])

[0096] Interpretation: Matches lines that start with "Its", followed by one or more Chinese numerals (one, two, three, four, five, six, seven, eight, nine, ten), and end with "should".

[0097] Example: Its two should focus on the selection and evaluation of suppliers to ensure the stability and reliability of the supply chain.

[0098] 5. (^[Its][1-9][0-9]?[0-9]?[,])

[0099] Interpretation: Matches lines that start with "Its", followed by 1 to 3 digits, and end with ",".

[0100] Example: Its 1, The project team needs to have rich industry experience and professional knowledge to address various challenges in project implementation.

[0101] 6. (^[Article][one|two|three|four|five|six|seven|eight|nine|ten]+[.])

[0102] Interpretation: Matches lines that start with "Article", followed by one or more Chinese numerals (one, two, three, four, five, six, seven, eight, nine, ten), and end with ".".

[0103] Example: First. Project Overview: This project aims to enhance the core competitiveness of the enterprise through technological innovation.

[0104] 7. (^[Article][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[Clause])

[0105] Interpretation: Matches lines that start with "Article" followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with "Clause".

[0106] Example: Article 1: Before the project starts, a detailed market research and demand analysis are required to ensure the feasibility of the project.

[0107] 8. (^[Chapter][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[Chapter])

[0108] Interpretation: Matches lines that start with "Chapter" followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with "Chapter".

[0109] Example: Chapter 1: Project Background and Objectives: This chapter will introduce in detail the background, objectives, and expected outcomes of the project.

[0110] 9. (^[Its][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[.])

[0111] Interpretation: Matches lines that start with "Its" followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with ".".

[0112] Example: Its Two. During the project implementation process, regular progress evaluations and risk management are required to ensure the project progresses as planned.

[0113] 10. (^[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[Requirement])

[0114] Interpretation: Matches lines that start with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with "Requirement".

[0115] Example: Two Requirements. Key attention should be paid to the cost control and resource optimization of the project to ensure the economic benefits of the project.

[0116] 11. (^[Article][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[,])

[0117] Interpretation: Matches lines that start with "Article" followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with ",".

[0118] Example: Article 1, The project team should have the ability of cross - departmental collaboration to ensure the smooth connection of all aspects of the project.

[0119] 12. (^[Qi][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[,])

[0120] Interpretation: Matches lines that start with "Qi" followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with ",".

[0121] Example:其二, During the project implementation process, it is necessary to conduct regular progress evaluations and risk management to ensure the project progresses as planned.

[0122] 13. (^[Di][1 - 9][0 - 9]?[0 - 9]?[Yao])

[0123] Interpretation: Matches lines that start with "Di" followed by 1 to 3 digits and end with "Yao".

[0124] Example:第1要:Before the project starts, it is necessary to conduct a detailed market research and requirements analysis to ensure the feasibility of the project.

[0125] 14. (^[1 - 9][0 - 9]?[0 - 9]?[)])

[0126] Interpretation: Matches lines that start with 1 to 3 digits and end with ")".

[0127] Example: 1)Project background: This project aims to solve the supply chain bottleneck problem in the current market and improve the overall operational efficiency.

[0128] 15. (^[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[)])

[0129] Interpretation: Matches lines that start with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with ")".

[0130] Example: 一) Project objectives: By introducing an advanced logistics management system, optimize inventory management and distribution processes to reduce operating costs.

[0131] 16. (^[1 - 9][0 - 9]?[0 - 9]?[Shi])

[0132] Interpretation: Matches lines that start with 1 to 3 digits and end with "Shi".

[0133] Example: 1是:The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0134] 17. (^[Qi][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[,])

[0135] Interpretation: Match lines that start with "其", followed by one or more Chinese numerals (一二三四五六七八九十), and end with ",".

[0136] Example: 其二, During the project implementation process, regular progress evaluations and risk management are required to ensure the project progresses as planned.

[0137] 18. (^[第][一二三四五六七八九十]+[.])

[0138] Interpretation: Match lines that start with "第", followed by one or more Chinese numerals (一二三四五六七八九十), and end with ".".

[0139] Example: 第一. Project Overview: This project aims to enhance the core competitiveness of the enterprise through technological innovation.

[0140] 19. (^[(][1-9][0-9]?[0-9]?[)])

[0141] Interpretation: Match lines that start with "(", followed by 1 to 3 digits, and end with ")".

[0142] Example: (1)Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0143] 20. (^[其][1-9][0-9]?[0-9]?[,])

[0144] Interpretation: Match lines that start with "其", followed by 1 to 3 digits, and end with ",".

[0145] Example: 其1, The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0146] 21. (^[1-9][0-9]?[0-9]?[,])

[0147] Interpretation: Match lines that start with 1 to 3 digits and end with ",".

[0148] Example: 1, Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0149] 22. (^[其][1-9][0-9]?[0-9]?[.])

[0150] Interpretation: Match lines that start with "其", followed by 1 to 3 digits, and end with ".".

[0151] Example: 1. The project team needs to have rich industry experience and professional knowledge to cope with various challenges in project implementation.

[0152] 23. (^[Article][One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten]+[is])

[0153] Interpretation: Matches lines starting with "Article", followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten), and ending with "is".

[0154] Example: Article One is: The project team needs to have rich industry experience and professional knowledge to cope with various challenges in project implementation.

[0155] 24. (^[Its][One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten]+[,])

[0156] Interpretation: Matches lines starting with "Its", followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten), and ending with ",".

[0157] Example: Its Two, During project implementation, it is necessary to conduct regular progress evaluations and risk management to ensure the project progresses as planned.

[0158] 25. (^[One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten]+[,])

[0159] Interpretation: Matches lines starting with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and ending with ",".

[0160] Example: Two, Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes to reduce operating costs.

[0161] 26. (^[Article][One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten]+[,])

[0162] Interpretation: Matches lines starting with "Article", followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten), and ending with ",".

[0163] Example: Article One, The project team needs to have cross - departmental collaboration capabilities to ensure the smooth connection of all project links.

[0164] 27. (^[One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten]+[,])

[0165] Interpretation: Matches lines starting with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and ending with ",".

[0166] Example: Two, Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes to reduce operating costs.

[0167] 28. (^[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[is])

[0168] Interpretation: Matches lines that start with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with "is".

[0169] Example: Two is: The project team needs to have rich industry experience and professional knowledge to address various challenges in project implementation.

[0170] 29. (^[1-9][0-9]?[0-9]?[.])

[0171] Interpretation: Matches lines that start with 1 to 3 digits and end with ".".

[0172] Example: 1. Project background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0173] 30. (^[1-9][0-9]?[0-9]?[,])

[0174] Interpretation: Matches lines that start with 1 to 3 digits and end with ",".

[0175] Example: 1, Project background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0176] 31. (^[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[,])

[0177] Interpretation: Matches lines that start with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with ",".

[0178] Example: Two, Project objective: By introducing an advanced logistics management system, optimize inventory management and distribution processes, and reduce operating costs.

[0179] 32. (^[The][1-9][0-9]?[0-9]?[is])

[0180] Interpretation: Matches lines that start with "The", followed by 1 to 3 digits, and end with "is".

[0181] Example: The 1 is: The project team needs to have rich industry experience and professional knowledge to address various challenges in project implementation.

[0182] 33. (^[1-9][0-9]?[0-9]?[.])

[0183] Interpretation: Match lines starting with 1 to 3 digits and ending with ".".

[0184] Example: 1. Project Background: This project aims to address the supply chain bottleneck in the current market and improve overall operational efficiency.

[0185] 34. (^[1-9][0-9]?[0-9]?[要])

[0186] Interpretation: Match lines starting with 1 to 3 digits and ending with "要".

[0187] Example: 1要: Before the project starts, detailed market research and demand analysis are required to ensure the feasibility of the project.

[0188] 35. (^[1-9][0-9]?[0-9]?[)])

[0189] Interpretation: Match lines starting with 1 to 3 digits and ending with ")".

[0190] Example: 1) Project Background: This project aims to address the supply chain bottleneck in the current market and improve overall operational efficiency.

[0191] 36. (^[第][1-9][0-9]?[0-9]?[,])

[0192] Interpretation: Match lines starting with "第", followed by 1 to 3 digits, and ending with ",".

[0193] Example: 第1, The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0194] 37. (^[一二三四五六七八九十]+[)])

[0195] Interpretation: Match lines starting with one or more Chinese numerals (一二三四五六七八九十) and ending with ")".

[0196] Example: 一)Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes, and reduce operating costs.

[0197] 38. (^[(][一二三四五六七八九十]+[)])

[0198] Interpretation: Match lines starting with "(" followed by one or more Chinese numerals (一二三四五六七八九十) and ending with ")".

[0199] Example: (I) Project Objectives: By introducing an advanced logistics management system, optimize inventory management and distribution processes, and reduce operating costs.

[0200] 39. (^[Qi][1-9][0-9]?[0-9]?[、])

[0201] Interpretation: Match lines starting with "Qi", followed by 1 to 3 digits, and ending with "、".

[0202] Example: Qi 1、The project team needs to have rich industry experience and professional knowledge to address various challenges in project implementation.

[0203] 40. (^[Di][Yi Er San Si Wu Liu Qi Ba Jiu Shi]+[Yao])

[0204] Interpretation: Match lines starting with "Di", followed by one or more Chinese numerals (Yi Er San Si Wu Liu Qi Ba Jiu Shi), and ending with "Yao".

[0205] Example: Di Yi Yao: Before project startup, detailed market research and demand analysis are required to ensure project feasibility.

[0206] 41. (^[(][1-9][0-9]?[0-9]?[)])

[0207] Interpretation: Match lines starting with "(", followed by 1 to 3 digits, and ending with ")".

[0208] Example: (1) Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0209] 42. (^[〔][1-9][0-9]?[0-9]?[〕])

[0210] Interpretation: Match lines starting with "〔", followed by 1 to 3 digits, and ending with "〕".

[0211] Example: 〔1〕Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0212] 43. (^[Qi][1-9][0-9]?[0-9]?[.])

[0213] Interpretation: Match lines starting with "Qi", followed by 1 to 3 digits, and ending with ".".

[0214] Example: Qi 1. The project team needs to have rich industry experience and professional knowledge to address various challenges in project implementation.

[0215] 44. (^[One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten]+[.])

[0216] Interpretation: Matches lines that start with one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten) and end with a “.”

[0217] Example: Two. Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes, and reduce operating costs.

[0218] 45. (^[(][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten][)])

[0219] Interpretation: Matches lines that start with “(”, followed by one or more Chinese numerals (One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten), and end with “)”.

[0220] Example: (One) Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes, and reduce operating costs.

[0221] 46. (^[1-9][0-9]?[0-9]?[,])

[0222] Interpretation: Matches lines that start with 1 to 3 digits and end with a “,”.

[0223] Example: 1, Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0224] 47. (^[Its][1-9][0-9]?[0-9]?[is])

[0225] Interpretation: Matches lines that start with “Its”, followed by 1 to 3 digits, and end with “is”.

[0226] Example: Its 1 is: The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0227] 48. (^[Its][1-9][0-9]?[0-9]?[should])

[0228] Interpretation: Matches lines that start with “Its”, followed by 1 to 3 digits, and end with “should”.

[0229] Example: Its 1 should: Before the project starts, detailed market research and requirements analysis need to be carried out to ensure the feasibility of the project.

[0230] 49. (^[Article][One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten][、])

[0231] Interpretation: Match lines that start with "第" (Di), followed by one or more Chinese numerals (one, two, three, four, five, six, seven, eight, nine, ten), and end with "、" (comma).

[0232] Example: First, Project Background: This project aims to address the supply chain bottlenecks in the current market and improve overall operational efficiency.

[0233] 50. (^[第][1-9][0-9]?[0-9]?[,])

[0234] Interpretation: Match lines that start with "第" (Di), followed by 1 to 3 digits, and end with "," (comma).

[0235] Example: No. 1, The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0236] 51. (^[一二三四五六七八九十]+[.])

[0237] Interpretation: Match lines that start with one or more Chinese numerals (one, two, three, four, five, six, seven, eight, nine, ten) and end with "." (dot).

[0238] Example: Two. Project Goals: By introducing an advanced logistics management system, optimize inventory management and distribution processes to reduce operational costs.

[0239] 52. (^[其][一二三四五六七八九十]+[.])

[0240] Interpretation: Match lines that start with "其" (Qi), followed by one or more Chinese numerals (one, two, three, four, five, six, seven, eight, nine, ten), and end with "." (dot).

[0241] Example: Second. During project implementation, it is necessary to conduct regular progress evaluations and risk management to ensure the project progresses as planned.

[0242] 53. (^[第][1-9][0-9]?[0-9]?[.])

[0243] Interpretation: Match lines that start with "第" (Di), followed by 1 to 3 digits, and end with "." (dot).

[0244] Example: No. 1. The project team needs to have rich industry experience and professional knowledge to address various challenges during project implementation.

[0245] 54. (^[abcd][,.、: ])

[0246] Interpretation: Match lines that start with "a", "b", "c", or "d", followed by ",", ".", "、" (comma), ":" (colon), or space.

[0247] Example: a. Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0248] 55. (^[ABCD][,.、: ])

[0249] Interpretation: Matches a line that starts with "A", "B", "C", "D", followed by ",",".",",",":" or a space.

[0250] Example: A. Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0251] 56. (^[(((][abcd][,,,.)) ]+)

[0252] Interpretation: Matches a line that starts with "(" or "(", followed by "a", "b", "c", "d", and then followed by ",",",",",",",".",")",")" or a space.

[0253] Example: (a) Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0254] 57. (^[(((][ABCD][,,,.)) ]+)

[0255] Interpretation: Matches a line that starts with "(" or "(", followed by "A", "B", "C", "D", and then followed by ",",",",",",",".",")",")" or a space.

[0256] Example: (A) Project Background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0257] 58. (^[①②③④⑤⑥⑦⑧⑨⑩⑪⑫] )+

[0258] Interpretation: Matches a line that starts with any character from "①" to "⑫".

[0259] Example: ① Project background: This project aims to solve the supply chain bottleneck problem in the current market and improve overall operational efficiency.

[0260] In an optional embodiment of the present invention, step 142 may include:

[0261] Step 1421, the multiple target paragraphs of the first matching result are judged in turn according to the punctuation mark number threshold in the second preset rule, and at least one target paragraph that is less than or equal to the punctuation mark number threshold is output to obtain a judgment result of whether the target paragraph is an outline. Preferably, the punctuation mark number threshold in the second preset rule is 3, of course, the punctuation mark number threshold here is not limited to 0, 1, 2, 3, and can also be determined according to actual conditions, such as integers such as 4 and 5.

[0262] In this embodiment, the second preset rule is: determine whether the number of punctuation marks contained in the paragraph is less than or equal to the punctuation mark number threshold. When the number of punctuation marks in the target paragraph is less than or equal to the punctuation mark number threshold, the target paragraph is considered to meet the second preset rule. When the number of punctuation marks in the target paragraph is greater than the punctuation mark number threshold, the target paragraph is considered not to meet the second preset rule.

[0263] The above method of the present invention, after obtaining the outline of the target article, may further include:

[0264] The outline of the target article is input into the corresponding artificial intelligence big model to output the corresponding target article. Due to the accurate information and description language of the input outline, the artificial intelligence big model can output a more accurate target article.

[0265] The above-mentioned embodiment of the present invention extracts the article outline based on rule analysis, and solves the problem that the natural language processing model will consume too much resources and take too long to extract the outline when the outline is extracted semantically by defining rules, traversing the input array, extracting the outline and outputting the results. Furthermore, it reduces resource consumption and time cost, especially when processing long texts, and can significantly reduce the consumption of computing resources and time. By traversing the input array once, combined with rule matching and punctuation mark restrictions, the method of the present invention can complete the analysis and extraction of the outline in a relatively short time, thereby improving processing efficiency.

[0266] The method of the present invention limits the number of punctuation marks when processing outline lines, ensuring that each item has less than 3 punctuation marks. This limitation avoids the errors caused by excessive punctuation marks commonly seen in the prior art, and improves the accuracy of outline analysis.

[0267] The method of the present invention can be used in any client by customizing outline rules.

[0268] The method of the present invention can be referenced and used in any environment by customizing outline rules, thus avoiding adaptation problems.

[0269] like Figure 2As shown, the embodiment of the present invention further provides an article outline extraction device 20, comprising:

[0270] An acquisition module 21 is used to acquire the target article content;

[0271] The processing module 22 is used to segment the content of the target article to obtain multiple target paragraphs; arrange the multiple target paragraphs according to the data format of the preset application program interface to obtain a paragraph array; traverse and judge the multiple target paragraphs in the paragraph array according to the outline judgment rule to obtain a judgment result of whether each target paragraph is an outline; and obtain the outline of the target article according to at least one target paragraph whose judgment result is yes.

[0272] Optionally, the target article content is segmented to obtain multiple target paragraphs, including:

[0273] Parsing the target article content into string content;

[0274] The string content is segmented according to a preset separator to obtain multiple target paragraphs.

[0275] Optionally, the plurality of target paragraphs are arranged according to a data format of a preset application program interface to obtain a paragraph array, including:

[0276] Each target paragraph of the plurality of target paragraphs is arranged as an element of a preset array of a preset application program interface to obtain a paragraph array.

[0277] Optionally, according to the outline judgment rule, multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline, including:

[0278] According to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result;

[0279] According to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline.

[0280] Optionally, according to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result, including:

[0281] The multiple target paragraphs are looped through, and the target paragraphs satisfying any one of the multiple regular rules in the first preset rule are output to obtain a first matching result, wherein the regular rule includes: a paragraph beginning with at least one character that appears in the outline at a frequency higher than a preset value.

[0282] Optionally, according to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline, including:

[0283] The multiple target paragraphs of the first matching result are judged in turn according to the punctuation mark number threshold in the second preset rule, and at least one target paragraph that is less than or equal to the punctuation mark number threshold is output to obtain a judgment result of whether the target paragraph is an outline.

[0284] Optionally, the punctuation mark quantity threshold in the second preset rule is 3.

[0285] It should be noted that the device is a device corresponding to the above method, and all implementation methods in the above method embodiments are applicable to the embodiments of the device and can achieve the same technical effects.

[0286] The embodiment of the present invention further provides a computing device, comprising: a processor, a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0287] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method. All implementations in the above method embodiment are applicable to this embodiment and can achieve the same technical effect.

[0288] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0289] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0290] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0291] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0292] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0293] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.

[0294] In addition, it should be pointed out that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understandable that all or any steps or components of the method and apparatus of the present invention can be implemented in hardware, firmware, software or a combination thereof in any computing device (including processors, storage media, etc.) or a network of computing devices, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.

[0295] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.

[0296] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for extracting an article outline, characterized in that: include: Get the target article content; Segmenting the target article content to obtain multiple target paragraphs; Arranging the plurality of target paragraphs according to a data format of a preset application program interface to obtain a paragraph array; According to the outline judgment rule, multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline; According to at least one target paragraph whose judgment result is yes, an outline of the target article is obtained.

2. The method for extracting an article outline according to claim 1, characterized in that: The target article content is segmented to obtain multiple target paragraphs, including: Parsing the target article content into string content; The string content is segmented according to a preset separator to obtain multiple target paragraphs.

3. The method for extracting an article outline according to claim 1, characterized in that: Arrange the multiple target paragraphs according to the data format of the preset application program interface to obtain a paragraph array, including: Each target paragraph of the plurality of target paragraphs is arranged as an element of a preset array of a preset application program interface to obtain a paragraph array.

4. The method for extracting an article outline according to claim 1, characterized in that: According to the outline judgment rule, multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline, including: According to a first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result; According to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline.

5. The method for extracting an article outline according to claim 4, characterized in that: According to the first preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the paragraph array in turn to obtain a first matching result, including: The multiple target paragraphs are looped through, and the target paragraphs satisfying any one of the multiple regular rules in the first preset rule are output to obtain a first matching result, wherein the regular rule includes: a paragraph beginning with at least one character that appears in the outline at a frequency higher than a preset value.

6. The method for extracting an article outline according to claim 4, characterized in that: According to the second preset rule in the outline judgment rule, outline matching is performed on each target paragraph in the first matching result in turn to obtain a judgment result of whether each target paragraph is an outline, including: The multiple target paragraphs of the first matching result are judged in turn according to the punctuation mark number threshold in the second preset rule, and at least one target paragraph that is less than or equal to the punctuation mark number threshold is output to obtain a judgment result of whether the target paragraph is an outline.

7. The method for extracting article outline according to claim 6, characterized in that: The punctuation mark quantity threshold in the second preset rule is 3.

8. A device for extracting article outlines, characterized in that: include: Acquisition module, used to obtain the target article content; A processing module, used for segmenting the target article content to obtain multiple target paragraphs; The multiple target paragraphs are arranged according to the data format of the preset application program interface to obtain a paragraph array; according to the outline judgment rule, the multiple target paragraphs in the paragraph array are traversed and judged to obtain a judgment result of whether each target paragraph is an outline; according to at least one target paragraph with a judgment result of yes, an outline of the target article is obtained.

9. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Directory generation method and apparatus applied to file format conversion scene

    CN106326194A

  • Complex PDF structure analysis method and device based on neural network

    CN110598191A

  • Document title tree construction method and device, electronic equipment and storage medium

    CN111460083A

  • Article outline generation method and device and storage medium

    CN117633214A

  • Manufacturing method of electronic device, method of measuring and film forming apparatus

    KR1020210122176A