Text classification method and system based on semantic analysis

By constructing semantic embedding vectors and directional difference sequences, and combining mutation intensity recognition and local jump tracking, the problem of insufficient semantic association capture in existing text classification technologies is solved, and efficient classification and semantic understanding of complex texts are achieved.

CN121327136APending Publication Date: 2026-01-13上海笑聘网络科技有限公司

Patent Information

Application Number
CN202511893634.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-16
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing text classification technologies rely on manually constructed feature dictionaries and fixed part-of-speech or word frequency features, which cannot fully capture the implicit relationships between semantics. This results in low classification accuracy in texts with diverse semantics or complex expressions, and a lack of adaptability and scalability.

Method used

By constructing semantic embedding vectors and calculating directional differences to form a continuous change sequence, combined with mutation intensity identification and local jump tracking, semantic mutation points are identified and segments are divided. By using contextual directional consistency judgment and category label comparison, semantic closed structures and convergent segments are extracted, thus achieving accurate identification of semantic relationship chains.

Benefits of technology

It improves the model's ability to understand and classify semantic attribution in complex contexts, enhances the ability to identify semantic boundaries, dynamically perceives semantic jumps and conflict initiations, and solves the problems of slow response to abrupt structures and weak semantic convergence recognition in traditional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121327136A_ABST
    Figure CN121327136A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of text processing, in particular to a text classification method and system based on semantic analysis, and the method comprises the following steps: segmenting semantic units, constructing a direction change sequence, positioning mutation nodes, generating a consistency section, forming a convergence section, and outputting a classification result. According to the method, a continuous change sequence is formed by constructing a semantic embedding vector and calculating a direction difference, a semantic mutation point can be anchored and divided into sections by combining mutation intensity identification and local jump tracking, and a semantic closed structure and a convergence section are extracted by means of context direction consistency judgment and generic label comparison; precise recognition of a semantic relation chain is realized, semantic jump and conflict starting points can be dynamically sensed, the semantic boundary recognition capability is improved, and the understanding and classification capability of a model on semantic attribution in a complex context is enhanced on the premise of not depending on a fixed dictionary and shallow statistics. The problems that a traditional model is slow in response to an abrupt change structure and weak in semantic convergence recognition are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text processing technology, and in particular to a text classification method and system based on semantic analysis. Background Technology

[0002] Text processing technology encompasses methods and processes for analyzing, transforming, managing, and utilizing natural language text. This includes text segmentation, syntactic analysis, semantic understanding, information extraction, text clustering, text classification, and sentiment analysis. It primarily utilizes natural language processing, statistical learning, rule matching, and deep learning to perform structured processing and intelligent understanding of unstructured or semi-structured text data. The aim is to improve the processing capabilities of computing systems for text data and enhance their application effects in scenarios such as search engines, intelligent question answering, and recommendation systems. Traditional text classification methods involve manually constructing feature dictionaries or using word frequency statistics to extract keywords or keyword groups from the text. These keywords are then used with shallow machine learning algorithms such as Naive Bayes classification, support vector machines, and k-nearest neighbors to determine the text's category. The basic process includes segmenting and removing stop words from the original text, constructing text vector representations, selecting training samples and training a classification model, and using the model to predict the category of the text to be classified. The features relied upon are mostly word frequency statistics, part-of-speech information, or manually constructed topic sets, and often depend on rules set by domain experts for preprocessing and feature engineering.

[0003] Existing text classification techniques mainly rely on manually constructed feature dictionaries and fixed part-of-speech or word frequency features, which cannot fully capture the implicit relationships between semantics and lack the ability to recognize synonym transformations and contextual changes. This results in low accuracy of classification results in texts with diverse semantics or complex expressions. Such methods perform poorly when dealing with nonlinear features such as abrupt changes in text structure and semantic jumps, and have difficulty recognizing semantic conflicts hidden in the context. In addition, feature engineering methods that rely on expert rules lack adaptability and scalability, requiring frequent adjustments to model parameters in multi-domain scenarios, which seriously affects classification efficiency and model generalization ability. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a text classification method based on semantic analysis.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a text classification method based on semantic analysis, comprising the following steps: S1: Collect the structure of continuous input text, segment the original semantic units and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; S2: Based on the semantic direction jump trajectory map, extract the absolute difference between each direction point and the up and down directions in the continuous direction change sequence and record it as the jump intensity. Filter the point with the maximum jump intensity and mark the corresponding position of the original semantic unit. Mark and generate text mutation structure anchor nodes. S3: Based on the anchor nodes of the text mutation structure, the directional jump intensity is detected sequentially, and it is determined whether it is continuously less than the judgment threshold. If it is satisfied, it is included in the continuous judgment sequence until the continuous jump is greater than the judgment threshold. The corresponding position is marked as the mutation position, the segment is extracted to form a local semantic extension area, and a semantically consistent context segment is generated. S4: Based on the semantic consistency context segment, determine whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is an inconsistency, mark it as the conflict starting point, find closed boundary points on both sides of the jump direction to form a semantic closed structure, and output the semantic category convergence segment. S5: Based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign the corresponding semantic belonging direction according to the text classification standard, output the belonging classification label, and generate the text classification result.

[0006] As a further aspect of the present invention, the semantic direction jump trajectory map includes a direction change sequence, an angle difference distribution, and a semantic embedding relationship network; the text mutation structure anchor node includes a direction mutation location, a jump intensity marker, and a semantic unit location index; the semantic consistency context segment includes a direction stabilization segment, a jump intensity threshold segment, and an anchor node adjacency region; the semantic category convergence segment includes a conflict starting point, a semantic closure boundary, and a category label stability region; and the text classification result includes a semantic feature set, a semantic attribution direction, and a classification label.

[0007] As a further aspect of the present invention, the step of obtaining the semantic direction jump trajectory map specifically includes: S111: Collect the continuous input text structure, split each word sequence in the text structure into semantic units based on word boundaries, monitor the lexical correlation between adjacent words, stop word interval information and contextual dependency structure, determine whether word combinations constitute continuous semantic segments, and independently group each continuous semantic segment to generate a set of semantic units. S112: Based on the set of semantic units, each semantic unit is mapped to a vector space using an embedding model to construct a set of semantic embedding vectors. The angle between any two adjacent semantic embedding vectors is monitored, and the difference is calculated with a preset directional difference benchmark value. The directional change values ​​between each pair of semantic units are statistically analyzed to obtain a sequence of directional difference values. S113: Based on the index position order of each item in the directional difference value sequence, construct the directional jump index path in sequence, map the path to the two-dimensional trajectory space, extract the jump inflection point position and jump amplitude value, aggregate all jump indices and jump amplitudes, and establish a semantic directional jump trajectory map.

