Rectification measure acquisition method, electronic equipment and medium

By integrating enterprise data, constructing a knowledge graph, and combining sentiment analysis and reinforcement learning, rectification measures were generated, which solved the problems of ambiguous problem identification and inefficient measure matching in the inspection and rectification process, and improved the effectiveness and efficiency of the rectification work.

CN120996166APending Publication Date: 2025-11-21CHONGQING CHINA TOBACCO IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510869939.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-11-21

Smart Images

  • Figure CN120996166A_ABST
    Figure CN120996166A_ABST
Patent Text Reader

Abstract

The invention provides a rectification measure acquisition method, electronic equipment and a medium. The method comprises the steps that attribute extraction, entity extraction and relation extraction are conducted on unstructured data through a first large language model, and a first information set is obtained; performing knowledge merging on the unstructured data to obtain a second information set; performing knowledge fusion on the first information set and the second information set to obtain a third information set, constructing to obtain a knowledge graph, and performing emotional tendency evaluation on the third information set by adopting an emotional analysis algorithm to obtain an emotional result; determining a problem feature vector related to the rectification problem from the third information set; matching the problem feature vector, the nodes in the knowledge graph and the relationship to obtain a rectification measure candidate set; and inputting the rectification measure candidate set into the second large language model subjected to reinforcement learning to obtain a final rectification measure set, so that automatic generation of rectification measures is facilitated, and the effect and efficiency of rectification work are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a rectification measure obtaining method, an electronic device and a medium. BACKGROUND

[0002] The purpose of the inspection and rectification work is to identify problems existing in enterprises or organizations, and to develop and implement effective rectification measures. However, in the actual rectification process, the problem analysis and the formation of rectification measures are usually carried out according to manual experience, which requires high professional knowledge of the operating personnel, and there are still problems such as fuzzy problem identification, low-efficiency and lagging measure matching, which affect the effect and efficiency of the inspection and rectification work. SUMMARY

[0003] Therefore, the purpose of the embodiments of the present application is to provide a rectification measure obtaining method, an electronic device and a medium, which can improve the effect and efficiency of the rectification work.

[0004] To achieve the above technical purpose, the technical scheme adopted by the present application is as follows:

[0005] In a first aspect, the embodiments of the present application provide a rectification measure obtaining method, which comprises:

[0006] Obtaining a first data set after preprocessing, the first data set comprising structured data and unstructured data related to an enterprise;

[0007] Performing attribute extraction, entity extraction and relationship extraction on the unstructured data by a first large language model to obtain an information set as a first information set;

[0008] Performing knowledge merging on the unstructured data to obtain a second information set;

[0009] Performing knowledge fusion on the first information set and the second information set to obtain a third information set;

[0010] Based on the third information set, a knowledge graph is constructed, and a sentiment analysis algorithm is used to evaluate the sentiment tendency of the third information set to obtain a sentiment result;

[0011] Based on the sentiment result, a problem feature vector related to the rectification problem is determined from the third information set;

[0012] Matching the problem feature vector, the nodes and the relationships in the knowledge graph to obtain a rectification measure candidate set;

[0013] Inputting the rectification measure candidate set into a second large language model subjected to reinforcement learning to obtain a final rectification measure set.

[0014] With reference to the first aspect, in some optional embodiments, the attribute extraction, entity extraction, and relation extraction are performed on the unstructured data by the first large language model to obtain a first information set, including:

[0015] The text of the unstructured data is divided into subtext units;

[0016] The subtext units are input into the first large language model, and a first candidate keyword related to an attribute is determined for a word in the subtext unit by a multi-head attention module in the first large language model;

[0017] Based on the multi-head attention module, the first candidate keyword with an association degree greater than a first threshold value with the attribute is determined as a first target keyword, and the association degree is taken as a value of the first target keyword to form an attribute-value pair set;

[0018] Based on the parameters for entity recognition pre-trained by the first large language model, a second candidate keyword related to an entity is determined for a word in the subtext unit by the multi-head attention module, and a second candidate keyword with an association degree greater than a second threshold value with the entity is selected as a second target keyword to obtain an entity set;

