Text classification processing method and text information ranking display method and device
By using hierarchical semantic tag analysis, the text classification problem of feedback issues in online shopping was solved, achieving accurate classification of the text to be processed and problem identification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2026-03-03
AI Technical Summary
In online shopping, it is difficult to accurately categorize feedback questions, making it hard to understand the clustering trends of feedback questions.
By analyzing the first-level semantic tags, second-level semantic tags, and target semantic tags step by step, the classification tags of the text to be processed are obtained, thus achieving accurate text classification.
It enables intuitive understanding and accurate classification of large amounts of text to be processed, helping the management platform to identify key issues in a timely manner.
Smart Images

Figure CN115757802B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to text classification and processing methods, text information sorting and display methods, devices, electronic devices, and computer storage media. Background Technology
[0002] With the rapid development of technology and the continuous improvement of living standards, online shopping has become increasingly popular. Customers can purchase the goods they need without leaving home, which obviously saves them a lot of time.
[0003] Online shopping requires cooperation from multiple parties during the delivery process. For example, merchants need to provide goods to customers, and delivery riders need to deliver those goods. This delivery process can lead to issues such as damaged goods or delayed deliveries. In such cases, all parties report these issues on the ordering platform or in applications used to provide feedback on orders. The management then optimizes the ordering service based on this feedback. However, the large number of online orders daily results in a significant volume of feedback. Because the content of these feedbacks varies from party to party, it is difficult to categorize them and identify the most frequent issues. Therefore, accurately classifying the text corresponding to these feedback issues has become a pressing technical problem that needs to be solved. Summary of the Invention
[0004] This application provides a text classification processing method to solve the technical problem of how to accurately classify the text to be processed. In addition, this application also provides a text information sorting and display method, a text classification processing device, a text information sorting and display device, an electronic device, and a computer storage medium.
[0005] This application provides a text classification processing method, including: obtaining a text to be processed; performing semantic analysis on the text to be processed based on a first-level semantic tag acquisition strategy to obtain a first-level semantic tag corresponding to the text to be processed; performing semantic analysis on the text to be processed based on a second-level semantic tag acquisition strategy and the first-level semantic tag to obtain a second-level semantic tag corresponding to the text to be processed; obtaining a target semantic tag corresponding to the text to be processed based on a target semantic tag acquisition strategy, the first-level semantic tag, the second-level semantic tag, and the text to be processed, and using the target semantic tag as a classification tag for the text to be processed.
[0006] Optionally, the step of performing semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy and the primary semantic tag to obtain the secondary semantic tag corresponding to the text to be processed includes: performing semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy to obtain the secondary verification tag corresponding to the text to be processed; performing semantic verification on the secondary verification tag using the primary semantic tag, and taking the secondary verification tag that semantically matches the primary semantic tag as the secondary semantic tag.
[0007] Optionally, obtaining the target semantic tag corresponding to the text to be processed based on the target semantic tag acquisition strategy, the first-level semantic tag, the second-level semantic tag, and the text to be processed includes: combining the second-level semantic tags based on the target semantic tag acquisition strategy, or combining the first-level semantic tags with the second-level semantic tags to obtain a combined tag to be verified; performing semantic verification on the combined semantic tag to be verified using the text to be processed, and taking the combined tag to be verified that semantically matches the text to be processed as the target semantic tag.
[0008] Optionally, the step of combining the secondary semantic tags or combining the primary semantic tags with the secondary semantic tags based on the target semantic tag acquisition strategy to obtain a combined tag to be verified includes: combining the secondary semantic tags or combining the primary semantic tags with the secondary semantic tags to obtain candidate combined tags; iterating through each candidate combined tag to see if it matches the target semantic tag acquisition strategy; if so, using the third-level standard tags in the preset tag library corresponding to the target semantic tag acquisition strategy as the combined tag to be verified.
[0009] Optionally, it may also include: preprocessing the text to be processed to obtain preprocessed text to be processed.
[0010] Optionally, the step of performing semantic analysis on the text to be processed based on the first-level semantic tag acquisition strategy to obtain the first-level semantic tag corresponding to the text to be processed includes: traversing whether the text to be processed matches the first-level semantic tag acquisition strategy; if so, using the first-level standard tag in the preset tag library corresponding to the first-level semantic tag acquisition strategy as the first-level semantic tag.
[0011] Optionally, the step of performing semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy to obtain the secondary verification tag corresponding to the text to be processed includes: traversing whether the text to be processed matches the secondary semantic tag acquisition strategy; if so, using the secondary standard tag in the preset tag library corresponding to the secondary semantic tag acquisition strategy as the secondary verification tag.
[0012] Optionally, before iterating through whether the text to be processed matches the secondary semantic tag acquisition strategy, the method further includes: determining whether the text to be processed meets the initial verification conditions for obtaining secondary semantic tags; the step of iterating through whether the text to be processed matches the secondary semantic tag acquisition strategy includes: if the text to be processed meets the initial verification conditions for obtaining secondary semantic tags, then iterating through whether the text to be processed matches the secondary semantic tag acquisition strategy.
[0013] Optionally, it further includes: if the text to be processed does not match the secondary semantic tag acquisition strategy, then the text to be processed is used as input data for the matching value prediction model to obtain the matching value between the text to be processed and each secondary standard tag, wherein the matching value prediction model is a model used to obtain the matching value between the text to be processed and each secondary standard tag based on the text to be processed; and the secondary verification tag corresponding to the text to be processed is obtained based on the matching value between the text to be processed and each secondary standard tag.
[0014] Optionally, the step of using the text to be processed as input data for the matching value prediction model to obtain the matching value between the text to be processed and each secondary standard label includes: using the text to be processed and the primary semantic label together as input data for the matching value prediction model to obtain the matching value between the text to be processed and each secondary standard label.
[0015] Optionally, obtaining the secondary verification tag corresponding to the text to be processed based on the matching value between the text to be processed and each secondary standard tag includes: determining whether the matching value satisfies a first matching condition, or determining whether the matching value satisfies a second matching condition and whether the text to be processed satisfies the secondary verification condition for obtaining secondary semantic tags; if so, determining a target secondary standard tag that satisfies the first matching condition, or determining a target secondary standard tag that satisfies the second matching condition and satisfies the secondary verification condition for obtaining secondary semantic tags; and obtaining the secondary verification tag corresponding to the text to be processed based on the target secondary standard tag.
[0016] Optionally, the matching value prediction model is obtained by: filtering text samples from candidate texts; obtaining matching value samples between the text samples and each secondary standard label; and training an initial text classification model based on the text samples and the matching value samples to obtain the matching value prediction model.
[0017] Optionally, training the initial text classification model based on the text samples and the matching value samples includes: obtaining a text sample vector for vector representation of the text samples; obtaining a matching value sample vector for vector representation of the matching value samples; and training the initial text classification model using the text sample vector and the matching value sample vector.
[0018] Optionally, the step of filtering text samples from candidate texts includes: filtering text samples from candidate texts based on a pre-set logical expression used to represent the target semantics.
[0019] Optionally, after obtaining the target semantic tags corresponding to the text to be processed, the text to be processed is sorted based on the number of the target semantic tags to obtain the sorting information of the text to be processed.
[0020] Optionally, after obtaining the target semantic tag corresponding to the text to be processed, the text to be processed is sorted based on the target semantic tag and the filtering condition information provided by the user terminal of the management ordering service platform for sorting the text to be processed, thereby obtaining the sorting information of the text to be processed.
[0021] Optionally, it further includes: obtaining a first request message from a user terminal used to manage the ordering service platform, requesting to obtain sorting information of the text to be processed; and sending the sorting information of the text to be processed to the user terminal in response to the first request message.
[0022] Optionally, the text to be processed includes text that provides feedback on the ordered service.
[0023] Optionally, the tags in the preset tag library are obtained in the following way: obtaining the text to be clustered; performing iterative clustering on the text to be clustered based on the identifier of the text to be clustered to obtain the initial clustering result information of the text to be clustered; performing semantic analysis on the initial clustering result information to obtain semantic analysis result information for the initial clustering result information; clustering the semantic analysis result information to obtain three-level standard tags; and performing text decomposition on the three-level standard tags to obtain first-level standard tags and second-level standard tags.
[0024] Optionally, the step of iteratively clustering the text to be clustered based on its identifier to obtain initial clustering result information includes: randomly selecting a specified number of unclustered texts from the text to be clustered as the first batch of texts to be clustered; iteratively clustering the first batch of texts to be clustered based on the number of elements in the first initial group and the identifier of the first batch of texts to be clustered to determine the clustering result of the first batch of texts to be clustered; determining whether the number of times the specified number of unclustered texts is randomly selected from the text to be clustered meets a preset selection number threshold condition; if not, randomly selecting a specified number of unclustered texts from the text to be clustered as the second batch of texts to be clustered; and based on the number of elements in the first initial group and the identifier of the second batch of texts to be clustered... Iterative clustering is performed on the second batch of texts to be clustered to determine the clustering result of the second batch of texts to be clustered; it is determined whether the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset sampling number threshold condition; if not, a specified number of unclustered texts are randomly selected from the texts to be clustered as the third batch of texts to be clustered; based on the number of elements in the first initial group and the identifier of the third batch of texts to be clustered, iterative clustering is performed on the third batch of texts to be clustered to determine the clustering result of the third batch of texts to be clustered; this process is repeated until the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset sampling number threshold condition, and the clustering result information of each batch is used as the initial clustering result information of the texts to be clustered.
[0025] Optionally, the step of iteratively clustering the first batch of texts to be clustered based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, and determining the clustering result of the first batch of texts to be clustered, includes: performing a first clustering on the first batch of texts to be clustered based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, and determining the first clustering result of the first batch of texts to be clustered; determining whether the number of iterations of iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets a preset iteration number threshold condition; if not, then performing a second clustering on the first batch of texts to be clustered based on the first clustering result, the number of elements in the first initial group, and the identifiers of the first batch of texts to be clustered, and determining the clustering result of the first batch of texts to be clustered. The second clustering result of the text; determining whether the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets a preset iteration threshold condition; if not, then based on the second clustering result, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered, the first batch of texts to be clustered is clustered for the third time to determine the third clustering result of the first batch of texts to be clustered; and so on, until the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets the preset iteration threshold condition; and determining the clustering result of the first batch of texts to be clustered based on the clustering result of the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group.
[0026] Optionally, determining the clustering result of the first batch of texts to be clustered based on the clustering result of the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group includes: determining whether the similarity between the texts corresponding to the elements in each clustering result group in the last clustering result meets a similarity threshold condition; if so, determining whether the number of elements in each clustering result group meets a preset element number threshold condition, and taking the clustering result group that meets the preset element number threshold condition as the clustering result of the first batch of texts to be clustered.
[0027] Optionally, after performing the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group, the method further includes: subtracting a preset number from the number of elements in the first initial group to obtain the number of elements in the second initial group; determining whether the number of elements in the second initial group is less than the preset number of elements in the initial group; if not, taking the remaining texts to be clustered from the first batch of texts except for the elements in the clustering result group that meet the preset element number threshold condition as the remaining texts to be clustered; performing iterative clustering on the remaining texts based on the number of elements in the second initial group and the identifier of the first batch of texts to be clustered, determining the clustering result of the remaining texts to be clustered, and taking the clustering result of the remaining texts to be clustered as the clustering result of the first batch of texts to be clustered.
[0028] Optionally, if the number of elements in the second initial group is less than the preset number of elements in the initial group, the process returns to the step of determining whether the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset threshold condition for the number of selections.
[0029] Optionally, the step of performing a second clustering on the first batch of texts to be clustered based on the first clustering result, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered includes: determining the middle element in the clustering result group of the first clustering result; determining the first element of the initial group for the second clustering of the first batch of texts to be clustered based on the middle element in the clustering result group of the first clustering result; and performing a second clustering on the first batch of texts to be clustered based on the first element of the initial group for the second clustering of the first batch of texts to be clustered, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered.
[0030] This application provides a method for displaying sorted text information, including: obtaining sorting information of text to be processed sent by a server; the sorting information of the text to be processed is obtained based on the number of target semantic tags corresponding to the text to be processed, or the sorting information of the text to be processed is obtained based on the target semantic tags and filtering condition information for sorting the text to be processed; wherein, the target semantic tags are obtained based on a target semantic tag acquisition strategy, the text to be processed, the primary semantic tags corresponding to the text to be processed, and the secondary semantic tags corresponding to the text to be processed; the primary semantic tags are obtained by performing semantic analysis on the text to be processed based on the primary semantic tag acquisition strategy, and the secondary semantic tags are obtained by performing semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy and the primary semantic tags; and displaying the text to be processed and the target semantic tags based on the sorting information of the text to be processed.
[0031] Optionally, it further includes: sending a first request message to the server to request the acquisition of sorting information of the text to be processed; the acquisition of sorting information of the text to be processed sent by the server includes: acquiring the sorting information of the text to be processed sent by the server in response to the first request message.
[0032] Optionally, displaying the text to be processed and the target semantic tags based on the sorting information of the text to be processed includes: determining the text to be processed and the target semantic tags corresponding to the text to be processed to be displayed to users of the management ordering service platform based on the sorting information of the text to be processed; and displaying the determined text to be processed and the target semantic tags corresponding to the text to be processed on the user's page.
[0033] Optionally, it also includes: a second request message sent by a user of the management ordering service platform through a user-side page to request the display of a target semantic tag; the display of the text to be processed and the target semantic tag includes: displaying the text to be processed and the target semantic tag on the page based on the second request message.
[0034] Optionally, it may also include: obtaining filtering criteria information for sorting the text to be processed from a user's page on the user terminal of the management ordering service platform.
[0035] Correspondingly, embodiments of this application provide a text classification processing apparatus, including: a text-to-process unit for obtaining text to be processed; a first-level semantic tag obtaining unit for performing semantic analysis on the text to be processed based on a first-level semantic tag obtaining strategy to obtain a first-level semantic tag corresponding to the text to be processed; a second-level semantic tag obtaining unit for performing semantic analysis on the text to be processed based on a second-level semantic tag obtaining strategy and the first-level semantic tag to obtain a second-level semantic tag corresponding to the text to be processed; and a target semantic tag obtaining unit for obtaining a target semantic tag corresponding to the text to be processed based on a target semantic tag obtaining strategy, the first-level semantic tag, the second-level semantic tag, and the text to be processed, and using the target semantic tag as a classification tag for the text to be processed.
[0036] Correspondingly, this application provides a text information sorting and display device, including: a sorting information obtaining unit, used to obtain sorting information of a text to be processed sent by a server; the sorting information of the text to be processed is obtained based on the number of target semantic tags corresponding to the text to be processed, or the sorting information of the text to be processed is obtained based on the target semantic tags and filtering condition information for sorting the text to be processed; wherein, the target semantic tags are obtained based on a target semantic tag obtaining strategy, the text to be processed, the primary semantic tags corresponding to the text to be processed, and the secondary semantic tags corresponding to the text to be processed; the primary semantic tags are obtained by performing semantic analysis on the text to be processed based on the primary semantic tag obtaining strategy, and the secondary semantic tags are obtained by performing semantic analysis on the text to be processed based on the secondary semantic tag obtaining strategy and the primary semantic tags; and a display unit, used to display the text to be processed and the target semantic tags based on the sorting information of the text to be processed.
[0037] Correspondingly, embodiments of this application provide an electronic device, including: a processor; and a memory for storing a computer program, which is executed by the processor to perform the above-described text classification processing method and text information sorting display method.
[0038] Correspondingly, this application provides a computer storage medium storing a computer program that is run by a processor to perform the above-described text classification processing method and text information sorting display method.
[0039] Compared with the prior art, the embodiments of this application have the following advantages:
[0040] This application provides a text classification processing method. In this method, after obtaining the text to be processed, semantic analysis is performed on the text based on a first-level semantic tag acquisition strategy to obtain the first-level semantic tags corresponding to the text. After obtaining the first-level semantic tags, semantic analysis is performed on the text based on a second-level semantic tag acquisition strategy and the first-level semantic tags to obtain the second-level semantic tags corresponding to the text. After obtaining the first-level and second-level semantic tags, a target semantic tag is obtained based on a target semantic tag acquisition strategy, the first-level semantic tags, the second-level semantic tags, and the text to be processed. This target semantic tag is then used as the classification tag for the text. This text classification processing method, by using target semantic tags to classify the text, facilitates a more intuitive understanding of a large number of texts to be processed. Furthermore, obtaining the target semantic tags of the text in a hierarchical manner makes the obtained target semantic tags of the text more closely match the semantics of the text, thus leading to more accurate classification of the text. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0042] Figure 1 This is a schematic diagram of the first scenario of the text classification processing method of this application;
[0043] Figure 2 This is a schematic diagram of a second scenario for the text classification processing method of this application;
[0044] Figure 3 A flowchart of the text classification processing method provided in the first embodiment of this application;
[0045] Figure 4 This is a first example flowchart of obtaining target semantic tags provided in the first embodiment of this application;
[0046] Figure 5 A second example flowchart for obtaining target semantic tags provided in the first embodiment of this application;
[0047] Figure 6 This is a clustering flowchart provided for the first embodiment of this application;
[0048] Figure 7 A flowchart illustrating the text information sorting display method provided in the second embodiment of this application;
[0049] Figure 8 A schematic diagram of a text classification processing device provided in the third embodiment of this application;
[0050] Figure 9 A schematic diagram of a text information sorting display device provided in the fourth embodiment of this application;
[0051] Figure 10 This is a schematic diagram of an electronic device provided in the fifth embodiment of this application. Detailed Implementation
[0052] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific implementations disclosed below.
[0053] This application provides a text classification processing method, a text information sorting and display method, an apparatus, an electronic device, and a computer storage medium. The following specific embodiments describe the text classification processing method, the text information sorting and display method, the apparatus, the electronic device, and the computer storage medium.
[0054] The text classification processing method and text information sorting display method of this application can be applied to various scenarios that require text classification and sorting display. By using the text classification processing method to process the text to be processed, the corresponding category tags of the text to be processed are determined, which makes it convenient for managers to intuitively understand a large number of texts to be processed based on the corresponding category tags. At the same time, based on the corresponding category tags of the texts to be processed, the texts to be processed can be sorted, that is, the sorting of the texts to be processed is realized based on the category tags, and the sorting of the category tags is displayed to the user, so that the user can understand what type of a large number of texts to be processed are mainly within a certain period of time.
[0055] As an example scenario, customers can order various goods on a product ordering service platform. Of course, the entire ordering process involves multiple parties (including merchants, customers placing orders, and delivery riders). To facilitate timely feedback from all parties regarding issues arising during the ordering and delivery process, a feedback module can be set up on the ordering service platform or in applications used for order feedback. This module collects feedback from all parties, which can be termed customer complaints (customer requests). The specific content directly provided by each party can be referred to as raw data. In reality, the content received through the feedback module is quite comprehensive, including customer complaints from consumers, merchants, and riders, suggestions for services, information from platform surveys, and inquiries about products.
[0056] Raw data can include raw text data and raw audio data. To facilitate understanding, let's take a customer complaint as an example. Suppose a customer inquires about a product and communicates with the seller by entering text on the consultation page, and the seller also replies by entering text. The text entered by both the customer and the seller constitutes raw text data. If the customer enters three sentences and the seller enters four, these seven sentences constitute one piece of raw text data. Similarly, if a customer inquires about a product and communicates with the seller by entering voice messages on the consultation page, and the seller also replies by entering voice messages, the voice messages entered by both the customer and the seller constitute raw audio data. If the customer enters three sentences and the seller enters four, these seven voice messages constitute one piece of raw audio data. Of course, raw audio data can also include the content of voice calls generated during product inquiries.
[0057] The aforementioned administrators obtain feedback from various parties through the user interface of the ordering service platform. The management interface (administration end) of the ordering service platform can obtain feedback from various parties by interacting with these interfaces, such as: the merchant interface (user interface used by merchants), the customer interface (user interface used by customers), and the delivery interface (user interface used by delivery riders). In fact, the ordering service platform or any application used for product order feedback can serve as an insight platform, with various interfaces set up for all parties to provide feedback.
[0058] When providing feedback, parties can do so in various ways. For example, they can enter text or insert images on the feedback page on their respective devices, or they can click on the voice input option on the feedback page and provide feedback via voice. Regardless of the method used, the feedback content can be provided to the ordering service platform or the application used for product order feedback. Specifically, feedback content can refer to inquiries, evaluations, or complaints about products, or it can refer to evaluations or complaints about the personnel handling the product, such as merchants or delivery riders. Merchants provide products, and riders deliver them. Of course, the above are just a few examples of feedback content; feedback can also be provided on other topics.
[0059] For example, when customer A orders a meal, if customer A finds that the meal order is late, customer A can file a complaint about the meal order on the meal ordering platform.
[0060] The complaint from customer A could be directed at either the merchant or the delivery rider. If customer A's complaint is directed at the delivery rider, and the actual delivery delay was due to the merchant's slow food preparation, the rider delivering the order can file a complaint against the merchant after receiving customer A's complaint. The rider can file a complaint against the merchant on the food ordering platform, stating, "My order was delayed because the merchant's food preparation was slow."
[0061] Since a large number of customers may order goods on the ordering service platform, which may result in a large number of customer complaints, the reason for providing a feedback module is to allow multiple parties to provide feedback on the problems that arise during the ordering process, in order to provide better service to all parties based on the feedback from all parties.
[0062] For example, when delivering goods from merchant M to location P, the historical maximum delivery time is 10 minutes. In subsequent deliveries, a reasonable delivery time for goods from merchant M to location P can be set to 10 minutes. If the delivery time exceeds 10 minutes, the order is confirmed as overdue. However, recently, many customer complaints have revealed the following: all orders from merchant M to location P have experienced delivery timeouts. Riders delivering these orders can report the reason for the timeout in the feedback module, specifically stating, "I was delayed because I took a detour." In reality, the road from merchant M to location P is currently under construction, requiring a detour to reach P. Of course, different riders may express the same meaning differently; other methods can also be used to express that the detour due to road construction caused the order to be overdue.
[0063] For example, rider A reports, "My delivery was late because I took a detour," while rider B reports, "Road construction required a detour, which caused the order to be late." In reality, riders A and B's reports essentially mean the same thing, but because each person phrases it differently, different original text data appears.
[0064] After the user-side management order service platform obtains the original text data of rider A and rider B through the feedback module, analysis reveals that the reasonable delivery time for orders in this route should be set to 20 minutes. The management order service platform personnel can then set the reasonable delivery time for orders in this route to 20 minutes, thereby reducing the likelihood of riders being late due to detours and resulting in customer complaints, and ultimately improving the delivery experience for the riders.
[0065] Of course, the above examples illustrate the scenario where only two pieces of raw text data are received in the feedback module. Given the large volume of raw data (including raw text and audio data) received daily or over a specific period on the ordering service platform, directly identifying the most frequent feedback issues based on this vast amount of data is challenging. Therefore, this paper proposes a method to obtain tags corresponding to the raw data and categorize the raw data based on these tags. This allows administrators of the ordering service platform to promptly identify the most prevalent issues among the large amounts of raw data received over a given period, enabling them to address these issues and ultimately provide a better experience for all parties involved.
[0066] Specifically, the tags corresponding to the original data can be obtained as follows: First, based on the original data, obtain the text to be processed. If the original data is raw text data, directly use the raw text data as the text to be processed; if the original data is raw audio data, convert the raw audio data to text and use the converted text as the text to be processed.
[0067] After obtaining the text to be processed, semantic analysis is performed on the text based on the first-level semantic label acquisition strategy to obtain the first-level semantic label corresponding to the text. At the same time, semantic analysis is performed on the text based on the second-level semantic label acquisition strategy and the first-level semantic label to obtain the second-level semantic label corresponding to the text. Finally, based on the target semantic label acquisition strategy, the first-level semantic label, the second-level semantic label, and the text to be processed, the target semantic label corresponding to the text to be processed is obtained, and the target semantic label is used as the classification label of the text to be processed.
[0068] To facilitate understanding of the process of obtaining the target semantic tags corresponding to the text to be processed, let's take "My order was delayed because my electric vehicle malfunctioned" as an example to illustrate how to obtain the target semantic tags corresponding to the text to be processed.
[0069] After obtaining the text to be processed, "My order was delayed because my electric vehicle malfunctioned," semantic analysis is performed on the text based on a first-level semantic tag acquisition strategy to obtain the corresponding first-level semantic tags. Specifically, performing semantic analysis on the text to be processed based on the first-level semantic tag acquisition strategy to obtain the corresponding first-level semantic tags can mean: iterating through whether the text to be processed matches the first-level semantic tag acquisition strategy; if so, the first-level standard tags in the preset tag library corresponding to the first-level semantic tag acquisition strategy are used as the first-level semantic tags.
[0070] For example, if the text to be processed is "My order was delayed because my electric vehicle malfunctioned," and during the traversal, if strategy A for obtaining first-level semantic tags requires the text to include: electric vehicle, electric scooter, or vehicle; strategy B requires the text to include: timeout or exceeding the time limit; strategy C requires the text to include: malfunction or damage; and strategy D requires the text to include: order, order, takeout order, or takeout, then the first-level semantic tags corresponding to the text to be processed are: electric vehicle, malfunction, order, timeout.
[0071] After obtaining the primary semantic tags, semantic analysis is performed on the text to be processed based on the secondary semantic tag acquisition strategy and the obtained primary semantic tags to obtain the secondary semantic tags corresponding to the text to be processed.
[0072] As a method to obtain secondary semantic tags corresponding to the text to be processed by semantic analysis based on the secondary semantic tag acquisition strategy and the primary semantic tag: First, the text to be processed is semantically analyzed based on the secondary semantic tag acquisition strategy to obtain the secondary verification tags corresponding to the text to be processed; then, the primary semantic tags are used to perform semantic verification on the secondary verification tags, and the secondary verification tags that semantically match the primary semantic tags are taken as the secondary semantic tags.
[0073] As a method for semantic analysis of the text to be processed based on the secondary semantic tag acquisition strategy, and to obtain the secondary verification tag corresponding to the text to be processed, it can refer to: traversing whether the text to be processed matches the secondary semantic tag acquisition strategy. If it does, then the secondary standard tag in the preset tag library corresponding to the secondary semantic tag acquisition strategy is used as the secondary verification tag.
[0074] For example, if the text to be processed is "My order was delayed because my electric vehicle malfunctioned", and during the traversal, if the secondary semantic tag acquisition strategy A1 requires the text to include: electric vehicle, electric scooter, or vehicle, and contains "malfunction" or "damage", and the secondary semantic tag acquisition strategy B1 requires the text to include: order, order, takeout order, or takeout, and contains "timeout" or "exceeded time", then the secondary tags to be verified for the text to be processed are: electric vehicle malfunction, order timeout.
[0075] After determining the secondary tags to be verified, the primary semantic tags are used to perform semantic verification on the secondary tags. Secondary tags that semantically match the primary semantic tags are then used as secondary semantic tags. For example, by using the primary semantic tags "electric vehicle," "fault," "order," and "timeout" to perform semantic verification on the secondary tags, and confirming that "electric vehicle fault" and "order timeout" both semantically match the primary semantic tags, then "electric vehicle fault" and "order timeout" are used as secondary semantic tags. Simultaneously, the primary semantic tags can also be used to verify whether any of the generated secondary tags are missing. For instance, if the tag "electric vehicle fault" does not exist when generating secondary tags, but the primary semantic tags contain "electric vehicle" and "fault," then it can be determined that a portion of the secondary tags is missing, and the final generated secondary semantic tags will inevitably be incomplete.
[0076] To better understand which secondary tags to be verified are semantically matched with the primary semantic tags, please refer to the following example. If the secondary tags to be verified obtained above are "electric vehicle timeout" and "order failure", semantic verification using the primary semantic tags reveals that "electric vehicle timeout" and "order failure" do not match the semantics of the text to be processed or the primary semantic tags. This is mainly because the semantics of the primary semantic tags are roughly "electric vehicle failure caused order timeout", while the semantics of "electric vehicle timeout" and "order failure" are roughly "order failure caused electric vehicle timeout" or "electric vehicle timeout caused order failure", which obviously does not match the semantics of the primary semantic tags. Therefore, "electric vehicle timeout" and "order failure" cannot be used as the final secondary semantic tags.
[0077] After determining the secondary semantic tags and the primary semantic tags, the target semantic tags corresponding to the text to be processed are obtained based on the target semantic tag acquisition strategy, the primary semantic tags, the secondary semantic tags, and the text to be processed.
[0078] Specifically, obtaining the target semantic label corresponding to the text to be processed based on the target semantic label acquisition strategy, the first-level semantic label, the second-level semantic label, and the text to be processed can refer to: first, combining the second-level semantic labels based on the target semantic label acquisition strategy, or combining the first-level semantic labels with the second-level semantic labels to obtain the combined label to be verified; then, using the text to be processed to perform semantic verification on the combined semantic label to be verified, and taking the combined label to be verified that matches the semantics of the text to be processed as the target semantic label.
[0079] As a strategy for obtaining target semantic tags, combining secondary semantic tags, or combining primary semantic tags with secondary semantic tags, to obtain combined tags to be verified can be done as follows: First, combine secondary semantic tags, or combine primary semantic tags with secondary semantic tags, to obtain candidate combined tags; then, iterate through each candidate combined tag to see if it matches the target semantic tag obtaining strategy. If it does, then use the third-level standard tags in the preset tag library corresponding to the target semantic tag obtaining strategy as the combined tags to be verified.
[0080] For example, after obtaining the primary semantic tags "electric vehicle," "malfunction," "cause," "order," and "timeout," and the secondary semantic tags "electric vehicle malfunction" and "order timeout," the primary and secondary semantic tags can be combined, or the secondary semantic tags can be combined, to obtain candidate combined tags.
[0081] When combining first-level semantic tags with second-level semantic tags, or combining second-level semantic tags, as an example, the logical relationship between the tags in the target semantic tag acquisition strategy can be an "AND" relationship. Of course, the logical relationship between the tags can also be other relationships.
[0082] For example, if the text to be processed is "My order was delayed because my electric vehicle malfunctioned", and during the traversal, if the target semantic tag acquisition strategy A2 requires the text to include "electric vehicle malfunction" and "delay", and the target semantic tag acquisition strategy B2 requires the text to include "electric vehicle malfunction" and "no delay", then in fact, the target semantic tag acquisition strategy A2 matches the text to be processed and the candidate combined tags, and the final target semantic tag is: "electric vehicle malfunction caused order delay".
[0083] To facilitate understanding of how to combine primary and secondary semantic tags, or vice versa, as an example, combining the primary and secondary semantic tags in the above example yields candidate combination tags such as: "electric vehicle malfunction", "electric vehicle order timeout", "malfunctioning electric vehicle malfunction", "malfunctioning order timeout", "causing electric vehicle malfunction", "causing order timeout", "order electric vehicle malfunction", "order order timeout", "timeout electric vehicle malfunction", and "timeout order timeout". The candidate combination tags listed above combine one primary semantic tag with one secondary semantic tag. In fact, multiple primary semantic tags can be combined with multiple secondary semantic tags. For example, they can be combined into "electric vehicle malfunction caused order timeout". When combining secondary semantic tags, the candidate combination tag "electric vehicle malfunction caused order timeout" can be obtained.
[0084] After obtaining the above candidate combination tags, it iterates through whether the combined candidate combination tags match the target semantic tag acquisition strategy, and uses the third-level standard tags in the preset tag library corresponding to the target semantic tag acquisition strategy as the combination tags to be verified. For example, it is determined that "electric vehicle malfunction caused order timeout" matches the target semantic tag acquisition strategy A2, and it is determined that "electric vehicle malfunction caused order not to timeout" matches the target semantic tag acquisition strategy B2; however, since "electric vehicle malfunction caused order not to timeout" does not belong to the third-level standard tags in the preset tag library corresponding to the target semantic tag acquisition strategy, only "electric vehicle malfunction caused order timeout" is confirmed as the combination tag to be verified.
[0085] It should be noted that, in the embodiments of this application, the target semantic tag is a standardized tag that can fully express the meaning of the customer complaint text. Therefore, the target semantic tag corresponding to the final text to be processed should be a sentence with a complete semantic expression.
[0086] Therefore, when using the text "My order was delayed because my electric vehicle malfunctioned" to perform semantic verification on the combined tags "electric vehicle malfunction caused order delay" and "electric vehicle malfunction caused order delay", the combined tag that is closest in semantics to the text to be processed (based on the semantic similarity between the two) can be selected as the target semantic tag. The above verification found that "electric vehicle malfunction caused order delay" is the closest in semantics to the text to be processed, so "electric vehicle malfunction caused order delay" is selected as the target semantic tag.
[0087] It should be noted that the semantics of the combined tags to be verified may not be close to those of the text to be processed in the actual process. In this case, the combined tags to be verified can be deleted. For example, in the example above, "electric vehicle malfunction caused the order not to time out" does not match the semantics of the text to be processed, so "electric vehicle malfunction caused the order not to time out" cannot be used as the final target semantic tag.
[0088] The reason for using the text to be processed for semantic validation of the combined semantic tags is to ensure that the final target semantic tags match the semantics of the text to be processed. For example, suppose the text to be processed is "I did not cause the order to time out because the restaurant was slow to prepare the food." When obtaining the primary and secondary semantic tags, the words "I did not" might not be used as primary and secondary semantic tags. Therefore, the combined semantic tags to be validated might be an affirmative sentence, i.e., "The restaurant was slow to prepare the food, which caused the order to time out." This is obviously inconsistent with the semantics of the text to be processed, so the combined semantic tags to be validated need to be adjusted or deleted to obtain target semantic tags that match the semantics of the text to be processed.
[0089] To better understand the relationships between primary semantic tags, secondary semantic tags, and target semantic tags, please refer to [link / reference]. Figure 1 This is a schematic diagram of the first scenario of the text classification processing method of this application. Figure 1 Examples of target semantic tags include "electric vehicle malfunction causing order timeout", "order cannot be cancelled after food has been prepared", "rider missed taking food", and "user contact information is incorrect". Examples of secondary semantic tags include "electric vehicle malfunction", "order timeout", "food prepared by merchant", "order cannot be cancelled", "rider missed taking food", "incorrect contact information", and "user phone number". Examples of primary semantic tags include "electric vehicle", "malfunction", "order", "timeout", "merchant", "food", "rider", "missed", "incorrect phone number", "phone number", and "user".
[0090] Among the first-level semantic tags mentioned above, "electric vehicle", "electric scooter", and "vehicle" are semantically similar; "order", "order", "takeout order" and "takeout" are semantically similar; "timeout" and "exceeding time" are semantically similar; "merchant", "business owner" and "seller" are semantically similar; "food" and "takeout" are semantically similar; "wrong phone number", "wrong phone number", and "incorrect phone number" are semantically similar; and "user", "customer", "buyer" and "guest" are semantically similar.
[0091] In this embodiment, a primary standard label can be assigned to primary semantic labels that are semantically similar or belong to the same category. For example, primary semantic labels corresponding to merchants (merchant is a primary standard label) can be: merchant, merchant, seller; primary semantic labels corresponding to consumers (consumer is a primary standard label) can be: consumer, user, customer, guest, customer, buyer; primary semantic labels corresponding to riders (rider is a primary standard label) can be: rider, deliveryman, deliveryman, food delivery guy, food delivery courier; primary semantic labels corresponding to electric vehicles (electric vehicle is a primary standard label) can be: electric scooter, electric vehicle. Primary semantic labels corresponding to timeout (timeout is a primary standard label) can be: timeout, exceeded time, time exceeded, exceeded by a few seconds, exceeded by a few minutes; primary semantic labels corresponding to no signal (no signal is a primary standard label) can be: no signal, no signal, no signal, cannot receive signal; primary semantic labels corresponding to self-delivery (self-delivery is a primary standard label) can be: self-delivery, self-delivery, self-delivery, self-delivery.
[0092] In the tag library, primary standard tags are standardized tags stored within the library. Taking primary standard tags as an example, they can actually be divided into different categories. As an example, primary standard tags can be divided into entity tags and phrase tags. For example, entity tags could be merchants, consumers, electric vehicles, etc.; phrase tags could be timeout, no signal, self-delivery, etc.
[0093] In fact, when storing primary standard tags, in order to facilitate the classification and management of primary standard tags, the tag library can store them in different category tag libraries according to their categories. For example, primary standard tags belonging to entity tags can be stored in the entity tag library, and primary standard tags belonging to phrase tags can be stored in the phrase tag library.
[0094] The aforementioned secondary and tertiary standard labels are similar to the primary standard label. A tertiary standard label can be composed of two secondary standard labels or multiple secondary standard labels. A secondary standard label can be composed of multiple primary standard labels. For example, "order timeout" can be a secondary standard label, composed of the two primary standard labels "order" and "timeout". Similarly, "slow food preparation leading to order timeout" can be a tertiary standard label, composed of the two secondary standard labels "slow food preparation" and "order timeout". Of course, a tertiary standard label can also be composed of a combination of primary and secondary standard labels.
[0095] After obtaining the target semantic tags corresponding to the text to be processed, the original data and the target semantic tags can be displayed on the user interface of the ordering service platform. For example, on a product ordering platform, the operations and maintenance personnel managing the platform need to optimize the services on the platform based on customer complaints from various parties to ensure a better service experience for all parties. Therefore, the operations and maintenance personnel need to clearly understand the main categories and contents of customer complaints. Displaying the original data and the corresponding target semantic tags (i.e., the target semantic tags corresponding to the text to be processed) together on the user interface page obviously helps the operations and maintenance personnel to clearly understand the main categories and contents of customer complaints.
[0096] To better understand the displayed raw data and its corresponding target semantic tags, please refer to [link / reference]. Figure 2 This is a schematic diagram of the second scenario of the text classification processing method of this application. Figure 2In the first example, the raw data could refer to rider C's explanation for the traffic ticket. Specifically, the raw data would be: "Look at my ticket. I have to take a detour, otherwise I'll have to go against traffic, which violates traffic rules. If I go against traffic, I definitely won't be late." The target semantic label for this raw data is: "Road closures and construction caused detours, resulting in order timeouts." Rider D also provided an explanation for the traffic ticket. Rider D's explanation is also used as raw data: "Due to road construction, the merchant is closed off within the construction area, so picking up the food requires a detour, causing the timeout." The target semantic label for this raw data is also: "Road closures and construction caused detours, resulting in order timeouts."
[0097] The above method can obtain a large amount of target semantic tags corresponding to raw data. Since the large amount of raw data contains feedback from multiple people, each person may speak or express themselves differently, which may result in different ways of expressing the same semantic meaning. Therefore, using target semantic tags to express the semantic meaning of raw data is actually a standardized semantic extraction of the raw data, which makes it easier for managers to quickly understand the raw data based on the target semantic tags.
[0098] In addition, please continue to see Figure 2 Administrators can input filtering criteria for raw data on the user-side page (i.e., the management side) of the management ordering service platform. These filtering criteria can be semantic tags or date information.
[0099] Since each piece of raw data has a corresponding target semantic tag, based on the matching degree between the filtering conditions and the target semantic tags, the management page can display the raw data that matches the filtering conditions, along with the target semantic tags of these filtered raw data. For example, Figure 2 On the page, administrators can enter "Road closure and road construction caused the order to time out" to display the raw data of rider C and rider D's explanations for the ticket.
[0100] To facilitate administrators' understanding of the main content corresponding to large amounts of raw data, the ranking of target semantic tags corresponding to the large amount of raw data can also be displayed on the management page. Please refer to [link / reference] for details. Figure 2 The order of multiple target semantic tags in the text is ranked as follows: first, "road closures and construction causing detours leading to order timeouts"; second, "inaccurate navigation / location causing order timeouts"; third, "user cannot reach the customer by phone causing order timeouts"; and fourth, "slow food preparation by the merchant causing order timeouts". The order of target semantic tags actually represents the order of the text to be processed (i.e., the raw data).
[0101] The above-mentioned Figures 1 to 2This illustration depicts one application scenario of the text classification processing method and the text information sorting and display method provided in this application. The embodiments of this application do not specifically limit the application scenarios of the text classification processing method and the text information sorting and display method. The aforementioned application scenario of the text classification processing method and the text information sorting and display method is merely one embodiment of the application scenarios of the text classification processing method and the text information sorting and display method provided in this application. The purpose of providing this application scenario embodiment is to facilitate understanding of the text classification processing method and the text information sorting and display method provided in this application, and is not intended to limit the text classification processing method and the text information sorting and display method provided in this application. Other application scenarios of the text classification processing method and the text information sorting and display method provided in this application will not be described in detail.
[0102] First Embodiment
[0103] The first embodiment of this application provides a text classification processing method. Some relevant information about this embodiment has been described in detail in the above scenario embodiments. For a detailed explanation of the relevant details, please refer to the above scenario embodiments. The following is combined with... Figures 3 to 6 This embodiment will be described.
[0104] Please refer to Figure 3 This is a flowchart of the text classification processing method provided in the first embodiment of this application.
[0105] The text classification processing method of this application includes the following steps:
[0106] Step S301: Obtain the text to be processed.
[0107] As the first step in the text classification processing method of this embodiment, the text to be processed can be obtained first. As an example, the text to be processed can refer to the text providing feedback on the ordering service. For example, the text corresponding to the raw data of feedback from multiple parties on a food delivery ordering service platform. When the raw data is text data, the raw text data can be used as the text to be processed. When the raw data is original audio data, the text corresponding to the original audio data after converting it to text is the text to be processed. If a piece of raw data contains multiple sentences, then when processing the text to be processed, the text corresponding to the multiple sentences is treated as a single piece of text to be processed.
[0108] Of course, to facilitate subsequent processing of the text to be processed, it is first preprocessed to obtain a preprocessed version. Preprocessing essentially removes useless information from the text, which could reduce processing efficiency if not removed. For example, this could involve removing profanity, links, and templates. Profanity or vulgar words can be identified based on a pre-set profanity database. It should be noted that the above text processing includes the steps involved in obtaining primary semantic tags, secondary semantic tags, and target semantic tags.
[0109] Step S302: Based on the first-level semantic tag acquisition strategy, perform semantic analysis on the text to be processed to obtain the first-level semantic tags corresponding to the text to be processed.
[0110] After obtaining the text to be processed, a first-level semantic tag acquisition strategy is used to perform semantic analysis on the text to obtain the first-level semantic tags corresponding to the text to be processed. In this embodiment, unless otherwise specified, the subsequent processing of the text to be processed actually involves preprocessing the text to be processed, that is, the text after removing useless information from the text to be processed.
[0111] In this embodiment, after obtaining the text to be processed, the target semantic tag is obtained by acquiring hierarchical semantic tags; that is, first, the first-level semantic tags and second-level semantic tags are obtained, and then the final target semantic tag is obtained. For a specific example flowchart of obtaining the target semantic tag, please refer to [link to flowchart]. Figure 4 This is a first example flowchart of obtaining target semantic tags provided in the first embodiment of this application.
[0112] exist Figure 4 In the example of a text containing N sentences, the process of obtaining the target semantic tags corresponding to the text is as follows: based on the first-level semantic tag acquisition strategy, semantic analysis is performed on the text to obtain the first-level semantic tags corresponding to the text. In fact, based on the first-level semantic tag acquisition strategy, semantic analysis is performed on the N sentences to obtain the first-level semantic tags corresponding to the N sentences.
[0113] As explained in the above scenario examples, the first-level semantic tags include entity tags and phrase tags. Correspondingly, the first-level semantic tag acquisition strategy also includes an entity tag acquisition strategy and a phrase tag acquisition strategy. That is, by using the entity tag acquisition strategy to perform semantic analysis on N sentences, entity tags corresponding to N sentences can be obtained; by using the phrase tag acquisition strategy to perform semantic analysis on N sentences, phrase tags corresponding to N sentences can be obtained. The entity tags and phrase tags corresponding to N sentences constitute the first-level semantic tags for the N sentences.
[0114] The above-described semantic analysis of the text to be processed, based on the first-level semantic tag acquisition strategy, obtains the first-level semantic tags corresponding to the text as follows: Iterate through the text to see if it matches any of the first-level semantic tag acquisition strategies (i.e., which first-level semantic tag acquisition strategy the text can match). If it does, then the first-level standard tag from the preset tag library corresponding to the matching first-level semantic tag acquisition strategy is taken as the first-level semantic tag. For a detailed description of how to iterate through the text to obtain the first-level semantic tags, please refer to the detailed introduction in the scenario example; it will not be repeated here.
[0115] In this embodiment, the tag library pre-stores primary standard tags, secondary standard tags, and tertiary standard tags. The tertiary standard tag can be a combination of primary and secondary standard tags, or a combination of multiple secondary standard tags. The secondary standard tag can be a combination of multiple primary standard tags. The methods for obtaining the primary, secondary, and tertiary standard tags in the tag library will be explained in the subsequent tag library construction section.
[0116] The above-mentioned first-level semantic tag acquisition strategy includes the corresponding first-level standard tags. For example, first-level semantic tag acquisition strategy A requires the text to be processed to include: electric vehicle, electric scooter, or vehicle; where electric vehicle, electric scooter, and vehicle are first-level standard tags.
[0117] Step S303: Based on the strategy of obtaining secondary semantic tags and primary semantic tags, perform semantic analysis on the text to be processed to obtain the secondary semantic tags corresponding to the text to be processed.
[0118] After obtaining the primary semantic tags, semantic analysis is performed on the text to be processed based on the secondary semantic tag acquisition strategy and the primary semantic tags to obtain the secondary semantic tags corresponding to the text to be processed.
[0119] Specifically, as a method for obtaining secondary semantic tags by performing semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy and the primary semantic tags, the method can be as follows: First, perform semantic analysis on the text to be processed based on the secondary semantic tag acquisition strategy to obtain the secondary verification tags corresponding to the text to be processed; then, use the primary semantic tags to perform semantic verification on the secondary verification tags, and use the secondary verification tags that semantically match the primary semantic tags as the secondary semantic tags.
[0120] In this embodiment, as an example of semantic analysis of the text to be processed based on the secondary semantic tag acquisition strategy to obtain the secondary verification tag corresponding to the text to be processed, the process iterates through whether the text to be processed matches the secondary semantic tag acquisition strategy. If it does, the secondary standard tag in the preset tag library corresponding to the secondary semantic tag acquisition strategy is used as the secondary verification tag.
[0121] In fact, the process of traversing whether the text to be processed matches the secondary semantic tag acquisition strategy is to take the text to be processed as input, traverse and calculate all secondary semantic tag acquisition strategies. If the text to be processed can pass (i.e. hit) the secondary semantic tag acquisition strategy A1, it is considered that the text to be processed directly hits the secondary standard tag corresponding to the secondary semantic tag acquisition strategy A1, and the hit secondary standard tag is used as the secondary tag to be verified.
[0122] For a detailed description of how to perform semantic analysis on the text to be processed based on the strategy of obtaining secondary semantic tags to obtain the secondary verification tags corresponding to the text to be processed; and how to perform semantic verification on the secondary verification tags using primary semantic tags, and use the secondary verification tags that semantically match the primary semantic tags as secondary semantic tags, please refer to the scenario implementation example, which will not be repeated here.
[0123] In this embodiment, before iterating through whether the text to be processed matches the secondary semantic tag acquisition strategy, it can be pre-determined whether the text to be processed meets the initial verification conditions for obtaining secondary semantic tags. This allows for selection of whether to continue with subsequent steps to obtain secondary semantic tags based on whether the text meets these initial verification conditions. The initial verification process in the initial verification conditions can refer to the keyword verification process performed on the text to be processed based on the initial verification conditions before iterating through whether the text to be processed matches the secondary semantic tag acquisition strategy.
[0124] The process of obtaining corresponding secondary semantic labels based on the text to be processed actually involves a full traversal of all secondary semantic label acquisition strategies. After traversing all strategies, assuming that no secondary semantic labels can still be obtained (i.e., the text to be processed does not match any of the strategies), the text is input into the target text classification model to predict the probability value of the text matching each secondary standard label, and the secondary semantic labels are obtained in subsequent processes based on the probability values. The entire process of obtaining secondary semantic labels can be described as follows: Figure 4The process involves inputting the text to be processed into various secondary semantic label acquisition strategies (i.e., secondary semantic label generation strategies) and the target text classification model. Each strategy and model is tried sequentially to obtain secondary semantic labels (as shown in the final M secondary semantic labels). To improve the hit rate of the secondary semantic label acquisition strategies and the target text classification model, an initial verification condition is used to validate the text before iterating through each strategy. If the text does not meet the initial verification condition, the subsequent process of obtaining secondary semantic labels is unnecessary, saving computation time and avoiding wasted computational resources.
[0125] The initial verification conditions mentioned above are actually quite similar to the strategies for obtaining first-level and second-level semantic tags. For example, if it is necessary to predict that the text to be processed can match the current second-level standard tag "the merchant did not prepare the food according to the remarks", as an example of the initial verification conditions, the keywords in the text to be processed must include: remarks, merchant, or keywords related to the merchant (merchant, merchant, shop, store, shop, seller); if it is necessary to predict that the text to be processed can match the current second-level standard tag "order timeout", as an example of the initial verification conditions, the keywords in the text to be processed must include: timeout or exceeding the time limit, etc.; if it is necessary to predict that the text to be processed can match the current second-level standard tag "electric vehicle malfunction", as an example of the initial verification conditions, the keywords in the text to be processed must include: electric vehicle, electric scooter, or vehicle, etc.; if it is necessary to predict that the text to be processed can match the current second-level standard tag "incorrect address", as an example of the initial verification conditions, the keywords in the text to be processed must include: address, etc.
[0126] Specifically, if the text to be processed meets the initial verification conditions for obtaining secondary semantic tags, the process iterates through whether the text to be processed matches the secondary semantic tag acquisition strategy. If so, the secondary standard tags in the preset tag library corresponding to the secondary semantic tag acquisition strategy are used as secondary verification tags, thereby obtaining secondary semantic tags.
[0127] If the text to be processed does not meet the initial verification conditions for obtaining secondary semantic tags, the subsequent steps of obtaining secondary verification tags and then obtaining secondary semantic tags will not be executed.
[0128] Specifically, please see Figure 5This is a second example flowchart of obtaining target semantic tags provided in the first embodiment of this application. In this example flowchart, after obtaining the text to be processed, step S501 is first executed: preprocessing the text to be processed, then step S502 is executed: obtaining first-level semantic tags using a first-level semantic tag acquisition strategy, then step S503 is executed: determining whether the text to be processed meets the initial verification conditions for obtaining second-level semantic tags; if the text to be processed meets the initial verification conditions for obtaining second-level semantic tags, then step S504 is executed: obtaining second-level semantic tags based on the second-level semantic tag generation strategy and the first-level semantic tags, and then step S505 is executed: combining the first-level semantic tags and the second-level semantic tags based on the target semantic tag acquisition strategy to obtain the target semantic tag. If the text to be processed does not meet the initial verification conditions for obtaining second-level semantic tags in step S503, then step S509 is executed to exit.
[0129] Before obtaining the secondary semantic labels, if the text to be processed meets the initial verification conditions for obtaining the secondary semantic labels, and the secondary semantic labels cannot be obtained based on the secondary semantic label acquisition strategy and the primary semantic labels (i.e., the text to be processed does not hit any of the secondary semantic label acquisition strategies), then step S506 is executed: input the text to be processed into the target text classification model to predict the probability value of the text to be processed hitting each of the secondary standard labels.
[0130] In fact, the probability values obtained above are an example of the matching values between the text to be processed and each secondary standard label, and the target text classification model is an example of the model for obtaining the matching values between the text to be processed and each secondary standard label.
[0131] If the probability value satisfies the first matching condition (i.e., the first probability matching condition), then step S507 can be directly executed: the corresponding current secondary standard label (i.e., the target secondary standard label) is used as the secondary label to be verified, and after confirming that the secondary label to be verified satisfies semantic verification, it is used as the secondary semantic label. For example, assuming that the probability of the text to be processed hitting a certain secondary standard label is 90%, then the secondary standard label is directly used as the secondary label to be verified. Then the first probability matching condition can be set to the probability that the text to be processed hits the secondary standard label is greater than or equal to 90%. It should be noted that in this embodiment, before using a certain secondary standard label as the secondary semantic label of the text to be processed, it is actually necessary to perform semantic verification on the secondary standard label. For example, the secondary standard label is used as the secondary label to be verified, and the text to be processed and the primary semantic label are used to perform semantic verification on the secondary label to be verified. If the secondary label to be verified semantically matches the text to be processed and the primary semantic label, then it is used as the secondary semantic label of the text to be processed.
[0132] If the probability value does not meet the first probability matching condition, but meets the second matching condition (i.e., the second probability matching condition), step S508 can be executed: determine whether the text to be processed meets the secondary verification condition for obtaining the second-level semantic tag. If yes, step S507 can be executed; if the text to be processed does not meet the secondary verification condition for obtaining the second-level semantic tag, then step S509 can be executed.
[0133] For example, assuming that the probability of the text to be processed hitting a certain secondary standard label is 80% (between 10% and 90%) and meets the above secondary verification conditions, the current secondary standard can be directly used as the secondary label to be verified. Then the second probability matching condition can be set to the probability of the text to be processed hitting the secondary standard label being between 10% and 90%.
[0134] The aforementioned secondary verification conditions are actually quite similar to the initial verification conditions. They are, in essence, strict verification conditions. These conditions are set after the text to be processed is input into the target text classification model, and when the probability value does not meet the first probability matching condition but does meet the second probability matching condition. Strict verification conditions are a verification strategy based on primary semantic labels and keywords, serving as a supplementary verification when the model's predicted probability is low. For example, for the secondary standard label: "no rider accepting orders," the strict verification condition could be: it must contain the primary semantic labels: "rider" and "accepting orders," and cannot contain: "not no rider accepting orders" or "not no rider accepting orders."
[0135] Furthermore, if the probability of the text to be processed hitting a certain secondary standard tag is less than the lower probability threshold (0.1), then that secondary standard tag will definitely not be hit. If the probability of the text to be processed hitting a certain secondary standard tag is greater than the upper probability threshold (0.9), then that secondary standard tag will definitely be hit.
[0136] If the probability of the text to be processed hitting a certain secondary standard label is greater than or equal to the lower probability threshold (0.1) and less than the upper probability threshold (0.9), and the text to be processed meets the strict verification conditions for obtaining the secondary semantic label, then the secondary standard label must be hit.
[0137] If the probability of the text to be processed hitting a certain secondary standard label is greater than or equal to the lower probability threshold (0.1) and less than the upper probability threshold (0.9), and the text to be processed does not meet the strict verification conditions for obtaining the secondary semantic label, then the secondary standard label must not be hit.
[0138] Therefore, in practice, if the probability of the text to be processed hitting a certain secondary standard tag does not meet either the first probability matching condition or the second probability matching condition, then step S509 is executed.
[0139] It should be noted that in step S505: based on the target semantic tag acquisition strategy, the first-level semantic tags and second-level semantic tags are combined to obtain the target semantic tag. During this process, the second-level semantic tags are combined, or the first-level semantic tags are combined with the second-level semantic tags to obtain candidate combined tags. Each candidate combined tag in the candidate combined tags is iterated to see if it matches the target semantic tag acquisition strategy. If the candidate combined tags do not match the target semantic tag acquisition strategy, or even if the candidate combined tags match the target semantic tag acquisition strategy, and the third-level standard tags in the preset tag library corresponding to the target semantic tag acquisition strategy are used as the combined tags to be verified, but the combined tags to be verified do not match the semantics of the text to be processed, and it is impossible to adjust the combined tags to be verified to match the semantics of the text to be processed, step S509 is also executed.
[0140] In this embodiment, if the text to be processed does not match the secondary semantic tag acquisition strategy, the text to be processed is used as input data for the matching value prediction model (i.e., the probability value prediction model) to obtain the matching value (i.e., the probability value) between the text to be processed and each secondary standard tag. The probability value prediction model is a model used to obtain the probability value between the text to be processed and each secondary standard tag based on the text to be processed; based on the probability value between the text to be processed and each secondary standard tag, the secondary tag to be verified corresponding to the text to be processed is obtained.
[0141] In this embodiment, the above-mentioned use of the text to be processed as input data of the probability value prediction model to obtain the probability value between the text to be processed and each secondary standard label can refer to using the text to be processed and the primary semantic label together as input data of the probability value prediction model to obtain the probability value between the text to be processed and each secondary standard label.
[0142] exist Figure 4 In this example, since the text to be processed contains N sentences (N sentences), the N sentences are separated by delimiters during the process of using the text to be processed as input data to a probability value prediction model (e.g., a target text classification model) to obtain the probability values between the text to be processed and each secondary standard label. In this embodiment, the target text classification model can be divided into 11 groups, with one corresponding target text classification model in each group. Each target text classification model has at least one corresponding secondary standard label, and the secondary standard labels within the same group are mutually exclusive. The target text classification models can be grouped according to the various stages of fulfillment, which may include, for example: placing an order, issuing an order, accepting an order, preparing the food, picking up the food, delivery, arrival, cancellation (of an order), and contacting (the customer).
[0143] The target text classification model in each group can obtain the probability value between the text to be processed and each of the secondary standard labels in that group. Since the secondary standard labels in the same group are mutually exclusive, the probability values between the text to be processed and each of the secondary standard labels in the same group are either all low, or only one secondary standard label has a high probability value with the text to be processed, so as to ensure that at most one secondary standard label in the group will be hit in the future.
[0144] In this embodiment, obtaining the secondary verification tag corresponding to the text to be processed based on the probability values between the text to be processed and each secondary standard tag can be achieved by: first, determining whether the probability value satisfies the first probability matching condition, or determining whether the probability value satisfies the second probability matching condition and whether the text to be processed satisfies the secondary verification condition for obtaining the secondary semantic tag; then, if so, determining the target secondary standard tag that satisfies the first probability matching condition, or determining the target secondary standard tag that satisfies the second probability matching condition and satisfies the secondary verification condition for obtaining the secondary semantic tag; finally, obtaining the secondary verification tag corresponding to the text to be processed based on the target secondary standard tag.
[0145] In this embodiment, the probability value prediction model is obtained as follows: First, text samples are selected from candidate texts (candidate texts are actually candidate samples); then, probability value samples between text samples and each secondary standard label are obtained; finally, the initial text classification model is trained based on the text samples and probability value samples to obtain the probability value prediction model.
[0146] One way to train an initial text classification model based on text samples and probability value samples is as follows: First, obtain text sample vectors for representing text samples; then, obtain probability value sample vectors for representing probability value samples; finally, use the text sample vectors and probability value sample vectors to train the initial text classification model.
[0147] Specifically, the initial text classification model can refer to a text classification model. As an example, it could be the classification model derived from fine-tuning a pre-trained model in ALBERT (ALBERT stands for A LiteBidirectionalEncoderRepresentationsfromTransformer).
[0148] In this embodiment, text samples are filtered from candidate samples in the following way: based on a pre-set logical expression used to represent the target semantics, text samples are filtered from candidate samples. For example, when filtering text samples, a logical expression such as "(closed or not open) and accepting orders" is used to filter text samples such as "I placed an order, but the merchant is closed and cannot accept the order" or "The merchant's business hours have passed and cannot accept the order".
[0149] The aforementioned candidate samples can actually be samples for which probability values between the candidate samples and each secondary standard label have been obtained in advance using other methods. Since the amount of text in the candidate samples may be large, a portion of the samples can be selected as text samples. During the selection process, 200 to 300 text samples can be chosen for each secondary semantic label sample.
[0150] Since the text to be processed contains N sentences (refer to...) Figure 4 The algorithm iterates through each of the secondary semantic label generation strategies for N sentences, and inputs each target text classification model when it fails to obtain a secondary semantic label.
[0151] Step S304: Based on the target semantic label acquisition strategy, first-level semantic labels, second-level semantic labels, and the text to be processed, obtain the target semantic label corresponding to the text to be processed, and use the target semantic label as the classification label of the text to be processed.
[0152] After obtaining the primary semantic tags and secondary semantic tags, the target semantic tags corresponding to the text to be processed are obtained based on the target semantic tag acquisition strategy, the primary semantic tags, the secondary semantic tags, and the text to be processed.
[0153] Specifically, obtaining the target semantic label corresponding to the text to be processed based on the target semantic label acquisition strategy, the first-level semantic label, the second-level semantic label, and the text to be processed can refer to: first, combining the second-level semantic labels based on the target semantic label acquisition strategy, or combining the first-level semantic labels with the second-level semantic labels to obtain the combined label to be verified; then, using the text to be processed to perform semantic verification on the combined semantic label to be verified, and taking the combined label to be verified that matches the semantics of the text to be processed as the target semantic label.
[0154] More specifically, based on the target semantic tag acquisition strategy, the combination of secondary semantic tags, or the combination of primary semantic tags and secondary semantic tags, to obtain the combined tags to be verified can mean: first, combining secondary semantic tags, or combining primary semantic tags and secondary semantic tags, to obtain candidate combined tags; then, iterating through each candidate combined tag to see if it matches the target semantic tag acquisition strategy. If it does, the third-level standard tags in the preset tag library corresponding to the target semantic tag acquisition strategy are used as the combined tags to be verified.
[0155] For example, see Figure 4 When obtaining a combined label to be verified based on a strategy that combines secondary semantic tags, or combines primary semantic tags with secondary semantic tags, the method is as follows: Figure 4 The target semantic labels are combined using the strategies shown. Finally, Q target semantic labels are obtained.
[0156] To facilitate understanding how to combine secondary semantic tags, or combine primary and secondary semantic tags to obtain candidate combined tags, we iterate through each candidate combined tag to see if it matches the target semantic tag acquisition strategy. If it does, the third-level standard tag in the preset tag library corresponding to the target semantic tag acquisition strategy is used as the combined tag to be verified. The following example illustrates this: For instance, when an order timeout is caused by both slow food preparation and electric vehicle malfunction, if the obtained secondary semantic tags include "slow food preparation and electric vehicle malfunction," and if "slow food preparation and electric vehicle malfunction" is used as a candidate combined tag, after iterating through each target semantic tag acquisition strategy, no matching third-level standard tag can be found in the preset tag library. This is mainly because the candidate combined tag "slow food preparation and electric vehicle malfunction" is invalid. The above combination of "slow food preparation and electric vehicle malfunction" can be done according to... Figure 4 The strategy is to combine a target semantic tag acquisition strategy.
[0157] In this embodiment, after obtaining the target semantic tags corresponding to the texts to be processed, the texts can be sorted based on the number of target semantic tags to obtain the sorting information of the texts to be processed. For example, if a large number of target semantic tags corresponding to the texts to be processed are obtained, there may be multiple texts to be processed that correspond to the same target semantic tag or similar target semantic tags. Suppose 10 texts to be processed are processed, and 5 texts to be processed correspond to the same target semantic tag. Then, these 5 texts to be processed can be jointly ranked in the first position. Of course, in order to facilitate the representation of the sorting information of the texts to be processed, their corresponding target semantic tags can be used to represent their sorting.
[0158] In this embodiment, after obtaining the target semantic tag corresponding to the text to be processed, the text to be processed can be sorted based on the target semantic tag and the filtering condition information provided by the user terminal of the management ordering service platform for sorting the text to be processed, so as to obtain the sorting information of the text to be processed.
[0159] After obtaining the sorting information of the text to be processed, this information can be provided to the user end of the ordering service management platform. For details regarding the sorting information of the text to be processed, please refer to [link / reference needed]. Figure 2 To facilitate providing the sorting information of the text to be processed to the user terminal of the management ordering service platform, in this embodiment, a first request message sent by the user terminal of the management ordering service platform to request the sorting information of the text to be processed can also be obtained; in response to the first request message, the sorting information of the text to be processed is sent to the user terminal.
[0160] In this embodiment, the tags in the preset tag library are obtained in the following way: First, the text to be clustered is obtained; then, based on the identifier of the text to be clustered, iterative clustering is performed on the text to be clustered to obtain the initial clustering result information of the text to be clustered; then, semantic analysis is performed on the initial clustering result information to obtain the semantic analysis result information of the initial clustering result information; then, the semantic analysis result information is clustered to obtain the third-level standard tags; finally, the third-level standard tags are decomposed into text to obtain the first-level standard tags and the second-level standard tags.
[0161] When obtaining tags from the preset tag library, the identifier of the text to be clustered can refer to its number. Based on the text to be clustered, a tag library is constructed to obtain standard tags at each level (including first-level, second-level, and third-level standard tags). These standard tags are then used as references to obtain the target semantic tags corresponding to the text to be processed. Since the text to be clustered generally contains a lot of content, its identifier is used as the element within a group during clustering to facilitate recording during the clustering process. For example, assuming there are one hundred texts to be clustered, they are numbered 1-100. Clustering is then performed on texts from 1 to 100. After obtaining the initial clustering results for the numbered texts, the initial clustering results for the text to be clustered are obtained.
[0162] As an identifier based on the text to be clustered, the initial clustering result information of the text to be clustered can be obtained in the following way:
[0163] First, a specified number of unclustered texts are randomly sampled from the texts to be clustered as the first batch of texts to be clustered. Then, based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, iterative clustering is performed on the first batch of texts to be clustered to determine the clustering results. Next, it is determined whether the number of times a specified number of unclustered texts are randomly sampled from the texts to be clustered meets a preset sampling threshold. One example of determining whether the sampling number meets this threshold is whether the sampling number is greater than a preset sampling threshold. If not, a specified number of unclustered texts are randomly sampled from the texts to be clustered as the second batch of texts to be clustered, based on the number of elements in the first initial group and the identifiers of the second batch of texts to be clustered. The system identifies the clustered texts, iterates through the clustering of the second batch of texts to be clustered, and determines the clustering results of the second batch of texts to be clustered. It then determines whether the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets a preset threshold condition for the number of selections. If not, a specified number of unclustered texts are randomly selected from the texts to be clustered as the third batch of texts to be clustered. Based on the number of elements in the first initial group and the identifier of the third batch of texts to be clustered, the system iterates through the clustering of the third batch of texts to be clustered and determines the clustering results of the third batch of texts to be clustered. This process continues until the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset threshold condition for the number of selections. The clustering results of each batch are then used as the initial clustering results of the texts to be clustered.
[0164] In this embodiment, the number of elements in the first initial group is used to determine the number of elements in each clustering result group during iterative clustering. The subsequent number of elements in the second and third initial groups also serves to determine the number of elements in each clustering result group during the clustering process.
[0165] In this embodiment, based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, iterative clustering is performed on the first batch of texts to be clustered to determine the clustering result. This can be achieved by: firstly, performing a first clustering on the first batch of texts to be clustered based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered to determine the first clustering result; then, determining whether the number of iterations of iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets a preset iteration number threshold condition; if not, then performing a second clustering on the first batch of texts to be clustered based on the first clustering result, the number of elements in the first initial group, and the identifiers of the first batch of texts to be clustered to determine the clustering result. The second clustering result of the text; then, it is determined whether the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets the preset iteration number threshold condition; if not, based on the second clustering result, the number of elements in the first initial group and the identifier of the first batch of texts to be clustered, the first batch of texts to be clustered is clustered for the third time to determine the third clustering result of the first batch of texts to be clustered; and so on, until the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets the preset iteration number threshold condition; finally, based on the clustering result of the last clustering of the first batch of texts to be clustered using the number of elements in the second initial group, the clustering result of the first batch of texts to be clustered is determined.
[0166] In this embodiment, the second clustering of the first batch of texts to be clustered, based on the first clustering result, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered, can be described as follows: First, determine the middle element in the clustering result group of the first clustering result; then, based on the middle element in the clustering result group of the first clustering result, determine the first element of the initial group for the second clustering of the first batch of texts to be clustered; and then, based on the first element of the initial group for the second clustering of the first batch of texts to be clustered, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered, perform the second clustering of the first batch of texts to be clustered.
[0167] In practice, based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, the first clustering of the first batch of texts involves randomly selecting one text from the first batch as the first element of the group. In the second clustering process, to improve the clustering results and ensure that similar texts are grouped together, the middle element of the first clustering result group is used as the first element of the initial group for the second clustering. Here, the first clustering result group refers to the initial clustering result group before the subsequent similarity threshold conditions mentioned in the process are applied to remove certain elements.
[0168] Taking the first clustering of the first batch of texts to be clustered as an example, the process of clustering is explained. First, the number of cluster groups for the first clustering of the first batch of texts to be clustered is determined. The number of cluster groups can be obtained by dividing the number of elements in the first batch of texts to be clustered by the number of elements in the first initial group. Each element in the first batch of texts to be clustered represents a piece of text in the first batch of texts to be clustered.
[0169] Based on the number of cluster groups, the same number of texts to be clustered are randomly selected from the first batch of texts to be clustered as the first element in each cluster group. Then, other elements of each cluster group are added to make the total number of elements in each cluster group equal to the number of elements in the first initial group.
[0170] When supplementing other elements in each cluster group, it can be based on the similarity between each element in the first batch of texts to be clustered and the first element within that group. That is, elements in the first batch of texts to be clustered that have the closest similarity to the first element within that group are prioritized. Specifically, the similarity calculation can be based on a short text similarity algorithm based on word vectors. It should be noted that the similarity between the elements refers to the similarity between the corresponding texts. Each element in a cluster group can actually represent a piece of text to be clustered. The above describes the detailed clustering process for the first batch of texts to be clustered. When performing the second clustering on the first batch of texts to be clustered, the clustering process is roughly similar to the first clustering process, the difference being that the first element within each cluster group uses the middle element from each cluster group in the first clustering. Subsequent third clustering on the first batch of texts to be clustered follows a similar process to the second clustering process; the detailed clustering process will not be elaborated further. As an example, the first batch of texts to be clustered can be clustered 20 times.
[0171] Specifically, determining the clustering results of the first batch of texts to be clustered based on the clustering results of the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group can refer to: determining whether the similarity between the texts corresponding to the elements in each clustering result group in the last clustering result meets the similarity threshold condition; if so, determining whether the number of elements in each clustering result group meets the preset element number threshold condition, and taking the clustering result group that meets the preset element number threshold condition as the clustering results of the first batch of texts to be clustered.
[0172] The reason for determining whether the similarity between the texts corresponding to the elements in each cluster result group meets the similarity threshold condition and whether the number of elements meets the preset element number threshold condition is to improve the clustering effect. For example, when the number of elements in a certain cluster result group is less than three, the elements in that cluster result group can be put back into the unclustered text so that they can be extracted and re-clustered later.
[0173] To improve the accuracy of clustering results, in this embodiment, elements in a clustering result group that meet the similarity threshold condition are stored in a temporary array. If the number of elements in the temporary array meets a preset element count threshold condition, the elements in the clustering result group that meet the similarity threshold condition are retained, and these elements are treated as a final clustering result group. It should be noted that elements in the clustering result group that do not meet the similarity threshold condition are also placed back into the unclustered text for later extraction and re-clustering.
[0174] Of course, the above process of putting some elements from the first batch of texts to be clustered back into the unclustered texts means that after the first batch of texts to be clustered has been iteratively clustered, if it is necessary to use the number of elements in the second initial group to iteratively cluster the remaining texts to be clustered in the first batch of texts to be clustered, then these elements will not be put back into the unclustered texts at this time, but will be treated as the remaining texts to be clustered in the first batch of texts to be clustered.
[0175] In this embodiment, after the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group, in order to fully cluster the texts to be clustered, in this embodiment, the number of elements in the first initial group is subtracted by a preset number to obtain the number of elements in the second initial group, and it is determined whether the number of elements in the second initial group is less than the preset number of elements in the initial group (the preset number of elements in the initial group can be a lower limit threshold for the number of elements in the initial group, for example, it can be set to 10); if not, the texts to be clustered in the first batch of texts to be clustered, excluding the elements in the clustering result group that meet the preset element number threshold condition, are taken as the remaining texts to be clustered; then, based on the number of elements in the second initial group and the identifier of the first batch of texts to be clustered, iterative clustering is performed on the remaining texts to be clustered to determine the clustering result of the remaining texts to be clustered, and the clustering result of the remaining texts to be clustered is taken as the clustering result of the first batch of texts to be clustered.
[0176] For example, when the number of elements in the first initial group is 30, after performing 20 iterations (20 being an example of the upper limit of the preset iteration threshold) on the first batch of text to be clustered using the number of elements in the first initial group, the number of elements in the first initial group can be subtracted by a preset number (e.g., subtracting 2) to obtain the number of elements in the second initial group. For example, the obtained number of elements in the second initial group could be 28, and this number of elements can be used to iteratively cluster the remaining text to be clustered in the first batch of text to be clustered (here, the remaining text to be clustered can be the first remaining text to be clustered). Regarding iterative clustering of the remaining text to be clustered in the first batch of text to be clustered using the number of elements in the second initial group, please refer to the process of iterative clustering of the first batch of text to be clustered using the number of elements in the first initial group; the principle is similar and will not be repeated here. For example, by performing 20 iterations of clustering on the remaining text to be clustered in the first batch of text to be clustered using the number of elements in the second initial group, the clustering results of the remaining text to be clustered are obtained.
[0177] In this embodiment, after the last clustering of the remaining text to be clustered using the number of elements in the second initial group, in order to further cluster the text to be clustered sufficiently, the following can be done: subtract a preset number from the number of elements in the second initial group to obtain the number of elements in the third initial group, and determine whether the number of elements in the third initial group is less than the preset number of elements in the initial group; if not, then the remaining text to be clustered (which can be called the second remaining text to be clustered) excluding the elements in the clustering result group that meet the preset element number threshold condition (the elements in the clustering result group that meet the preset element number threshold condition include the elements in the clustering result group that meet the preset element number threshold condition after iterative clustering using the number of elements in the first initial group and the number of elements in the second initial group); then, based on the number of elements in the third initial group and the identifier of the first batch of text to be clustered, iterative clustering is performed on the second remaining text to be clustered to determine the clustering result of the second remaining text to be clustered, and the clustering result of the second remaining text to be clustered is also used as the clustering result of the first batch of text to be clustered.
[0178] For example, when the number of elements in the second initial group is 28, after performing 20 iterations (20 being an example of the upper limit of the preset iteration threshold) on the first remaining text to be clustered using the number of elements in the second initial group, a preset number (e.g., subtracting 2) can be subtracted from the number of elements in the second initial group to obtain the number of elements in the third initial group. For example, the obtained number of elements in the third initial group could be 26, and this number can be used to iteratively cluster the second remaining text to be clustered. Regarding iterative clustering of the second remaining text to be clustered using the number of elements in the third initial group, please refer to the process of iteratively clustering the first batch of text to be clustered using the number of elements in the first initial group; the principle is similar and will not be repeated here. For example, performing 20 iterations of clustering on the second remaining text to be clustered using the number of elements in the third initial group yields the clustering results for the second remaining text to be clustered.
[0179] Following the above method, the number of elements in the third initial group can be subtracted from the preset number to obtain the number of elements in the fourth initial group. This fourth initial group number is then used to iteratively cluster the remaining text to be clustered until the number of elements in a decreasing initial group is less than the preset number of elements in the initial group. Afterward, the process returns to the step of determining whether the number of times a specified number of unclustered texts are randomly selected from the text to be clustered meets a preset sampling number threshold. For example, it can be determined whether the sampling number is greater than a preset sampling number threshold (in this embodiment, the preset sampling number threshold can be 30).
[0180] In this embodiment, the process of iteratively clustering the first remaining text to be clustered using the number of elements in the second initial group, the process of iteratively clustering the second remaining text to be clustered using the number of elements in the third initial group, and the process of iteratively clustering the third remaining text to be clustered using the number of elements in the fourth initial group can all refer to the process of iteratively clustering the first batch of text to be clustered using the number of elements in the first initial group.
[0181] The clustering results obtained by iteratively clustering the first batch of texts to be clustered using the number of elements in the first initial group, the clustering results obtained by iteratively clustering the first remaining texts to be clustered using the number of elements in the second initial group, the clustering results obtained by iteratively clustering the second remaining texts to be clustered using the number of elements in the third initial group, and the clustering results obtained by iteratively clustering the third remaining texts to be clustered using the number of elements in the fourth initial group can all be used as the clustering results of the first batch of texts to be clustered. Of course, the similarity between the texts corresponding to the elements in the clustering groups of the above clustering results all meet the similarity threshold condition, and the number of elements in the clustering groups meets the preset element number threshold condition.
[0182] The above process describes how to obtain the clustering results of the first batch of texts to be clustered. The process of obtaining the clustering results of the second batch of texts to be clustered, the subsequent process of obtaining the clustering results of the third batch of texts to be clustered, and so on up to the Nth batch of texts to be clustered can all refer to the process of obtaining the clustering results of the first batch of texts to be clustered. As an example, N can be 30.
[0183] To better understand the process of clustering the text to be clustered and obtaining the initial clustering results, please refer to [link to relevant documentation]. Figure 6 This is a clustering flowchart provided in the first embodiment of this application. Assuming there are 30,000 texts to be clustered, each batch of clustering is actually an iterative clustering of a batch of texts to be clustered. To reduce the amount of information data in the clustering iteration and thus improve clustering efficiency, when iteratively clustering each batch of texts to be clustered, a specified number of unclustered texts are randomly selected from the texts to be clustered. For example, Figure 6 The 2000 randomly selected texts to be clustered can serve as an example of a specified number of unclustered texts. 2000 can also be used as an upper limit threshold for the specified number of unclustered texts.
[0184] Please continue to refer to Figure 6 After obtaining the text to be clustered, step S601 is executed first: preprocessing the text to be clustered. The preprocessing is similar to the preprocessing of the text to be processed. For details on the preprocessing, please refer to the preprocessing process of the text to be processed, which will not be repeated here.
[0185] After preprocessing the text to be clustered, step S602 is executed: determine whether the number of times a specified number of unclustered texts are extracted from the text to be clustered is greater than 30.
[0186] If the number of times a specified number of unclustered texts are extracted from the text to be clustered is less than 30, then step S603 is executed: determine if the number of unclustered texts in the text to be clustered is greater than 2000; if so, then step S604 is executed: extract 2000 unclustered texts from the text to be clustered as the first batch of texts to be clustered. Then step S605 is executed: iteratively cluster the first batch of texts to be clustered using the specified number of elements within a group to determine the clustering result of the first batch of texts to be clustered. If the result of step S603 is negative, then step S605 is executed directly, that is: when the number of unclustered texts in the text to be clustered is less than or equal to 2000, the unclustered texts in the text to be clustered are directly used as the first batch of texts to be clustered.
[0187] For example, assuming the specified number of elements in a group is 30, the first batch of texts to be clustered is iteratively clustered so that the number of elements in each cluster group is 30. For details on how to iteratively cluster the first batch of texts to be clustered so that the number of elements in each cluster group is 30, please refer to the above process of using the number of elements in the first initial group and the identifier of the first batch of texts to be clustered to iteratively cluster the first batch of texts to be clustered and determine the clustering results of the first batch of texts to be clustered.
[0188] During the iterative clustering of the first batch of texts to be clustered, after iteratively clustering the first batch of texts to be clustered using a specified number of elements within a group, step S606 is executed: it is determined whether the specified number of elements within a group minus a preset number is less than the preset initial number of elements within a group; if not, step S605 is executed again. However, when executing step S605, the specified number of elements within a group needs to be updated, that is: the updated number of elements within a group is used to cluster the text elements in the first batch of texts that were not successfully clustered (text elements that were not successfully clustered refer to the text elements in the first batch of texts to be clustered). In this process, text elements (excluding those in cluster result groups that meet the preset element quantity threshold) are iteratively clustered. Then, step S606 is executed. If the determination is still negative, the number of elements within a group is decreased by a preset amount to update the number of elements within the group. The updated number of elements within the group is then used to iteratively cluster the text elements in the first batch of text to be clustered that failed to cluster (text elements that failed to cluster refer to text elements in the first batch of text to be clustered that are excluding those in cluster result groups that meet the preset element quantity threshold). This process continues until the determination result of step S606 is positive. Throughout this clustering process, the final optimized clustering result obtained from the last iterative clustering using the number of elements within each group is used as the clustering result for the first batch of text to be clustered. The optimization process involved in the final optimized clustering result actually refers to the aforementioned process of filtering elements in the cluster result group based on the similarity threshold and the preset element quantity threshold.
[0189] If the judgment result of step S606 is yes, then return to step S602. If the number of times a specified number of unclustered texts are extracted from the text to be clustered is less than 30, then proceed to step S603: determine whether the number of unclustered texts in the text to be clustered is greater than 2000; if yes, then proceed to step S604: except that this time 2000 unclustered texts are extracted from the text to be clustered as the second batch of text to be clustered. After determining the second batch of text to be clustered, proceed to step S605 in the same way as the first batch of text to be clustered.
[0190] In fact, the above clustering process includes iterative clustering of the first batch of texts to be clustered, iterative clustering of the second batch of texts to be clustered, and iterative clustering of the third batch of texts to be clustered.
[0191] After iteratively clustering the second batch of text to be clustered according to the above steps, return to step S602. If the number of times a specified number of unclustered texts are extracted from the text to be clustered is less than 30, then proceed to step S603: determine if the number of unclustered texts in the text to be clustered is greater than 2000; if so, proceed to step S604: this time, extract 2000 unclustered texts from the text to be clustered as the third batch of text to be clustered. After determining the third batch of text to be clustered, proceed to step S605 in the same way as the second batch of text to be clustered, and so on, until when returning to step S602, the number of times a specified number of unclustered texts are extracted from the text to be clustered is greater than 30, then proceed to step S607: output the clustering results information for each batch. In fact, as an example, the clustering results can actually be represented in the form of clustering result groups.
[0192] The reason for selecting 30 batches of unclustered texts from 30,000 texts to be clustered is a reasonably calculated number of selections. When the lower limit of the similarity threshold is set to 98%, it is possible that half of the texts in each batch will eventually be successfully clustered. That is, if 2,000 texts are selected, 1,000 texts will eventually be successfully clustered. In this way, by selecting 30 batches from 30,000 texts to be clustered, most of the texts in the 30,000 texts to be clustered can be successfully clustered.
[0193] After obtaining the initial clustering results of the text to be clustered, semantic analysis is performed on these results. This can refer to manual analysis of the initial clustering results to derive semantic analysis results. Then, the semantic analysis results are summarized and clustered again to obtain tertiary standard labels. The clustering of semantic analysis results can follow the same process as obtaining the initial clustering results, except that the text to be clustered is replaced with the semantic analysis results. Finally, the tertiary standard labels are decomposed to obtain primary and secondary standard labels. Decomposing the tertiary standard labels involves breaking down each character or word within the tertiary standard label to obtain primary and secondary standard labels. These primary, secondary, and tertiary standard labels are then stored in a label library, thus completing the construction of the label library.
[0194] In this embodiment, to facilitate the storage of different types of third-level standard labels, first-level standard labels, and second-level standard labels, they can be categorized when storing each level of standard labels. For example, in a food ordering service scenario, the standard labels at each level can be categorized according to the various stages of fulfillment. These stages may include, for example: placing an order, issuing an order, accepting an order, preparing the food, picking up the food, delivery, arrival, cancellation (of the order), and contacting (the customer).
[0195] This application provides a text classification processing method. In this method, after obtaining the text to be processed, semantic analysis is performed on the text based on a first-level semantic tag acquisition strategy to obtain the first-level semantic tags corresponding to the text. After obtaining the first-level semantic tags, semantic analysis is performed on the text based on a second-level semantic tag acquisition strategy and the first-level semantic tags to obtain the second-level semantic tags corresponding to the text. After obtaining the first-level and second-level semantic tags, a target semantic tag is obtained based on a target semantic tag acquisition strategy, the first-level semantic tags, the second-level semantic tags, and the text to be processed. This target semantic tag is then used as the classification tag for the text. This text classification processing method, by using target semantic tags to classify the text, facilitates a more intuitive understanding of a large number of texts to be processed. Furthermore, obtaining the target semantic tags of the text in a hierarchical manner makes the obtained target semantic tags of the text more closely match the semantics of the text, thus leading to more accurate classification of the text.
[0196] Furthermore, in this embodiment, an improved clustering method based on the K-means clustering algorithm is used to cluster the text to be clustered in order to construct a preset label library. This makes the clustering results of the text to be clustered more accurate, and consequently, the standard labels at each level in the subsequently constructed preset label library are more accurate. At the same time, a batch sampling method is used to sample a large number of texts to be clustered, which reduces the amount of data in each iteration of clustering and improves clustering efficiency.
[0197] Second Embodiment
[0198] Corresponding to the first embodiment, the second embodiment of this application provides a method for displaying sorted text information. The executing entity of this embodiment is a user terminal managing an ordering service platform. The parts in the second embodiment that are the same as those in the scenario embodiment and the first embodiment will not be described again; please refer to the relevant parts of the scenario embodiment and the first embodiment for details.
[0199] Please refer to Figure 7 This is a flowchart of a text information sorting display method provided in the second embodiment of this application.
[0200] The text information sorting and display method of this application embodiment includes the following steps:
[0201] Step S701: Obtain the sorting information of the text to be processed sent by the server.
[0202] In this embodiment, the sorting information of the text to be processed is obtained based on the number of target semantic tags corresponding to the text to be processed, or the sorting information of the text to be processed is obtained based on the target semantic tags and the filtering condition information used to sort the text to be processed; wherein, the target semantic tags are obtained based on the target semantic tag acquisition strategy, the text to be processed, the first-level semantic tags corresponding to the text to be processed, and the second-level semantic tags corresponding to the text to be processed; the first-level semantic tags are obtained by semantic analysis of the text to be processed based on the first-level semantic tag acquisition strategy, and the second-level semantic tags are obtained by semantic analysis of the text to be processed based on the second-level semantic tag acquisition strategy and the first-level semantic tags.
[0203] Step S702: Based on the sorting information of the text to be processed, display the text to be processed and the target semantic tags.
[0204] In this embodiment, in order to obtain the sorting information of the text to be processed, the method further includes: sending a first request message to the server to request the sorting information of the text to be processed; after sending the first request message to the server, as a way to obtain the sorting information of the text to be processed sent by the server, it can refer to: obtaining the sorting information of the text to be processed sent by the server in response to the first request message.
[0205] In this embodiment, as an implementation method for displaying the text to be processed and the target semantic tags based on the sorting information of the text to be processed, it can refer to: First, based on the sorting information of the text to be processed, determining the text to be processed and the target semantic tags corresponding to the text to be processed to be displayed to users of the management ordering service platform; then, displaying the determined text to be processed and the target semantic tags corresponding to the text to be processed to users of the management ordering service platform on the user's page.
[0206] In addition, to facilitate the display of the text to be processed and the target semantic tags, this embodiment also includes: obtaining a second request message sent by a user of the management ordering service platform through a user-side page to request the display of the target semantic tags; as one implementation of displaying the text to be processed and the target semantic tags, it can refer to: displaying the text to be processed and the target semantic tags on the page based on the second request message.
[0207] In this embodiment, the text to be processed can be sorted based on filtering conditions for sorting. These filtering conditions can be set by the administrator on the user terminal page of the management ordering service platform. Therefore, it is also necessary to obtain the filtering conditions for sorting the text to be processed sent by the user of the management ordering service platform through the user terminal page, and provide the filtering conditions to the execution entity server of the first embodiment so that the server can sort the text to be processed.
[0208] This application provides a method for displaying sorted text information. In this method, sorting information of the text to be processed sent by the server is obtained. Then, based on the sorting information, the text to be processed and target semantic tags are displayed. The sorting information is obtained based on the number of target semantic tags corresponding to the text to be processed, or based on the target semantic tags and filtering conditions used to sort the text to be processed. The target semantic tags are obtained based on a target semantic tag acquisition strategy, the text to be processed, the primary semantic tags corresponding to the text to be processed, and the secondary semantic tags corresponding to the text to be processed. The primary semantic tags are obtained through semantic analysis of the text to be processed based on the primary semantic tag acquisition strategy, and the secondary semantic tags are obtained through semantic analysis of the text to be processed based on the secondary semantic tag acquisition strategy and the primary semantic tags. This method allows administrators to intuitively understand a large amount of text to be processed based on the displayed text to be processed and target semantic tags.
[0209] Third Embodiment
[0210] Corresponding to the text classification processing method provided in the first embodiment of this application, the third embodiment of this application also provides a text classification processing apparatus. Since the apparatus embodiment is basically similar to the first embodiment, the description is relatively simple; relevant details can be found in the description of the first embodiment. The apparatus embodiments described below are merely illustrative.
[0211] Please refer to Figure 8 This is a schematic diagram of a text classification processing device provided in the third embodiment of this application.
[0212] The text classification processing device 800 includes: a text acquisition unit 801 for acquiring text to be processed; a primary semantic tag acquisition unit 802 for performing semantic analysis on the text to be processed based on a primary semantic tag acquisition strategy to obtain primary semantic tags corresponding to the text to be processed; a secondary semantic tag acquisition unit 803 for performing semantic analysis on the text to be processed based on a secondary semantic tag acquisition strategy and the primary semantic tags to obtain secondary semantic tags corresponding to the text to be processed; and a target semantic tag acquisition unit 804 for obtaining a target semantic tag corresponding to the text to be processed based on a target semantic tag acquisition strategy, the primary semantic tags, the secondary semantic tags, and the text to be processed, and using the target semantic tags as classification tags for the text to be processed.
[0213] Optionally, the secondary semantic tag obtaining unit is specifically used for: performing semantic analysis on the text to be processed based on the secondary semantic tag obtaining strategy to obtain the secondary verification tags corresponding to the text to be processed; performing semantic verification on the secondary verification tags using the primary semantic tags, and taking the secondary verification tags that semantically match the primary semantic tags as the secondary semantic tags.
[0214] Optionally, the target semantic tag obtaining unit is specifically used to: combine the secondary semantic tags based on the target semantic tag obtaining strategy, or combine the primary semantic tags with the secondary semantic tags to obtain a combined tag to be verified; perform semantic verification on the combined semantic tags to be verified using the text to be processed, and take the combined tag to be verified that semantically matches the text to be processed as the target semantic tag.
[0215] Optionally, the target semantic tag obtaining unit is specifically used to: combine the secondary semantic tags, or combine the primary semantic tags with the secondary semantic tags to obtain candidate combined tags; traverse each candidate combined tag in the candidate combined tags to see if it matches the target semantic tag obtaining strategy; if so, use the third-level standard tags in the preset tag library corresponding to the target semantic tag obtaining strategy as the combined tags to be verified.
[0216] Optionally, it may also include: a preprocessing unit; the preprocessing unit is specifically used to: preprocess the text to be processed to obtain the preprocessed text to be processed.
[0217] Optionally, the first-level semantic tag acquisition unit is specifically used to: traverse whether the text to be processed matches the first-level semantic tag acquisition strategy; if so, use the first-level standard tag in the preset tag library corresponding to the first-level semantic tag acquisition strategy as the first-level semantic tag.
[0218] Optionally, the secondary semantic tag acquisition unit is specifically used to: traverse whether the text to be processed matches the secondary semantic tag acquisition strategy; if so, use the secondary standard tag in the preset tag library corresponding to the secondary semantic tag acquisition strategy as the secondary tag to be verified.
[0219] Optionally, it further includes: an initial verification condition judgment unit, specifically used to: determine whether the text to be processed meets the initial verification condition for obtaining secondary semantic tags before traversing whether the text to be processed matches the secondary semantic tag acquisition strategy; the secondary semantic tag acquisition unit is specifically used to: if the text to be processed meets the initial verification condition for obtaining secondary semantic tags, then traverse whether the text to be processed matches the secondary semantic tag acquisition strategy.
[0220] Optionally, the secondary semantic tag acquisition unit is further configured to: if the text to be processed does not match the secondary semantic tag acquisition strategy, use the text to be processed as input data for a matching value prediction model to obtain matching values between the text to be processed and each secondary standard tag, wherein the matching value prediction model is a model used to obtain matching values between the text to be processed and each secondary standard tag based on the text to be processed; and obtain the secondary verification tag corresponding to the text to be processed based on the matching values between the text to be processed and each secondary standard tag.
[0221] Optionally, the secondary semantic tag obtaining unit is specifically used to: use the text to be processed and the primary semantic tags together as input data for the matching value prediction model to obtain the matching value between the text to be processed and each secondary standard tag.
[0222] Optionally, the secondary semantic tag obtaining unit is specifically used to: determine whether the matching value satisfies a first matching condition, or determine whether the matching value satisfies a second matching condition and whether the text to be processed satisfies the secondary verification condition for obtaining secondary semantic tags; if so, determine a target secondary standard tag that satisfies the first matching condition, or determine a target secondary standard tag that satisfies the second matching condition and satisfies the secondary verification condition for obtaining secondary semantic tags; and obtain the secondary verification tag corresponding to the text to be processed based on the target secondary standard tag.
[0223] Optionally, it also includes: a training unit, specifically used for: filtering text samples from candidate texts; obtaining matching value samples between the text samples and each secondary standard label; and training an initial text classification model based on the text samples and the matching value samples to obtain the matching value prediction model.
[0224] Optionally, the training unit is specifically used to: obtain a text sample vector for vector representation of the text sample; obtain a matching value sample vector for vector representation of the matching value sample; and train an initial text classification model using the text sample vector and the matching value sample vector.
[0225] Optionally, the training unit is specifically used to: filter text samples from candidate texts based on a pre-set logical expression used to represent the target semantics.
[0226] Optionally, it further includes: a sorting unit, specifically used to: after obtaining the target semantic tags corresponding to the text to be processed, sort the text to be processed based on the number of the target semantic tags, and obtain the sorting information of the text to be processed.
[0227] Optionally, it also includes: a sorting unit, specifically used to: after obtaining the target semantic tag corresponding to the text to be processed, sort the text to be processed based on the target semantic tag and the filtering condition information for sorting the text to be processed provided by the user terminal of the management ordering service platform, and obtain the sorting information of the text to be processed.
[0228] Optionally, it further includes: a sorting information sending unit, specifically configured to: obtain a first request message sent by a user terminal for managing the ordering service platform, requesting to obtain sorting information of the text to be processed; and send the sorting information of the text to be processed to the user terminal in response to the first request message.
[0229] Optionally, the text to be processed includes text that provides feedback on the ordered service.
[0230] Optionally, it further includes: a clustering unit, used to obtain tags from the preset tag library; the clustering unit is specifically used to: obtain text to be clustered; perform iterative clustering on the text to be clustered based on the identifier of the text to be clustered to obtain initial clustering result information of the text to be clustered; perform semantic analysis on the initial clustering result information to obtain semantic analysis result information for the initial clustering result information; cluster the semantic analysis result information to obtain three-level standard tags; and perform text decomposition on the three-level standard tags to obtain first-level standard tags and second-level standard tags.
[0231] Optionally, the clustering unit is specifically configured to: randomly select a specified number of unclustered texts from the texts to be clustered as the first batch of texts to be clustered; perform iterative clustering on the first batch of texts to be clustered based on the number of elements in the first initial group and the identifiers of the first batch of texts to be clustered, and determine the clustering result of the first batch of texts to be clustered; determine whether the number of times the specified number of unclustered texts are randomly selected from the texts to be clustered meets a preset selection threshold condition; if not, randomly select a specified number of unclustered texts from the texts to be clustered as the second batch of texts to be clustered; and perform iterative clustering on the second batch of texts to be clustered based on the number of elements in the first initial group and the identifiers of the second batch of texts to be clustered, and determine the clustering result of the first batch of texts to be clustered. The clustering results of the second batch of texts to be clustered; determining whether the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset sampling number threshold condition; if not, then a specified number of unclustered texts are randomly selected from the texts to be clustered as the third batch of texts to be clustered; based on the number of elements in the first initial group and the identifier of the third batch of texts to be clustered, iterative clustering is performed on the third batch of texts to be clustered to determine the clustering results of the third batch of texts to be clustered; and so on, until the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset sampling number threshold condition, and the clustering result information of each batch is used as the initial clustering result information of the texts to be clustered.
[0232] Optionally, the clustering unit is specifically configured to: perform a first clustering of the first batch of texts to be clustered based on the number of elements in the first initial group and the identifier of the first batch of texts to be clustered, and determine the first clustering result of the first batch of texts to be clustered; determine whether the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets a preset iteration number threshold condition; if not, perform a second clustering of the first batch of texts to be clustered based on the first clustering result, the number of elements in the first initial group and the identifier of the first batch of texts to be clustered, and determine the second .... If the number of iterations of the iterative clustering performed on the first batch of texts to be clustered meets a preset iteration threshold, then based on the second clustering result, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered, a third clustering is performed on the first batch of texts to be clustered to determine the third clustering result of the first batch of texts to be clustered; this process continues until the number of iterations of the iterative clustering performed on the first batch of texts to be clustered using the number of elements in the first initial group meets the preset iteration threshold; finally, based on the clustering result of the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group, the clustering result of the first batch of texts to be clustered is determined.
[0233] Optionally, the clustering unit is specifically used to: determine whether the similarity between the texts corresponding to the elements in each cluster result group in the clustering result of the last clustering meets the similarity threshold condition; if so, determine whether the number of elements in each cluster result group meets the preset element number threshold condition, and take the cluster result group that meets the preset element number threshold condition as the clustering result of the first batch of texts to be clustered.
[0234] Optionally, the clustering unit is further configured to: after the last clustering of the first batch of texts to be clustered using the number of elements in the first initial group, subtract a preset number from the number of elements in the first initial group to obtain the number of elements in the second initial group; determine whether the number of elements in the second initial group is less than the preset number of elements in the initial group; if not, take the remaining texts to be clustered in the first batch of texts to be clustered, excluding the elements in the clustering result group that meet the preset element number threshold condition, as the remaining texts to be clustered; perform iterative clustering on the remaining texts to be clustered based on the number of elements in the second initial group and the identifier of the first batch of texts to be clustered, determine the clustering result of the remaining texts to be clustered, and take the clustering result of the remaining texts to be clustered as the clustering result of the first batch of texts to be clustered.
[0235] Optionally, the clustering unit is further configured to: if the number of elements in the second initial group is less than the preset number of elements in the initial group, then return to the step of determining whether the number of times a specified number of unclustered texts are randomly selected from the texts to be clustered meets the preset sampling number threshold condition.
[0236] Optionally, the clustering unit is specifically used for: determining the intermediate element in the clustering result group of the first clustering result; determining the first element of the initial group for the second clustering of the first batch of texts to be clustered based on the intermediate element in the clustering result group of the first clustering result; and performing a second clustering of the first batch of texts to be clustered based on the first element of the initial group for the second clustering of the first batch of texts to be clustered, the number of elements in the first initial group, and the identifier of the first batch of texts to be clustered.
[0237] Fourth embodiment
[0238] Corresponding to the text information sorting and display method provided in the second embodiment of this application, the fourth embodiment of this application also provides a text information sorting and display device. Since the device embodiment is basically similar to the second embodiment, the description is relatively simple; relevant details can be found in the description of the second embodiment. The device embodiments described below are merely illustrative.
[0239] Please refer to Figure 9This is a schematic diagram of a text information sorting display device provided in the fourth embodiment of this application.
[0240] The text information sorting and display device 900 includes: a sorting information obtaining unit 901, used to obtain sorting information of the text to be processed sent by the server; the sorting information of the text to be processed is obtained based on the number of target semantic tags corresponding to the text to be processed, or the sorting information of the text to be processed is obtained based on the target semantic tags and filtering condition information for sorting the text to be processed; wherein, the target semantic tags are obtained based on a target semantic tag obtaining strategy, the text to be processed, the primary semantic tags corresponding to the text to be processed, and the secondary semantic tags corresponding to the text to be processed; the primary semantic tags are obtained by semantic analysis of the text to be processed based on the primary semantic tag obtaining strategy, and the secondary semantic tags are obtained by semantic analysis of the text to be processed based on the secondary semantic tag obtaining strategy and the primary semantic tags; and a display unit 902, used to display the text to be processed and the target semantic tags based on the sorting information of the text to be processed.
[0241] Optionally, it further includes: a first request message sending unit, configured to send a first request message to the server to request the acquisition of sorting information of the text to be processed; the sorting information acquisition unit is specifically configured to: acquire the sorting information of the text to be processed sent by the server in response to the first request message.
[0242] Optionally, the display unit is specifically configured to: determine, based on the sorting information of the text to be processed, the text to be processed to be displayed to the user of the management ordering service platform and the target semantic tags corresponding to the text to be processed; and display the determined text to be processed to be displayed to the user of the management ordering service platform and the target semantic tags corresponding to the text to be processed on the user's page.
[0243] Optionally, it further includes: a second request message obtaining unit, used to obtain a second request message sent by a user of the management ordering service platform through a user-side page, requesting the display of a target semantic tag; the display unit is specifically used to: display the text to be processed and the target semantic tag on the page based on the second request message.
[0244] Optionally, it also includes: a filtering condition information obtaining unit, used to obtain filtering condition information for sorting the text to be processed, sent by users of the management ordering service platform through a user-side page.
[0245] Fifth embodiment
[0246] Corresponding to the methods of the first and second embodiments of this application, the fifth embodiment of this application also provides an electronic device.
[0247] like Figure 10 As shown, Figure 10 This is a schematic diagram of an electronic device provided in the fifth embodiment of this application.
[0248] In this embodiment, an optional hardware structure of the electronic device 1000 may be as follows: Figure 10 As shown, it includes: at least one processor 1001, at least one memory 1002 and at least one communication bus 1005; the memory 1002 contains a program 1003 and data 1004.
[0249] Bus 1005 can be a communication device for transmitting data between components within electronic device 1000, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).
[0250] Additionally, the electronic device also includes at least one network interface 1006 and at least one peripheral interface 1007. The network interface 1006 provides wired or wireless communication with an external network 1008 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, the network interface 1006 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.
[0251] Peripheral interface 1007 is used to connect to peripherals, such as peripheral 1 in the figure. Figure 10 1009 in the middle), peripheral 2 ( Figure 10 1010 in the middle) and peripheral 3 ( Figure 10 (1011 in the original text). Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (such as mice, touchpads, or touchscreens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays), displays or light-emitting diode displays, video input devices (such as cameras or input interfaces coupled to video files), etc.
[0252] The processor 1001 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0253] The memory 1002 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage device.
[0254] In this embodiment, the processor 1001 calls the program and data stored in the memory 1002 to execute the methods of the first and second embodiments of this application.
[0255] Sixth Embodiment
[0256] Corresponding to the methods of the first and second embodiments of this application, the sixth embodiment of this application also provides a computer storage medium storing a computer program that is executed by a processor to perform the methods of the first and second embodiments of this application.
[0257] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this invention. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0258] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, a network interface, and memory. Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0259] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable storage media, such as modulated data signals and carrier waves.
[0260] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
Claims
1. A method of text classification processing, characterized by, The method comprises the following steps: obtaining a to-be-processed text, wherein the to-be-processed text comprises a text for feedback on a subscription service; performing semantic analysis on the to-be-processed text based on a first semantic label obtaining strategy to obtain a first semantic label corresponding to the to-be-processed text, wherein the first semantic label comprises an entity label and a phrase label, and the first semantic label obtaining strategy comprises an entity label obtaining strategy and a phrase label obtaining strategy; performing semantic analysis on the to-be-processed text based on a second semantic label obtaining strategy to obtain a second to-be-verified label corresponding to the to-be-processed text, performing semantic verification on the second to-be-verified label by using the first semantic label, and taking a second semantic label matched with the first semantic label as a second semantic label, wherein the second semantic label is a plurality of combined labels formed by combining a plurality of first semantic labels; combining the first semantic label and the second semantic label based on a target semantic label obtaining strategy to obtain a to-be-verified combined label, performing semantic verification on the to-be-verified combined label by using the to-be-processed text, taking a to-be-verified combined label matched with the to-be-processed text as a target semantic label, and taking the target semantic label as a classification label of the to-be-processed text, wherein the target semantic label is a sentence capable of performing complete semantic expression on the meaning of the to-be-processed text by combining the first semantic label and the second semantic label.
2. The method of claim 1, wherein, The combining the first semantic label and the second semantic label based on the target semantic label obtaining strategy to obtain the to-be-verified combined label comprises: combining the first semantic label and the second semantic label to obtain a candidate combined label; traversing each candidate combined label in the candidate combined label to determine whether the candidate combined label matches the target semantic label obtaining strategy, and if so, taking a third standard label in a preset label library corresponding to the target semantic label obtaining strategy as the to-be-verified combined label.
3. The method of claim 1, wherein, The method further comprises: preprocessing the to-be-processed text to obtain a preprocessed to-be-processed text.
4. The method of claim 1, wherein, The performing semantic analysis on the to-be-processed text based on the first semantic label obtaining strategy to obtain the first semantic label corresponding to the to-be-processed text comprises: traversing the to-be-processed text to determine whether the to-be-processed text matches the first semantic label obtaining strategy, and if so, taking a first standard label in a preset label library corresponding to the first semantic label obtaining strategy as the first semantic label.
5. The method of claim 1, wherein, The performing semantic analysis on the to-be-processed text based on the second semantic label obtaining strategy to obtain the second to-be-verified label corresponding to the to-be-processed text comprises: traversing the to-be-processed text to determine whether the to-be-processed text matches the second semantic label obtaining strategy, and if so, taking a second standard label in a preset label library corresponding to the second semantic label obtaining strategy as the second to-be-verified label.
6. The method of claim 5, wherein, Before traversing the to-be-processed text to determine whether the to-be-processed text matches the second semantic label obtaining strategy, the method further comprises: traversing the to-be-processed text to determine whether the to-be-processed text satisfies an initial verification condition for obtaining a second semantic label. The traversing the to-be-processed text to determine whether the to-be-processed text matches the second semantic label obtaining strategy comprises: If the to-be-processed text meets the initial checking condition for obtaining the secondary semantic label, it is checked whether the to-be-processed text matches the secondary semantic label obtaining strategy.
7. The method of claim 5, wherein, Further comprising: If the to-be-processed text does not match the secondary semantic label obtaining strategy, the to-be-processed text is taken as input data of a matching value prediction model to obtain a matching value between the to-be-processed text and each secondary standard label, the matching value prediction model being a model for obtaining a matching value between to-be-processed text and each secondary standard label according to to-be-processed text; According to the matching value between the to-be-processed text and each secondary standard label, a secondary to-be-checked label corresponding to the to-be-processed text is obtained.
8. The method of claim 7, wherein, The to-be-processed text is taken as input data of a matching value prediction model to obtain a matching value between the to-be-processed text and each secondary standard label, comprising: The to-be-processed text and the primary semantic label are taken together as input data of a matching value prediction model to obtain a matching value between the to-be-processed text and each secondary standard label.
9. The method of claim 7, wherein, The matching value between the to-be-processed text and each secondary standard label is obtained, comprising: It is judged whether the matching value meets a first matching condition, or whether the matching value meets a second matching condition and whether the to-be-processed text meets a secondary checking condition for obtaining a secondary semantic label; If so, a target secondary standard label meeting the first matching condition is determined, or a target secondary standard label meeting the second matching condition and the secondary checking condition for obtaining a secondary semantic label is determined; Based on the target secondary standard label, a secondary to-be-checked label corresponding to the to-be-processed text is obtained.
10. The method of claim 7, wherein, The matching value prediction model is obtained in the following manner: Text samples are screened from candidate texts; Matching value samples between the text samples and each secondary standard label are obtained; An initial text classification model is trained based on the text samples and the matching value samples to obtain the matching value prediction model.
11. The method of claim 10, wherein, The initial text classification model is trained based on the text samples and the matching value samples, comprising: A text sample vector for vector representation of the text samples is obtained; A matching value sample vector for vector representation of the matching value samples is obtained; The initial text classification model is trained using the text sample vector and the matching value sample vector.
12. The method of claim 10, wherein, The text samples are screened from the candidate texts, comprising: Based on a pre-set logical expression for representing a target semantic, text samples are screened from the candidate texts.
13. The method of claim 1, wherein, After obtaining the target semantic label corresponding to the to-be-processed text, the to-be-processed text is sorted based on the number of target semantic labels to obtain sorting information of the to-be-processed text.
14. The method of claim 1, wherein, After obtaining the target semantic label corresponding to the to-be-processed text, the to-be-processed text is sorted based on the target semantic label and screening condition information provided by a user end of a management subscription service platform for sorting the to-be-processed text to obtain sorting information of the to-be-processed text.
15. The method according to claim 13 or 14, characterized in that, Further comprising: Obtaining a first request message for requesting sorting information of the to-be-processed text from a user terminal of a subscription service platform; For the first request message, sending the sorting information of the to-be-processed text to the user terminal.
16. The method of claim 2 or 4 or 5, wherein, The labels in the preset label library are obtained in the following way: Obtaining a to-be-clustered text; Based on the identification of the to-be-clustered text, iteratively clustering the to-be-clustered text to obtain initial clustering result information of the to-be-clustered text; Performing semantic analysis on the initial clustering result information to obtain semantic analysis result information for the initial clustering result information; Clustering the semantic analysis result information to obtain a three-level standard label; Text disassembly is performed on the three-level standard label to obtain a first-level standard label and a second-level standard label.
17. The method of claim 16, wherein, The initial clustering result information of the to-be-clustered text is obtained by iteratively clustering the to-be-clustered text based on the identification of the to-be-clustered text, including: Randomly extracting a specified number of unclustered texts in the to-be-clustered text as a first batch of to-be-clustered texts; Based on the first initial group element number and the identification of the first batch of to-be-clustered texts, iteratively clustering the first batch of to-be-clustered texts to determine the clustering result of the first batch of to-be-clustered texts; Determine whether the number of times of randomly extracting a specified number of unclustered texts in the to-be-clustered text meets a preset extraction frequency threshold condition; If not, randomly extract a specified number of unclustered texts in the to-be-clustered text as a second batch of to-be-clustered texts; Based on the first initial group element number and the identification of the second batch of to-be-clustered texts, iteratively cluster the second batch of to-be-clustered texts to determine the clustering result of the second batch of to-be-clustered texts; Determine whether the number of times of randomly extracting a specified number of unclustered texts in the to-be-clustered text meets the preset extraction frequency threshold condition; If not, randomly extract a specified number of unclustered texts in the to-be-clustered text as a third batch of to-be-clustered texts; Based on the first initial group element number and the identification of the third batch of to-be-clustered texts, iteratively cluster the third batch of to-be-clustered texts to determine the clustering result of the third batch of to-be-clustered texts; In this way, until the number of times of randomly extracting a specified number of unclustered texts in the to-be-clustered text meets the preset extraction frequency threshold condition, the clustering result information of each batch is taken as the initial clustering result information of the to-be-clustered text.
18. The method of claim 17, wherein, The first batch of to-be-clustered texts is iteratively clustered based on the first initial group element number and the identification of the first batch of to-be-clustered texts to determine the clustering result of the first batch of to-be-clustered texts, including: Based on the first initial group element number and the identification of the first batch of to-be-clustered texts, iteratively cluster the first batch of to-be-clustered texts to determine the clustering result of the first batch of to-be-clustered texts; Determine whether the number of times of randomly extracting a specified number of unclustered texts in the to-be-clustered text meets the preset extraction frequency threshold condition; If no, performing second clustering on the first batch of texts to be clustered based on the first clustering result, the first initial intra-group element number and the identification of the first batch of texts to be clustered, to determine a second clustering result of the first batch of texts to be clustered; If no, performing third clustering on the first batch of texts to be clustered based on the second clustering result, the first initial intra-group element number and the identification of the first batch of texts to be clustered, to determine a third clustering result of the first batch of texts to be clustered; and so on, until the iteration number of the iterative clustering performed on the first batch of texts to be clustered using the first initial intra-group element number meets the preset iteration number threshold condition; According to the clustering result of the last clustering performed on the first batch of texts to be clustered using the first initial intra-group element number, determining the clustering result of the first batch of texts to be clustered. The determining of the clustering result of the first batch of texts to be clustered according to the clustering result of the last clustering performed on the first batch of texts to be clustered using the first initial intra-group element number comprises:
19. The method of claim 18, wherein, If yes, judging whether the element number in each clustering result group meets a preset element number threshold condition, and taking the clustering result group meeting the preset element number threshold condition as the clustering result of the first batch of texts to be clustered. After the last clustering performed on the first batch of texts to be clustered using the first initial intra-group element number, the method further comprises:
20. The method of claim 19, wherein, Subtracting a preset number from the first initial intra-group element number to obtain a second initial intra-group element number; If no, taking the texts to be clustered in the first batch of texts to be clustered except the elements in the clustering result group meeting the preset element number threshold condition as remaining texts to be clustered; Performing iterative clustering on the remaining texts to be clustered based on the second initial intra-group element number and the identification of the first batch of texts to be clustered, to determine a clustering result of the remaining texts to be clustered, and taking the clustering result of the remaining texts to be clustered as the clustering result of the first batch of texts to be clustered. If the second initial intra-group element number is less than the preset initial intra-group element number, returning to the step of judging whether the number of times of randomly extracting a specified number of un-clustered texts in the texts to be clustered meets the preset extraction number threshold condition. The performing of the second clustering on the first batch of texts to be clustered based on the first clustering result, the first initial intra-group element number and the identification of the first batch of texts to be clustered comprises:
21. The method of claim 20, wherein, Determining intermediate elements in the clustering result groups of the first clustering result; 22. The method of claim 18, wherein, determine, based on the intermediate element in the clustering result group of the first clustering result, an initial grouping head element for second clustering of the first batch of texts to be clustered; cluster the first batch of texts to be clustered based on the initial grouping head element for second clustering of the first batch of texts to be clustered, the first initial group element quantity, and the identification of the first batch of texts to be clustered.
23. A method of presenting a ranking of textual information, characterized by, comprise: obtain the sorting information of the to-be-processed text sent by the server; the sorting information of the to-be-processed text is obtained based on the quantity of target semantic labels corresponding to the to-be-processed text, or the sorting information of the to-be-processed text is obtained based on the target semantic label and the screening condition information used for sorting the to-be-processed text; wherein the target semantic label is obtained by combining a first-level semantic label and a second-level semantic label based on a target semantic label obtaining strategy, performing semantic verification on the to-be-processed text based on a to-be-verified combined label obtained by combining the first-level semantic label and the second-level semantic label, and the target semantic label is a classification label of the to-be-processed text; the target semantic label is a sentence that can completely express the meaning of the to-be-processed text by combining the first-level semantic label and the second-level semantic label; the first-level semantic label is obtained by performing semantic analysis on the to-be-processed text based on a first-level semantic label obtaining strategy; the first-level semantic label comprises an entity label and a phrase label; the first-level semantic label obtaining strategy comprises an entity label obtaining strategy and a phrase label obtaining strategy; the second-level semantic label is obtained by performing semantic analysis on the to-be-processed text based on a second-level semantic label obtaining strategy, performing semantic verification on the second-level to-be-verified label based on the first-level semantic label, and obtaining the second-level to-be-verified label that is semantically matched with the first-level semantic label; the second-level semantic label is a plurality of combined labels formed by combining a plurality of first-level semantic labels; display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text.
24. The method of claim 23, wherein, Further comprise: send a first request message for requesting to obtain the sorting information of the to-be-processed text to the server; obtaining the sorting information of the to-be-processed text sent by the server comprises: obtaining the sorting information of the to-be-processed text sent by the server for the first request message.
25. The method of claim 23, wherein, displaying the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text comprises: determining the to-be-processed text and the target semantic label corresponding to the to-be-processed text for displaying to the user of the management subscription service platform based on the sorting information of the to-be-processed text; displaying the to-be-processed text and the target semantic label corresponding to the to-be-processed text determined for displaying to the user of the management subscription service platform on the page of the user terminal.
26. The method of claim 23, wherein, Further comprise: obtain a second request message for requesting to display the target semantic label sent by the user of the management subscription service platform through the page of the user terminal; The display of the to-be-processed text and the target semantic label includes: Based on the second request message, the to-be-processed text and the target semantic label are displayed on the page.
27. The method of claim 23, wherein, Also includes: Obtain the filtering condition information for sorting the to-be-processed text sent by the user of the management subscription service platform through the page of the user terminal.
28. A text classification processing apparatus characterized by comprising: Including: A to-be-processed text obtaining unit is configured to obtain to-be-processed text, the to-be-processed text including text for feedback on a subscription service; A first-level semantic label obtaining unit is configured to perform semantic analysis on the to-be-processed text based on a first-level semantic label obtaining strategy to obtain a first-level semantic label corresponding to the to-be-processed text, the first-level semantic label including an entity label and a phrase label, and the first-level semantic label obtaining strategy including an entity label obtaining strategy and a phrase label obtaining strategy; A second-level semantic label obtaining unit is configured to perform semantic analysis on the to-be-processed text based on a second-level semantic label obtaining strategy to obtain a second-level to-be-verified label corresponding to the to-be-processed text, perform semantic verification on the second-level to-be-verified label using the first-level semantic label, and take a second-level semantic label that is semantically matched with the first-level semantic label as the second-level to-be-verified label, the second-level semantic label being a plurality of combined labels formed by a plurality of the first-level semantic labels; A target semantic label obtaining unit is configured to combine the first-level semantic label and the second-level semantic label based on a target semantic label obtaining strategy to obtain a to-be-verified combined label, perform semantic verification on the to-be-verified combined label using the to-be-processed text, take a to-be-verified combined label that is semantically matched with the to-be-processed text as a target semantic label, take the target semantic label as a classification label of the to-be-processed text, and the target semantic label being a sentence that is formed by the combination of the first-level semantic label and the second-level semantic label and that is capable of completely expressing the meaning of the to-be-processed text.
29. A display device for sorting text information, characterized in that, Including: A sorting information obtaining unit is configured to obtain sorting information of to-be-processed text sent by a server. The sorting information of the to-be-processed text is obtained based on the number of target semantic labels corresponding to the to-be-processed text, or the sorting information of the to-be-processed text is obtained based on the target semantic labels and screening condition information used for sorting the to-be-processed text; wherein, the target semantic label is obtained based on a target semantic label obtaining strategy, in which a first-level semantic label is combined with a second-level semantic label to obtain a to-be-verified combined label, the to-be-processed text is used for semantic verification of the to-be-verified combined label, the to-be-verified combined label obtained based on semantic matching with the to-be-processed text is the classification label of the to-be-processed text, and the target semantic label is a sentence that can completely express the meaning of the to-be-processed text by combining the first-level semantic label and the second-level semantic label; the first-level semantic label is obtained based on a first-level semantic label obtaining strategy by performing semantic analysis on the to-be-processed text, the first-level semantic label includes an entity label and a phrase label, and the first-level semantic label obtaining strategy includes an entity label obtaining strategy and a phrase label obtaining strategy; the second-level semantic label is obtained based on a second-level semantic label obtaining strategy by performing semantic analysis on the to-be-processed text, the second-level semantic label obtaining strategy includes a second-level to-be-verified label corresponding to the to-be-processed text, the first-level semantic label is used for semantic verification of the second-level to-be-verified label, and the second-level to-be-verified label obtained based on semantic matching with the first-level semantic label is a plurality of combined labels formed by combining a plurality of first-level semantic labels. The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text.
30. An electronic device, comprising: The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text. The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text. The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text.
31. A computer storage medium, comprising, The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text. The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text. The display unit is configured to display the to-be-processed text and the target semantic label based on the sorting information of the to-be-processed text.
Citation Information
Patent Citations
A method and apparatus for classifying information, and a computer-readable storage medium
CN109145301A
Method and device for carrying out multi-label classification on text data
CN114036944A
Text processing method and device, equipment and storage medium
CN114328807A