[0008] As a further aspect of the present invention, the step of obtaining the anchor node of the text mutation structure specifically includes: S211: Based on the semantic direction jump trajectory map, read the direction point data corresponding to each semantic unit node in the continuous direction change sequence in the map, sequentially detect the numerical difference between any direction point and the two direction points before and after, calculate the absolute difference with the previous direction point and the absolute difference with the next direction point respectively, take the average of the two as the jump intensity index value of the direction point, calculate and obtain the direction point jump intensity value, and store it as the corresponding index structure to obtain the direction point jump intensity value sequence; S212: Based on the direction point jump intensity value sequence, perform numerical comparison of each jump intensity value in the entire sequence, traverse all index values ​​corresponding to jump intensities, obtain the maximum jump intensity value through filtering operations, and record the index position in the original sequence, locate the semantic unit corresponding to the index as the structural mutation point, and obtain the semantic unit index corresponding to the extreme value of jump intensity. S213: Based on the semantic unit index corresponding to the extreme value of the jump intensity, mark the structural attribute identifier of the corresponding position in the original semantic unit set, add mutation marker information to the original semantic unit index set, and output it as a marked semantic structure data frame to establish a text mutation structure anchor node.

[0009] As a further aspect of the present invention, the formula for calculating the direction point jump intensity value is as follows: ; in, This represents the jump intensity value at the direction point with index i. This represents the angle value of the direction point at index i. and These represent the angle values ​​of the previous and next direction points, respectively.

[0010] As a further aspect of the present invention, the step of obtaining the semantically consistent context segment specifically includes: S311: Based on the anchor node of the text mutation structure, extract the positioning information of the corresponding index position in the jump intensity sequence, extract the jump intensity values ​​of adjacent direction points to the left and right respectively, and construct the direction intensity extension array. Use the index sliding structure to gradually detect whether each jump intensity value is less than the judgment threshold. If it is satisfied, add the corresponding index position to the continuity judgment index set. S312: Based on the continuity judgment index set, the direction point sequence with continuous jump intensity less than the judgment threshold is subjected to boundary judgment, and the direction point index that first exceeds the judgment threshold is determined as the end point of the sequence boundary. The index positions of the left and right direction extension ends are recorded respectively, and the boundary truncation segment centered on the mutation node is constructed to obtain the mutation segment boundary index pair. S313: Based on the mutation segment boundary index pair, extract all semantic unit content between the start and end indices in the original semantic unit set, aggregate them in the original order to form a structured semantic fragment, and label it as the extended area content type to establish a semantically consistent context segment.

[0011] As a further aspect of the present invention, the step of obtaining the semantic category convergence segment specifically includes: S411: Based on the semantic consistency context segment, extract three sets of semantic units before and after the index position of the mutation node, and aggregate the category tags corresponding to each semantic unit. Make a category consistency judgment by the difference in literal attributes between tag types. If the category tags marked by the three sets of semantic units before and after belong to different main category nodes in the hierarchical classification system, it is considered that a tag jump behavior has occurred. Record the index position corresponding to the mutation node and establish a semantic category jump mark index. S412: Based on the semantic category jump marker index, scan the direction jump sequence simultaneously to the left and right with the index as the conflict starting point, extract the direction difference of three consecutive groups of semantic units, and determine whether they are all less than the reference value and decrease in order. If the above trend condition is met, the index position is marked as the direction change stabilization node, and record one node position on the left and one on the right respectively to generate a direction change convergence boundary index pair. S413: Based on the direction change convergence boundary index pair, perform fragment aggregation processing on all semantic units located within the index interval in the original semantic unit set, construct a closed structure from the start point to the end point of the convergence boundary, assign a structure type label, and establish a semantic category convergence segment.

[0012] As a further aspect of the present invention, the steps for obtaining the text classification results are specifically as follows: S511: Based on the semantic category convergence segment, extract the text content of all semantic units within the segment and their corresponding semantic tags, contextual expression patterns and lexical combination structures, and combine the original word order, dependency relations and grammatical configuration information of the semantic units to construct a semantic feature vector for each semantic unit, and perform vectorized aggregation operations on the semantic feature terms to obtain a semantic feature matrix. S512: Based on the semantic feature matrix, cluster and sort the semantic dimension distribution corresponding to each semantic unit, calculate the similarity between the high-weight semantic dimension in the vector and the category dictionary of each direction, select the direction with the maximum similarity as the direction classification of the corresponding unit, and count the bidirectional pairing results of semantic direction and category to obtain the semantic classification direction label set. S513: Based on the semantic attribution direction label set, match the direction classification labels sequentially according to the order position of the semantic units in the original text, construct a structured text classification record, and output a list of classification labels aggregated by sentence segment to establish the text classification result.

[0013] A text classification system based on semantic analysis, comprising: The direction sequence construction module is used to execute S1: collect the continuous input text structure, perform original semantic unit segmentation and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; The mutation intensity extraction module is used to perform S2: based on the semantic direction jump trajectory map, extract the absolute difference between each direction point and the up and down directions in the continuous direction change sequence and record it as the jump intensity, filter the point with the maximum jump intensity and mark the corresponding position of the original semantic unit, and mark and generate the text mutation structure anchor node. The context extension recognition module is used to perform S3: based on the anchor node of the text mutation structure, it sequentially detects the directional jump intensity, determines whether it is continuously less than the judgment threshold, and if it is satisfied, it is included in the continuous judgment sequence until the continuous jump is greater than the judgment threshold. The corresponding position is marked as the mutation position, the segment is extracted to form a local semantic extension area, and a semantically consistent context segment is generated. The boundary compression convergence module is used to execute S4: Based on the semantic consistency context segment, it determines whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is an inconsistency, it is marked as the conflict starting point. Closed boundary points are searched along both sides of the jump direction to form a semantic closed structure, and the semantic category convergence segment is output. The classification label output module is used to execute S5: based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign the corresponding semantic belonging direction according to the text classification standard, output the belonging classification label, and generate the text classification result.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by constructing semantic embedding vectors and calculating directional differences to form a continuous change sequence, combined with mutation intensity identification and local jump tracking, semantic mutation points can be anchored and segmented. By using contextual directional consistency judgment and category label comparison, semantic closed structures and convergence segments are extracted, achieving accurate identification of semantic relationship chains. It can dynamically perceive semantic jumps and conflict starting points, improve semantic boundary recognition capabilities, and enhance the model's ability to understand and classify semantic attribution in complex contexts without relying on fixed dictionaries and shallow statistics. It effectively solves the problems of slow response to mutation structures and weak semantic convergence recognition in traditional models. Attached Figure Description