[0019] The subtext unit containing any entity in the entity set is input into the first large language model to obtain a relationship between entities to form a relationship set, and the first information set is formed based on the attribute-value pair set, the entity set, and the relationship set.

[0020] With reference to the first aspect, in some optional embodiments, knowledge fusion is performed on the first information set and the second information set to obtain a third information set, including:

[0021] The first information set and the second information set are subjected to coreference resolution and entity disambiguation for knowledge fusion to obtain the third information set.

[0022] With reference to the first aspect, in some optional embodiments, a sentiment analysis algorithm is used to perform sentiment tendency evaluation on the third information set to obtain a sentiment result, including:

[0023] The sentiment tendency evaluation on the third information set is performed by a logistic regression model using the following formula, represented as:

[0024]

[0025] In the formula, P(y=1|x) represents the probability of positive sentiment given the feature vector x; y is a sentiment tendency label; x={x1,…,xn} is a feature vector of information i, n is the number of feature vectors, and information i is any information in the third information set; the third information set is represented as I = {i1, …, i p}, p represents the number of information; e is a natural constant; β0is an intercept term; β1to β n are model parameters;

[0026] Based on the term frequency-inverse document frequency formula, the importance of information in the third information set is determined, represented as:

[0027] TF_IDF(t, d) = TF(t, d) · IDF(t)

[0028]

[0029] In the formula, TF_IDF(t, d) represents the importance of word t in information in the third information set in document d; TF(t, d) represents the term frequency of word t in document d in the information in the third information set; N is the total number of documents in the third information set; the number of documents containing word t in the third information set;

[0030] The probability of the positive sentiment and the importance of the information are used as the sentiment result.

[0031] In combination with the first aspect, in some optional embodiments, based on the third information set, a knowledge graph is constructed, including:

[0032] Entities in the third information set are used to construct a node set;

[0033] Based on the relationship type between entities in the third information set, a set of edges is created;

[0034] Based on the set of edges and the node set, the knowledge graph is created, represented as:

[0035] G = (V, E)

[0036] G represents the knowledge graph;

[0037] V = {v1, …, v q}, represents the node set; q represents the number of nodes;

[0038] E = {(v i ,r j ,v k )}, represents the set of edges; (v i ,r j ,v k ) represents that node v i is connected to node vk There is a relationship r between them j .

[0039] In combination with the first aspect, in some optional embodiments, based on the sentiment result, a problem feature vector related to the rectification problem is determined from the third information set, including:

[0040] From the sentiment result, a sentiment result related to the rectification problem is determined as a target sentiment result;

[0041] The information corresponding to the target sentiment result in the third information set is taken as key information corresponding to the rectification problem;

[0042] The key information is converted into a feature vector to form the problem feature vector.

[0043] In combination with the first aspect, in some optional embodiments, in the second large language model, a defined state space S, an action space A, a reward function R and a policy function π are included; a state s∈S, the state s includes the problem feature vector and the rectification measure candidate set; an action a∈A, representing a rectification measure in the rectification measure candidate set; a reward function R(a,s) is used to obtain a reward according to the state s and the action a of the rectification measure; and the policy function π(a|s) represents the probability of taking the action a under the state s.

[0044] In combination with the first aspect, in some optional embodiments, the structured data includes financial statement data, personnel information data and business process data of an enterprise;

[0045] The unstructured data includes a tour work report text and a meeting record document of an enterprise.

[0046] The second aspect, the embodiments of the present application also provide an electronic device, the electronic device includes a processor and a memory coupled with each other, the memory stores a computer program, when the computer program is executed by the processor, the electronic device executes the above-mentioned method.

[0047] The third aspect, the embodiments of the present application also provide a computer readable storage medium, the computer readable storage medium stores a computer program, when the computer program runs on the computer, the computer executes the above-mentioned method.

[0048] The application with the above technical scheme has the following advantages:

[0049] In the technical solutions provided in the present application, by integrating structured and unstructured data, combining the entity / relation extraction capability of a large language model, comprehensive analysis of complex enterprise data is realized, and the problem of insufficient processing of unstructured text by traditional methods can be solved; the constructed knowledge graph can dynamically reflect the relevance of enterprise problems and provide visual decision support for rectification; the introduction of sentiment analysis to evaluate data tendency, combined with a feature vector matching mechanism, ensures that the candidate set of rectification measures is more in line with the actual problem scenario, such as the consideration of subjective factors of construction personnel in engineering rectification; the secondary screening of the large language model optimized through reinforcement learning can improve the feasibility and pertinence of the rectification measures; in this way, the closed-loop processing from data collection to measure generation of the present application has the advantages of automated analysis, which is conducive to quickly identifying problems and forming rectification measures, and thus is conducive to improving the effect and efficiency of rectification work. BRIEF DESCRIPTION OF DRAWINGS

[0050] The present application can be further illustrated by the non-limiting embodiments shown in the accompanying drawings. It should be understood that the following drawings only show certain embodiments of the present application, and therefore should not be considered as limiting the scope, and other related drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.

[0051] Figure 1 A flowchart of a rectification measure acquisition method provided by an embodiment of the present application.

[0052] Figure 2 A technical architecture diagram of the rectification measure acquisition method provided by an embodiment of the present application. DETAILED DESCRIPTION

[0053] The present application will be described in detail below in conjunction with the drawings and specific embodiments. It should be noted that in the drawings or description, similar or identical parts are denoted by the same reference numerals, and the implementation modes not shown or described in the drawings are in the form known to those skilled in the art. In the description of the present application, the terms "first", "second", etc. are only used for differentiation and cannot be understood as indicating or implying relative importance.

[0054] An electronic device is provided by an embodiment of the present application, which can include a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device can execute the corresponding steps in the following rectification measure acquisition method. The electronic device can be, but is not limited to, a personal computer, a server, etc.

[0055] Please refer to Figure 1 and Figure 2 The present application also provides a rectification measure acquisition method, which can be applied to the above-mentioned electronic device. The rectification measure acquisition method can include the following steps:

[0056] In step 110, a pre-processed first data set is obtained, the first data set including structured data and unstructured data related to an enterprise;

[0057] In step 120, attribute extraction, entity extraction, and relation extraction are performed on the unstructured data by a first large language model to obtain an information set as a first information set;

[0058] In step 130, knowledge merging is performed on the unstructured data to obtain a second information set;

[0059] In step 140, knowledge fusion is performed on the first information set and the second information set to obtain a third information set;

[0060] In step 150, a knowledge graph is constructed based on the third information set, and a sentiment analysis algorithm is used to evaluate the sentiment tendency of the third information set to obtain a sentiment result;

[0061] In step 160, based on the sentiment result, a problem feature vector related to the rectification problem is determined from the third information set;

[0062] In step 170, the problem feature vector, nodes and relationships in the knowledge graph are matched to obtain a rectification measure candidate set;

[0063] In step 180, the rectification measure candidate set is input into a second large language model that has undergone reinforcement learning to obtain a final rectification measure set.

[0064] The steps of the rectification measure acquisition method will be described in detail as follows:

[0065] In step 110, the first data set is a pre-processed data set prepared by an operator in advance. The acquisition of the first data set and the pre-processing method are both conventional methods.

[0066] For example, for obtaining a diversified raw data set from different sources (the raw data set containing structured data and unstructured data), the pre-processing method can include data cleaning to remove noise and duplicate data in the raw data, data formatting to convert the data to a unified format, data standardization to normalize the data, and the like to ensure the quality and consistency of the data. The pre-processed data set is used as the first data set and exists in the cloud or locally. The electronic device can obtain the first data set from the cloud server or locally.

