Online document editing structured segmentation and itemization control method and system

By considering the calculation of content coherence and logical relationships in online document editing, and combining the hash algorithm to generate identifiers, the problem of inaccurate document level division in the existing technology is solved, and the efficiency of document editing and the accuracy of structured division are improved. .

CN118350353BActive Publication Date: 2024-10-29BEIJING WEIPU TIMES SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410608230.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2024-10-29
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

Existing online document editing technology fails to effectively consider the coherence between contents, resulting in inaccurate document hierarchical division results and an inability to accurately understand the logical structure and semantic relationships of the document.

Method used

By obtaining the requirements document, dividing the document according to font size, calculating the similarity and logical relationship of adjacent sentences, re-dividing and updating the initial requirement content, and using a hash algorithm to generate a unique identifier, ensuring that each requirement item has high coherence and independence.

Benefits of technology

It improves the efficiency of document editing, optimizes the document structure, makes the content clearer and easier to understand, ensures that each requirement item corresponds to the actual identifier, facilitates rapid location, management and retrieval, and improves the clarity and accuracy of document processing. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118350353B_ABST
    Figure CN118350353B_ABST
Patent Text Reader

Abstract

This invention relates to the field of online document editing technology, and more particularly to a method and system for structured segmentation, cutting, and itemization control of online document editing. The method includes: dividing the requirement document according to font size to obtain several initial requirement items and corresponding initial requirement content; calculating the similarity between sentences adjacent to the target sentence; when the similarity calculation result is less than a preset similarity, determining the logical relationship; further dividing the document according to the determination result to obtain updated requirement content and updated requirement items; editing several updated requirement items using a hash algorithm to obtain several actual identifiers; matching the target identifier with the actual identifiers to obtain the target requirement item and corresponding target requirement content; when editing the target requirement content, marking and displaying the edited content and storing it in the target requirement content, and obtaining the stored final requirement content. This invention improves the accuracy of requirement document structure segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of online document editing, and in particular to a method and system for controlling structured segmentation and itemization of online document editing. Background Art

[0002] With the rapid development of information technology, online document editing has become an important tool in the fields of team collaboration, project management, knowledge management, etc.

[0003] The patent document with Chinese patent publication number CN111079402A discloses a document level division method, a document level division device and a readable storage medium. The document level division method includes: obtaining titles in a document and extracting text features of the titles; classifying the titles according to the text features to determine the title categories; determining the level of the titles according to the title categories and arrangement order; wherein the text features include: keyword information, word meaning information and font information.

[0004] The existing technology divides the hierarchical structure into levels according to the title and text features of the document, but does not consider the coherence between the contents. Coherence is crucial to understanding the logical structure and semantic relationship of the document. The lack of coherence analysis causes the hierarchical division results to be inconsistent with actual needs, making the document division results inaccurate. Summary of the invention

[0005] To this end, the present invention provides an online document editing structured segmentation and itemization control method and system, which can solve the problem of inaccurate document result division results by detecting the consistency of the demand content to update the initial demand items obtained by dividing the demand document structure.

[0006] To achieve the above-mentioned object, the present invention provides a method for controlling structured segmentation and itemization of online document editing, comprising: obtaining a requirement document, dividing the requirement document according to the font size, and obtaining a number of initial requirement items and corresponding initial requirement contents according to the division result;

[0007] Obtain keywords in a target sentence and sentences adjacent to the target sentence in the initial demand content, calculate similarities between adjacent sentences based on a number of keywords, and obtain similarity calculation results; when the similarity calculation results are less than a preset similarity, determine whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence, so as to divide the initial demand content again according to the similarity calculation results or the logical judgment results, obtain update demand content, and analyze the update demand content to obtain update demand items according to the analysis results;

[0008] Editing the plurality of update requirement entries by using a hash algorithm to obtain a plurality of actual identifiers;

[0009] The target identifier is matched with the actual identifier to obtain the target requirement entry and the corresponding target requirement content. When the target requirement content is edited, the edited content is marked and displayed and stored in the target requirement content to obtain the final requirement content after storage.

[0010] Furthermore, the step of dividing the requirement document according to the font size includes:

[0011] Preliminarily dividing the requirement document according to the font size of the requirement document to obtain an initial structure;

[0012] Verifying the structure content corresponding to the initial structure to determine the integrity of the structure content;

[0013] When the completeness is greater than a preset completeness, extracting a number of keywords from the structure content;

[0014] Take the keywords as the initial demand items and their corresponding contents as the initial demand contents.

[0015] Furthermore, the step of verifying the structure content corresponding to the initial structure includes:

[0016] Performing character quantity and character comparison on the structure content and the corresponding content in the requirement document;

[0017] Obtaining a first missing degree according to the character quantity comparison result;

[0018] Obtaining a first degree of garbled characters according to the character comparison result;

[0019] The completeness of the structural content is obtained according to the first missing degree and the first garbled degree.