[0015] Figure 1 This is a flowchart of the main steps of the present invention; Figure 2 This is a flowchart of the semantic direction jump trajectory map acquisition process of the present invention; Figure 3 This is a flowchart of the process for obtaining anchor nodes for the text mutation structure in this invention. Figure 4 This is a flowchart of the semantic consistency context segment acquisition process of the present invention; Figure 5 This is a flowchart of the semantic category convergence segment acquisition process of the present invention; Figure 6 This is a flowchart of the text classification result acquisition process of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0018] Please see Figure 1 A text classification method based on semantic analysis includes the following steps: S1: Collect the structure of continuous input text, segment the original semantic units and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; S2: Based on the semantic direction jump trajectory map, extract the absolute difference between each direction point and its upper and lower directions in the continuous direction change sequence, record it as the jump intensity, compare the jump intensity of the whole sequence in sequence, select the point with the maximum jump intensity and mark the corresponding position of the original semantic unit, mark and generate the text mutation structure anchor node. S3: Based on the anchor node of the text mutation structure, the directional jump intensity is detected on both sides of the anchor node in turn. It is determined whether the jump intensity is continuously less than the judgment threshold of 10°. If it is satisfied, it is included in the continuous judgment sequence until the continuous jump intensity is greater than the judgment threshold. The corresponding position is marked as the mutation position, the segment is extracted to form a local semantic extension area, and a semantically consistent context segment is generated. S4: Based on the semantic consistency context segment, determine whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is inconsistency, mark it as the conflict starting point. Find two position nodes on both sides of the jump direction where the direction change is stable (the direction difference of three consecutive groups of semantic units is within 5° of the baseline value and the direction difference shows a decreasing trend) as closed boundary points to form a semantic closed structure and output the semantic category convergence segment. S5: Based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign the corresponding semantic belonging direction according to the text classification standard, output the belonging classification label, and generate the text classification result.

[0019] The semantic direction jump trajectory diagram includes the direction change sequence, angle difference distribution, and semantic embedding relationship network. The text mutation structure anchor nodes include the direction mutation location, jump intensity marker, and semantic unit location index. The semantic consistency context segment includes the direction stabilization segment, the jump intensity threshold segment, and the anchor node adjacency region. The semantic category convergence segment includes the conflict starting point, semantic closure boundary, and category label stabilization region. The text classification result includes the semantic feature set, semantic attribution direction, and classification label.

[0020] Please see Figure 2 Step S1 is as follows: S111: Collect the continuous input text structure, split each word sequence in the text structure into semantic units based on word boundaries, monitor the lexical correlation between adjacent words, stop word interval information and contextual dependency structure, determine whether word combinations constitute continuous semantic segments, and independently group each continuous semantic segment to generate a set of semantic units. The acquisition of continuously input text structures relies on text integration data already completed in the corpus preprocessing stage. In practical applications, it can be based on corpus types such as news summary texts, product review sequences, and question-and-answer corpus fragments, accessed according to time or chapter structure. After receiving the text input, word segmentation is first performed, initially splitting it according to spaces, punctuation, and syntactic boundaries, extracting the smallest word units and detecting their part-of-speech tags and stop word markers. Subsequently, combining the lexical connectivity between adjacent words, dependency syntactic relationships, and context combination probability values, a sliding window structure with a window size of 3 is constructed to detect word combination within the window. If the combination within the current window has a frequency higher than the threshold of 3 times in the corpus and the part-of-speech combination meets the rules such as adjective + noun or verb + noun combination patterns, then the window is considered a candidate semantic fragment. The logic of this rule determination is: extract the combination of 3 words in the current window, and look up the table. The co-occurrence frequency and part-of-speech combination are checked to determine if they constitute a valid sequence. If they do, the sequence is retained as a semantic unit; otherwise, the window is shifted one position, and the process continues. During this process, it is also necessary to determine whether the current combination contains consecutive stop words or function word structures. If the segment contains more than two stop words, its semantic consistency is low, and the combination should be discarded to filter out invalid information. For example, in the sentence "The product has an exquisite appearance and a good user experience," the combinations "product appearance" and "user experience" are valid combinations of noun + noun and verb + noun, respectively, satisfying the part-of-speech rule and semantic continuity condition. Therefore, they can be included in the semantic unit set as two independent semantic segments. The lexical connectivity value required for the above rule judgment can be generated by calculating the co-occurrence frequency. For example, if a combination appears 20 times in the training corpus, and the total frequency of the participating words is 200 and 300, the lexical connectivity probability can be calculated as follows: ; When the connection probability is greater than the preset connection threshold of 0.05, the combination is considered to have associated semantics and can be identified as a semantic unit. If it is less than the threshold, the combination is excluded. In the sliding window matching stage, each sentence can generate a maximum of several semantic fragments that meet the rules. After extracting all the combinations that meet the requirements in the above way, they are split into independent units according to the sentence structure and classified into sets for subsequent embedding operations, and finally a set of semantic units is generated.

[0021] S112: Based on the set of semantic units, each semantic unit is mapped to the vector space using an embedding model to construct a set of semantic embedding vectors. The angle between any two adjacent semantic embedding vectors is monitored, and the difference is calculated with the preset directional difference benchmark value. The directional change values ​​between each pair of semantic units are statistically analyzed to obtain a sequence of directional difference values. Based on a set of semantic units, embedding operations can be directly performed on each semantic segment in the set. This operation relies on a pre-defined semantic embedding space construction method, such as using a word vector embedding dictionary with a vector dimension of 128. The semantic vector corresponding to each semantic unit is generated according to the average embedding method of word combinations. During the embedding process, if a semantic unit, such as "experience," contains two words, "use" and "experience," then its embedding vector is the dimension-wise average of the two word vectors. Let the word vector of "use" be... The first dimension is 0.35, the second dimension is 0.28, and the 128th dimension is 0.42; the experience word vector is... Given that its first dimension is 0.40, its second dimension is 0.30, and its 128th dimension is 0.36, the average vector of this semantic unit is: ; ; ; After this processing, the set of embedding vectors for all semantic units can be obtained; then, the angle between each pair of adjacent semantic unit vectors is calculated by dividing the dot product of the two vectors by the product of their magnitudes. Let the cosine of the angle between vectors a and b be: ; If the cosine of the angle between two vectors is 0.95, then the angle between them is... Then, the included angle is compared with the preset directional difference benchmark value. If the preset directional difference benchmark value is set to 15°, then the value exceeds the benchmark value by 3.19°. The difference should be recorded as the directional difference value between the pair of semantic units. After traversing all adjacent semantic unit vector combinations, all directional difference values ​​are stored in an array according to the order of appearance of the semantic units to generate a directional difference value sequence.

[0022] S113: Arrange the index positions of each item in the direction difference value sequence to construct the direction jump index path, map the path to the two-dimensional trajectory space, extract the jump inflection point position and jump amplitude value, aggregate all jump indices and jump amplitudes, and establish a semantic direction jump trajectory map; Based on the directional difference value sequence, the index position of each item needs to be recorded. A path is constructed according to the original order of appearance of the semantic units. This path is defined as the semantic jump trajectory path. A two-dimensional coordinate system is used to represent the jump amplitude and jump point position of each jump location. The horizontal axis represents the semantic unit index position, and the vertical axis represents the directional difference value at that point. Furthermore, the jump inflection point is extracted by detecting abrupt changes in the sequence. The criteria for judging abrupt changes are whether the amplitude difference between the current directional difference value and the two adjacent directional difference values ​​exceeds the jump amplitude threshold. This jump amplitude threshold can be defined as the mean of the current sequence's directional difference values ​​plus twice the standard deviation. For example, the directional difference value sequence of a certain semantic segment is as follows: ; Its mean is Standard deviation Then the threshold for the jump amplitude is: ; Since the value of the fourth item is 45.6°, which exceeds the threshold of 41.32°, it is determined to be a transition inflection point. The index of this position is 3, and the transition amplitude is 45.6°. After aggregating the indices and transition amplitudes of all the points determined to be transition points, a transition trajectory diagram is established. Each record in the trajectory diagram is an index-difference value mapping point. Finally, the discrete transition trajectory graphs between semantic units in the direction space are drawn, and the semantic direction transition trajectory diagram is finally established.