[0067] The structured data includes, but is not limited to, financial statement data of an enterprise (such as total assets, total liabilities, and owner's equity in the balance sheet, operating income, operating cost, and net profit in the profit statement), personnel information data (such as employee number, name, department, position, employment time, salary level, performance evaluation result, and other structured fields), business process data (purchase order number, order date, supplier number, commodity type and quantity, purchase amount, acceptance status, sales order number, customer number, sales date, delivery time, and collection situation), and discipline inspection case account data (case number, case type, case filing time, processing progress, involved personnel, involved amount, and processing result).

[0068] The unstructured data includes, but is not limited to, enterprise inspection work report texts (such as descriptions of work inspections of departments of the enterprise, elaborations of discovered problems, and related suggestions), employee reporting email contents (reporting event descriptions, involved personnel, and time clues), conference record documents (conference theme, discussion content, decision matters, and speeches of participants), discipline inspection conversation audio transcription texts (conversation content of both parties, and related expressions of tone and emotion), and discussion posts of an enterprise internal forum on management problems (post text, reply content, and user comments).

[0069] In step 120, attribute extraction, entity extraction, and relation extraction are performed on the unstructured data by a first large language model to obtain an information set as a first information set, including:

[0070] The text of the unstructured data is divided into subtext units;

[0071] The subtext units are input into the first large language model, and a first candidate keyword related to an attribute of a word in the subtext unit is determined by a multi-head attention module in the first large language model;

[0072] Based on the multi-head attention module, the first candidate keyword with an association degree with the attribute greater than a first threshold value is determined as a first target keyword, and the association degree is taken as a value of the first target keyword to form an attribute-value pair set;

[0073] Based on parameters for entity recognition pre-trained by the first large language model, a second candidate keyword related to an entity of a word in the subtext unit is determined by the multi-head attention module, and a second candidate keyword with an association degree with the entity greater than a second threshold value is selected as a second target keyword to obtain an entity set;

[0074] The subtext unit containing any entity in the entity set is input into the first large language model to obtain the relationship between entities, form a relationship set, and form the first information set based on the attribute-value pair set, the entity set, and the relationship set.

[0075] In this embodiment, the implementation process of attribute extraction can be: dividing the text of the unstructured data into subtext units T i , then inputting each subtext unit into a first large language model (LLM), which calculates the correlation degree of each word and an attribute key word (such as a preset attribute key word set A key , such as "amount", "time", "person in charge", etc.) through a multi-head attention mechanism. Taking a large language model with a Transformer architecture as an example, the attention score Attention i (w, a) of the word vector w in the subtext unit T attr and the attribute key word vector a is calculated.

[0076]

[0077] In the formula, w is the word vector in the subtext unit T i ; a is the attribute key word vector; K attr and V attr are the key vector and value vector corresponding to the attribute key word, respectively; and d k is the key vector dimension. The words with high correlation degree with the attribute key word are selected according to the attention score, combined into attribute values, and an attribute-value pair set is formed. For example, if the text contains "the amount of this purchase is 500,000 yuan", the attribute "amount" and its corresponding value "500,000 yuan" can be extracted through the above calculation.

[0078] Entity extraction process: based on the attribute-value pair set and the subtext unit T i , the model calculates the correlation degree of each word and an entity type (such as a preset entity type set, such as "enterprise department", "person name", "rectification task name", etc.) again through a pre-trained named entity recognition (NER) related parameter and a multi-head attention mechanism. The calculation method is similar to the attention score calculation in attribute extraction, and the entities in the text are identified according to the score to form an entity set. For example, from the text "Zhang San of the finance department is responsible for this rectification task", the entities "finance department" (enterprise department type), "Zhang San" (person name type), and "this rectification task" (rectification task name type) can be identified.

[0079] Relationship extraction process: based on the entity set, the subtext unit T jThe first large language model is inputted, and the semantic correlation between entities is calculated through a multi-head attention module. The first large language model learns the patterns of entity relationships in a large amount of text, and calculates the attention scores between entity vectors:

[0080]

[0081] where e1 and e2 are the vector representations of the two entities, respectively; K rel and V rel are the key vector and value vector for relationship calculation, respectively; d k is the dimension of the key vector. According to the scores and a pre-defined set of relationship types, the relationship between entities is determined, forming a set of relationships. For example, for "Zhang San is responsible for this rectification task", it can be determined that there is a "responsible" relationship between "Zhang San" and "this rectification task". Finally, the attribute-value pair set, entity set and relationship set constitute the extracted key information and feature vector set, which is the first information set.

[0082] It should be noted that each type of information in the first information set needs to be merged with knowledge. The way of knowledge merging can be as follows:

[0083] For entities of the same type, attributes from different data sources are merged. For example, for a "person" entity, if the "violation behavior description" attribute of a certain person is extracted from unstructured data, and the "department" and "position" attributes of the person are extracted from structured data, they are merged into a complete person entity information. The knowledge merging is performed by combining rules and machine learning. For explicit attribute merging rules (such as date format unified to "YYYY-MM-DD", numerical unit unified to standard unit, etc.), a rule engine is used for processing; for complex semantic fusion, a machine learning model (such as a Transformer-based sequence-to-sequence model) is used for processing. In the rule engine processing stage, if the date format in the structured data is "MM / DD / YYYY", it is automatically converted to the unified format; in the machine learning model processing stage, for semantically ambiguous attribute descriptions, such as "important project" in unstructured data and "core business" in structured data, the model learns a large amount of corpus to determine that the two have similar semantics and are merged. Finally, the merged first information set is obtained.

[0084] In step 130, knowledge merging is performed on the structured data to extract knowledge from the preprocessed structured data. The knowledge merging manner can be flexibly handled according to actual conditions. For example, by data parsing, the numerical indicators in the financial statement data are associated with the related transaction data in the business process data, such as corresponding the purchase order amount with the accounts payable in the financial statement; the employee position in the personnel information data is matched with the project leader information involved in the business process. For the same type of data table, such as the personnel information tables of multiple departments, data merging is performed through unique identifiers such as employee numbers to remove duplicate records and supplement missing information, so as to realize knowledge merging on the structured data and obtain a second information set.

[0085] In step 140, knowledge fusion is performed on the first information set and the second information set to obtain a third information set, including:

[0086] The first information set and the second information set are subjected to co-reference resolution and entity disambiguation to perform knowledge fusion to obtain the third information set.

[0087] In the embodiment, the processing flow of co-reference resolution can be: in the data information, different expressions pointing to the same real world object are identified. By calculating the semantic similarity between the entity expressions mentioned in the text, the cosine similarity formula is used, which is represented as:

[0088]

[0089] In the formula, CosineSimilarity(v1, v2) represents the similarity between entities v1 and v2; v1 and v2 are the vector representations of two entity expressions (which can be generated by the word vector of a large language model); ||v1|| and ||v2|| are the norms of the vectors, respectively. For example, set the similarity threshold θ (such as 0.8), when the cosine similarity of two entity expressions is greater than θ, it is determined that there is a co-reference relationship, and they are merged into the same entity expression. For example, “Zhang manager” and “Zhang San manager” are merged into the same entity by calculating the vector similarity higher than the threshold.

[0090] The processing flow of entity disambiguation can be: for entities with the same name but different meanings, the context information and related knowledge in the knowledge graph are used for differentiation. The ambiguous entity and the context text are input into a large language model, and the model calculates the correlation degree of the entity and different candidate entities in the knowledge graph according to the pre-trained knowledge and the current context. The correlation degree calculation can refer to the score calculation method in the attention mechanism, and the candidate entity with the highest correlation degree is selected as the real reference of the ambiguous entity to eliminate ambiguity. For example, “apple” may refer to a fruit or a company. Through the context “the company released a new product this year”, combined with the related information of “Apple Inc.” in the knowledge graph, it is determined that “apple” refers to “Apple Inc.”.

[0091] After coreference resolution and entity disambiguation, a third information set is obtained.

[0092] In step 150, based on the third information set, a knowledge graph is constructed, including:

[0093] The entities in the third information set are constructed into a node set;

[0094] Based on the relationship types between the entities in the third information set, a set of edges is created;

[0095] Based on the set of edges and the set of nodes, the knowledge graph is created, represented as:

[0096] G=(V,E) (4)

[0097] G represents the knowledge graph, which is a directed graph;

[0098] V={v1,…,v q} represents the node set; q represents the number of nodes;

[0099] E={(v i ,r j ,v k )} represents the set of edges; (v i ,r j ,v k ) represents that there is a relationship r i between node v k and node v j , such as “responsible for”, “associated with”, “term”, etc. Node v i may represent related entities of the inspection and rectification task, such as rectification tasks, responsible persons, rectification periods, etc.

[0100] In the knowledge graph construction process, entities are identified as nodes from the processed data by an entity extraction algorithm, and the relationships between entities are determined as edges by a relationship extraction algorithm. For example, from the processed data, three entities "Zhang San", "purchase process rectification task", and "December 31, 2024" are extracted, and two relationships "Zhang San is responsible for the purchase process rectification task" and "the purchase process rectification task is due on December 31, 2024" are determined. "Zhang San", "purchase process rectification task", and "December 31, 2024" are added to the node set as nodes, and "(Zhang San, responsible, purchase process rectification task)" and "(purchase process rectification task, due on, December 31, 2024)" are added to the edge set as edges. The entity extraction algorithm is a conventional algorithm, which will not be described here.

[0101] In step 150, a sentiment analysis algorithm is used to evaluate the sentiment tendency of the third information set, and a sentiment result is obtained, including:

[0102] By using a logistic regression model, the sentiment tendency of the third information set is evaluated by the following formula, which is represented as:

[0103]

[0104] In the formula, P(y=1|x) represents the probability of positive sentiment given the feature vector x; y is a sentiment tendency label, for example, y=1 represents positive sentiment, and y=0 represents negative sentiment; x={x1,…,x n} is the feature vector of information i, such as word vector or other representation, n is the number of feature vectors, and information i is any information in the third information set; the third information set is represented as I={i1,…,i p}, and p represents the number of information; e is a natural constant; β0 is the intercept term; β1 to β n are model parameters;

[0105] Based on the term frequency-inverse document frequency (TF-IDF) formula, the importance of information in the third information set is determined, which is represented as:

[0106] TF_IDF(t,d)=TF(t,d)·IDF(t) (6)

[0107]

[0108] In the formula, TF_IDF(t,d) represents the importance of word t in document d in the information in the third information set; TF(t,d) represents the term frequency of word t in document d in the information in the third information set; N is the total number of documents in the third information set; and the number of documents containing word t in the third information set;

[0109] The probability of the positive sentiment, the importance of the information, as the sentiment result.

[0110] Understandably, the higher the TF_IDF(t, d) value, the higher the importance of the word t in the document d, and further evaluate the importance of the information. For example, for the information "frequent violation operation", the sentiment tendency is calculated by the logistic regression model as negative, and then the importance of the information is evaluated by using the TF-IDF formula. If the word frequently appears in the document and less appears in other documents, the TF-IDF value is high, indicating that the information is important.

[0111] In step 160, based on the sentiment result, the problem feature vector related to the rectification problem is determined from the third information set, including:

[0112] From the sentiment result, determine the sentiment result related to the rectification problem as the target sentiment result;

[0113] The information corresponding to the target sentiment result in the third information set is the key information corresponding to the rectification problem;

[0114] The key information can be converted into a feature vector by a vectorization algorithm (such as a word embedding algorithm, a TF-IDF vectorization algorithm, etc.) to form the problem feature vector.

[0115] Understandably, different sentiment results have different degrees of association with rectification problems, and based on the association, the sentiment result strongly related to the rectification problem can be obtained, that is, the target sentiment result. The strong correlation can be flexibly determined according to the actual situation, which will not be repeated here.

[0116] Step 170 is the process of association reasoning in the knowledge graph based on the problem feature vector. The association reasoning process calculates the path set from the problem node to the measure node by a path search algorithm such as depth-first search (DFS) or breadth-first search (BFS), and calculates the association strength for each path. The final output is a set of rectification measures related to the problem with different association strengths.

[0117] After the construction of the knowledge graph, a directed graph containing the entities and relationships related to the inspection and rectification task is formed. The association reasoning process matches the problem feature vector with the nodes and relationships in the knowledge graph, and searches for paths in the knowledge graph starting from the problem node. The knowledge graph provides a structured knowledge base of entities and relationships for association reasoning. Based on the structure and content of the knowledge graph, the association reasoning mines the rectification measure association paths related to the problem, thereby realizing the reasoning process from the knowledge graph to the rectification measure candidate set.

[0118] In step 180, the second large language model is used in reinforcement learning, including a defined state space S, an action space A, a reward function R, and a policy function π; state s∈S, the state s includes the problem feature vector and the candidate set of rectification measures; action a∈A, representing the rectification measures in the candidate set of rectification measures; reward function R(a,s) is used to obtain the reward according to the state s and the action a of the rectification measure, for example, the reward is set according to the effectiveness, feasibility and other indicators of the rectification measure; the policy function π(a|s) represents the probability of taking action a under state s. That is, by using the second large language model, iterative learning is performed to obtain the final set of rectification measures.

[0119] By continuously interacting with the environment (i.e., touring rectification problems and knowledge graphs, etc.), the policy is updated according to the Bellman equation, and the rectification measures are updated. Through continuous iterative learning, the large language model generates rectification measure suggestions based on the current problem characteristics and the optimal policy. For example, when encountering the problem of "sales performance decline", the large language model may generate rectification measure suggestions such as "strengthen market promotion" and "optimize sales team incentive mechanism" according to the current state and the learned policy, and evaluate the potential value of these measures according to the reward function to select the optimal measure for recommendation. The Bellman equation updates the policy as follows:

[0120] Q π (s,a)=R(s,a)+γ∑ s′∈S P(s′|s,a)max a′ Q π (s′,a′) (8)

[0121] In the formula, Q π (s,a) is the value function of state s taking action a under policy π; γ∈[0,1] is the discount factor, which is used to balance the current reward and the future reward; P(s′|s,a) is the probability of transitioning to state s′ after taking action a in state s.

[0122] In this embodiment, the processor can be an integrated circuit chip with signal processing capability. The processor can be a general processor. For example, the processor can be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0123] The memory can be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the memory can be used to store the first large language model, the second large language model, the knowledge graph, etc. Of course, the memory can also be used to store a program, and the processor executes the program after receiving an execution instruction.