[0020] Furthermore, the step of calculating the similarity between adjacent sentences according to a number of keywords includes:

[0021] Select any sentence in the initial demand content as a target sentence, perform word segmentation processing on the target sentence, and obtain a plurality of first word segmentations;

[0022] Taking the next sentence adjacent to the target sentence as a first detection sentence, performing word segmentation processing on the first detection sentence to obtain a plurality of second word segmentations;

[0023] Taking the previous sentence adjacent to the target sentence as a second detection sentence, performing word segmentation processing on the second detection sentence to obtain a plurality of third word segmentations;

[0024] extracting a number of first keywords from a number of the first participles, extracting a number of second keywords from a number of the second participles, and extracting a number of third keywords from a number of the third participles;

[0025] Input the first keyword, the second keyword, and the third keyword into a word vector model to obtain a first word vector, a second word vector, and a third word vector;

[0026] A first similarity between the first word vector and the second word vector is calculated by a similarity calculation algorithm, and a second similarity between the first word vector and the third word vector is calculated.

[0027] Furthermore, the step of determining whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence includes:

[0028] Determining whether the first keyword, the second keyword, and the third keyword include a logical keyword;

[0029] If none of the first keyword, the second keyword, and the third keyword includes a logical keyword, it is determined that there is no logical relationship between the target sentence and the sentences adjacent to the target sentence;

[0030] If at least one of the first keyword, the second keyword and the third keyword contains a logical keyword, it is determined that there is a logical relationship between the target sentence and the sentences adjacent to the target sentence, so as to divide the initial demand content again according to the logical relationship and obtain updated demand content.

[0031] Furthermore, the step of obtaining update requirement items according to the analysis results includes:

[0032] Determine the requirement items that need to be updated in the initial requirement items according to the division result;

[0033] Rename the requirement items that need to be updated according to the updated requirement content;

[0034] Verify the renamed requirement items, merge the updated requirement contents corresponding to the requirement items with the same name into the same updated requirement item, and complete the update of all requirement items that need to be updated to obtain the updated requirement items and updated requirement contents.

[0035] Furthermore, the step of editing the plurality of update requirement items by using a hash algorithm includes:

[0036] Generating initial identifiers for a number of update requirement entries based on a counted hash algorithm;

[0037] Performing uniqueness determination on a plurality of the initial identifiers, and editing the initial identifiers according to the determination results to obtain actual identifiers;

[0038] The actual identifier and the corresponding requirement item are updated so that a plurality of the updated requirement items correspond to the identifier one by one.

[0039] Furthermore, the step of determining the uniqueness of the initial identifiers includes:

[0040] Create an empty collection;

[0041] Traversing a number of the initial identifiers and comparing them with the empty set, if the initial identifier is unique, adding the initial identifier to the empty set, and comparing the next initial identifier with the added empty set, until all the initial identifiers are added to the empty set and the uniqueness determination is completed;

[0042] If the initial identifier coincides with the empty set after the addition, the repeated part is transformed using a hash function to obtain the actual identifier.

[0043] Furthermore, the step of preliminarily dividing the demand document according to the font size of the demand document includes:

[0044] Identify a number of font sizes in the requirement document, count the number of font sizes corresponding to the number of font sizes, and obtain a font size table;

[0045] The font size with the largest number in the font size table is used as the content font size, and the font size in the font size table that is larger than the content font size is used as the title font size;

[0046] The demand document is preliminarily divided according to the title font size and the content font size.

[0047] Furthermore, the present invention also provides an online document editing structured segmentation cutting and itemization control system, the system comprising:

[0048] A division module is used to obtain a requirement document, divide the requirement document according to the font size, and obtain a number of initial requirement items and corresponding initial requirement contents according to the division result;

[0049] An updating module, connected to the division module, for obtaining keywords in a target sentence and sentences adjacent to the target sentence in the initial demand content, calculating similarities between adjacent sentences based on a number of keywords, and obtaining similarity calculation results, and when the similarity calculation results are less than a preset similarity, determining whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence, and dividing the initial demand content again based on the similarity calculation results or the logical judgment results, obtaining update demand content, and analyzing the update demand content, and obtaining update demand items based on the analysis results;

[0050] An editing module, connected to the updating module, for editing a number of the updating requirement items through a hash algorithm to obtain a number of actual identifiers;

[0051] The acquisition module is connected to the editing module and is used to match the target identifier with the actual identifier to obtain the target requirement item and the corresponding target requirement content. When the target requirement content is edited, the edited content is marked and displayed and stored in the target requirement content to obtain the final requirement content after storage.

