Project classification method and system based on item content identification
By using TextRank and TF-IDF algorithms in project management combined with EMD distance calculation methods, the problem of inaccurate project classification is solved, and the precise classification and management efficiency of projects are improved.
Patent Information
- Application Number
- CN202411303249.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology is difficult to adapt to the diversity and complexity of projects, resulting in insufficient project classification and low management efficiency.
By establishing a database, the keywords of the target project are extracted using the TextRank algorithm, and combined with the TF-IDF and EMD distance calculation methods, we can determine which reference categories the target project belongs to.
Accurate classification of projects has been achieved, management efficiency has been improved, and the diversity and complexity of projects has been addressed.
Smart Images

Figure CN119088971A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of project classification, and in particular to a project classification method and system based on project content recognition. Background Art
[0002] A project is an independent one-time task that people organize human, material, financial and other resources through efforts and various methods, according to the relevant planning and arrangement of the business model, in order to achieve the goals defined by quantity and quality indicators. The core of a project lies in its one-time and independent nature. Each project has its own unique goals and requirements. In order to achieve these goals, project managers need to coordinate various resources and apply appropriate methods to ensure the smooth progress of the project.
[0003] Categorizing projects can help project managers understand project types more clearly, thereby developing more targeted management strategies and improving management efficiency. Conventional classification methods are usually based on the nature, scale, complexity, risk and other key characteristics of projects. However, these methods may not be able to adapt to the diversity and complexity of projects. For example, some projects may span multiple categories and are difficult to classify into a single category. Summary of the invention
[0004] The purpose of the present invention is to provide a project classification method and system based on project content recognition to solve the above technical problems.
[0005] The purpose of the present invention can be achieved through the following technical solutions: A project classification method based on project content recognition includes the following steps: S1: Establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are classified items, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; S2: Determine the target item, which is the item to be classified after preprocessing, segment the target item, and determine the keywords therein by the TextRank algorithm, and use them as target keywords, and encode the target keywords to obtain numerical target keywords, and convert the numerical target keywords into decimal to obtain target values, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, and use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the hth classification value; S3: Determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, determine that the target item belongs to the reference classification corresponding to the classification set, and Lyc represents a preset EMD distance threshold.
[0006] As a further solution of the present invention: in the step S2, the process of preprocessing the items to be classified specifically includes: Remove special characters in the items to be classified by regular expressions and replace the special characters with blank strings. The special characters include punctuation marks, URLs, English, serial numbers and numbers. The stop words in the items to be classified are removed by using a preset stop word list.
[0007] As a further solution of the present invention: in the step S3, when there is no EMD distance L<Lyc between the target set and the classification set, a prompt message is sent to remind the staff.
[0008] As a further solution of the present invention: in the step S3, the process of determining the EMD distance threshold Lyc specifically includes: Take the reference items in the same reference classification as the evaluation items, and determine the evaluation set (G1, G2, ..., Gy), where Gy represents the decimal value of the yth numerical evaluation keyword in the evaluation item, and the numerical evaluation keyword is determined by coding the keyword in the evaluation item; Calculate the EMD distance between the evaluation sets, and determine the maximum value Lmax and the minimum value Lmin therein, calculate the distance difference ΔL=Lmax-Lmin, when the distance difference ΔL is greater than or equal to the preset difference threshold, remove the maximum value Lmax and the minimum value Lmin, and determine the maximum value and the minimum value again, and repeat the above steps until the corresponding distance difference ΔL after removing the maximum value and the minimum value is less than the difference threshold, calculate the mean of the EMD distances that have not been removed at this time, and use it as the EMD distance threshold.
[0009] As a further solution of the present invention: in the process of calculating the mean of the EMD distances that have not been removed, when the difference between a certain EMD distance that has not been removed and the mean is greater than or equal to a preset value, the EMD distance is removed and the mean is recalculated.
[0010] A project classification system based on project content recognition, comprising: Initial module: establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are items that have been classified, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; Processing module: determine the target item, which is the item to be classified after preprocessing, segment the target item, determine the keywords therein by the TextRank algorithm, and use them as target keywords, encode the target keywords to obtain numerical target keywords, convert the numerical target keywords into decimal, obtain the target value, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, and use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the hth classification value; Classification module: determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, the target item is determined to belong to the reference classification corresponding to the classification set. Lyc represents a preset EMD distance threshold.
[0011] Beneficial effects of the present invention: In the present invention, a database is first established to determine the reference items and reference categories in the database, which is the basis for subsequently determining the keywords in the reference items in the same reference category through TF-IDF; TF-IDF (Term Frequency-Inverse Document Frequency) is a statistical method widely used in text mining and information retrieval to evaluate the importance of a word in a set of documents. It combines the two metrics of term frequency (TF) and inverse document frequency (IDF) to calculate the weight of each word. The keywords in the reference project determined by TF-IDF can better represent the characteristics of the reference classification; then determine the reference classification corresponding to each reference project, that is, determine which reference classification the reference project belongs to, which is the basis for determining which reference classification the target project belongs to; then determine the target keyword and encode it, and convert the encoded numerical target keyword into decimal to obtain the target value; it can be understood that the conversion to decimal is to reduce the complexity of the subsequent calculation of EMD distance, thereby improving efficiency. Decimal numerical calculation has a highly optimized implementation in computer systems, and the basic operations involved (addition, subtraction, multiplication, and division) can be performed efficiently. Compared with other bases (such as binary, hexadecimal, etc.), decimal values are easier to perform direct numerical comparisons and mathematical operations, thereby simplifying the calculation process; EMD distance, that is, Earth Mover's Distance, EMD is a distance measurement method that measures the difference between two probability distributions, and is used to calculate the minimum workload required to convert one resource distribution into another resource distribution; similarly, the classification value is obtained; finally, the target project is judged whether it belongs to the reference classification according to the EMD distance between the target set and the classification set; it can be understood that by calculating the EMD distance in sequence, it is judged which classification sets the target project belongs to. The present invention realizes the accurate classification of projects, thereby coping with the diversity and complexity of projects and improving management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The present invention will be further described below in conjunction with the accompanying drawings.
[0013] Figure 1 It is a flow chart of a project classification method based on project content recognition of the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0015] See also Figure 1 As shown, the present invention is a project classification method based on project content recognition, comprising the following steps: S1: Establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are classified items, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; S2: Determine the target item, which is the item to be classified after preprocessing, segment the target item, and determine the keywords therein by the TextRank algorithm, and use them as target keywords, and encode the target keywords to obtain numerical target keywords, and convert the numerical target keywords into decimal to obtain target values, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, and use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the hth classification value; S3: Determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, determine that the target item belongs to the reference classification corresponding to the classification set, and Lyc represents a preset EMD distance threshold.
[0016] It should be noted that the database is first established to determine the reference items and reference categories in the database. This is the basis for the subsequent determination of keywords in the reference items in the same reference category through TF-IDF. TF-IDF (Term Frequency-Inverse Document Frequency) is a statistical method widely used in text mining and information retrieval to evaluate the importance of a word in a set of documents. It combines the two metrics of term frequency (TF) and inverse document frequency (IDF) to calculate the weight of each word. The keywords in the reference project determined by TF-IDF can better represent the characteristics of the reference classification; then determine the reference classification corresponding to each reference project, that is, determine which reference classification the reference project belongs to, which is the basis for determining which reference classification the target project belongs to; then determine the target keyword and encode it, and convert the encoded numerical target keyword into decimal to obtain the target value; it can be understood that the conversion to decimal is to reduce the complexity of the subsequent calculation of EMD distance, thereby improving efficiency. Decimal numerical calculation has a highly optimized implementation in computer systems, and the basic operations involved (addition, subtraction, multiplication, and division) can be performed efficiently. Compared with other bases (such as binary, hexadecimal, etc.), decimal values are easier to perform direct numerical comparisons and mathematical operations, thereby simplifying the calculation process; EMD distance, that is, Earth Mover's Distance, EMD is a distance measurement method that measures the difference between two probability distributions. It is used to calculate the minimum workload required to convert one resource distribution into another resource distribution. Similarly, the classification value is obtained. Finally, the target item is judged whether it belongs to the reference classification based on the EMD distance between the target set and the classification set. It can be understood that by calculating the EMD distance in sequence, it is determined which classification sets the target item belongs to.
[0017] In another preferred implementation of the present invention, in step S2, the process of preprocessing the items to be classified specifically includes: Remove special characters in the items to be classified by regular expressions and replace the special characters with blank strings. The special characters include punctuation marks, URLs, English, serial numbers and numbers. The stop words in the items to be classified are removed by using a preset stop word list.
[0018] It is worth noting that removing special characters and stop words can significantly reduce redundant information in the text and simplify subsequent text processing and analysis steps; special characters and stop words often do not contain practical meaning, and they may interfere with the classification results. Removing these noises can make the classification model more stable and reliable; Regular Expression (regular expression, referred to as regex) is a pattern used to match character combinations in a string.
[0019] In another preferred implementation of the present invention, in the step S3, when there is no EMD distance L<Lyc between the target set and the classification set, a prompt message is sent to remind the staff.
[0020] It is understandable that the target item may have unique features or novel attributes that do not conform to any of the existing reference classifications, so a prompt message is sent; the reason for this may be that there are anomalies or errors in the processing of the target item, such as inaccurate keyword extraction, feature encoding errors, etc., and the staff needs to be reminded.
[0021] In another preferred implementation of the present invention, in step S3, the process of determining the EMD distance threshold Lyc specifically includes: Take the reference items in the same reference classification as the evaluation items, and determine the evaluation set (G1, G2, ..., Gy), where Gy represents the decimal value of the yth numerical evaluation keyword in the evaluation item, and the numerical evaluation keyword is determined by coding the keyword in the evaluation item; Calculate the EMD distance between the evaluation sets, and determine the maximum value Lmax and the minimum value Lmin therein, calculate the distance difference ΔL=Lmax-Lmin, when the distance difference ΔL is greater than or equal to the preset difference threshold, remove the maximum value Lmax and the minimum value Lmin, and determine the maximum value and the minimum value again, and repeat the above steps until the corresponding distance difference ΔL after removing the maximum value and the minimum value is less than the difference threshold, calculate the mean of the EMD distances that have not been removed at this time, and use it as the EMD distance threshold.
[0022] It should be noted that by iteratively removing the maximum and minimum values, the impact of outliers on the results can be reduced. Outliers are usually caused by noise or extreme cases, and they may deviate significantly from other data points, thus affecting the rationality of the threshold. After removing extreme values, calculating the mean of the remaining EMD distances can obtain a more stable and reliable threshold. This mean can better reflect the typical similarity between items in the evaluation set.
[0023] In another preferred implementation of the present invention, in the process of calculating the mean of the EMD distances that have not been removed, when the difference between a certain EMD distance that has not been removed and the mean is greater than or equal to a preset value, the EMD distance is removed and the mean is recalculated.
[0024] A project classification system based on project content recognition, comprising: Initial module: establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are items that have been classified, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; Processing module: determine the target item, which is the item to be classified after preprocessing, segment the target item, determine the keywords therein by the TextRank algorithm, and use them as target keywords, encode the target keywords to obtain numerical target keywords, convert the numerical target keywords into decimal, obtain the target value, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, and use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the hth classification value; Classification module: determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, the target item is determined to belong to the reference classification corresponding to the classification set. Lyc represents a preset EMD distance threshold.
[0025] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A project classification method based on project content recognition, characterized in that: The following steps are involved: S1: Establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are classified items, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; S2: Determine the target item, which is the item to be classified after preprocessing, segment the target item, and determine the keywords therein by the TextRank algorithm, and use them as target keywords, and encode the target keywords to obtain numerical target keywords, and convert the numerical target keywords into decimal to obtain target values, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the h-th classification value; S3: Determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, determine that the target item belongs to the reference classification corresponding to the classification set, and Lyc represents a preset EMD distance threshold.
2. A project classification method based on project content recognition according to claim 1, characterized in that: In the step S2, the process of preprocessing the items to be classified specifically includes: Remove special characters in the items to be classified by regular expressions and replace the special characters with blank strings. The special characters include punctuation marks, URLs, English, serial numbers and numbers. The stop words in the items to be classified are removed by using a preset stop word list.
3. The project classification method based on project content recognition according to claim 1 is characterized in that: In the step S3, when there is no EMD distance L<Lyc between the target set and the classification set, a prompt message is sent to remind the staff.
4. The project classification method based on project content recognition according to claim 1 is characterized in that: In step S3, the process of determining the EMD distance threshold Lyc specifically includes: Take the reference items in the same reference classification as the evaluation items, and determine the evaluation set (G1, G2, ..., Gy), where Gy represents the decimal value of the yth numerical evaluation keyword in the evaluation item, and the numerical evaluation keyword is determined by coding the keyword in the evaluation item; Calculate the EMD distance between the evaluation sets, and determine the maximum value Lmax and the minimum value Lmin therein, calculate the distance difference ΔL=Lmax-Lmin, when the distance difference ΔL is greater than or equal to the preset difference threshold, remove the maximum value Lmax and the minimum value Lmin, and determine the maximum value and the minimum value again, and repeat the above steps until the corresponding distance difference ΔL after removing the maximum value and the minimum value is less than the difference threshold, calculate the mean of the EMD distances that have not been removed at this time, and use it as the EMD distance threshold.
5. The project classification method based on project content recognition according to claim 4 is characterized in that: In the process of calculating the mean of the EMD distances that have not been removed, when the difference between a certain EMD distance that has not been removed and the mean is greater than or equal to a preset value, the EMD distance is removed and the mean is recalculated.
6. A project classification system based on project content recognition, characterized in that: include: Initial module: establishing a database, wherein the database stores reference items and reference categories, wherein the reference items are items that have been classified, and the reference categories are categories where reference items exist; Generate a reference set (Ai1, Ai2, ..., Aim), when the i-th reference item belongs to the m-th reference category, Aim=1; when the i-th reference item does not belong to the m-th reference category, Aim=0; and filter the elements that are 1 in the reference set, and generate a classification set (F1, F2, ..., Fn), Fn represents the reference category corresponding to the n-th 1 element in the reference set; Processing module: determine the target item, which is the item to be classified after preprocessing, segment the target item, determine the keywords therein by the TextRank algorithm, and use them as target keywords, encode the target keywords to obtain numerical target keywords, convert the numerical target keywords into decimal, obtain the target value, and generate a target set (C1, C2, ..., Cd), where Cd represents the dth target value; Determine reference items in the same reference classification according to the classification set, determine keywords therein by TF-IDF, and use them as classification keywords, encode the classification keywords to obtain numerical classification keywords, convert the numerical target keywords into decimals, obtain classification values, and generate a classification set (D1, D2, ..., Dh), where Dh represents the hth classification value; Classification module: determine the EMD distance L between the target set and the classification set. When the EMD distance L between the target set and the classification set is less than Lyc, the target item is determined to belong to the reference classification corresponding to the classification set. Lyc represents a preset EMD distance threshold.