[0023] Table 1. Directional Difference Value Sequence and Jump Threshold Calculation Table

[0024] As shown in Table 1, the directional difference value of the third item is significantly higher than the baseline jump threshold of 41.32°, and therefore it is identified as a semantic jump point. This jump point will participate in the drawing of the jump trajectory map and the corresponding jump feature position will be marked in the spatial path. This result shows that discrete changes in semantic direction can be effectively mapped into a graphical trajectory structure and expressed in a visual aggregate form as a semantic direction jump trajectory map.

[0025] Please see Figure 3 Step S2 is as follows: S211: Based on the semantic direction jump trajectory map, read the direction point data corresponding to each semantic unit node in the continuous direction change sequence in the map, sequentially detect the numerical difference between any direction point and the two preceding and following direction points, calculate the absolute difference with the previous direction point and the absolute difference with the next direction point, and take the average of the two as the jump intensity index value of that direction point, using the formula: ; The direction point jump intensity value is calculated and stored as a corresponding index structure to obtain a sequence of direction point jump intensity values; where, This represents the jump intensity value at index i. This represents the angle value of the direction point at index i. and These represent the angle values ​​of the previous and next direction points, respectively. Based on the established set of direction nodes in the semantic direction jump trajectory graph, the angle values ​​corresponding to each direction point in the direction sequence are extracted. These angle values ​​are derived from the angle calculation of the semantic embedding vectors completed in the previous step, and are constructed by recording the angle changes between adjacent semantic units. Next, for each direction point with index i in the sequence, its relationship with the previous direction point is calculated sequentially. and the next direction point To reduce the influence of noise points and improve the accuracy of jump intensity determination, the average of the differences between the two directions is used to represent the jump intensity of the current direction point. This calculation method sums the differences between the two directions and divides by two to obtain the average jump amplitude value. If the direction point sequence of a segment in the actual semantic data is [20°, 26°, 15°, 32°, 29°], and the third direction point is 15°, then its jump intensity is calculated as follows: ; That is, the jump intensity of the direction point is 14 degrees. This value will be used as a reference for the intensity of local directional fluctuations in the sequence. By repeating the above operation for all direction points and summarizing them into a jump intensity vector, an index-intensity mapping data structure is established to form a sequence of direction point jump intensity values. This sequence can be further used for mutation point screening. The calculation of the direction point jump intensity is based on the local context difference. The mutation trend is stably identified by the two-sided difference averaging method, while avoiding misjudgment of unilateral mutations, forming a standardized and quantifiable change index.

[0026] Table 2 Calculation Table of Jump Strength Examples

[0027] As shown in Table 2, the jump intensity calculation process fully reflects the cumulative change characteristics of the local angle change of the direction point, which helps to highlight the location nodes with large fluctuations and facilitates the subsequent extraction of abrupt change points.

[0028] formula Its overall operational logic is based on the quantification of the local fluctuations of the direction point in the semantic sequence's context, where the parameters... This represents the angle value of the current direction point. and These are the angle values ​​of the previous and next direction points, respectively. First, the direction jump amplitude is calculated using the angle differences between the two direction points and the current point, and then the absolute value is used for calculation. and This avoids the cancellation effect caused by positive and negative directional differences, ensuring that all angular changes are non-negative values ​​in the measurement, thus reflecting the true intensity of the change. Subsequently, the difference between the up and down directions is added to comprehensively reflect the overall fluctuation amplitude of the current directional point in the local context. Finally, normalization is performed by dividing by 2 and averaging. The purpose is to ensure that the final jump intensity value can reflect the degree of drastic change in semantic direction at the current point, without being dominated by abnormal disturbances on one side. This achieves a symmetrical measurement of changes on both sides of the context, thereby quantifying the magnitude of directional change of the current point relative to its neighborhood. Therefore, the formula adopts the logical order of subtraction-absolute value-summation-averaging to ensure numerical symmetry, robustness, and relative adaptability to outliers when expressing the intensity of angular change.

[0029] The directional jump intensity value is used to measure the degree of angular fluctuation between a specific directional point in a semantic direction sequence and its adjacent directional points above and below. It reflects the local mutation characteristics of the point in the overall semantic trajectory. This index is calculated by taking the average of the absolute differences in the angles between the current directional point and its previous and next directional points. It captures the intensity of angular change in the region where the directional point is located. The larger the value, the more obvious the directional jump has occurred in the semantic sequence. It may correspond to phenomena such as semantic structural transitions, topical mutations, or changes in sentiment in the text content. It has mutation sensitivity and local discrimination ability and can be used as an important metric for screening key nodes in the process of semantic mutation identification.

[0030] S212: Based on the sequence of direction point jump intensity values, perform numerical comparison of each jump intensity value in the entire sequence, traverse all index values ​​corresponding to jump intensities, obtain the maximum jump intensity through filtering operations, and record the index position in the original sequence. Locate the semantic unit corresponding to the index as the structural mutation point, and obtain the semantic unit index corresponding to the extreme value of jump intensity. Based on the jump intensity vector obtained from the sequence of direction point jump intensity values, the entire sequence is traversed and compared. During the comparison process, the jump intensity value is extracted item by item and continuously updated with the current maximum value. When the new value is greater than the recorded maximum value, the maximum value is updated and the current index position is recorded. In a specific example, if the jump intensity sequence is [5.5, 14.0, 8.5, 6.0], the maximum jump intensity is 14.0, its corresponding index is 2, and the corresponding direction point is the 3rd direction point. Based on this index, its position in the original semantic unit set can be accurately located. During the operation, the jump intensity values ​​are stored in an array structure, and a variable is set to record the current maximum intensity value and its index number. The extraction of the global extreme point can be completed in a single traversal, and the semantic unit index corresponding to the jump intensity extreme value can be obtained.