[0052] Compared with the prior art, the beneficial effect of the present invention lies in that, through document division and itemization control, the workload of manual editing and collating documents is reduced, thereby improving the efficiency of document editing, and the initial demand content is divided again through similarity calculation results and logical judgment results to ensure that each demand item has high coherence and independence, thereby optimizing the overall structure of the document and making the content clearer and easier to understand, and the identifiers of the updated demand items are edited so that each demand item corresponds one-to-one with the actual identifier, which helps to quickly locate, manage and retrieve the document content later, improving convenience, and users can quickly find and edit the target demand item according to the target identifier. At the same time, the revised edited content will be marked and displayed, which helps users to track and compare changes before and after editing, and improves the clarity of document processing. By obtaining demand documents for centralized acceptance of demands, problems such as demand duplication, overlap, and quality caused by multiple demand sources are solved, which helps to improve the accuracy of structured division of demand documents.

[0053] In particular, by using the font size of the requirements document for preliminary division, the main structure and chapters of the document can be quickly and accurately identified, ensuring that the initial structure is consistent with the actual content, providing a solid foundation for subsequent processing, and by verifying the structural content corresponding to the initial structure, timely discovering and correcting possible omissions or errors in the content, ensuring that the content of each part is complete and accurate, providing reliable data for subsequent keyword extraction and itemization control. By extracting keywords from the structural content, the core content of each part can be accurately summarized, providing strong support for subsequent itemization control based on keywords, and helping to ensure that each requirement item can accurately reflect the key information in the document. Re-verifying the initial structure based on keywords can further ensure the accuracy and rationality of the initial requirement items, thereby improving the quality and consistency of the initial requirement items, and helping to improve the accuracy of the structured division of the requirements document.

[0054] In particular, the difference between the structural content and the actual demand document content can be accurately detected through character quantity comparison and character comparison. The character quantity comparison can find the missing or added content, while the character comparison can find the disorder or error of the characters, so as to ensure the accuracy of the verification result. The first missing degree calculated according to the character quantity comparison result can quantitatively evaluate the missing degree of the structural content, which helps to find out which parts of the content may be incomplete or missing. The first garbled degree calculated according to the character comparison result can quantitatively evaluate the garbled degree of the structural content, revealing potential content errors or format problems. Combined with the first missing degree and the first garbled degree, the completeness of the structural content is comprehensively evaluated, so as to comprehensively reflect the quality status of the content, provide a more comprehensive and accurate basis for subsequent keyword extraction and itemization control, and help to improve the accuracy of the structured division of the demand document.

[0055] In particular, by re-dividing the initial requirement items and determining the requirement items that need to be updated based on the division results, it is ensured that each requirement item more accurately reflects the actual requirements, and the requirement items are renamed to improve the accuracy of the requirement items. By merging the updated requirement content corresponding to the requirement items with the same name, redundancy and repetition can be eliminated, making the organizational structure of the requirement items more compact and clear, which helps to improve the conciseness of the requirement document and maintain the accuracy of the structural division of the requirement document. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A flow chart of a method for controlling structured segmentation and itemization of online document editing provided by an embodiment of the present invention;

[0057] Figure 2 A schematic diagram of a flow chart for calculating the similarity between adjacent sentences in the online document editing structured segmentation and itemization control method provided by an embodiment of the present invention;

[0058] Figure 3 A schematic diagram of a flow chart of editing a requirement item in the online document editing structured segmentation cutting and itemization control method provided by an embodiment of the present invention;

[0059] Figure 4 A structural block diagram of the online document editing structured segmentation and itemization control system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0061] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0062] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.

[0063] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" 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 a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0064] See also Figure 1 As shown, an embodiment of the present invention provides a method for controlling structured segmentation and itemization of online document editing, the method comprising:

[0065] Step S100, obtaining a requirement document, dividing the requirement document according to the font size, and obtaining a number of initial requirement items and corresponding initial requirement contents according to the division result;

[0066] Step S200, obtaining keywords in a target sentence and sentences adjacent to the target sentence in the initial demand content, calculating similarities between adjacent sentences based on a number of keywords, obtaining similarity calculation results, and when the similarity calculation results are less than a preset similarity, determining whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence, so as to divide the initial demand content again according to the similarity calculation results or the logical judgment results, obtain update demand content, and analyze the update demand content to obtain update demand items according to the analysis results;

[0067] Step S300, editing the plurality of update requirement items by using a hash algorithm to obtain a plurality of actual identifiers;

[0068] Step S400, matching the target identifier with the actual identifier, obtaining the target requirement entry and the corresponding target requirement content, and when editing the target requirement content, marking and displaying the edited content and storing it in the target requirement content, obtaining the final requirement content after storage.

[0069] Specifically, the preset similarity described in the embodiment of the present invention is 90%. Based on historical data, setting a higher similarity threshold helps filter out adjacent sentences with low relevance to the target sentence. If the similarity is set too low, it will cause the demand content to be over-segmented, making the analysis too complicated and trivial. Selecting a similarity of 90% avoids over-division while maintaining a certain degree of precision.

[0070] The target identifier is used to locate a unique tag or code for a specific requirement item, which corresponds to the actual identifier;

[0071] Editing the content corresponding to the target requirement item includes: modifying text content, adjusting format, adding or deleting some information, etc. During the editing process, in order to distinguish the original content from the edited content, the edited content is marked, which can be achieved by highlighting, using different colors or fonts, adding comments, etc.