[0124] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the electronic device described above can refer to the corresponding process of each step in the foregoing method, and will not be described in more detail here.

[0125] The embodiments of the present application also provide a computer readable storage medium. The computer readable storage medium stores a computer program, and when the computer program runs on a computer, the computer executes the rectification measure acquisition method as described in the above embodiments.

[0126] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware, or can be implemented by means of software and necessary general hardware platform. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of instructions for causing a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.

[0127] In the embodiments of the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are only illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the devices, methods and computer program products according to the embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a special hardware-based system for performing the specified functions or actions, or can be implemented by a combination of special hardware and computer instructions. In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form a separate part, or each module can exist independently, or two or more modules can be integrated to form a separate part.

[0128] The above only describes the embodiments of the present disclosure and is not used to limit the protection scope of the present disclosure. For those skilled in the art, the present disclosure can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for obtaining rectification measures, characterized in that, The method includes: Obtain a preprocessed first data set, which includes structured and unstructured data related to the enterprise; The unstructured data is subjected to attribute extraction, entity extraction, and relation extraction using the first major language model to obtain an information set, which serves as the first information set. The unstructured data is then subjected to knowledge merging to obtain a second information set; The first information set and the second information set are fused to obtain a third information set; Based on the third information set, a knowledge graph is constructed, and a sentiment analysis algorithm is used to evaluate the sentiment tendency of the third information set to obtain the sentiment result. Based on the emotional results, problem feature vectors related to the rectification issues are determined from the third information set; The problem feature vector, nodes, and relationships in the knowledge graph are matched to obtain a candidate set of rectification measures; The candidate set of rectification measures is input into the second language model after reinforcement learning to obtain the final set of rectification measures.