[0031] S213: Based on the semantic unit index corresponding to the extreme value of the jump intensity, mark the structural attribute identifier of the corresponding position in the original semantic unit set, add mutation marker information to the original semantic unit index set, and output as a marked semantic structure data frame to establish text mutation structure anchor nodes. To read the semantic unit index corresponding to the extreme value of the jump intensity, an index mapping table is first established in the original semantic unit set structure. This structure records the position index, corresponding direction point angle value, jump intensity value, and Boolean identifier of whether each semantic unit has been marked as a mutation node in the input text. Using this structure, a line-by-line matching operation is performed on the semantic units in the input text to extract the index value corresponding to the extreme value of the jump intensity. In actual corpora, if a text describes a product as having an exquisite appearance, good user experience, long battery life, but slow charging, its decomposed semantic units would be [product appearance, user experience, battery life, slow charging]. According to the direction point angle value sequence listed in Table 3 of the aforementioned paragraph, it is [20°, 26°, 15°, 32°]. The calculated jump intensity sequence is [5.5°, 14.0°, 8.5°], where the maximum jump intensity is 14.0°, corresponding to the second index position, i.e. the semantic unit's user experience. Therefore, this semantic unit needs to be set with a mutation flag. This is done by setting the boolean field is_mutation to True or setting the mutation type field to T1 for structural identification. At the same time, a structured data frame containing the original semantic unit text, corresponding angle, jump intensity, and mutation flag is constructed to form a semantic structure record with mutation node anchoring capability. After processing, all fields are merged and output into a unified structure to form a stable semantic anchoring structure that is convenient for subsequent storage, retrieval, and visualization analysis, i.e., a text mutation structure anchoring node.

[0032] Table 3. Schematic diagram of anchor nodes for text mutation structure.

[0033] As shown in Table 3, the user experience in this sequence was identified as the unique semantic unit of mutation structure. Its corresponding angle change was strong and the jump intensity reached a maximum of 14.0°. Therefore, it needs to be set as a mutation anchor node and explicitly labeled in the data frame to support subsequent identification and structure extraction operations for semantic mutation regions. This result shows that the anchoring of mutation nodes not only depends on directional information, but also requires filtering and structured labeling in conjunction with jump intensity to establish text mutation structure anchor nodes.

[0034] Please see Figure 4 Step S3 is as follows: S311: Based on the anchor node of the text mutation structure, extract the positioning information of the corresponding index position in the jump intensity sequence, extract the jump intensity values ​​of adjacent direction points to the left and right respectively, and construct the direction intensity extension array. Use the index sliding structure to gradually detect whether each jump intensity value is less than the judgment threshold. If it is satisfied, add the corresponding index position to the continuity judgment index set. Based on the anchor node of the text mutation structure, it is necessary to call the index position of the mutation node in the original jump intensity value sequence. From this position, incremental expansion is performed to the left and right, extracting the jump intensity values ​​of several consecutive points before and after it, and sequentially constructing a one-dimensional jump intensity expansion sequence. During the operation, a cursor pointer is set with the mutation node index as the center, and each point in each direction is traversed independently to the left and right. The jump intensity of the current point in each direction is compared with a judgment threshold of 10°. If the current jump intensity is less than the threshold, the index position is recorded in the continuous sequence cache structure. If a jump intensity greater than or equal to 10° is encountered in a certain direction, the detection in that direction is immediately interrupted, and all index values ​​before the breakpoint are recorded. As a region that meets the extension conditions, the judgment threshold of 10° is derived from the empirical configuration of the stability interval of the structural mutation boundary. The basis for setting it is that when the directional fluctuation amplitude is less than 10° in the semantic jump environment, it can be regarded as a continuous and stable state. Taking actual data as an example, if we start from index 3 as the mutation node, the jump intensity values ​​of the right directional points are 6.5, 7.8, 11.3, and 9.6 respectively. In the traversal, only the first two directional points (index 4 and 5) meet the condition of less than 10°. Index 6 triggers the threshold boundary judgment due to its value of 11.3°, which causes the interruption of detection. The left side is processed in the same way, and the set of all directional point indices that meet the conditions is {2, 3, 4, 5}. Finally, the continuity judgment index set is generated.

[0035] Table 4. Sample Table of Jump Strength Value Tests

[0036] As shown in Table 4, the indices for consecutive transition intensities less than the judgment threshold of 10° are 1 to 3, and the process terminates at the 4th direction point because it exceeds the threshold, thus obtaining the complete set of continuity judgment indices.

[0037] S312: Based on the continuity judgment index set, the direction point sequence with continuous jump intensity less than the judgment threshold is judged for boundary judgment. The direction point index that first exceeds the judgment threshold is determined as the end point of the sequence boundary. The index positions of the left and right direction extension endpoints are recorded respectively. The boundary truncation segment centered on the mutation node is constructed to obtain the mutation segment boundary index pair. Based on the continuity determination index set, the set needs to be structurally parsed. By extracting the minimum and maximum index values ​​in the set, an extension boundary is constructed to represent the start and end range of the directional jump continuous segment. In the operation, variables are set to record the start and end index values ​​of the current set as boundary markers. Then, the jump intensity boundary value confirmation operation is performed. The legality of the boundary is confirmed by comparing the jump intensity values ​​of the directional points on both sides with the 10° judgment threshold. If the jump intensity of the directional point on the boundary is exactly equal to or slightly higher than 10°, then the previous index is allowed as the end point of the extension boundary. For example, in the set {2, 3, 4, 5}, the maximum index is 5, and the jump intensity of the 6th directional point is 11.3°. Then, index 5 is determined to be the right end point position. Finally, the abrupt change segment boundary range with the starting position as index 2 and the ending position as index 5 is obtained by aggregation, and the abrupt change segment boundary index pair is established.

[0038] S313: Based on the boundary index pairs of mutation segments, extract all semantic unit content between the start and end indices in the original semantic unit set, aggregate them in the original order to form a structured semantic fragment, and label it as the content type of the extension area to establish a semantically consistent context segment. Based on the boundary index pairs of the mutation segment, it is necessary to sequentially retrieve the mapping positions of the start index and end index contained in the index pair in the original semantic unit set, and use this as the basis for truncation to perform structured extraction operations on the original semantic structure. In specific implementation, the boundary index pairs are first obtained. For example, if the start index is 2 and the end index is 5, then all units in the semantic unit set with an index range of 2 to 5 need to be traversed and extracted one by one to form a continuous semantic unit set. The content corresponding to this set in the aforementioned implementation data is the three semantic structures of "user experience", "battery life", and "slow charging". After the extraction is completed, a structure label field is added to each semantic unit in the set, where the "context_type" field is marked as "extended segment", and the original angle value and jump intensity value of the semantic unit are also added. These elements are integrated together to ultimately construct a context fragment data frame with semantic integrity and structural identification capabilities. Each line in the data frame records a semantic unit, which includes fields such as "semantic content," "angle value," "jump strength value," "whether it is a mutation node," and "context type." The index order of these units in the original input text is maintained to support semantic integrity verification and block consistency analysis. In the example above, the sequence of semantic unit angle values ​​within the segment is [26°, 15°, 32°, 29°], and the jump strength is [14°, 8.5°, 6.0°, 7.2°]. The jump strength is less than 10° within the boundary index range, verifying its semantic stability. The structured output is shown in the table below, ultimately establishing a semantically consistent context segment.