[0072] Specifically, the embodiment of the present invention assumes that the initial demand content is a text describing a business process or technical solution, for example: "With the development of big data technology, enterprises begin to collect and analyze a large amount of user data. This data is not only used to improve products, but also for personalized recommendation services. By analyzing users' purchase history and browsing behavior, enterprises can more accurately predict users' future needs. This brings higher profits and customer satisfaction to enterprises.";

[0073] Divide the initial demand content into sentences based on symbol judgment and extract keywords between adjacent sentences, for example: Sentence 1: With the development of big data technology, companies have begun to collect and analyze a large amount of user data.

[0074] Keywords: Big data technology, enterprise, collection, analysis, user data;

[0075] Sentence 2: These data are not only used to improve products, but also for personalized recommendation services.

[0076] Keywords: data, improved products, personalized recommendation services;

[0077] Sentence 3: By analyzing users’ purchase history and browsing behavior, companies can more accurately predict users’ future needs.

[0078] Keywords: analysis, purchase history, browsing behavior, prediction, future demand;

[0079] The relevance of keywords between adjacent sentences is calculated through text similarity algorithms (such as TF-IDF, cosine similarity, etc.). For example, for sentence 1 and sentence 2, the keyword "data" appears in both sentence 1 and sentence 2, and the similarity is 98%, so sentence 1 and sentence 2 are coherent.

[0080] Specifically, the embodiments of the present invention reduce the workload of manual editing and collating documents through document division and itemization control, thereby improving the efficiency of document editing, and re-dividing the initial demand content through similarity calculation results and logical judgment results to ensure that each demand item has high coherence and independence, thereby optimizing the overall structure of the document and making the content clearer and easier to understand. The identifiers of the updated demand items are edited so that each demand item corresponds one-to-one with the actual identifier, which helps to quickly locate, manage and retrieve the document content later and improves convenience. Users can quickly find and edit the target demand item according to the target identifier, and the revised edited content will be marked and displayed, which helps users track and compare changes before and after editing, improves the clarity of document processing, and centrally accepts demands by obtaining demand documents, which solves the problems of demand duplication, overlap, quality, etc. caused by multiple demand sources, and helps to improve the accuracy of structured division of demand documents.

[0081] Specifically, the step of dividing the requirement document according to the font size includes:

[0082] Preliminarily dividing the requirement document according to the font size of the requirement document to obtain an initial structure;

[0083] Verifying the structure content corresponding to the initial structure to determine the integrity of the structure content;

[0084] When the completeness is greater than a preset completeness, extracting a number of keywords from the structure content;

[0085] Take the keywords as the initial demand items and their corresponding contents as the initial demand contents.

[0086] Specifically, the embodiment of the present invention further includes, when the completeness is less than a preset completeness, copying a portion of the requirement document corresponding to the structural content and pasting it into the initial structural portion.

[0087] Specifically, the embodiment of the present invention extracts several keywords from the structure content, including:

[0088] Performing word segmentation processing on the structure content to obtain a number of word segments;

[0089] The most frequent words among the segmented words are extracted as keywords through an algorithm based on word frequency statistics.

[0090] Specifically, the embodiment of the present invention uses the font size of the requirement document for preliminary division to quickly and accurately identify the main structure and chapters of the document, ensure that the initial structure is consistent with the actual content, and provide a solid foundation for subsequent processing. By verifying the structural content corresponding to the initial structure, it is possible to discover and correct omissions or errors in the content in a timely manner, ensuring that the content of each part is complete and accurate, and providing reliable data for subsequent keyword extraction and itemization control. By extracting keywords from the structural content, the core content of each part can be accurately summarized, providing strong support for subsequent itemization control based on keywords, and helping to ensure that each requirement item can accurately reflect the key information in the document. Re-verifying the initial structure based on keywords can further ensure the accuracy and rationality of the initial requirement items, thereby improving the quality and consistency of the initial requirement items and improving the accuracy of the structured division of the requirement document.

[0091] Specifically, the step of verifying the structure content corresponding to the initial structure includes:

[0092] Performing character quantity and character comparison on the structure content and the corresponding content in the requirement document;

[0093] Obtaining a first missing degree according to the character quantity comparison result;

[0094] Obtaining a first degree of garbled characters according to the character comparison result;

[0095] The completeness of the structural content is obtained according to the first missing degree and the first garbled degree.

[0096] Specifically, in the embodiment of the present invention, the first missing degree can be obtained by dividing the number of characters of the structure content by the number of characters of the corresponding content in the requirement document;

[0097] The first garbled degree may be calculated by similarity calculation between the structure content and the corresponding content in the requirement document, and the similarity calculation result is used as the first garbled degree;

[0098] The similarity can be calculated by a similarity calculation algorithm such as Euclidean distance;

[0099] The completeness can be obtained by multiplying the first missing degree by the first garbled degree;