2. The method according to claim 1, characterized in that, The unstructured data is processed using a first language model to extract attributes, entities, and relationships, resulting in an information set, which serves as the first information set, including: The text of the unstructured data is divided into sub-text units; The sub-text unit is input into the first large language model, and the first candidate keyword related to the word and attribute in the sub-text unit is determined through the multi-head attention module in the first large language model; Based on the multi-head attention module, the first candidate keyword with a correlation degree greater than a first threshold is determined as the first target keyword, and the correlation degree is used as the value of the first target keyword to form a set of attribute-value pairs; Based on the parameters for entity recognition pre-trained by the first large language model, the multi-head attention module determines the second candidate keywords related to the entities in the sub-text unit, and selects the second candidate keywords with a correlation degree greater than the second threshold as the second target keywords to obtain the entity set; The subtext unit containing any entity in the entity set is input into the first large language model to obtain the relationship between entities, forming a relationship set, and based on the attribute and value pair set, the entity set, and the relationship set, the first information set is formed.

3. The method according to claim 1, characterized in that, The first information set and the second information set are fused to obtain a third information set, which includes: The first information set and the second information set are subjected to coreference resolution and entity disambiguation to perform knowledge fusion and obtain the third information set.

4. The method according to claim 1, characterized in that, Based on the aforementioned third information set, a knowledge graph is constructed, including: Construct a node set from the entities in the third information set; Based on the relationship types between entities in the third information set, create a set of edges; Based on the set of edges and the set of nodes, the knowledge graph is created and represented as follows: G = (V, E) G represents the knowledge graph; V = {v1, ..., v} q } represents the set of nodes; q represents the number of nodes; E = {(v i ,r j ,v k )}, representing the set of edges; (v i ,r j ,v k ) represents node v i With node v k There is a relationship r j .