[0039] Table 5. Semantic Consistency Context Segment Data Structure Table

[0040] As shown in Table 5, this context segment satisfies the condition that the intensity of the continuous jump is less than the judgment threshold of 10° at both the structural and numerical levels, and has semantic structural consistency and segment stability. Therefore, this set is used as the output to construct a semantically consistent context segment.

[0041] Please see Figure 5 Step S4 is as follows: S411: Based on the semantic consistency context segment, extract the three sets of semantic units before and after the index position of the mutation node, and aggregate the category tags corresponding to each semantic unit. Make category consistency judgment by the difference in literal attributes between tag types. If the category tags marked by the three sets of semantic units before and after belong to different main class nodes in the hierarchical classification system, it is considered that a tag jump behavior has occurred. Record the index position corresponding to the mutation node and establish a semantic category jump mark index. Based on the semantic consistency context segment, three sets of semantic units need to be extracted from the mutation position index both forward and backward to form a forward sequence and a backward sequence. For each set of semantic units, its category label field is called to extract the corresponding semantic category code. Then, the main category codes of each category label in the two sequences are compared to see if there is a difference in attribution. In the operation, the label hierarchy is set to a three-level coding structure. If the main category code (first-level label) is inconsistent, it is considered a label jump. In practical applications, for example, the three sets of semantic labels in the forward direction are "product function", "user experience" and "product attribute", and the three sets of semantic labels in the backward direction are "logistics service", "after-sales strategy" and "customer service evaluation". Among them, "user experience" and "customer service evaluation" belong to "main attribute" and "service category" respectively. It is determined to be a main category divergence, a jump mark is established, the original index value of the mutation position is recorded and output for subsequent structural conflict area tracking, and finally a semantic category jump mark index is generated.

[0042] S412: Based on the semantic category jump marker index, scan the direction jump sequence to the left and right simultaneously with the index as the conflict starting point, extract the direction difference of three consecutive groups of semantic units, and determine whether they are all less than the benchmark value and decrease in order. If the above trend conditions are met, the index position is marked as the direction change stabilization node, and record one node position on the left and one on the right respectively to generate a direction change convergence boundary index pair. Based on the semantic category jump marker index, direction difference extraction is performed to the left and right of the jump position, respectively. The direction difference between three consecutive direction points on each side is extracted and their magnitudes are judged sequentially. In actual processing, the current position index is first obtained, and then three direction points are sampled. For example, if the current index is 7, the left direction difference sequence is Δ6=4.7°, Δ5=3.9°, Δ4=2.8°, and the right direction is Δ8=4.9°, Δ9=4.3°, Δ...10 =3.7°, determine whether the difference between the three directions in each group is less than the baseline value of 5° (5° is set according to the deviation tolerance range between the average change of the directional angle of semantic units and the clustering stability of semantic homogeneous segments in the semantic embedding space. Usually, in semantic aggregation experiments, it is found that when the difference between the directional angles of three consecutive semantic units is less than 5°, the change of their category normalized distance in the semantic space does not exceed 0.15, and their clustering labels remain consistent. Therefore, this threshold is fixed at 5° and does not change with the change of the jump node strength, but it is closely related to the choice of semantic embedding dimension. It is valid when the embedding dimension is 128. If the dimension is expanded to 256, it needs to be tightened to within 3° to maintain the proportional matching of the spatial convergence constraint). And satisfy the decreasing relationship from left to right, that is, when Δ6>Δ5>Δ4 is ​​valid, it can be determined that the directional change at the directional point has converged. If both the left and right sides satisfy the judgment condition, the corresponding termination index positions on both sides are recorded as the boundary of the stable interval of directional change, and finally the directional change convergence boundary index pair is generated.

[0043] S413: Based on the convergence boundary index pairs of direction change, perform fragment aggregation processing on all semantic units located within the index interval in the original semantic unit set, construct a closed structure from the start point to the end point of the convergence boundary, assign a structure type label, and establish a semantic category convergence segment; Based on the convergence boundary index pair according to the direction change, and using its start index and end index as the interval boundary, the semantic units within the interval range in the original semantic unit set are structurally extracted and integrated to form a closed structure with semantic category stability and directional continuity. In the specific implementation, let the boundary index pair be [3, 10]. Then the semantic units from index 3 to 10 are "user experience", "battery life", "slow charging", "battery swelling", "product heat generation", "customer service response", "exchange process" and "service quality" respectively. After extracting the above semantic units, the structure segment is constructed in the original order, and the label field "structure_type" of the structure segment is set to "convergence segment" to support structural clustering and semantic stability analysis. At the same time, the direction difference, semantic label and identification field are merged and recorded in the data frame as the structured output result to establish the semantic category convergence segment.

[0044] Table 6. Structure of Semantic Category Convergence Sections

[0045] As shown in Table 6, the directional difference of semantic units in this segment is within 5°, and the trend decreases on both the left and right sides. The semantic category smoothly transitions from the subject attribute to the service category, forming a stable convergence structure. The output is the semantic category convergence segment.

[0046] Please see Figure 6The S5 steps are as follows: S511: Based on the semantic category convergence segment, extract the text content of all semantic units in the segment and the corresponding semantic tags, context expression patterns and word combination structures, and combine the original word order, dependency relations and grammatical configuration information of the semantic units to construct a semantic feature vector for each semantic unit. The vectorized aggregation operation of the semantic feature terms is used to obtain the semantic feature matrix. Based on semantic category convergence segments, the original word composition, part-of-speech tags, grammatical structures, and inter-word dependencies of all semantic units within these segments are extracted. Structural analysis identifies the subordinate relationships between semantic core words and their modifiers. Next, the word embedding vectors of these semantic units are collected, and their word order information, contextual dependency values, syntactic depth levels, part-of-speech weights, and semantic density factors are combined to construct the feature vector structure of each semantic unit. All semantic unit vectors are arranged in a linear order within the text, forming a consistent-dimensional, variable-length two-dimensional matrix. The semantic feature matrix is ​​used to support subsequent classification direction mapping operations. For example, the semantic unit "customer service response" has a word embedding vector of 128 dimensions, a part-of-speech tag of "noun + verb", a dependency structure of "subject-predicate", a context dependency degree of 0.83, and a semantic density of 0.65. Its feature vector structure can be represented as a numerical vector of length 132, such as [0.23, 0.18, ..., 0.47, 128, 1, 0.83, 0.65], which correspond to the dimensions of embedding, part-of-speech encoding, dependency relation encoding, position weight, and semantic density, respectively.

