Text processing method, system and electronic device
By identifying semantic tags in policy or news texts, extracting keywords and inter-word relationships, generating simplified expressions, and recommending suitable texts, this approach solves the problems of long reading times and cold start in existing technologies, achieving efficient and accurate text processing and recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA INNOVATION PRIVATE LIMITED
- Filing Date
- 2021-08-06
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies require a significant amount of time for detailed reading when processing large volumes of policy documents or press releases of varying content types, and are prone to misunderstandings, potentially causing businesses or users to miss out on favorable policy opportunities. Furthermore, existing recommendation systems suffer from cold start problems and lack a refined interpretation of policy texts and intelligent analysis of the degree of preferential treatment.
By determining the semantic tags of multiple sentences in the text, extracting the first and second categories of words and the information on the relationships between words, generating simplified expressions, and combining them with the recommendation module to recommend suitable texts to users, a hierarchical system architecture design is adopted to flexibly deploy the language processing model and solve the cold start problem.
It achieves precise and simplified text expression, reduces reading and comprehension time costs, improves recommendation efficiency and accuracy, avoids cold start problems, and helps users quickly find suitable policy or news texts.
Smart Images

Figure CN115906858B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a text processing method, system and electronic device. Background Technology
[0002] Policy documents and press releases are numerous and varied in content, requiring businesses and users to meticulously read and understand each document to find suitable policies or understand the current situation. If a policy document or press release mentions favorable policies, businesses and users need to interpret and calculate them themselves to gain further insight, which undoubtedly consumes a significant amount of time. Furthermore, misunderstandings can lead to businesses and users, even if they meet the requirements, failing to benefit from or understand the corresponding favorable policies. Summary of the Invention
[0003] In view of the above problems, this application provides a text processing method, system and electronic device that solves the above problems or at least partially solves the above problems.
[0004] In one embodiment of this application, a text processing method is provided. The method includes:
[0005] Determine the semantic tags corresponding to multiple statements in the text;
[0006] Extract at least one word from statements whose semantic tags belong to the first category.
[0007] Extract at least two second-category words and the relationship information between different second-category words from statements whose semantic tags belong to the second category.
[0008] A simplified representation of the text is generated based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words.
[0009] In another embodiment of this application, a text processing method is provided. The method includes:
[0010] Determine the semantic tags corresponding to multiple statements in the policy text;
[0011] Extract at least one word from statements whose semantic tags belong to the first category.
[0012] Extract at least two second-category words and the relationship information between different second-category words from statements whose semantic tags belong to the second category.
[0013] Based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words, a simplified representation of the text to be displayed to enterprise users is generated.
[0014] In yet another embodiment of this application, a text processing system is provided. The method includes:
[0015] The data layer is used to interact with the database for data storage and retrieval; wherein, the database stores corpus data.
[0016] The language processing layer has at least one language processing model, used to optimize any language processing model based on the corpus obtained by the data layer; it is also used to perform semantic analysis on the input text using at least some of the at least one language processing model to determine the semantic tags corresponding to multiple sentences in the text; and extract at least one first-class word from sentences whose semantic tags belong to the first category of tags; extract at least two second-class words and the relationship information between different second-class words from sentences whose semantic tags belong to the second category of tags; and generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words.
[0017] The output layer is used to output a simplified representation of the text.
[0018] In yet another embodiment of this application, a text processing system is provided. The system includes:
[0019] Databases are used to store corpora;
[0020] A language processing engine for optimizing any one of at least one language processing models using corpora stored in the database;
[0021] The language processing engine is further configured to perform semantic analysis on the input text using at least a portion of the at least one language processing model to determine semantic tags corresponding to multiple sentences in the text; extract at least one first-class word from sentences whose semantic tags belong to a first-class tag; extract at least two second-class words and relational information between different second-class words from sentences whose semantic tags belong to a second-class tag; and generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relational information between different second-class words.
[0022] The database is also used to store the text and a simplified representation of the text.
[0023] In one embodiment of this application, an electronic device is provided. The electronic device includes a memory and a processor; the memory stores one or more computer instructions, which, when executed by the processor, can implement the steps of the text processing methods provided in the above embodiments.
[0024] The technical solutions provided in the embodiments of this application are not only applicable to the processing of policy texts mentioned in the background art, but can also be extended to the processing of other texts besides policy texts, such as news texts, internal enterprise documents, etc. Specifically, the technical solutions provided in the embodiments of this application first determine the semantic tags corresponding to multiple sentences in the text. For sentences with a first category of semantic tags, at least one first category word can be extracted; for sentences with a second category of semantic tags, at least two second category words and the relationship information between different second category words can be extracted; finally, a simplified expression of the text can be generated based on the extracted at least one first category word, the at least two second category words, and the relationship information between different second category words. It can be seen that the technical solutions provided in the embodiments of this application simplify the length of the text, and the means of simplifying the length of the document is not simply to extract key and important words, but also to extract the relationship information between second category words and retain the simplified expression of the relationship between words, so as to ensure the semantic accuracy of the simplified expression; the simplified expression of the text is accurate, intuitive, and concise, reducing the time cost for users to read and understand the text.
[0025] Furthermore, the simplified text descriptions obtained from the technical solutions provided in the various embodiments of this application also provide data support for recommending text to users and enterprises in the future, which helps to improve recommendation efficiency and accuracy.
[0026] In a text processing system provided in one embodiment of this application, a hierarchical system architecture is adopted. The data layer can interact with the database to obtain corpora or store data. The language processing layer can flexibly deploy at least one language processing model, and a suitable language processing model can be selected for different types of text. For example, for official documents such as policy texts, a specific language processing model (such as a classification model) can be optimized (e.g., trained) using dedicated official document corpora. This allows the optimized (or trained) language processing model suitable for policy texts to process the policy text and obtain a simplified expression. For other types of text, such as news texts, an appropriate language processing model can be selected based on the characteristics of news texts to process the news text and obtain a corresponding simplified expression; and so on. The output layer is used to output the simplified expression of the text processed by the language processing layer for storage in the database or output to the corresponding client, etc. Furthermore, in the technical solution provided in this embodiment, more than one semantic processing model can be used for semantic analysis of the text. Therefore, the text processing system with a hierarchical system architecture provided in this embodiment is more flexible and can flexibly deploy and replace language processing models based on actual needs.
[0027] Furthermore, the text processing system provided in this application embodiment may also include a recommendation layer, which is located between the language processing layer and the output layer. It may also have at least one recommendation model, and the recommendation model can be selected according to the characteristics of the actual recommendation object, etc., which is highly flexible and applicable to a wider range of scenarios. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A theoretical schematic diagram illustrating the principle framework and processing flow of each functional module of the text processing method provided in an embodiment of this application.
[0030] Figure 2 A flowchart illustrating a text processing method provided in an embodiment of this application;
[0031] Figure 3a This is a schematic diagram of the technical architecture of a text processing system provided in one embodiment of this application;
[0032] Figure 3b A schematic diagram illustrating the structure of a text processing system from a hierarchical architecture, as provided in an embodiment of this application;
[0033] Figure 4 A flowchart illustrating a text processing method provided in another embodiment of this application;
[0034] Figure 5 A flowchart illustrating a text processing method provided in yet another embodiment of this application;
[0035] Figure 6 This is a schematic diagram of the structure of a text processing system provided in an embodiment of this application;
[0036] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0037] In the context of rapid global information development, users, enterprises, and organizations face a large amount of information. It takes a lot of time to capture social development trends and favorable policies, and they may miss out on opportunities.
[0038] For example, in a specific application scenario—government-enterprise services—a key service is facilitating the efficient use of policies offered by institutions and service-oriented organizations by businesses, organizations, and users. To support the development of businesses and organizations, service-oriented organizations and institutions often publish various policy documents annually on public service platforms and related websites. These policy documents are usually published in text form (hereinafter referred to as policy texts). Due to the large number and varying content of policy texts, businesses, organizations, or users need to carefully read and understand the content of each policy text to select those that best suit their needs. In other words, the more policy texts there are, the higher the time cost for businesses, organizations, or users to read them carefully and select the useful ones. Furthermore, policy texts often contain favorable provisions; if businesses, organizations, or users want to further understand the specific preferential policies, they need to interpret and calculate them themselves.
[0039] While existing technologies can, to some extent, automatically recommend suitable policy texts to businesses, users, or organizations, they primarily rely on historical behavioral data (such as viewing records) during the recommendation process. This historical behavioral data is relatively sparse, making the recommendation system susceptible to cold start problems.
[0040] The cold start problem refers to the difficulty in optimizing or training a recommendation model with good recommendation performance when there is limited historical or training data. The challenge lies in ensuring the recommendation system functions well and continuously improves its performance. Furthermore, because current technologies primarily focus on the recommendation process itself, in addition to the aforementioned cold start problem, they lack a detailed interpretation of policy texts and intelligent analysis and calculation of the extent of benefits offered by those texts.
[0041] To address the aforementioned problems, this application provides the following embodiments to offer a solution that performs intelligent text analysis and semantic understanding to obtain simplified text representations, aiding users, businesses, or organizations in quickly finding suitable texts (such as policy texts, press releases, etc.) and reducing the probability of missing beneficial information. Furthermore, in addition to providing simplified text representations, the embodiments of this application can proactively recommend suitable texts to users, businesses, or organizations, further reducing the time required for them to search. To enable those skilled in the art to better understand the solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0042] In some processes described in the specification, claims, and accompanying drawings of this application, multiple operations appearing in a specific order are included. These operations may be executed out of order or in parallel. Operation numbers such as 101, 102, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that the terms "first," "second," etc., used herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to different types. Moreover, the following embodiments are merely some embodiments of this application, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0043] Before introducing the method embodiments provided in this application, the principle framework of the text processing system on which the technical solution provided in this application is based will be explained first.
[0044] Figure 1 This document illustrates the theoretical framework and processing flow of each functional module of the file processing method provided in this application. For example... Figure 1As shown, the apparatus for implementing the document processing method provided in this application may include the following major functional modules, specifically including but not limited to: content interpretation module 10 and relationship interpretation module 20. Among them,
[0045] The content interpretation module 10 is used to determine the semantic tags corresponding to multiple sentences in the text; and to extract at least one first-class word from the sentences whose semantic tags belong to the first-class tags.
[0046] The relation interpretation module 20 is used to extract at least two second-category words and relation information between different second-category words from statements whose semantic tags belong to the second category of tags.
[0047] The expression module 30 is used to generate a simplified expression of the text based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words.
[0048] Furthermore, such as Figure 1 As shown, this embodiment may also include a recommendation module. Specifically, the recommendation module 40 is used to obtain description information of the target object; determine recommended text from the multiple texts based on the description information and simplified expressions of multiple texts; and send the simplified expression corresponding to the recommended text to the client corresponding to the target object.
[0049] In specific implementation, when the recommendation module 40 determines the recommended text from the multiple texts based on the description information and the simplified expression of each text, it can specifically do the following: based on at least one first-class word contained in the description information and the simplified expression of each text, analyze the relevance between the target object and each text, and determine the text with the required relevance as the recommended text.
[0050] The content regarding "analyzing the relevance of the target object to each text based on the description information and at least one Class I word contained in the simplified expression of each text" will be explained in detail in the following section.
[0051] In this embodiment, the text can be policy text. Accordingly, the semantic tags corresponding to the statements contained in the policy text may include, but are not limited to, application conditions, preferential items, and others. For example, the semantic tag "application conditions" can be classified as a first category tag, and the semantic tag "preferential items" can be classified as a second category tag.
[0052] The first category of tags can also have sub-tags. For example, the semantic tag "application conditions" can include sub-tags such as "registered location" and "business scope." It should be noted that the tags listed above are characteristics of policy documents issued by enterprises. In another type of text, such as policy documents targeting individual citizens, the semantic tags corresponding to the statements may include, but are not limited to, "application conditions," "preferential treatment items," and "other." However, the sub-tags included in "application conditions" might be "years of service," "household registration," "industry," etc.
[0053] Therefore, it should be noted that the semantic tags mentioned above are merely examples for specific types of text. The semantic tags will differ depending on the target audience of the policy text, or even if it is not a policy text but rather a news article or analytical article published on a website. This embodiment does not exhaustively list these examples. Furthermore, it should be added that the solutions provided in this application embodiment only illustrate the extraction methods for two categories of tags. In specific implementations, third, fourth, and so on, categories of tags can be added. Different extraction strategies can be used for different categories of tags. The extraction strategies are not specifically limited in this embodiment.
[0054] More specifically, in one implementation scheme, the content interpretation module 10 can analyze the sentences in the text at the sentence level based on a classification model to classify all sentences in the text and assign semantic tags corresponding to each category. Then, the content interpretation module 10 can also use a first extraction model to extract words from sentences whose semantic tags belong to the first category, thereby extracting at least one first-category word. The aforementioned first extraction model can be understood as parsing each sentence at a finer granularity, such as words or phrases, compared to the sentence level.
[0055] The relation interpretation module 20 can use the second extraction model to extract words from sentences whose semantic tags belong to the second category of tags, so as to extract multiple second-category words; then, using the relation recognition model, combined with sentences whose semantic tags belong to the second category of tags, it can identify the relation information between any two second-category words among the multiple second-category words extracted by the second extraction model.
[0056] It should be noted that the first extraction model, the second extraction model, the relation recognition model, etc., mentioned above are not specifically limited in this embodiment. The specific implementation forms of each model will be illustrated with examples below.
[0057] In one feasible technical solution, a relational information may have a pre-defined relational expression template. Therefore, the expression module 30 can express the relationship between any two second-category words as a simplified relational expression based on the relational expression template corresponding to the relational information between any two second-category words interpreted by the relational interpretation module 20. Of course, there may be more than two second-category words with a relationship; there may be three or four. Therefore, when the expression template 30 performs the simplified expression, it can express these three, four, or more second-category words as simplified relational expressions according to the relational expression templates corresponding to the relational information of these three, four, or more second-category words. Furthermore, the expression module 30 is also used to generate a simplified expression of the text based on at least one first-category word of the text interpreted by the content interpretation module 10 and at least one simplified relational expression of the text obtained by the above process.
[0058] The recommendation module 40 can calculate the relevance between the text and the descriptive information of the target object based on synonym expansion models, normalization models, and computational models. It also uses a lightweight recommendation framework (such as a framework composed of recall and ranking models) to provide a simplified representation of the recommended text to the target object. In addition to sending the simplified representation of the recommended text to the target object, the original text can also be recommended simultaneously. The entity corresponding to the target object will differ depending on the type of text. For example, when dealing with policy texts about enterprises and organizations, the target object is the enterprise or organization itself. The descriptive information of the enterprise or organization may include, but is not limited to, its registered address, business scope, and registration date. Similarly, when dealing with policy texts about individual citizens or employees of enterprises and institutions, the target object is the individual citizen or employee's length of service, industry, etc.
[0059] The aforementioned synonym expansion model, normalization model, and computational model will be described in detail below.
[0060] Therefore, the technical solution provided in this application achieves precise interpretation of text sentences through the content interpretation module, interprets the relationship information between second-type words in the text through the relationship interpretation module 20, simplifies the expression of the text through the expression module 30, and recommends suitable text to the target audience through the recommendation module 40. The system technical architecture corresponding to the functions of the content interpretation module 10, relationship interpretation module 20, expression module 30, and recommendation module 30 is as follows: Figure 3a and Figure 3b As shown.
[0061] The technical solution provided in this embodiment, based on information technologies such as cloud computing, big data, and artificial intelligence, comprehensively utilizes language processing models and recommendation models to intelligently achieve precise interpretation of text content and relationships, accurately determining simplified expressions of the text (such as relational expressions related to application conditions and preferential policies in policy texts), and presenting them to target objects (such as corporate users, individual users, and organizations) in an intuitive and concise manner. Furthermore, the technical solution provided in this embodiment can also combine simplified expressions of the text (more specifically, at least one first-class word contained in the simplified expression of a document) with the target object's own descriptive information (such as publicly available corporate introduction information) to recommend suitable text to the target object, effectively avoiding the cold start problem caused by using sparse historical behavioral data for recommendation. The following will provide a detailed description of the technical solutions provided in each embodiment of this application to specifically illustrate how to solve the problems existing in the prior art.
[0062] The following describes the method embodiments provided in this application.
[0063] The execution entity of the text processing methods provided in the following embodiments can be a server, or a virtual server deployed on a server cluster, etc., and this embodiment does not specifically limit it. Specifically, it can be a computer program configured on the execution entity that has the corresponding functions of the modules in the above embodiments. Of course, if the client device has relatively strong computing power, the execution entity of the following method embodiments can also be a client device. Specifically, the client device can be a desktop computer, a laptop computer, a smart wearable device, etc.
[0064] Figure 2 A flowchart illustrating a text processing method provided in an embodiment of this application is shown. Figure 2 As shown, the method includes the following steps:
[0065] 101. Determine the semantic tags corresponding to multiple statements in the text;
[0066] 102. Extract at least one word from the first category of semantic tags in the statements;
[0067] 103. From statements whose semantic tags belong to the second category of tags, extract at least two second-category words and the relationship information between different second-category words;
[0068] 104. Generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words.
[0069] Taking the text in this embodiment as a policy text as an example, a policy text can specifically refer to various preferential policy texts (also known as support policy texts) issued for a certain jurisdiction or region to benefit the people and enterprises. Generally, preferential policy texts will contain key content such as the application conditions and preferential policies related to policy support, in order to guide and support the development of enterprises and talent entities through these key contents. It is evident that it is necessary to determine the key contents in the policy text, such as the application conditions and preferential policies related to policy support, so as to process the key contents in a subsequent manner and solve the problems existing in the prior art. Based on this, when the text mentioned in 101 above is a preferential policy text, the text contains at least: at least one statement with the semantic tag "application conditions", at least one statement with the semantic tag "preferential items", and so on.
[0070] In one feasible technical solution, in step 101 above, semantic tags corresponding to multiple sentences in the policy text can be obtained by analyzing the text content at the sentence level. Specifically, step 101, "determining the semantic tags corresponding to multiple sentences in the text," may specifically include:
[0071] 1011. Obtain the text;
[0072] 1012. Segment the text to obtain multiple sentences;
[0073] 1013. Using a classification model, the semantic tags corresponding to the multiple statements are identified.
[0074] Sometimes, two or more statements may have the same semantic tag. To simplify this, this embodiment may also include step 1014, which involves summarizing the statements with the same semantic tag.
[0075] In the above 1011, web crawlers (also known as web spiders or web robots) can be used to crawl open websites or platforms to obtain text that meets the requirements. Specifically, the entry point for crawling can be set to the homepage of a website or a webpage used for publishing information, etc. In addition, the entry point for crawling can also be the homepage of a third-party website on the Internet or a webpage used for publishing information on a third-party website, etc., which is not limited here. Furthermore, some crawling rules can be set to crawl only text that meets the rules, such as only crawling policy text containing document numbers, where the document number is the number of a document issued by a specific department, which is generated according to official regulations. In addition to obtaining policy text through the above-mentioned web crawling method, this embodiment can also use other methods to obtain it, such as manual import, system integration with the website or platform, etc., to obtain the required text, which is not specifically limited in this embodiment.
[0076] In the above 1013, the classification model can be a pre-trained machine learning model. This machine learning model can be built based on algorithms such as BERT (Bidirectional Encoder Representations from Transformers, a pre-trained model), SVM (Support Vector Machine), LSTM (Long Short-Term Memory, a recurrent neural network), GBDT (Gradient Boosting Decision Tree), etc., and is not limited here. Accordingly, the training process of this classification model can include the following steps:
[0077] Obtain training samples; the training samples include multiple statements and the sample labels belonging to each statement;
[0078] The multiple statements are used as input to the classification model, and the classification model is executed to obtain an output result containing semantic labels corresponding to the multiple statements;
[0079] The classification model is optimized based on the output results and the sample labels of each statement.
[0080] Alternatively, the classification model can be a rule-based model. Rule-based methods transform knowledge into rules, which are typically accurate but have poor scalability.
[0081] Machine learning models are mainly classified into the following two categories:
[0082] One type is machine learning models built based on machine learning algorithms, such as SVM and GBDT. These machine learning models are trained by manually defining model features and feeding those features into a classification algorithm.
[0083] Another type is classification algorithms based on deep learning, such as CNN (Convolutional Neural Networks), BERT, LSTM, etc. These algorithms can automatically learn the inherent relationship between data and categories, and can build feature libraries in combination with application scenarios without spending a long time.
[0084] Alternatively, the classification model may be a model built using a hybrid approach. For example, a model constructed by combining algorithms such as CNN, BERT, and LSTM. Another approach could be a model built by combining rule-based methods with machine learning algorithms. For instance, a rule-based method could be used for pre-filtering to analyze multiple sentences in the text and obtain semantic labels for each sentence. Then, the semantic labels obtained by the rule-based method, along with the text itself, could be used as input to a machine learning model to obtain the semantic labels for each sentence. Of course, a post-rule-based method can be added as a fallback. For example, the semantic labels obtained by the machine learning model could be used as input to this post-rule-based method to correct (or optimize) the semantic labels for each sentence in the text.
[0085] In step 1012 above, the text can first be segmented at the sentence level. Each segmented sentence is then input into a classification model, which identifies and analyzes each sentence to obtain its corresponding semantic tag. This sentence segmentation can be achieved using existing technologies, and this embodiment does not impose specific limitations. For example, for policy texts targeting enterprises and organizations, the semantic tags corresponding to the sentences in the policy text may include, but are not limited to: application conditions, preferential items, and others. Then, based on the semantic tags corresponding to each sentence and the policy text, sentences with the same semantic tags are summarized. Summarizing sentences with the same semantic tags in conjunction with the policy text includes operations such as merging and sorting. Specifically, sentences with the same semantic tags are merged, and then, according to their position in the policy text, the merged sentences with the same semantic tags are sorted.
[0086] For example, suppose that after classifying the text content in policy text A using a classification model, based on policy text A and the semantic tags corresponding to each sentence in policy text A obtained after classification, sentences with the same semantic tags are summarized to obtain the final result, such as:
[0087] Statements with the semantic tag "Application Conditions" include: I. Supported Entities Entities included in the Blue and Green Program must simultaneously meet the following basic conditions: (I) Established after June 1, 2011, by a team led by university teachers or research institute experts, registered and paying taxes in ** City, possessing corporate legal person status, and having a sound financial management system and accounting system. (II) University teachers or research institute experts invest in the company in the form of currency, intangible assets, etc., with an equity ratio of not less than 20% within one year after the company's registration, and the technological achievements used by the company are independently developed and have no intellectual property disputes. Simultaneously, the following necessary conditions must be met: 1. Manufacturing Headquarters. Refers to enterprises engaged in advanced manufacturing, with registered capital of not less than 50 million yuan and annual tax payment (local tax revenue, the same below) of not less than 10 million yuan in the previous year. 2. Service Industry Headquarters. Enterprises engaged in modern logistics, leisure tourism, retail trade, business exhibitions, scientific research and development, creative design, service outsourcing, e-commerce, equity investment, etc., with registered capital of not less than 10 million yuan and tax payment of not less than 5 million yuan in the previous year.
[0088] Statements with the semantic tag "preferential items" include: a reward of no more than 10% of the subsidy amount for enterprises implementing the patented technology will be given to patent holders who transfer patented technologies in ** City.
[0089] In policy text A, all statements except those with the semantic tag "application conditions" and "preferential items" can be labeled "other". Specific examples of statements with the semantic tag "other" will not be provided here.
[0090] In the example above, the statements labeled "application conditions" and "preferential items" can be used as key content in policy text A.
[0091] It should be noted that the classification model in this embodiment can be pre-written program code, application programs, functional modules, etc., and can be stored in a storage medium. When it is necessary to use the classification model to analyze the sentences in the text, the classification model can be called from the corresponding storage medium. For details, see [link to documentation]. Figure 3a The technical architecture of a text processing system is shown, which is a hierarchical architecture based on the system's principles. Figure 3a The illustrated technical architecture provides technical support for implementing each step of the text processing method described in this embodiment. For example... Figure 3a As shown, the system's technical architecture includes:
[0092] The data layer is used to interact with the database for data storage and retrieval; wherein, the database stores corpus data.
[0093] The language processing layer has at least one language processing model, used to optimize any language processing model based on the corpus obtained by the data layer; it is also used to perform semantic analysis on the input text using at least some of the at least one language processing model to determine the semantic tags corresponding to multiple sentences in the text; and extract at least one first-class word from sentences whose semantic tags belong to the first category of tags; extract at least two second-class words and the relationship information between different second-class words from sentences whose semantic tags belong to the second category of tags; and generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words.
[0094] The output layer is used to output a simplified representation of the text.
[0095] The data layer can interact with multiple databases, including but not limited to: basic thesaurus, industry thesaurus, stop word thesaurus, internet thesaurus, and other thesauruses. In addition to performing semantic analysis of text using at least one language processing model, the language processing layer also provides training algorithms. The executing entity can utilize the corpus provided by the database (i.e., words, sentences, etc. stored in each database) to optimize the at least one language processing model based on the training algorithms (e.g., adding, deleting, modifying, or training rules) to produce the required model, such as a classification model, a first extraction model, a second extraction model, or a relation recognition model. The optimized (or trained) model can be stored in a storage medium for later retrieval when needed.
[0096] Figure 3a The named entity recognition (NER) function described refers to identifying entities belonging to specific types from text, such as time, amount, and location. This is achieved by first identifying the entity's boundaries and then determining its category based on those boundaries. This NER function, similar to a classification model, is primarily based on three types of algorithms related to NER: rule-based methods, machine learning-based methods, and hybrid methods. Rule-based methods involve constructing rule templates and selecting features including statistical information, punctuation marks, keywords, indicator words, locative words, positional words (such as the last character), and head words. Combined with a named entity database, each rule is weighted, and the type is determined by the match between the entity and the rule (e.g., the semantic labels corresponding to sentences or words mentioned above). Machine learning-based methods utilize machine learning models, such as Hidden Markov Models, Maximum Entropy Models, Support Vector Machines, and Conditional Random Fields, to learn annotation models based on a large amount of labeled corpus, thereby labeling the entity type corresponding to each position in a sentence. Hybrid methods combine rule-based and model-based methods, as described above.
[0097] in, Figure 3a Machine Reading Comprehension (MRC), as illustrated, is a technology that uses algorithms to enable computers to understand the semantics of text and answer related questions. Following the mainstream model approaches of MRC and by separating and combining certain technical aspects, MRC models are categorized as follows: one-dimensional matching models, two-dimensional matching models, inference models, and other models. Among these, one-dimensional and two-dimensional matching models are foundational models, while inference models focus on the mechanisms for reasoning about text content. For more detailed implementations of one-dimensional matching models, two-dimensional matching models, and inference models, please refer to existing literature; these will not be elaborated upon here. Figure 3a The first extraction model can be implemented using named entity recognition or machine reading comprehension. In fact, the classification model can also be implemented using machine reading comprehension. This embodiment does not make a specific limitation on this.
[0098] As can be seen, the text processing system provided in this embodiment adopts a hierarchical system architecture design concept (such as...). Figure 3a As shown, the data layer can interact with the database to obtain corpora or store data; the language processing layer can be flexibly deployed with at least one language processing model, and a suitable language processing model can be selected for different types of text. Alternatively, a suitable language processing model can be selected based on actual accuracy, processing efficiency requirements, etc. For example, for official documents such as policy texts, a specific language processing model (such as a neural network model LSTM provided in machine learning methods) can be optimized (e.g., trained) using a dedicated official document corpus. This allows the optimized (or trained) language processing model suitable for policy texts to process the policy text and obtain a simplified expression of the policy text. For other types of text, such as news texts, an appropriate language processing model can be selected based on the characteristics of news texts to process the news text and obtain a corresponding simplified expression; and so on. The output layer is used to output the simplified expression of the text processed by the language processing layer for storage in a database or output to the corresponding client, etc. Furthermore, in the technical solutions provided in this application embodiment, more than one semantic processing model can be used for semantic analysis of text. As can be seen, the text processing system with a hierarchical system architecture design concept provided in this application embodiment is more flexible and can be flexibly deployed and replaced based on actual needs.
[0099] In this embodiment, step 102, "extracting at least one first-category word from statements whose semantic tags belong to the first category of tags," can be implemented using the aforementioned named entity recognition function or machine reading comprehension function. See [link to documentation]. Figure 3aAs shown. In other words, step 102 in this embodiment can be implemented using a first extraction model, which is built based on the aforementioned named entity recognition function. Specifically, step 102 in this embodiment, "extracting at least one first-category word from statements whose semantic tags belong to the first category of tags," includes:
[0100] 1021. Obtain the first extraction model;
[0101] 1022. Take the statement whose semantic tag belongs to the first category tag as the input of the first extraction model, and execute the first extraction model to obtain the at least one first category word.
[0102] For example, the first extraction model is built based on BERT and LSTM algorithms. After extracting at least one first-category word, this first extraction model can also identify the word tags corresponding to each first-category word. These word tags can be lower-level tags of the aforementioned first-category semantic tags. For example, lower-level tags of the semantic tag "application conditions" may include: business scope, registered location, etc.
[0103] It should be noted that the entities mentioned above can also be understood as the first type of words extracted from the statement. The word tags corresponding to these first type of words can be: business scope, time, amount, location, etc. In this embodiment, "entity" and "word" are simply different names for the same concept in different scenarios. The "entity" mentioned below can also be understood as a word with word tags, or more specifically, a first type of word with word tags.
[0104] The first category of words extracted using the first extraction model can carry the position of the first category of words in the sentence. Further, to improve the accuracy of first category word extraction, a well-fitting rule can be constructed to optimize the first category of words extracted based on the first extraction model, combined with the sentence containing the first category of words, to obtain at least one optimized first category of words. The well-fitting rule can be constructed by linguistic experts or technicians based on in-depth research and understanding of texts (such as a certain type of text, like policy texts). The optimized first category of words obtained through the above processing steps can be used to summarize the first category of words with word tags based on these at least one first category of words and their positions in the sentence. Similar to the sentence summarization mentioned above, the extracted first category of words with the same word tag are merged and sorted according to their order in the sentence and the order of the sentences.
[0105] It should be noted that the words in this embodiment, such as the first type of words and the second type of words, can be single characters, phrases composed of multiple characters, or word segments composed of multiple phrases, etc. This embodiment does not limit these. Not every word segment composed of any number of phrases or every phrase composed of any number of characters can be called a word as defined in this document. The phrases and word segments referred to in this document are those commonly used by the public in natural language. For example, "leisure tourism" is a word segment, while "business and R&D" is not.
[0106] Continuing with the policy text A shown in the example above, let's assume that the first extraction model extracts multiple first-category words from the first-category label of the sentence, such as: "founded by a team led by university teachers and experts from research institutes; engaged in advanced manufacturing; engaged in modern logistics, leisure tourism, commercial retail, business exhibitions, scientific research and development, creative design, service outsourcing, e-commerce, equity investment, etc.", and first-category words with the label "registered location", such as "**city". Further, based on in-depth research and understanding of the policy, let's assume that the rules for constructing the first and last words using the beginning-end construction method for the label "business scope" are: org_start (i.e., the first word in the sentence) = ['engaged in',.....], org_end (the last word in the sentence) = ['enterprise', 'logistics', 'tourism', 'retail', 'exhibitions', 'research and development', 'design', 'outsourcing', 'business', 'investment', "etc.".....]. Based on this rule and in conjunction with the corresponding statements, the first category of words with the tag "business scope" extracted by the first extraction model are optimized. It can be determined that the first category of words with the tag "business scope" such as "founded by a team led by university teachers and experts from research institutes" belongs to a category other than "business scope" tags. Therefore, the optimized first category of words with the tag "business scope" includes: engaged in advanced manufacturing, modern logistics, leisure tourism, retail trade, business exhibitions, scientific research and development, creative design, service outsourcing, e-commerce, equity investment, etc. Similarly, corresponding rules can be constructed for words corresponding to other tags (such as "registered location" and "registered capital"), which will not be elaborated upon in this paper.
[0107] It should be noted that the rules specifically shown in the above example for the word tag "business scope" are merely illustrative and do not represent the actual rules constructed. In other words, the constructed rules can also be other types of rules, and this embodiment does not limit them.
[0108] In one specific implementation, step 103 of this embodiment, "extracting at least two second-category words and relationship information between different second-category words from statements whose semantic tags belong to the second-category tags," may include the following steps:
[0109] 1031. Obtain the second extraction model and the relationship recognition model;
[0110] 1032. Using the statements whose semantic tags belong to the second category tags as input to the second extraction model, the second extraction model is executed to obtain the at least two second category words;
[0111] 1033. Using the at least two second-category words and the statement whose semantic label belongs to the second-category label as input to the relation recognition model, the relation recognition model is executed to obtain the relation information between any two second-category words among the at least two second-category words.
[0112] That is, at least two second-category words are extracted from statements whose semantic tags belong to the second category of tags using the second extraction model; then the statements whose semantic tags belong to the second category of tags and the extracted at least two second-category words are used as input to the relation recognition model, and the relation recognition model is executed to obtain the relation information between any two second-category words among the at least two second-category words.
[0113] For example, taking the statement in policy text A shown above whose semantic label belongs to the second category label (i.e., the statement in policy text A whose semantic label is "preferential item") as an example, using the second extraction model, word extraction processing is performed on statement a, which is "a reward of no more than 10% of the subsidy amount for enterprises implementing the patented technology will be given to patent holders who transfer patented technologies in ** City". This process identifies and analyzes two second-category words in statement a: "subsidy amount" and "10%". These two second-category words, "subsidy amount" and "10%", constitute the word pair corresponding to statement a. Inputting statement a and the word pair ("subsidy amount" and "10%") into the relation recognition model yields information reflecting the relationship between the two second-category words, "subsidy amount" and "10%", which is "multiplied by no more than". In practical implementation, these two second-category words and the associated information can be represented as a triple {"subsidy amount", "multiplied by no more than", "10%"}.
[0114] It should be noted that the aforementioned relation recognition model can be a machine learning model. Specifically, the relation recognition model can be built based on algorithms such as R-BERT (a derivative model of BERT for relation extraction). By training and optimizing the constructed machine model using training samples, a relation recognition model that meets the requirements can be obtained. This relation recognition model can be implemented based on two related algorithms: rule-based methods and machine learning-based methods. Rule-based relation recognition models refer to designing patterns containing lexical, syntactic, and semantic features according to the requirements of the extraction task, searching for second-class words that match these patterns during sentence analysis, and deriving the relationship information between two second-class words. Based on the degree of dependence on the training corpus, machine learning-based relation recognition models include the following three methods: unsupervised relation recognition models, supervised relation recognition models, and weakly supervised relation recognition models; among which...
[0115] The core idea of unsupervised relation recognition models is that if two words are used similarly and appear in the same context, then the meanings of the two words are similar. Similarly, if two entities have similar contexts, then the two entity pairs tend to have the same semantic relationship. Unsupervised relation recognition models can be used to discover new relations, but the relations they obtain do not contain semantic information.
[0116] Supervised relation recognition models treat relation recognition as a multi-classification task, extracting text feature vectors and using a supervised classifier for relation extraction. Existing supervised relation extraction methods can be categorized, but are not limited to, feature vector-based methods, kernel function-based methods, and neural network-based methods.
[0117] Weakly supervised relation recognition models can be divided into two frameworks. One framework uses techniques such as semi-supervised learning and active learning to reduce the cost and effort of improving extraction results. For example, it uses a small amount of labeled data to discover unlabeled data in the text and then manually labels these data. The other framework is based on the idea of back-labeling. It uses relation triples in the knowledge base to automatically label the text containing the entity as training data, thereby reducing the cost of manual labeling.
[0118] For example, the second extraction model in this embodiment can be, but is not limited to, a machine learning-based method for construction and training, while the relationship recognition model can be, but is not limited to, a deep learning-based supervised relationship recognition algorithm for construction and training.
[0119] Looking back Figure 3a The technical architecture diagram shown includes language processing models in the language processing layer, which may include, but are not limited to, the classification model, the first extraction model, the second extraction model, the relation recognition model, etc. mentioned above.
[0120] By obtaining at least one first-class word, at least two second-class words, and the relationship information between different second-class words through steps 102 and 103, a simplified representation of the text can be generated. Specifically, step 104 may include the following steps:
[0121] 1041. According to the relation expression template corresponding to the relation information, express at least two second-class words with the relation information as simplified relation expressions;
[0122] 1042. Generate a simplified representation of the text based on at least one first-class word and at least one simplified relation.
[0123] One type of relational information can correspond to one or two relational expression templates. The triples {second-class word 1, relational information, second-class word 2} extracted from the text may be multiple, and some triples may have the same relational information, while others may have different relational information. For each triple, the relational expression template corresponding to the relational information in that triple can be selected to express the triple as a simplified relation. For example, the simplified relation corresponding to the triple {“subsidy amount”, “multiplied by no more than”, “10%”} is: ≤“subsidy amount” multiplied by 10%.
[0124] In practical implementation, a simplified expression model can be constructed, containing multiple relation templates. A relation expression template refers to the expression rule constructed for a relation term in the relation lexicon that describes the relationship between two words, reflecting the two words and the relation term between them. The relation lexicon is a database specifically used to store various relation terms describing the relationship between two elements. For example, relation terms stored in the relation lexicon can be "multiplied by no more than", "multiplied by equal to", "increase not exceeding", etc., without limitation. When constructing the relation expression templates corresponding to each relation term in the relation lexicon, manual, automatic, or a combination of manual and automatic methods can be used. For example, the relation expression template corresponding to "multiplied by no more than" can be "<=A*B", the relation expression template corresponding to "multiplied by equal to" can be "=A*B", and the relation expression template corresponding to "increase not exceeding" can be "<=A+B".
[0125] Therefore, when using relational expression templates in the simplification model, one can first determine the relational expression template corresponding to each triple based on the relational terms (i.e., relational information) in at least one set of triples. Then, according to the relational expression templates corresponding to each triple, the simplified relational expressions corresponding to each triple are generated. For example, continuing the example above, the two second-category terms extracted from statement a in policy text A, "A reward of no more than 10% of the subsidy amount for patent holders who transfer patented technologies in Hangzhou," are "subsidy amount" and "10%." The relational term used to describe the relationship between "subsidy amount" and "10%" is "multiplied by no more than." Based on the relational template corresponding to "multiplied by no more than" in the simplification model, if it is "<=A*B," then the simplified relational expression reflecting the relationship between "subsidy amount" and "10%" can be generated as: "<=subsidy amount*10%." The generated simplified expression reflecting the relationship between "subsidy amount" and "10%" (i.e., "<= subsidy amount * 10%)" is the simplified expression corresponding to statement a, "A reward of no more than 10% of the subsidy amount will be given to the patentee who transfers the patent technology in Hangzhou." This simplified expression corresponding to statement a can, to a certain extent, intuitively reflect the preferential treatment provided by policy text A. Of course, the simplified expression corresponding to statement a can take other forms besides the formula shown above, such as a specific numerical form. For example, if the specific value of "subsidy amount" is known, the product between "subsidy amount" and "10%" can be further calculated. The resulting simplified expression corresponding to statement a is in numerical form. Specifically, if the value of "subsidy amount" is set to 20,000 yuan, then the simplified expression corresponding to statement a can be <= 2,000 yuan. This embodiment does not limit the specific form of the simplified expression.
[0126] Furthermore, step 1042 above, "generating a simplified representation of the text based on the at least one first-class word and at least one simplified relation," may include:
[0127] 10421. Obtain the post-processing algorithm;
[0128] 10422. Using the post-processing algorithm, post-process the at least one first-class word to obtain a summary expression;
[0129] 10423. Based on the summary expression and the at least one simplified relation, generate a simplified representation of the text.
[0130] The post-processing algorithm described above involves summarizing at least one first-category word with the same word type. For example, in the example given above, the first-category words tagged "business scope" include: engaged in advanced manufacturing, modern logistics, leisure tourism, retail trade, business exhibitions, scientific research and development, creative design, service outsourcing, e-commerce, and equity investment. After summarizing these first-category words, the summary expression is as follows:
[0131] Business scope: Engaged in advanced manufacturing, modern logistics, leisure tourism, commercial retail, business exhibitions, scientific research and development, creative design, service outsourcing, e-commerce, and equity investment.
[0132] Assuming it also contains a first-class word tagged with "registration location" and named **City; then based on the steps in 10423 above, the following simplified expression can be generated:
[0133]
[0134] Furthermore, the method provided in this embodiment may also include the following steps:
[0135] 105. Obtain the description information of the target object;
[0136] 106. Based on the described information and the simplified expression of multiple texts, determine the recommended text among the multiple texts;
[0137] 107. Send the simplified description corresponding to the recommended text to the client corresponding to the target object.
[0138] Before executing step 106, the description information of the target object can be preprocessed. This preprocessing may include, but is not limited to, synonym expansion and normalization. The normalization process refers to representing multiple words or tags that are synonyms using the same word or tag.
[0139] Assuming this embodiment is applied in a government-enterprise service scenario, where the target object is a company and the text is a policy document, the simplified representation of the text obtained through the above steps contains at least one first-class word and at least one simplified relational expression. The first-class word includes word tags and their corresponding values; for example, the word tag "registered location" corresponds to the value "**city". The descriptive information of the target object can also be preprocessed into a representation including word tags and their corresponding values to facilitate subsequent relevance calculations.
[0140] In the above step 105, the target counterpart may be an enterprise user of an enterprise type, or of course, other types of users, such as individual users, which is not limited here. The descriptive information of the target object can be preprocessed to obtain multiple third-category words for describing the target object. Similarly, the third-category words include word tags and their corresponding values. For example: the value corresponding to the word tag "enterprise name" is "** Company", the value corresponding to the word tag "registered place" is "** Country ** City", the value corresponding to the word tag "business scope" is "commercial retail", and so on.
[0141] In practical applications, the same content can be expressed in multiple ways. For example, "Beijing", "Jing", etc. can all refer to "Beijing City". In order to be able to recommend text to the target object more accurately in the future, the technical solution provided in this embodiment will perform operations such as synonym expansion and normalization on the words extracted from the descriptive information after obtaining the descriptive information of the target object. At the same time, operations such as synonym expansion and normalization will also be performed on the first-category words in the simplified expression of the text.
[0142] When specifically implementing, the words extracted from the descriptive information and the first-category words in the simplified expression of the text can be respectively first expanded with synonyms using a synonym model. After the synonym expansion process, multiple synonym sequences with similar meanings are obtained. It should be noted here that: in this embodiment, both the words extracted from the descriptive information and the first-category words in the simplified expression of the text contain word tags and their corresponding values. Therefore, when performing synonym expansion, the word tags can be expanded with synonyms, and at the same time, the values corresponding to the word tags can also be expanded with synonyms. For example, for a word in the descriptive information, the value corresponding to the word tag "business scope" is "commercial retail". After synonym expansion, the synonyms of the word tag "business scope" include: main business project, business project, industry, etc.; the synonyms of "commerce" include: trade, business, etc.; the synonyms of "retail" include: retail sale, trafficking, selling, etc.
[0143] The goal of synonym expansion is to enrich the expression of words so as to facilitate improving the recommendation accuracy in the future. Then, the multiple synonyms obtained after synonym expansion are normalized using a normalization model to standardize the synonyms with different expressions, that is, words with the same meaning but different expressions are represented by a unified standard word to achieve the normalization of synonyms.
[0144] For example, a word vector model is constructed based on the word2vec algorithm, and then the word vectors of the data in the database (such as the basic database, industry thesaurus, Internet thesaurus, etc.) are calculated using this word vector model; subsequently, the distance between two words is calculated based on the word vectors of the two words; two words with a distance less than a set threshold (the specific value is not specifically limited in this embodiment) are defined as synonyms; finally, these two words defined as synonyms are stored in the synonym thesaurus. Based on this synonym thesaurus, a synonym expansion model can be obtained, and using this synonym expansion model, the words extracted from the description information of the target object and the first type of words in the simplified expression of the text are respectively subjected to synonym expansion.
[0145] Using a normalization model, all the words expanded by synonyms are expressed as unified standard words. For example, synonyms: bulk selling, retail selling, retail, etc. are all expressed as "retail". Among them, the normalization model can be a machine learning model, such as a neural network model. For example, the word vectors of multiple words belonging to synonyms in the synonym thesaurus are used as the input of this neural network model, and the neural network model is executed to obtain an output result; then, based on the output result and the sample normalized words corresponding to the multiple words, the neural network model is optimized. The neural network model that has completed training can be used as the normalization model in this embodiment.
[0146] Correspondingly, in step 106 of this embodiment, "determine the recommended text in the multiple texts according to the description information and the simplified expressions of the multiple texts" includes:
[0147] 1061. Preprocess the description information and the simplified expressions of the multiple texts respectively.
[0148] Specifically, the preprocessing of the description information may include: extracting at least one word from the description information (here, the first extraction model mentioned above can also be used to achieve this), performing synonym expansion on the extracted word using the synonym expansion model, and then performing normalization processing on the multiple synonyms expanded by the synonym using the normalization model. Through the above preprocessing process, the standard word (or normalized expression) corresponding to each word included in the description information can be obtained.
[0149] The preprocessing of the simplified expression of the text can specifically be the preprocessing of at least one first type of word in the simplified expression of the text. The preprocessing process is the same as the above process to obtain the standard word (or normalized expression) corresponding to each first type of word respectively.
[0150] 1062. Calculate the relevance between the description information and each text for the at least one standard word corresponding to the preprocessed description information and the at least one standard word corresponding to each of the multiple texts.
[0151] The aforementioned relevance can also be referred to as matching degree, fit degree, etc. In specific implementation, the distance can be calculated based on the word vectors of at least one standard word corresponding to the descriptive information and the word vectors of at least one standard word corresponding to a text. The calculated distance can be directly used as the relevance between the descriptive information and the text. Alternatively, the calculated distance can be converted into a parameter representing the degree of relevance according to a preset conversion rule. In implementation, the word vectors of at least one standard word corresponding to the descriptive information and the word vectors of at least one standard word corresponding to a text can be embedded into the same vector space to calculate the distance.
[0152] In practice, a computational model can be used to calculate the relevance between descriptive information and text. The input to this model can be the word vectors of at least one standard word corresponding to the descriptive information and the word vectors of at least one standard word corresponding to a text. Executing the model outputs the distance. This computational model can be a model built based on machine learning algorithms, such as a neural network model. The training sample set includes multiple samples. Each sample includes: the word vectors of at least one standard word corresponding to the sample enterprise descriptive information, the word vectors of at least one standard word corresponding to the sample text, and the sample distance. During training, a sample can be used as the input to the neural network model, and the model is executed to obtain the output result. Based on the output result and the sample distance, the neural network model is optimized. After optimization, the next sample is obtained from the training sample set, and the above process continues until the output result and the sample distance meet a preset condition, indicating that the model has completed training.
[0153] It should be noted that the computational model mentioned above is not limited to the neural network model listed above, but can also be other types of models, which are not limited in this embodiment.
[0154] 1063. Based on the relevance of the described information to each text, determine the recommended text among the multiple texts.
[0155] The number of recommended texts can be multiple.
[0156] One possible implementation is to recall multiple texts that meet predefined relevance criteria, sort the multiple texts, and recommend the sorted texts to the target object.
[0157] The above process can be called a content-based recommendation algorithm, that is, a recommendation algorithm based on the distance between descriptive information and word vectors of each text. This algorithm does not suffer from the cold start problem. Furthermore, this algorithm is suitable for scenarios where text is recommended to enterprises or organizations, because in practical applications it is difficult to obtain behavioral information about enterprises or organizations, such as records of historical text browsing, collection, and downloads, making it difficult to combine historical behavioral information for text recommendation.
[0158] In other scenarios where historical behavior information of the target object can be obtained, such as when recommending policy texts to a single user, obtaining the user's historical behavior information (such as records of text viewed in the past) is not difficult. Therefore, when performing step 1063 above, texts similar to historical texts contained in the historical behavior information can be selected from multiple texts that meet the preset relevance conditions as recommended texts. The historical texts contained in the historical behavior information can be texts viewed by the target object at a certain historical moment, or texts that have been saved, downloaded, etc.
[0159] In scenarios where historical behavior information of the target object is available, another possible recommendation algorithm is content-based collaborative filtering. Collaborative filtering recommendation algorithms may also include: object-based collaborative filtering; text-based collaborative filtering; and model-based collaborative filtering, etc.
[0160] I. Object-based collaborative filtering
[0161] Simply put, it calculates the similarity between objects (such as users, businesses, etc.) and text based on their interactions (such as saving, downloading, viewing, etc.). For example, user A saved text a at time t1, viewed text b at time t2, and downloaded text c at time t3. User B downloaded text a at time t4, viewed text d at time t5, and viewed text c at time t6. User C downloaded text e at time t7, viewed text f at time t8, and viewed text g at time t9. Therefore, we can conclude that:
[0162] Both User A and User B have viewed, saved, or downloaded texts a and c.
[0163] Users A and C, as well as users B and C, have no overlap.
[0164] Therefore, it can be determined that users A and B are similar users; while users A and C, and users B and C are not similar users. Since users are similar, their text preferences have recommendation value; therefore, texts that similar users have historically viewed, saved, or downloaded can be used as recommended texts.
[0165] In this embodiment, step 1063 can integrate the content-based recommendation algorithm with the collaborative filtering algorithm to achieve text recommendation. Specifically, step 1063 can be defined as follows:
[0166] Based on the relevance of the description information to each text, and the similarity between the target object and other objects, a recommended text is determined from the plurality of texts.
[0167] That is, multiple texts whose relevance meets preset conditions are recalled as recommended texts, and texts that are preferred by objects whose similarity to the target object meets similarity conditions are recalled as recommended texts. The preferred texts can be determined based on the object's historical behavior information, which is not specifically limited in this document. For example, in the above example, user A and user B are similar users; user A is the target object in this embodiment, so text d viewed by user B at historical time t5 can be used as recommended text and recommended to user A.
[0168] The recalled recommended texts include texts that meet the predefined relevance criteria and texts that evoke similar object preferences. In practice, the intersection can also be taken during recall; for example, multiple texts that meet the predefined relevance criteria can be used as a first set, multiple texts that evoke similar object preferences can be used as a second set, and the intersection of the first and second sets can be used as the recommended texts.
[0169] II. Text-based Collaborative Filtering
[0170] Simply put, this involves clustering similar texts viewed, saved, or downloaded by the target audience over a historical period to analyze their text preferences and recommend texts that the target audience likes.
[0171] Accordingly, step 1063 above can be specifically described as follows:
[0172] Based on the relevance of the descriptive information to each text and the text preferences of the target object, a recommended text is determined from the plurality of texts.
[0173] III. Model-based Collaborative Filtering
[0174] Simply put, this involves building a filtering model that can predict the future behavior of a target object by learning from its historical behavioral information. For example, the target object's historical behavioral information includes text information viewed, downloaded, or saved during historical periods. The filtering model can use this historical behavioral information as samples to learn and predict the target object's preference for a particular text.
[0175] Accordingly, step 1063 above can be specifically described as follows:
[0176] Based on the relevance of the description information to each text, at least one first candidate text is determined among the plurality of texts;
[0177] The target object's historical behavior information and simplified descriptions of multiple texts are used as input parameters to the filtering model. The filtering model is executed to obtain at least one second candidate text preferred by the target object.
[0178] The recommended text is determined based on the at least one first candidate text and the at least one second candidate text.
[0179] Furthermore, the recommendation algorithm used in this embodiment can also be a knowledge-based recommendation algorithm. A knowledge-based recommendation algorithm provides recommended text according to a specified requirement (such as the text content requirement input by the target object, which can take the form of keywords, phrases, sentences, etc.) and pre-defined knowledge rules. If no corresponding recommended text exists, the requirement can be continuously refined and concretized through one or more interactions with the target object, so that recommended text can be found according to the pre-defined knowledge rules. Specifically, knowledge-based recommendation algorithms can include: constraint-based recommendation algorithms and instance-based recommendation algorithms.
[0180] I. Constraint-based recommendation algorithms recommend content that conforms to a set of recommendation rules to a target object. For example, after obtaining the target object's needs, at least one suitable recommendation rule is obtained from the set of recommendation rules based on those needs, and then text that conforms to the at least one recommendation rule is recommended to the target object.
[0181] Accordingly, step 1063 above can be specifically described as follows:
[0182] Based on the relevance of the description information to each text, at least one first candidate text is determined among the plurality of texts;
[0183] Obtain the demand information input by the target object at least once, and based on the demand information, obtain at least one suitable recommendation rule from the recommendation rule set, and recommend at least one second candidate text that conforms to the at least one recommendation rule for the target object;
[0184] The recommended text is determined based on the at least one first candidate text and the at least one second candidate text.
[0185] II. Instance-based recommendation algorithms retrieve text from multiple text sources that is similar to the needs of the target user and use it as recommended text. This algorithm is similar to a retrieval algorithm. The target user inputs their needs (such as keywords), and then retrieves text containing or similar content to those needs.
[0186] Accordingly, step 1063 above can be specifically described as follows:
[0187] Based on the relevance of the description information to each text, at least one first candidate text is determined among the plurality of texts;
[0188] Obtain the requirement information input by the target object at least once, and based on the requirement information, retrieve at least one second candidate text containing content similar to the requirement information from multiple texts;
[0189] The recommended text is determined based on the at least one first candidate text and the at least one second candidate text.
[0190] Furthermore, the recommendation algorithm that can be used in this embodiment can also be a combined recommendation algorithm. A combined recommendation algorithm uses two or more recommendation algorithms simultaneously, such as combining a collaborative filtering recommendation algorithm with a content-based recommendation algorithm. The more specific implementation steps of step 1063 were listed in the section introducing the collaborative filtering recommendation algorithm above, reflecting the concept of this combined recommendation algorithm. Similarly, the more specific implementation steps of step 1063 were also listed in the section introducing the knowledge-based recommendation algorithm above, reflecting the concept of combining knowledge-based and content-based recommendation algorithms.
[0191] It's important to note that the content-based, knowledge-based, and system-filtering recommendation algorithms described above can be used individually to recommend text to a target audience. The choice of which algorithm to use and how to combine them depends on factors such as recommendation accuracy requirements and the application scenario. For example, in recommending policy texts to businesses, because obtaining historical behavioral information about the businesses is difficult, a content-based recommendation algorithm would be chosen to perform the recommendation process.
[0192] Furthermore, the underlying functional modules of the method provided in this embodiment can be designed as low-dependency, decoupled recommendation functional modules. For example, a coarse recall module and a fine ranking module. These functional modules together form a lightweight recommendation framework, and each module can flexibly select various algorithms. In specific implementation, these functional modules, such as the coarse recall module, can be executable files edited in a computer language. Executing the executable file with the corresponding function completes the corresponding steps. That is, after recalling multiple recommended texts using the method described above, the fine ranking module (i.e., the executable file implementing the fine ranking function) can be called to sort the multiple recommended texts in reverse order. Finally, the top N recommended texts are pushed to the target object. The value of N can be a default value, such as the first 5 or 8, or a value set by the target object itself; this embodiment does not specifically limit this value.
[0193] It should be noted that when there are multiple recommended texts, they can be presented to the target audience in a list format. In practice, the recommendation information sent to the target audience can include only a simplified description of each recommended text and a link to each recommended file. Alternatively, the recommendation information sent to the target audience can include the full text of each recommended text, as well as a simplified description of each recommended text.
[0194] See Figure 3b The diagram shown represents the hierarchical architecture of the text processing system provided in this application. Figure 3a A recommendation layer is added to the existing structure. Building upon the language processing layer, data layer, and output layer described above, this embodiment adds a recommendation layer.
[0195] The language processing layer is also used to associate and store the text and its simplified representation in the database through the data layer.
[0196] The recommendation layer is located between the language processing layer and the output layer, and has at least one recommendation model for obtaining descriptive information of the target object; it is also used to perform relevance analysis on the descriptive information and simplified expressions of multiple texts stored in the database using at least some of the at least one recommendation model, and determine at least one recommended text to be recommended to the target object.
[0197] The output layer is used to output a simplified representation of the at least one recommended text recommended to the target object.
[0198] Specifically, the recommendation module may include, but is not limited to: models built using content-based recommendation algorithms, models built using collaborative filtering recommendation algorithms, models built using knowledge-based recommendation algorithms, models built using combined recommendation algorithms, and so on.
[0199] The above content is presented in a relatively theoretical and hardware-oriented manner. The text processing system provided in the following example includes: a database and a language processing engine. Among them,
[0200] Databases are used to store corpora;
[0201] A language processing engine for optimizing any one of at least one language processing models using corpora stored in the database;
[0202] The language processing engine is further configured to perform semantic analysis on the input text using at least a portion of the at least one language processing model to determine semantic tags corresponding to multiple sentences in the text; extract at least one first-class word from sentences whose semantic tags belong to a first-class tag; extract at least two second-class words and relational information between different second-class words from sentences whose semantic tags belong to a second-class tag; and generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relational information between different second-class words.
[0203] The database is also used to store the text and a simplified representation of the text.
[0204] Furthermore, the text processing system provided in this embodiment also includes:
[0205] A recommendation engine is used to obtain descriptive information of a target object; and to perform a relevance analysis on the descriptive information and simplified representations of multiple texts stored in the database using at least some of the models in at least one recommendation model, to determine at least one recommended text to be recommended to the target object.
[0206] The output module is used to output a simplified representation of the at least one recommended text recommended to the target object.
[0207] Figure 4 This illustration shows a flowchart of another text processing method provided in an embodiment of this application. The executing entity of this method can be a server, which can be a conventional server, a cloud server, or a virtual server, etc., and this embodiment does not specifically limit this. This embodiment is applicable to scenarios where policy texts are recommended to enterprise users. Figure 4 As shown, the method includes the following steps:
[0208] 201. Determine the semantic tags corresponding to multiple statements in the policy text;
[0209] 202. Extract at least one first-category word from statements whose semantic tags belong to the first category of tags;
[0210] 203. From statements whose semantic tags belong to the second category of tags, extract at least two second-category words and the relationship information between different second-category words;
[0211] 204. Based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words, generate a simplified representation of the text to be displayed to enterprise users.
[0212] Furthermore, the method provided in this embodiment may also include the following steps:
[0213] 205. Obtain description information of enterprise users;
[0214] 206. Based on the described information and simplified expressions of multiple policy texts, determine the recommended policy text from among the multiple policy texts;
[0215] 207. Send the simplified version of the recommended policy text to the client corresponding to the enterprise user.
[0216] For more detailed information on items 201 to 207 above, please refer to the corresponding descriptions above, which will not be repeated here.
[0217] Figure 5 A flowchart of a text processing method is also shown. Figure 5 The illustrated embodiments are written from the perspective of client-server interaction. Specifically, as shown... Figure 5As shown, the method includes:
[0218] 301. Receive request information sent by the target object through the client;
[0219] 302. Obtain the description information of the target object based on the request information.
[0220] The description information may be carried in the request information; or the request information may carry the identifier of the target object, and the execution subject of the method in this embodiment obtains the corresponding description information based on the identifier.
[0221] 303. Based on the description information and the simplified expression of multiple texts, determine the recommended text from the multiple texts; 304. Send the simplified expression of the recommended text to the client for display on the client.
[0222] The simplified representation of the text is generated based on at least one first-class word, at least two second-class words, and the relationship information between different second-class words. The at least one first-class word is extracted from sentences in the text whose semantic tags belong to the first-class tags, and the at least two second-class words and the relationship information between different second-class words are extracted from sentences in the text whose semantic tags belong to the second-class tags.
[0223] It should be noted that for more detailed information on each step of this embodiment, please refer to the corresponding descriptions above, which will not be repeated here. In addition to the steps described above, this embodiment may also include other steps mentioned above.
[0224] Figure 6 This application illustrates a text processing system according to an embodiment of the present application. The system provided in this embodiment is written from a hardware perspective. For example... Figure 6 As shown, the text processing system includes: server 401 and client 402; wherein,
[0225] Server 401 is used to determine the semantic tags corresponding to multiple statements in the text; extract at least one first-class word from statements whose semantic tags belong to the first category of tags; extract at least two second-class words and the relationship information between different second-class words from statements whose semantic tags belong to the second category of tags; generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words and the relationship information between different second-class words; and store the simplified representation of the text in a text simplified representation library.
[0226] Client 402 is used to send request information to server 401;
[0227] The server 401 is further configured to receive request information sent by the target object through the client 402; obtain description information of the target object according to the request information; determine a recommended text among the multiple texts according to the description information and a text simplification library; and send the simplified description of the recommended text to the client.
[0228] The client 402 is also used to display a simplified representation of the recommended text.
[0229] See Figure 6 As shown, in the technical solution provided in this embodiment, the server 401 can be a single server, a virtual server deployed on a server or server cluster, or a collection of computers based on cloud computing (i.e., the cloud). The cloud consists of a large number of hosts or network servers based on cloud computing, a type of distributed computing that comprises a super virtual computer composed of a group of loosely coupled computers. The client 402 can be, for example, a desktop computer, tablet computer, smartphone, smart wearable device (such as a smartwatch, glasses, etc.), etc.
[0230] It should be noted that any steps in the information recommendation system provided in this embodiment that are not described in detail can be found in the corresponding contents of the above embodiments, and will not be repeated here. Furthermore, the information recommendation system provided in this embodiment may include other parts or all of the steps in the above embodiments in addition to the steps described above; for details, please refer to the corresponding contents of the above embodiments, and will not be repeated here.
[0231] In summary, the technical solutions provided by the embodiments of this application can have at least the following beneficial effects:
[0232] For text, it can utilize language processing capabilities (such as text classification and entity recognition) and combine them with text characteristics to locate and extract words from the text, as well as extract information about the relationships between words. This allows for accurate, complete, and concise expression of the text, saving the target audience's reading time.
[0233] When recommending text to a target object, a content-based recommendation algorithm is used to recommend text to the target object based on its own descriptive information and the simplified expression of the text. This not only provides high recommendation accuracy but also avoids the cold start problem in the recommendation process.
[0234] The technical solutions provided in the embodiments of this application are more effective when applied to certain specific scenarios, such as recommending policy texts to enterprises or users, and can fill the technical gap in existing policy text recommendation.
[0235] Figure 7A schematic diagram of the structure of an electronic device provided according to an embodiment of this application is shown. Figure 7 As shown, the client device includes a memory 81 and a processor 82. The memory 81 can be configured to store various other data to support operation on the sensor. Examples of this data include instructions for any application or method used to operate on the sensor. The memory 81 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0236] The memory 81 is used to store one or more computer instructions;
[0237] The processor 82 is coupled to the memory 81 and is used to execute one or more computer instructions stored in the memory 81 to implement the steps in the text processing methods provided in the above embodiments.
[0238] Furthermore, such as Figure 7 As shown, the electronic device also includes other components such as a communication component 83, a power supply component 85, and a display 86. Figure 7 The diagram only shows some components and does not mean that the electronic device includes only these components. Figure 7 The components shown.
[0239] Accordingly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the text processing method steps or functions provided in the above embodiments.
[0240] This application also provides a computer program product, including a computer program that, when executed by a processor, enables the processor to implement the text processing method steps or functions provided in the above embodiments.
[0241] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0242] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0243] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A text processing method characterized by, include: Determine the semantic tags corresponding to multiple statements in the text; Extract at least one word from sentences whose semantic tags belong to the first category of semantic tags; Extract at least two second-category words and the relationship information between different second-category words from statements whose semantic tags belong to the second category of semantic tags; Based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words, a simplified representation of the text is generated. The simplified representations of the multiple texts are used together with the description information of the target object to determine the recommended text among the multiple texts. The simplified representation of the recommended text is used for output.
2. The method of claim 1, wherein, Based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words, a simplified representation of the text is generated, including: According to the relation expression template corresponding to the relation information, at least two second-class words with the relation information are expressed as simplified relation expressions; A simplified representation of the text is generated based on at least one first-class word and at least one simplified relation.
3. The method of claim 2, wherein, Based on at least one first-class word and at least one simplified relation, a simplified representation of the text is generated, including: Post-processing algorithm; Using the post-processing algorithm, the at least one first-class word is post-processed to obtain a summary expression; A simplified representation of the text is generated based on the summarizing expression and the at least one simplified relation.
4. The method according to any one of claims 1 to 3, characterized in that, Determine the semantic tags corresponding to multiple statements in the text, including: The text is segmented into sentences to obtain multiple sentences; Using a classification model, the semantic tags corresponding to the multiple statements are identified respectively; Summarize statements with the same semantic tags.
5. The method of claim 4, wherein, From statements whose semantic tags belong to the first category of semantic tags, extract at least one word from the first category, including: Obtain the first extraction model; The statement whose semantic tag belongs to the first category of semantic tags is used as the input of the first extraction model, and the first extraction model is executed to obtain the at least one first category word.
6. The method according to any one of claims 1 to 3, characterized in that, From statements whose semantic tags belong to the second category, extract at least two second-category words and the relationship information between different second-category words, including: Obtain the second extraction model and the relationship recognition model; The statement whose semantic tag belongs to the second category of semantic tags is used as the input of the second extraction model, and the second extraction model is executed to obtain the at least two second category words; The at least two second-category words and the statement whose semantic label belongs to the second-category semantic label are used as input to the relation recognition model, and the relation recognition model is executed to obtain the relation information between any two second-category words among the at least two second-category words.
7. The method according to any one of claims 1 to 3, characterized in that, Also includes: Obtain the description information of the target object; Based on the description information and simplified representations of multiple texts, a recommended text is determined from the multiple texts; The simplified description corresponding to the recommended text is sent to the client corresponding to the target object.
8. A text processing method characterized by, include: Determine the semantic tags corresponding to multiple statements in the policy text; Extract at least one word from sentences whose semantic tags belong to the first category of semantic tags; Extract at least two second-category words and the relationship information between different second-category words from statements whose semantic tags belong to the second category of semantic tags; Based on the at least one first-class word, the at least two second-class words, and the relationship information between different second-class words, a simplified description of the text to be displayed to enterprise users is generated. The simplified descriptions of multiple texts, together with the description information of the target object, are used to determine the recommended text among the multiple texts. The simplified description of the recommended text is then output.
9. The method of claim 8, wherein, Also includes: Obtain description information of enterprise users; Based on the described information and simplified expressions of multiple policy texts, a recommended policy text is determined from among the multiple policy texts; The simplified version of the recommended policy text is sent to the client corresponding to the enterprise user.
10. A text processing system, characterized by include: The data layer is used to interact with the database for data storage and retrieval; wherein, the database stores corpus data. The language processing layer has at least one language processing model, used to optimize any language processing model based on the corpus obtained by the data layer; it is also used to perform semantic analysis on the input text using at least a portion of the at least one language processing model to determine the semantic tags corresponding to multiple sentences in the text; and to extract at least one first-class word from sentences whose semantic tags belong to a first-class semantic tag; to extract at least two second-class words and relational information between different second-class words from sentences whose semantic tags belong to a second-class semantic tag; and to generate a simplified representation of the text based on the at least one first-class word, the at least two second-class words, and the relational information between different second-class words. The simplified representations of the multiple texts are used together with the description information of the target object to determine recommended text among the multiple texts, and the simplified representations of the recommended text are used for output. The output layer is used to output a simplified representation of the text.
11. The system of claim 10, wherein, Also includes: The language processing layer is also used to associate and store the text and its simplified representation in the database through the data layer; The recommendation layer, located between the language processing layer and the output layer, has at least one recommendation model for obtaining descriptive information of the target object; it is also used to perform relevance analysis on the descriptive information and simplified expressions of multiple texts stored in the database using at least some of the at least one recommendation model, to determine at least one recommended text to be recommended to the target object. The output layer is used to output a simplified representation of the at least one recommended text recommended to the target object.
12. A text processing system, characterized by include: Databases are used to store corpora; A language processing engine for optimizing any one of at least one language processing models using corpora stored in the database; The language processing engine is also used to perform semantic analysis on the input text using at least some of the at least one language processing model, so as to determine the semantic tags corresponding to multiple sentences in the text respectively. From statements whose semantic tags belong to the first category of semantic tags, at least one first-category word is extracted; from statements whose semantic tags belong to the second category of semantic tags, at least two second-category words and relational information between different second-category words are extracted; based on the at least one first-category word, the at least two second-category words, and the relational information between different second-category words, a simplified representation of the text is generated; the simplified representations of multiple texts are used together with the description information of the target object to determine the recommended text among the multiple texts; the simplified representation of the recommended text is used for output. The database is also used to store the text and a simplified representation of the text.
13. The system of claim 12, wherein, Also includes: A recommendation engine is used to obtain descriptive information of a target object; and to perform a relevance analysis on the descriptive information and simplified representations of multiple texts stored in the database using at least some of the models in at least one recommendation model, to determine at least one recommended text to be recommended to the target object. The output module is used to output a simplified representation of the at least one recommended text recommended to the target object.
14. An electronic device, comprising: It includes a memory and a processor; the memory is used to store one or more computer instructions, which, when executed by the processor, can implement the steps of the text processing method according to any one of claims 1 to 7, or the steps of the text processing method according to claim 8 or 9.