[0100] If the completeness is obtained according to the above method, practice based on historical data shows that setting the completeness to 0.8 can well balance the false positive rate and the missed positive rate, then the preset completeness is 0.8, and the first garbled degree is calculated by the Euclidean distance algorithm. When the first garbled degree is 1, the structural content is similar to the corresponding content in the requirement document. When the first missing degree is 1, the structural content is not missing. When the missing degree is less than 1, the structural content is missing. Then the completeness corresponding to the complete structural content is 1. The embodiment of the present invention selects 80% as the judgment node to judge and repair the structural content.

[0101] Specifically, the embodiment of the present invention accurately detects the difference between the structural content and the actual demand document content through character quantity comparison and character comparison. The character quantity comparison can find the missing or added content, while the character comparison can find the disorder or error of the character, thereby ensuring the accuracy of the verification result. The first missing degree calculated according to the character quantity comparison result is used to quantitatively evaluate the missing degree of the structural content, which helps to find out which parts of the content may be incomplete or missing. The first garbled degree calculated according to the character comparison result is used to quantitatively evaluate the garbled degree of the structural content, revealing potential content errors or format problems. Combined with the first missing degree and the first garbled degree, the completeness of the structural content is comprehensively evaluated, thereby comprehensively reflecting the quality status of the content, providing a more comprehensive and accurate basis for subsequent keyword extraction and itemization control, and helping to improve the accuracy of the structured division of the demand document.

[0102] See also Figure 2 As shown, the steps of calculating the similarity between adjacent sentences according to a number of keywords include:

[0103] Step S210, selecting any sentence in the initial demand content as a target sentence, performing word segmentation processing on the target sentence, and obtaining a plurality of first word segmentations;

[0104] Step S220, taking the next sentence adjacent to the target sentence as a first detection sentence, performing word segmentation processing on the first detection sentence, and obtaining a plurality of second word segmentations;

[0105] Step S230, taking the previous sentence adjacent to the target sentence as a second detection sentence, performing word segmentation processing on the second detection sentence, and obtaining a plurality of third word segmentations;

[0106] Step S240, extracting a number of first keywords from a number of the first participles, extracting a number of second keywords from a number of the second participles, and extracting a number of third keywords from a number of the third participles;

[0107] Step S250, inputting the first keyword, the second keyword and the third keyword into a word vector model to obtain a first word vector, a second word vector and a third word vector;

[0108] Step S260, calculating the first similarity between the first word vector and the second word vector, and calculating the second similarity between the first word vector and the third word vector by using a similarity calculation algorithm.

[0109] Specifically, the word vector model can be a pre-trained model such as Word2Vec, G loVe, FastText, etc.

[0110] Specifically, the embodiment of the present invention determines that the first detection sentence and the second detection sentence are distinguished by punctuation marks. If the initial demand content is "I like to eat fruit. Apples and bananas are my favorites. They are both sweet and taste good.", and the target sentence is "Apples and bananas are my favorites.", then the first detection sentence is "I like to eat fruit.", and the second detection sentence is "They are both sweet and taste good.".

[0111] Specifically, the step of determining whether there is a logical relationship between the target sentence and the sentences adjacent to the target sentence includes:

[0112] Determining whether the first keyword, the second keyword, and the third keyword include a logical keyword;

[0113] If none of the first keyword, the second keyword, and the third keyword includes a logical keyword, it is determined that there is no logical relationship between the target sentence and the sentences adjacent to the target sentence;

[0114] If at least one of the first keyword, the second keyword and the third keyword contains a logical keyword, it is determined that there is a logical relationship between the target sentence and the sentences adjacent to the target sentence, so as to divide the initial demand content again according to the logical relationship and obtain updated demand content.

[0115] Specifically, the logical keywords described in the embodiment of the present invention include but are not limited to words such as "because", "so", "but", "however", "although", etc. that express logical relationships such as cause and effect, transition, concession, etc. By identifying logical keywords, the logical relationship between sentences can be judged more accurately, and the initial demand content can be divided and updated more accurately.

[0116] Specifically, the method of logical relationship judgment in the embodiment of the present invention helps to improve the accuracy of the structural division of the demand document, making the structured segmentation and itemization control method more accurate and effective. At the same time, through the judgment and processing of logical relationships, the readability and comprehensibility of the document are also improved, allowing users to obtain the required information more conveniently and quickly when using online document editing tools.

[0117] Specifically, the steps of re-dividing the initial requirement content according to the similarity calculation result or the logic judgment result, obtaining the update requirement content, and analyzing the update requirement content to obtain the update requirement items according to the analysis result include:

[0118] Determining the similarity between the target sentence and the first detection sentence and the second detection sentence according to the calculation results of the first similarity and the second similarity;

[0119] If the similarity between the target sentence and the first detection sentence or the second detection sentence is greater than a preset similarity, merging the target sentence and the first detection sentence or the second detection sentence into one required content;