5. The method according to claim 1, characterized in that, The sentiment analysis algorithm is used to assess the sentiment tendency of the third information set, and the sentiment results are obtained, including: Using a logistic regression model, the sentiment assessment of the third information set is performed using the following formula: In the formula, P(y=1|x) represents the probability that the information is positive sentiment given the feature vector x; y is the sentiment tendency label; x={x1,…,x n Let} be the feature vector of information i, n be the number of feature vectors, and information i be any information in the third information set; the third information set is represented as I = {i1, ..., i...} p }, p represents the amount of information; e is the natural constant; β0 is the intercept term; β1 to β n These are model parameters; Based on the term frequency-inverse document frequency formula, the importance of the information in the third information set is determined as follows: TF_IDF(t,d) = TF(t,d)·IDF(t) In the formula, TF_IDF(t,d) represents the importance of word t in the information of the third information set in document d; TF(t,d) represents the word frequency of word t in the information of the third information set in document d; N is the total number of documents in the third information set; and N is the number of documents in the third information set that contain word t. The probability of the positive sentiment and the importance of the information are used as the sentiment outcome.

6. The method according to claim 1, characterized in that, Based on the sentiment results, problem feature vectors related to the rectification issues are determined from the third information set, including: From the emotional results, determine the emotional results related to the rectification problem, and use them as target emotional results; The information in the third information set that corresponds to the target emotional result is used as the key information corresponding to the rectification problem; The key information is converted into a feature vector to form the problem feature vector.

7. The method according to claim 1, characterized in that, The second language model includes a defined state space S, an action space A, a reward function R, and a policy function π; a state s ∈ S, which includes the problem feature vector and the candidate set of rectification measures; an action a ∈ A, which represents a rectification measure in the candidate set of rectification measures; a reward function R(a,s), which is used to obtain a reward based on the state s and the rectification measure action a; and a policy function π(a|s), which represents the probability of taking action a in the state s.

8. The method according to any one of claims 1-7, characterized in that, The structured data includes the company's financial statement data, personnel information data, and business process data; The unstructured data includes the company's inspection reports and meeting minutes.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory coupled together, the memory storing a computer program that, when executed by the processor, causes the electronic device to perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method as described in any one of claims 1-8.