[0047] S512: Based on the semantic feature matrix, cluster and sort the semantic dimension distribution corresponding to each semantic unit, calculate the similarity between the high-weight semantic dimension in the vector and the category dictionary of each direction, select the direction with the highest similarity as the direction classification of the corresponding unit, and count the bidirectional pairing results of semantic direction and category to obtain the semantic classification direction label set. Based on the semantic feature matrix, the feature vector corresponding to each semantic unit is extracted row by row, and a semantic direction label dictionary is extracted from the classification standard set. Each label direction corresponds to a set of high-frequency semantic feature reference vectors. The cosine similarity between the current semantic unit vector and the direction label reference vector is calculated, and the direction corresponding to the maximum similarity value is determined. This is used to determine the direction attribution. If the similarity between a semantic unit vector and the "service experience" direction label dictionary is 0.72, which is significantly higher than its similarity with other direction labels (such as "product performance" at 0.41 and "ease of use" at 0.35), then the semantic unit is classified into the "service experience" semantic direction, and a classification label binding operation is performed on it. Finally, the binding pairing relationship between all semantic units in the complete segment and their corresponding directions is obtained, resulting in the semantic attribution direction label set.

[0048] S513: Based on the semantic attribution direction label set, match the direction classification labels sequentially according to the order of the semantic units in the original text, construct a structured text classification record, and output a list of classification labels aggregated by sentence segment to establish the text classification result; Based on the semantic attribution direction tag set, the attribution directions are merged sequentially according to the order of semantic units in the original text to construct a structured text tag pair sequence. The sequence is divided into sentences and paragraphs as the smallest unit. The attribution direction of multiple semantic units in each paragraph is determined by majority voting to set the main classification direction. Simultaneously, the proportion of each direction is recorded to form a direction distribution vector. A classification structure is generated with "paragraph number—main direction—distribution vector" as the core fields. The final output is a structured classification data frame. Each line in this data frame represents the semantic attribution status of a text segment. Content fields include paragraph ID, paragraph content, main attribution direction, direction probability distribution vector, and the number of participating semantic units. For example, if the paragraph content is "Customer service response is not timely, problem feedback is not resolved," its main attribution direction is "service response category," and the attribution probability distribution is {service response category: 0.74, user experience category: 0.18, brand awareness category: 0.08}. Finally, the text classification result is established.

[0049] Table 7 Text Classification Results Paragraph ID Paragraph content Main attribution direction Directional probability distribution (weights) Number of semantic units P01 Customer service response was slow and the problem was not resolved. Service Response Class {Service Response: 0.74, User Experience: 0.18, Brand: 0.08} 5 P02 The product is quite heavy and not very easy to operate. Ease of use {Ease of use: 0.66, Product attributes: 0.34} 4 P03 The logistics were fast, but the packaging was damaged, which affected the overall impression. Service Logistics {Service Logistics: 0.58, Service Response: 0.27, Cognition: 0.15} 6 As shown in Table 7, the final generated text classification structure has the ability to label the primary attribution direction and the direction distribution at the paragraph level, thus constituting the text classification result.

[0050] A text classification system based on semantic analysis, comprising: The direction sequence construction module is used to execute S1: collect the continuous input text structure, perform original semantic unit segmentation and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; The mutation intensity extraction module is used to perform S2: Based on the semantic direction jump trajectory map, extract the absolute difference between each direction point and the up and down directions in the continuous direction change sequence and record it as the jump intensity, filter the point with the maximum jump intensity and mark the corresponding position of the original semantic unit, and mark and generate the text mutation structure anchor node. The context extension recognition module is used to execute S3: anchor nodes based on text mutation structure, sequentially detect the intensity of directional jumps, determine whether they are continuously less than the judgment threshold, if so, include them in the continuous judgment sequence, until the continuous jumps are greater than the judgment threshold, mark the corresponding position as the mutation position, extract the segment to form a local semantic extension area, and generate a semantically consistent context segment. The boundary compression convergence module is used to execute S4: Based on the semantic consistency context segment, it determines whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is an inconsistency, it is marked as the conflict start point. It searches for closed boundary points on both sides of the jump direction to form a semantic closed structure and outputs the semantic category convergence segment. The classification label output module is used to execute S5: based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign the corresponding semantic belonging direction according to the text classification standard, output the belonging classification label, and generate the text classification result.

[0051] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A text classification method based on semantic analysis, characterized in that, Includes the following steps: S1: Collect the structure of continuous input text, segment the original semantic units and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; S2: Based on the semantic direction jump trajectory map, extract the absolute difference between each direction point in the continuous direction change sequence and the direction point of the previous sequence position and the next sequence position, record it as the jump intensity, filter the point with the maximum jump intensity and mark the corresponding position of the original semantic unit, mark and generate the text mutation structure anchor node. S3: Based on the anchor node of the text mutation structure, the directional jump intensity is detected sequentially, and it is determined whether it is continuously less than the preset jump intensity judgment threshold. If it is satisfied, it is included in the continuous judgment sequence until the continuous jump is greater than the judgment threshold. The corresponding position is marked as the mutation position, the segment is extracted to form a local semantic extension area, and a semantically consistent context segment is generated. S4: Based on the semantic consistency context segment, determine whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is an inconsistency, mark it as the conflict starting point, find closed boundary points on both sides of the jump direction to form a semantic closed structure, and output the semantic category convergence segment. S5: Based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign it to the corresponding semantic direction according to the preset semantic classification mapping rules, output the classification label, and generate the text classification result.

2. The text classification method based on semantic analysis according to claim 1, characterized in that: The semantic direction jump trajectory diagram includes a direction change sequence, angle difference distribution, and semantic embedding relationship network. The text mutation structure anchor node includes the direction mutation position, jump intensity marker, and semantic unit positioning index. The semantic consistency context segment includes the direction stabilization segment, the jump intensity threshold segment, and the anchor node adjacency region. The semantic category convergence segment includes the conflict starting point, semantic closure boundary, and category label stability region. The text classification result includes the semantic feature set, semantic attribution direction, and classification label.

3. The text classification method based on semantic analysis according to claim 1, characterized in that, The specific steps for obtaining the semantic direction jump trajectory map are as follows: S111: Collect the continuous input text structure, split each word sequence in the text structure into semantic units based on word boundaries, monitor the lexical correlation between adjacent words, stop word interval information and contextual dependency structure, determine whether word combinations constitute continuous semantic segments, and independently group each continuous semantic segment to generate a set of semantic units. S112: Based on the set of semantic units, each semantic unit is mapped to a vector space using an embedding model to construct a set of semantic embedding vectors. The angle between any two adjacent semantic embedding vectors is monitored, and the difference is calculated with a preset directional difference benchmark value. The directional change values ​​between each pair of semantic units are statistically analyzed to obtain a sequence of directional difference values. S113: Based on the index position order of each item in the directional difference value sequence, construct the directional jump index path in sequence, map the path to the two-dimensional trajectory space, extract the jump inflection point position and jump amplitude value, aggregate all jump indices and jump amplitudes, and establish a semantic directional jump trajectory map.