[0120] If the similarity between the target sentence and the first detection sentence and the second detection sentence is less than a preset similarity, detecting whether there are logical relation words between the target sentence and the first detection sentence and the second detection sentence;

[0121] If there are logically related words in the target sentence, the first test sentence, and the second test sentence, the target sentence and the first test sentence or the second test sentence are merged into one requirement content;

[0122] If there are no logically related words between the target sentence and the first test sentence and the second test sentence, split the target sentence and the first test sentence or the second test sentence into three required contents;

[0123] Analyze the updated demand content and extract key information and demand points;

[0124] Based on the extracted key information and demand points, the updated demand content is itemized and controlled to generate a structured demand item list.

[0125] Specifically, the embodiment of the present invention calculates the similarity between the target sentence and the adjacent sentences, and combines the logical relationship judgment to accurately divide and update the initial demand content. According to the judgment result of the semantic relevance, the target sentence is used as an independent demand item or merged with the adjacent sentences to form a more compact and coherent demand item list, thereby improving the accuracy of the structural division of the demand document and making each demand item clearer and more specific, which is convenient for users to quickly obtain the required information. At the same time, by analyzing and itemizing the updated demand content, the readability and comprehensibility of the document are further improved, thereby enhancing the user experience.

[0126] Specifically, the step of obtaining update requirement items according to the analysis results includes:

[0127] Determine the requirement items that need to be updated in the initial requirement items according to the division result;

[0128] Rename the requirement items that need to be updated according to the updated requirement content;

[0129] Verify the renamed requirement items, merge the updated requirement contents corresponding to the requirement items with the same name into the same updated requirement item, and complete the update of all requirement items that need to be updated to obtain the updated requirement items and updated requirement contents.

[0130] Specifically, the step of renaming the requirement items to be updated according to the update requirement content in the embodiment of the present invention includes:

[0131] Extracting keywords from the update requirement content through an algorithm based on word frequency statistics;

[0132] The keyword is used as the name of the update requirement item.

[0133] Specifically, the embodiment of the present invention divides the initial requirement items again, determines the requirement items that need to be updated based on the division results, ensures that each requirement item more accurately reflects the actual requirement, renames the requirement items to improve the accuracy of the requirement items, and eliminates redundancy and repetition by merging the updated requirement content corresponding to the requirement items with the same name, making the organizational structure of the requirement items more compact and clear, which helps to improve the conciseness of the requirement document and maintain the accuracy of the structural division of the requirement document.

[0134] See also Figure 3 As shown, the step of editing the plurality of update requirement entries by using a hash algorithm includes:

[0135] Step S310, generating initial identifiers for a number of update requirement entries based on a counted hash algorithm;

[0136] Step S320, performing uniqueness determination on the initial identifiers, and editing the initial identifiers according to the determination results to obtain actual identifiers;

[0137] Step S330: Update the actual identifier and the corresponding requirement item so that a plurality of the updated requirement items correspond to the identifier one by one.

[0138] Specifically, the step of generating initial identifiers for the plurality of update requirement entries using the count-based hash algorithm in the embodiment of the present invention includes:

[0139] Set a starting value as the starting point for counting;

[0140] Traversing and counting a number of the update requirement items;

[0141] The count value is taken as input, and a hash value is generated as the initial identifier through a hash algorithm.

[0142] Specifically, in the embodiment of the present invention, the starting value is selected as 0, and the hash algorithm can be MD5, SHA-1, etc.

[0143] Specifically, the embodiment of the present invention improves the efficiency and accuracy of editing by using a hash algorithm to quickly generate an initial identifier for each update requirement entry. By judging the uniqueness of the initial identifier, duplicate identifiers in the update requirement entry are avoided, which helps to accurately identify and locate each requirement entry in subsequent processing.

[0144] Specifically, the step of determining the uniqueness of the initial identifiers includes:

[0145] Create an empty collection;

[0146] Traversing a number of the initial identifiers and comparing them with the empty set, if the initial identifier is unique, adding the initial identifier to the empty set, and comparing the next initial identifier with the added empty set, until all the initial identifiers are added to the empty set and the uniqueness determination is completed;

[0147] If the initial identifier coincides with the empty set after the addition, the repeated part is transformed using a hash function to obtain the actual identifier.

[0148] Specifically, the hash function described in the embodiment of the present invention refers to a function that maps the key value of an element in a hash table to a storage location of the element, which is common knowledge among those skilled in the art and will not be described in detail here.

[0149] Specifically, the step of preliminarily dividing the demand document according to the font size of the demand document includes:

[0150] Identify a number of font sizes in the requirement document, count the number of font sizes corresponding to the number of font sizes, and obtain a font size table;

[0151] The font size with the largest number in the font size table is used as the content font size, and the font size in the font size table that is larger than the content font size is used as the title font size;

[0152] The demand document is preliminarily divided according to the title font size and the content font size.