4. The text classification method based on semantic analysis according to claim 1, characterized in that, The specific steps for obtaining the anchor nodes of the text mutation structure are as follows: S211: Based on the semantic direction jump trajectory map, read the direction point data corresponding to each semantic unit node in the continuous direction change sequence in the map, sequentially detect the numerical difference between any direction point and the two direction points before and after, calculate the absolute difference with the previous direction point and the absolute difference with the next direction point respectively, take the average of the two as the jump intensity index value of the direction point, calculate and obtain the direction point jump intensity value, and store it as the corresponding index structure to obtain the direction point jump intensity value sequence; S212: Based on the direction point jump intensity value sequence, perform numerical comparison of each jump intensity value in the entire sequence, traverse all index values ​​corresponding to jump intensities, obtain the maximum jump intensity value through filtering operations, and record the index position in the original sequence, locate the semantic unit corresponding to the index as the structural mutation point, and obtain the semantic unit index corresponding to the extreme value of jump intensity. S213: Based on the semantic unit index corresponding to the extreme value of the jump intensity, mark the structural attribute identifier of the corresponding position in the original semantic unit set, add mutation marker information to the original semantic unit index set, and output it as a marked semantic structure data frame to establish a text mutation structure anchor node.

5. The text classification method based on semantic analysis according to claim 4, characterized in that, The formula for calculating the directional point jump intensity value is as follows: ; in, This represents the jump intensity value at index i. This represents the angle value of the direction point at index i. and These represent the angle values ​​of the previous and next direction points, respectively.

6. The text classification method based on semantic analysis according to claim 1, characterized in that, The steps for obtaining the semantically consistent context segment are as follows: S311: Based on the anchor node of the text mutation structure, extract the positioning information of the corresponding index position in the jump intensity sequence, extract the jump intensity values ​​of adjacent direction points to the left and right respectively, and construct the direction intensity extension array. Use the index sliding structure to gradually detect whether each jump intensity value is less than the preset jump intensity judgment threshold. If it is satisfied, add the corresponding index position to the continuity judgment index set. S312: Based on the continuity judgment index set, the direction point sequence with continuous jump intensity less than the judgment threshold is subjected to boundary judgment, and the direction point index that first exceeds the judgment threshold is determined as the end point of the sequence boundary. The index positions of the left and right direction extension ends are recorded respectively, and the boundary truncation segment centered on the mutation node is constructed to obtain the mutation segment boundary index pair. S313: Based on the mutation segment boundary index pair, extract all semantic unit content between the start and end indices in the original semantic unit set, aggregate them in the original order to form a structured semantic fragment, and label it as the extended area content type to establish a semantically consistent context segment.

7. The text classification method based on semantic analysis according to claim 1, characterized in that, The specific steps for obtaining the semantic category convergence segment are as follows: S411: Based on the semantic consistency context segment, extract three sets of semantic units before and after the index position of the mutation node, and aggregate the category tags corresponding to each semantic unit. Make a category consistency judgment by the difference in literal attributes between tag types. If the category tags marked by the three sets of semantic units before and after belong to different main category nodes in the hierarchical classification system, it is considered that a tag jump behavior has occurred. Record the index position corresponding to the mutation node and establish a semantic category jump mark index. S412: Based on the semantic category jump marker index, scan the direction jump sequence simultaneously to the left and right with the index as the conflict starting point, extract the direction difference of three consecutive groups of semantic units, and determine whether they are all less than the reference value and decrease in order. If the above trend condition is met, the index position is marked as the direction change stabilization node, and record one node position on the left and one on the right respectively to generate a direction change convergence boundary index pair. S413: Based on the direction change convergence boundary index pair, perform fragment aggregation processing on all semantic units located within the index interval in the original semantic unit set, construct a closed structure from the start point to the end point of the convergence boundary, assign a structure type label, and establish a semantic category convergence segment.

8. The text classification method based on semantic analysis according to claim 1, characterized in that, The specific steps for obtaining the text classification results are as follows: S511: Based on the semantic category convergence segment, extract the text content of all semantic units within the segment and their corresponding semantic tags, contextual expression patterns and lexical combination structures, and combine the original word order, dependency relations and grammatical configuration information of the semantic units to construct a semantic feature vector for each semantic unit, and perform vectorized aggregation operations on the semantic feature terms to obtain a semantic feature matrix. S512: Based on the semantic feature matrix, cluster and sort the semantic dimension distribution corresponding to each semantic unit, calculate the similarity between the high-weight semantic dimension in the vector and the category dictionary of each direction, select the direction with the maximum similarity as the direction classification of the corresponding unit, and count the bidirectional pairing results of semantic direction and category to obtain the semantic classification direction label set. S513: Based on the semantic attribution direction label set, match the direction classification labels sequentially according to the order position of the semantic units in the original text, construct a structured text classification record, and output a list of classification labels aggregated by sentence segment to establish the text classification result.

9. A text classification system based on semantic analysis, characterized in that, The system is used to implement the text classification method based on semantic analysis as described in any one of claims 1-8, comprising: The direction sequence construction module is used to execute S1: collect the continuous input text structure, perform original semantic unit segmentation and obtain semantic embedding vectors, calculate the direction difference value based on the angle between the embedding vectors of two adjacent semantic units, arrange them according to the original text order, construct a continuous direction change sequence, and construct a semantic direction jump trajectory map; The mutation intensity extraction module is used to perform S2: based on the semantic direction jump trajectory map, extract the absolute difference between each direction point in the continuous direction change sequence and its adjacent positions and record it as the jump intensity, filter the point with the maximum jump intensity and mark the corresponding position of the original semantic unit, and mark and generate the text mutation structure anchor node. The context extension recognition module is used to perform S3: based on the anchor node of the text mutation structure, it sequentially detects the directional jump intensity, determines whether it is continuously less than the preset jump intensity judgment threshold, and if it is satisfied, it is included in the continuous judgment sequence until the continuous jump is greater than the judgment threshold. The corresponding position is marked as the mutation position, the segment is extracted to form a local semantic extension area, and a semantically consistent context segment is generated. The boundary compression convergence module is used to execute S4: Based on the semantic consistency context segment, it determines whether there is a category label jump phenomenon in the three groups of semantic units before and after the mutation position. If there is an inconsistency, it is marked as the conflict starting point. Closed boundary points are searched along both sides of the jump direction to form a semantic closed structure, and the semantic category convergence segment is output. The classification label output module is used to execute S5: based on the semantic category convergence segment, extract the semantic features of the semantic unit, assign the corresponding semantic belonging direction according to the text classification standard, output the belonging classification label, and generate the text classification result.

Citation Information

Patent Citations

  • Method and system for processing data based on large language model

    CN120471023A

  • Processing method and system based on computer vision large model

    CN120708226A

  • Text classification method, electronic equipment and storage medium

    CN120744127A

  • Multi-modal digital publishing intelligent checking system and method based on large model

    CN120930637A

  • Automatic quality evaluation method for high-quality data set in cultural field

    CN120951988A

Cited By

  • Intelligent patent document classification method and system based on semantic understanding

    CN121833954A

  • A patent document intelligent classification method and system based on semantic understanding

    CN121833954B

  • Vectorization construction method and system for manufacturing equipment maintenance knowledge

    CN122240677A