[0153] Specifically, an example of an embodiment of the present invention is: scanning a demand document through a text processing software or a scripting program, and identifying all different font sizes used therein, including 12, 14, and 16;

[0154] By traversing each text element in the document, count the number of times each font size appears in the requirement document. For example, font size 12 appears 500 times in the requirement document, font size 14 appears 20 times in the requirement document, and font size 16 appears 10 times in the requirement document.

[0155] According to the statistical results, the font size table is sorted as follows:

[0156] Font size quantity 12 500 14 20 16 10

[0157] Use 12-point font size for content, and 14-point and 16-point font size for titles;

[0158] Go through the requirements document and use 14 or 16 point font as the title font size, and use it as the dividing boundary to make preliminary divisions of the requirements document.

[0159] See also Figure 4 As shown, the embodiment of the present invention also provides an online document editing structured segmentation cutting and itemization control system, the system comprising:

[0160] A division module 10 is used to obtain a requirement document, divide the requirement document according to the font size, and obtain a number of initial requirement items and corresponding initial requirement contents according to the division result;

[0161] The updating module 20 is connected to the dividing module 10, and is used to obtain keywords in the target sentence and the sentences adjacent to the target sentence in the initial demand content, calculate the similarity between the adjacent sentences according to a number of keywords, and obtain the similarity calculation result. When the similarity calculation result is less than the preset similarity, it is determined whether there is a logical relationship between the target sentence and the sentences adjacent to the target sentence, so as to divide the initial demand content again according to the similarity calculation result or the logical judgment result, obtain the update demand content, and analyze the update demand content to obtain the update demand items according to the analysis result;

[0162] An editing module 30, connected to the updating module 20, for editing a number of the updating requirement items by using a hash algorithm to obtain a number of actual identifiers;

[0163] The acquisition module 40 is connected to the editing module 30, and is used to match the target identifier with the actual identifier to obtain the target requirement entry and the corresponding target requirement content. When the target requirement content is edited, the edited content is marked and displayed and stored in the target requirement content to obtain the final requirement content after storage.

[0164] Specifically, the online document editing structured segmentation cutting and itemization control system provided by the embodiment of the present invention can implement the above-mentioned online document editing structured segmentation cutting and itemization control method, and achieve the same technical effect, which will not be repeated here.

[0165] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for controlling structured segmentation and itemization of online document editing. It is characterized in that include: Obtaining a requirement document, dividing the requirement document according to the font size, and obtaining a number of initial requirement items and corresponding initial requirement contents according to the division result; Obtain keywords in a target sentence and sentences adjacent to the target sentence in the initial demand content, calculate similarities between adjacent sentences based on a number of keywords, and obtain similarity calculation results; when the similarity calculation results are less than a preset similarity, determine whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence, so as to divide the initial demand content again according to the similarity calculation results or the logical judgment results, obtain update demand content, and analyze the update demand content to obtain update demand items according to the analysis results; The steps of calculating the similarity between adjacent sentences according to a number of keywords include: Select any sentence in the initial demand content as a target sentence, perform word segmentation processing on the target sentence, and obtain a plurality of first word segmentations; Taking the next sentence adjacent to the target sentence as a first detection sentence, performing word segmentation processing on the first detection sentence to obtain a plurality of second word segmentations; Taking the previous sentence adjacent to the target sentence as a second detection sentence, performing word segmentation processing on the second detection sentence to obtain a plurality of third word segmentations; extracting a number of first keywords from a number of the first participles, extracting a number of second keywords from a number of the second participles, and extracting a number of third keywords from a number of the third participles; Input the first keyword, the second keyword, and the third keyword into a word vector model to obtain a first word vector, a second word vector, and a third word vector; Calculate the first similarity between the first word vector and the second word vector, and calculate the second similarity between the first word vector and the third word vector by using a similarity calculation algorithm; The steps of re-dividing the initial requirement content according to the similarity calculation result or the logic judgment result, obtaining the update requirement content, and analyzing the update requirement content to obtain the update requirement items according to the analysis result include: Determining the similarity between the target sentence and the first detection sentence and the second detection sentence according to the calculation results of the first similarity and the second similarity; If the similarity between the target sentence and the first detection sentence or the second detection sentence is greater than a preset similarity, merging the target sentence and the first detection sentence or the second detection sentence into one required content; If the similarity between the target sentence and the first detection sentence and the second detection sentence is less than a preset similarity, detecting whether there are logical relation words between the target sentence and the first detection sentence and the second detection sentence; If there are logically related words in the target sentence, the first test sentence, and the second test sentence, the target sentence and the first test sentence or the second test sentence are merged into one requirement content; If there are no logically related words between the target sentence and the first test sentence and the second test sentence, split the target sentence and the first test sentence or the second test sentence into three required contents; Editing the plurality of update requirement entries by using a hash algorithm to obtain a plurality of actual identifiers; The target identifier is matched with the actual identifier to obtain the target requirement entry and the corresponding target requirement content. When the target requirement content is edited, the edited content is marked and displayed and stored in the target requirement content to obtain the final requirement content after storage.

2. The online document editing structured segmentation and itemization control method according to claim 1, It is characterized in that The step of dividing the requirement document according to the font size comprises: Preliminarily dividing the requirement document according to the font size of the requirement document to obtain an initial structure; Verifying the structure content corresponding to the initial structure to determine the integrity of the structure content; When the completeness is greater than a preset completeness, extracting a number of keywords from the structure content; Take the keywords as the initial demand items and their corresponding contents as the initial demand contents.

3. The online document editing structured segmentation and itemization control method according to claim 2, It is characterized in that The step of verifying the structure content corresponding to the initial structure includes: Performing character quantity and character comparison on the structure content and the corresponding content in the requirement document; Obtaining a first missing degree according to the character quantity comparison result; Obtaining a first degree of garbled characters according to the character comparison result; The completeness of the structural content is obtained according to the first missing degree and the first garbled degree.

4. The method for controlling structured segmentation and itemization of online document editing according to claim 3, It is characterized in that The step of determining whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence comprises: Determining whether the first keyword, the second keyword, and the third keyword include a logical keyword; If none of the first keyword, the second keyword, and the third keyword includes a logical keyword, it is determined that there is no logical relationship between the target sentence and the sentences adjacent to the target sentence; If at least one of the first keyword, the second keyword and the third keyword contains a logical keyword, it is determined that there is a logical relationship between the target sentence and the sentences adjacent to the target sentence, so as to divide the initial demand content again according to the logical relationship and obtain updated demand content.

5. The online document editing structured segmentation and itemization control method according to claim 4, It is characterized in that The step of obtaining update requirement items according to the analysis results comprises: Determine the requirement items that need to be updated in the initial requirement items according to the division result; Rename the requirement items that need to be updated according to the updated requirement content; The renamed requirement items are verified, and the update requirement contents corresponding to the requirement items with the same name are merged into the same update requirement item, until all the requirement items that need to be updated are updated, so as to obtain the update requirement items and update requirement contents.

6. The online document editing structured segmentation and itemization control method according to claim 5, It is characterized in that The step of editing the plurality of update requirement items by using a hash algorithm comprises: Generating initial identifiers for a number of update requirement entries based on a counted hash algorithm; Performing uniqueness determination on a plurality of the initial identifiers, and editing the initial identifiers according to the determination results to obtain actual identifiers; The actual identifier and the corresponding requirement item are updated so that a plurality of the updated requirement items correspond to the identifier one by one.

7. The online document editing structured segmentation and itemization control method according to claim 6, It is characterized in that The step of determining the uniqueness of the initial identifiers comprises: Create an empty collection; Traversing a number of the initial identifiers and comparing them with the empty set, if the initial identifier is unique, adding the initial identifier to the empty set, and comparing the next initial identifier with the added empty set, until all the initial identifiers are added to the empty set and the uniqueness determination is completed; If the initial identifier coincides with the empty set after the addition, the repeated part is transformed using a hash function to obtain the actual identifier.

8. The online document editing structured segmentation and itemization control method according to claim 7, It is characterized in that The step of preliminarily dividing the demand document according to the font size of the demand document comprises: Identify a number of font sizes in the requirement document, count the number of font sizes corresponding to the number of font sizes, and obtain a font size table; The font size with the largest number in the font size table is used as the content font size, and the font size in the font size table that is larger than the content font size is used as the title font size; The demand document is preliminarily divided according to the title font size and the content font size.

9. A system using the online document editing structured segmentation and itemization control method according to any one of claims 1 to 8, It is characterized in that include: A division module is used to obtain a requirement document, divide the requirement document according to the font size, and obtain a number of initial requirement items and corresponding initial requirement contents according to the division result; An updating module, connected to the division module, for obtaining keywords in a target sentence and sentences adjacent to the target sentence in the initial demand content, calculating similarities between adjacent sentences based on a number of keywords, and obtaining similarity calculation results, and when the similarity calculation results are less than a preset similarity, determining whether there is a logical relationship between the target sentence and sentences adjacent to the target sentence, and dividing the initial demand content again based on the similarity calculation results or the logical judgment results, obtaining update demand content, and analyzing the update demand content, and obtaining update demand items based on the analysis results; An editing module, connected to the updating module, for editing a number of the updating requirement items through a hash algorithm to obtain a number of actual identifiers; The acquisition module is connected to the editing module and is used to match the target identifier with the actual identifier to obtain the target requirement item and the corresponding target requirement content. When the target requirement content is edited, the edited content is marked and displayed and stored in the target requirement content to obtain the final requirement content after storage.

Citation Information

Patent Citations

  • Document hierarchy division method, document hierarchy division device and readable storage medium

    CN111079402A

  • Demand entry segmentation method

    CN115221868A

  • Method and Apparatus for Automated Bill Timeline

    US20130124376A1

  • System for generating immigration risk assessment data

    US20220343236A1