Policy text classification method and device, equipment and storage medium
By processing policy texts using a large language model, effective key information is extracted and filtered. Combined with classification rules, the automatic classification of policy texts is achieved, solving the problem of low efficiency in traditional methods and improving the accuracy and efficiency of policy text recognition and interpretation.
Patent Information
- Application Number
- CN202511617930.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-01-06
AI Technical Summary
Traditional manual processing of policy texts is inefficient and prone to errors in judgment or omission of key information due to information overload, making it difficult to accurately identify the importance of policies.
A large language model is used to process the policy text set, extract multiple key element information, determine the effective key element information through discrimination ranking and semantic rewriting, and automatically classify the policy texts by combining classification rules.
It enables efficient classification of policy texts, improves the efficiency of enterprises in identifying and interpreting policies, ensures the accuracy and consistency of classification results, and enhances interpretability and controllability.
Smart Images

Figure CN121278097A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of large language model technology, and more particularly to a method, apparatus, device, and storage medium for classifying policy texts. Background Technology
[0002] Currently, businesses face increasingly complex policy information flows. These flows encompass macroeconomic regulation, industry oversight, tax incentives, environmental requirements, and many other aspects, directly impacting their operational models, resource allocation, and strategic direction. Therefore, for businesses, timely identification and accurate interpretation of relevant policies enable them to formulate scientifically sound and rational rules and regulations.
[0003] However, when faced with a massive amount of policy documents, traditional manual processing methods are not only inefficient, but also prone to errors in judgment or omissions of key information due to information overload.
[0004] Therefore, there is an urgent need for a policy text classification method that can accurately distinguish the importance of policies, and then classify them according to their importance, thereby improving the efficiency of enterprises in viewing policies. Summary of the Invention
[0005] To address, or at least partially address, the aforementioned technical problems, this disclosure provides a method, apparatus, device, and storage medium for classifying policy texts.
[0006] A first aspect of this disclosure provides a method for classifying policy texts, the method comprising: Obtain policy text sets, data information of at least one dimension of enterprises, and preset classification description data information; input the policy text sets, data information of at least one dimension of enterprises, and preset classification description data information into a first preset large language model; wherein, the data information of at least one dimension of enterprises and the preset classification description data information are used to construct prompt words; Based on the first preset large language model, the policy text set is processed according to the prompt words to obtain multiple key element information; wherein, the key element information is used to characterize the indicator information in the policy text set; the multiple key element information are all different from each other; Based on the second preset large language model, a preset number of valid key element information is determined from the multiple key element information, and the policy text to be classified is classified according to the preset number of valid key element information to obtain the category of the policy text to be classified.
[0007] In one example, the process of classifying the policy text to be classified based on the preset number of valid key element information to obtain the category of the policy text to be classified includes: Determine whether there is content in the policy text to be classified that matches the effective key element information, and obtain the determination result; Based on the judgment result and the preset classification rules, the policy text to be classified is classified to obtain the category of the policy text to be classified.
[0008] In one example, determining whether the policy text to be classified contains content that matches the effective key element information and obtaining the determination result includes: Obtain the scoring vector corresponding to each of the aforementioned valid key element information; If the policy text to be classified contains content that matches the effective key element information, then a first element is added to the corresponding scoring vector; wherein, the first element is used to characterize the content in the policy text to be classified that satisfies the effective key element information; If there is no content in the policy text to be classified that matches the effective key element information, then a second element is added to the corresponding scoring vector; wherein, the second element is used to characterize the content in the policy text to be classified that does not meet the effective key element information; The scoring vectors corresponding to the preset number of valid key element information are concatenated to obtain the judgment result.
[0009] In one example, the preset classification rules include: classification model or weight allocation rules; wherein the classification model is obtained after training based on historical policy texts.
[0010] In one example, determining a preset number of valid key element information from the plurality of key element information includes: Based on the second preset large language model and validation set, the discriminative power of the multiple key element information is determined; wherein, the validation set includes multiple validation policy texts; the multiple validation policy texts are of different categories; the number of categories of the validation policy texts is used to evaluate the discriminative power. The distinguishability of the multiple key element information is sorted to obtain a sorting result, and the preset number of valid key element information is determined from the sorting result.
[0011] In one example, determining the discriminative power of the multiple key element information based on the second preset large language model and validation set includes: Based on the second preset large language model and the validation set, the following operations are performed for each key element information: If the key element information belongs to the category of a first preset number of verification policy texts, then the distinguishability of the key element information is determined to be a first-level distinguishability, and the key element information is removed. If the key element information belongs to the category of a second preset number of verification policy texts, then the distinguishability of the key element information is determined to be a second-level distinguishability, and the key element information is semantically rewritten to obtain the rewritten key element information; wherein, the rewritten key element information is used to replace the key element information. If the key element information belongs to a category of a third preset number of verification policy texts, then the distinguishability of the key element information is determined to be a level three distinguishability.
[0012] In one example, the method further includes: The categories of the policy texts to be classified are visualized to obtain visualization results, which are then displayed.
[0013] A second aspect of this disclosure provides a policy text classification apparatus, the apparatus comprising: The acquisition module is used to acquire policy text sets, data information of at least one dimension of enterprises, and preset classification description data information, and input the policy text sets, data information of at least one dimension of enterprises, and preset classification description data information into a first preset large language model; wherein, the data information of at least one dimension of enterprises and the preset classification description data information are used to construct prompt words; The determination module is used to process the policy text set based on the first preset large language model and the prompt words to obtain multiple key element information; wherein, the key element information is used to characterize the indicator information in the policy text set; the multiple key element information are different from each other; The processing module is used to determine a preset number of valid key element information from the multiple key element information based on the second preset large language model, and to classify the policy text to be classified according to the preset number of valid key element information to obtain the category of the policy text to be classified.
[0014] A third aspect of this disclosure provides an electronic device comprising: a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the method described in the first aspect.
[0015] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the method of the first aspect described above.
[0016] A fifth aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0017] This disclosure provides a method, apparatus, device, and storage medium for classifying policy texts. The method includes: firstly, acquiring a policy text set, data information of at least one dimension of an enterprise, and preset classification description data; inputting the policy text set, the data information of at least one dimension of the enterprise, and the preset classification description data into a first preset large language model; then, based on the first preset large language model, processing the policy text set according to prompt words to obtain multiple key element information; finally, based on a second preset large language model, determining a preset number of valid key element information from the multiple key element information; and classifying the policy texts to be classified according to the preset number of valid key element information to obtain the category of the policy texts to be classified. Using this technical solution, the policy text set is processed through the first preset large language model to extract multiple key element information, and then valid key element information is determined based on these multiple key element information. Since the valid key element information can characterize the indicator information in the policy text set, it is possible to accurately distinguish the importance of policies. Then, policies are classified according to their importance. After classifying policies, the efficiency of enterprises in viewing policies is correspondingly improved. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating a method for classifying policy texts provided in an embodiment of this disclosure; Figure 2 This is a flowchart illustrating a method for classifying policy texts provided in an embodiment of this disclosure; Figure 3This is a schematic diagram illustrating a policy text classification process provided in an embodiment of this disclosure; Figure 4 This is a schematic diagram of the structure of a policy text classification device provided in an embodiment of this disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation
[0021] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0022] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0023] Figure 1 This is a flowchart illustrating a method for classifying policy texts according to an embodiment of this disclosure. This method can be executed by an electronic device. The electronic device can be exemplarily understood as a device such as a mobile phone, tablet computer, laptop computer, desktop computer, or smart TV. Figure 1 As shown, the method provided in this embodiment includes the following steps: S101. Obtain policy text set, data information of at least one dimension of enterprises, and preset classification description data information, and input the policy text set, data information of at least one dimension of enterprises, and preset classification description data information into the first preset large language model; wherein, the data information of at least one dimension of enterprises and preset classification description data information are used to construct prompt words.
[0024] In one example, the policy text set consists of policy texts that have undergone initial screening. Specifically, this policy text set may have been initially screened based on industry and sector information. This policy text set includes multiple policy texts.
[0025] In this embodiment, the enterprise's data information in at least one dimension includes enterprise information, industry sector, business scope, risk appetite, production status, and development direction. Enterprise information can be the enterprise's introductory information; production status can be whether the enterprise's business lines are profitable; and development direction can be the enterprise's strategic plan. The preset classification description data information is the description information of the category of each policy text. For example, the policy text categories can be A. Important Policy, B. Ordinary Policy, and C. Irrelevant Policy. The description of A. Important Policy can be a policy involving specific provisions; B. Ordinary Policy can be a policy related to the enterprise but not involving technical specifications; and C. Irrelevant Policy can be a policy unrelated to the enterprise's business. The enterprise's data information in at least one dimension and the preset classification description data information can be used to construct prompt words. These prompt words instruct a preset large language model to process the policy text set according to the content of the prompt words. The first preset large language model can be a Large Language Model (LLM).
[0026] S102. Based on the first preset large language model, the policy text set is processed according to the prompt words to obtain multiple key element information; among them, the key element information is used to represent the indicator information in the policy text set; the multiple key element information are different from each other.
[0027] In one example, key element information is used to characterize indicator information in the policy text set, where there can be multiple key element information pieces. Furthermore, key element information can be words, short texts, or long texts. If there are multiple key element information pieces, and these pieces are distinct, if two identical key element information pieces are obtained by processing the policy text set based on prompt words using a first-preset large language model, then deduplication can be performed.
[0028] S103. Based on the second preset large language model, determine a preset number of effective key element information from multiple key element information, and classify the policy text to be classified according to the preset number of effective key element information to obtain the category of the policy text to be classified.
[0029] In one example, the second preset large language model can be the same model as the first preset large language model, or it can be a different model. The number of presets can be dynamically adjusted; for example, the number of presets can be 10. Effective key element information refers to the key element information used to distinguish the categories of policy texts, and its specific content is not limited.
[0030] In this embodiment, if there are 20 key elements, some of these 20 key elements may not be sufficient to accurately distinguish the policy text. Therefore, a predetermined number of valid key elements need to be selected from these 20. Specifically, if key element A only falls within the category of "Important Policy A," then key element A is determined to be valid, meaning the category of "Important Policy A" can be determined solely based on key element A. Here, we assume there are three policy text categories: A (Important Policy), B (Ordinary Policy), and C (Irrelevant Policy). In this case, if key element A is in both "Important Policy A" and "Ordinary Policy B," then key element A is not in "Irrelevant Policy C." If key element A is in "Important Policy A," "Ordinary Policy B," and "Irrelevant Policy C," then the category of the policy text cannot be determined solely based on key element A, and key element A is determined not to be valid.
[0031] In one example, the policy text to be classified can be obtained from a website or from the business side. The category of the policy text to be classified is the category of the policy text determined in the preset classification description data information. For example, the category of the policy text can be A. Important Policy, B. Ordinary Policy, and C. Irrelevant Policy.
[0032] This disclosure provides a method for classifying policy texts. The method includes: acquiring a set of policy texts, data information of at least one dimension of an enterprise, and preset classification description data; inputting the policy text set, the data information of at least one dimension of the enterprise, and the preset classification description data into a preset large language model; then, based on the preset large language model, processing the policy text set according to prompt words to obtain multiple key element information; finally, based on the preset large language model, determining a preset number of valid key element information from the multiple key element information; and classifying the policy texts to be classified according to the preset number of valid key element information to obtain the category of the policy texts to be classified. Using this technical solution, the importance of policies can be accurately distinguished, and then classified according to the importance of policies, thereby improving the efficiency of enterprises in viewing policies.
[0033] Figure 2 This illustration shows a flowchart of a policy text classification method provided by an embodiment of the present disclosure. This embodiment is an optimization of the above embodiments and can be combined with various optional solutions from one or more of the above embodiments.
[0034] like Figure 2 As shown, the classification method for this policy text may include the following steps: S201. Obtain policy text set, data information of at least one dimension of enterprises, and preset classification description data information; input the policy text set, data information of at least one dimension of enterprises, and preset classification description data information into the first preset large language model; wherein, the data information of at least one dimension of enterprises and preset classification description data information are used to construct prompt words.
[0035] In one example, this step can be found in step S101, and will not be repeated here.
[0036] S202. Based on the first preset large language model, the policy text set is processed according to the prompt words to obtain multiple key element information; among them, the key element information is used to represent the indicator information in the policy text set; the multiple key element information are different from each other.
[0037] In one example, this step can be found in step S102, and will not be repeated here.
[0038] S203. Based on the second preset large language model and validation set, determine the discriminative power of multiple key element information; wherein, the validation set includes multiple validation policy texts; the multiple validation policy texts are of different categories; the number of categories of the validation policy texts is used to evaluate the discriminative power.
[0039] In one example, the validation set includes multiple policy text categories, and each policy text category contains multiple valid policy texts. For example, the validation set includes A (Important Policy), B (Ordinary Policy), and C (Irrelevant Policy). Specifically, A (Important Policy) contains 10 valid policy texts, B (Ordinary Policy) contains 10 valid policy texts, and C (Irrelevant Policy) contains 10 valid policy texts.
[0040] The number of policy text categories to which key element information belongs can be used to assess discrimination. The smaller the number of policy text categories to which key element information belongs, the greater the discrimination. If the number of policy text categories to which key element information belongs is equal to the total number of policy text categories, it indicates a lack of discrimination and cannot effectively support classification judgment; therefore, it will be removed.
[0041] For a clearer explanation, please refer to the following: Based on the second pre-defined large language model and validation set, the discriminative power of several key element information is determined, including: Based on the second preset large language model and validation set, the following operations are performed for each key element information: If the key element information belongs to the category of the first preset number of verification policy texts, then the distinguishability of the key element information is determined to be the first-level distinguishability, and the key element information is removed. If the key element information belongs to the category of the second preset number of verification policy texts, then the distinguishability of the key element information is determined to be the second-level distinguishability, and the key element information is semantically rewritten to obtain the rewritten key element information; wherein, the rewritten key element information is used to replace the key element information. If the key element information belongs to the category of the third preset number of verification policy texts, then the discrimination of the key element information is determined to be a level three discrimination.
[0042] In one example, the first preset quantity can be three or more. If the key element information belongs to a category of the first preset quantity of verification policy texts, it means that the key element information exists in multiple categories of verification policy texts. This means that if the key element information is obtained, it is impossible to determine the category of the verification policy text to which the key element information belongs, and therefore it is impossible to classify the policy text to be classified based on the key element information. Therefore, the key element information is discarded. Further, the distinguishability of the key element information is determined as the first-level distinguishability, where the first-level distinguishability is used to represent no distinguishability.
[0043] In one example, if the total number of categories for the verified policy texts is three, then the second preset quantity can be two. If the key element information belongs to one of the categories of the second preset quantity of verified policy texts, it means that the key element information cannot be used to distinguish the categories of some policy texts, and therefore the key element information needs to be processed. Specifically, the key element information is semantically rewritten to obtain the rewritten key element information. Specifically, it can be rewritten from the opposite semantic concept, and then the rewritten key element information belongs to another category of verified policy texts. For example, if the rewritten key element information belongs to policy C that is irrelevant, then the rewritten key element information can be used to distinguish policy C that is irrelevant. In this embodiment, the distinguishability of the key element information is determined to be a second-order distinguishability, where second-order distinguishability means that the key element information needs to be rewritten to have distinguishability.
[0044] In one example, the third preset quantity can be one. If the key element information belongs to a category of a verified policy text, the category of the corresponding policy text can be determined based on the key element information. In this case, the discrimination of the key element information is determined as a three-level discrimination, where three-level discrimination means that the category of the policy text can be determined solely based on the key element information; that is, three-level discrimination is strong discrimination.
[0045] S204. Sort the distinguishability of multiple key element information to obtain the sorting results, and determine a preset number of valid key element information from the sorting results.
[0046] In one example, if key element information appears only in one category, such as only in category A, it will be directly identified as an important judgment indicator for that category. It has high distinguishability and can be ranked at the top. Then, the preset number of valid key element information is determined from the ranking results.
[0047] S205. Determine whether there is content in the policy text to be classified that matches the effective key element information, and obtain the judgment result.
[0048] In one example, based on the second preset large language model, semantic processing is used to determine whether the policy text to be classified meets the content of each effective key element information, and the judgment result is obtained.
[0049] In one example, the system determines whether the policy text to be classified contains content that matches valid key element information, and obtains the judgment result, including: Obtain the scoring vector corresponding to each valid key element; If the policy text to be classified contains content that matches the effective key element information, then a first element is added to the corresponding scoring vector; whereby the first element is used to represent the content in the policy text to be classified that satisfies the effective key element information. If there is no content in the policy text to be classified that matches the effective key element information, then a second element is added to the corresponding scoring vector; whereby the second element is used to represent the content in the policy text to be classified that does not meet the effective key element information. The scoring vectors corresponding to a preset number of valid key element information are concatenated to obtain the judgment result.
[0050] In one example, the scoring vector can be a one-dimensional vector. In this embodiment, the first element can be 1, and the second element can be 0. If the policy text to be classified contains content that meets the requirements of valid key element information, then 1 is added to the corresponding scoring vector; if the policy text to be classified does not contain content that meets the requirements of valid key element information, then 0 is added to the corresponding scoring vector. Then, the scoring vectors corresponding to a preset number of valid key element information are concatenated to obtain a preset number of one-dimensional vectors, which is used as the judgment result.
[0051] S206. Based on the judgment result and the preset classification rules, classify the policy texts to be classified to obtain the categories of the policy texts to be classified.
[0052] In one example, the preset classification rules include: classification model or weight allocation rules; wherein the classification model is obtained by training based on historical policy texts.
[0053] In one example, the weighting rule could be to combine classification thresholds and weight configurations for different categories to perform a weighted calculation or rule matching on the judgment results. The impact of certain valid key information elements on a company may vary. Therefore, different weight values can be set for each valid key information element to reflect its relative importance in the classification process.
[0054] As new policy texts are continuously added or business needs change, the importance of key information elements can be recalculated based on the latest policy text set, and the weighting rules can be dynamically adjusted. This approach improves the adaptability of the classification and ensures that the policy classification results always align with the actual needs of the enterprise.
[0055] In one example, the method also includes: The categories of the policy texts to be classified are visualized to obtain the visualization results, which are then displayed.
[0056] In one example, the visualization can be in tabular or graphical form, which allows users to view it.
[0057] For a clearer explanation, please refer to [link to relevant documentation]. Figure 3 This diagram illustrates a policy text classification process.
[0058] This disclosure provides a method for classifying policy texts. The method includes: determining the discriminative power of multiple key element information based on a preset large language model and validation set; ranking the discriminative power of the multiple key element information to obtain a ranking result; determining a preset number of valid key element information from the ranking result; judging whether the policy text to be classified satisfies the content of each valid key element information, and obtaining a judgment result; and classifying the policy text to be classified according to the judgment result and preset classification rules to obtain the category of the policy text to be classified. Using this technical solution, the entire process from the original policy text to structured scoring and then to the final classification result is automated. This method not only improves classification efficiency and consistency but also enhances interpretability and controllability. Specifically, it allows for a clear understanding of why each policy is classified into a certain category, and the judgment logic can be adjusted and optimized according to actual circumstances. This provides strong technical support and assurance for enterprises to quickly identify key policies and formulate response strategies.
[0059] Figure 4 This is a schematic diagram of the structure of a policy text classification device provided in this embodiment of the disclosure. This policy text classification device can be understood as the aforementioned electronic device or a functional module within the aforementioned electronic device. For example... Figure 4 As shown, the classification device 40 for the policy text includes: The acquisition module 401 is used to acquire policy text sets, data information of at least one dimension of enterprises, and preset classification description data information, and input the policy text sets, data information of at least one dimension of enterprises, and preset classification description data information into a first preset large language model; wherein, the data information of at least one dimension of enterprises and preset classification description data information are used to construct prompt words; The determination module 402 is used to process the policy text set based on the prompt words according to the first preset large language model to obtain multiple key element information; wherein, the key element information is used to represent the indicator information in the policy text set; the multiple key element information are different from each other; The processing module 403 is used to determine a preset number of valid key element information from multiple key element information based on the second preset large language model, and to classify the policy text to be classified according to the preset number of valid key element information to obtain the category of the policy text to be classified.
[0060] In one example, processing module 403 includes: The judgment submodule is used to determine whether there is content in the policy text to be classified that matches the effective key element information, and to obtain the judgment result; The first determination submodule is used to classify the policy text to be classified according to the judgment result and the preset classification rules, so as to obtain the category of the policy text to be classified.
[0061] In one example, the submodule is determined for: Obtain the scoring vector corresponding to each valid key element; If the policy text to be classified contains content that matches the effective key element information, then a first element is added to the corresponding scoring vector; whereby the first element is used to represent the content in the policy text to be classified that satisfies the effective key element information. If there is no content in the policy text to be classified that matches the effective key element information, then a second element is added to the corresponding scoring vector; whereby the second element is used to represent the content in the policy text to be classified that does not meet the effective key element information. The scoring vectors corresponding to a preset number of valid key element information are concatenated to obtain the judgment result.
[0062] In one example, the preset classification rules include: classification model or weight allocation rules; wherein the classification model is obtained by training based on historical policy texts.
[0063] In one example, processing module 403 includes: The second determination submodule is used to determine the discriminative power of multiple key element information based on the second preset large language model and validation set; wherein, the validation set includes multiple validation policy texts; the multiple validation policy texts are of different categories; the number of categories of the validation policy texts is used to evaluate the discriminative power. The sorting submodule is used to sort the distinguishability of multiple key element information, obtain the sorting results, and determine a preset number of valid key element information from the sorting results.
[0064] In one example, the second determined submodule is specifically used for: Based on the second preset large language model and validation set, the following operations are performed for each key element information: If the key element information belongs to the category of the first preset number of verification policy texts, then the distinguishability of the key element information is determined to be the first-level distinguishability, and the key element information is removed. If the key element information belongs to the category of the second preset number of verification policy texts, then the distinguishability of the key element information is determined to be the second-level distinguishability, and the key element information is semantically rewritten to obtain the rewritten key element information; wherein, the rewritten key element information is used to replace the key element information. If the key element information belongs to the category of the third preset number of verification policy texts, then the discrimination of the key element information is determined to be a level three discrimination.
[0065] In one example, the classification device 40 for the policy text includes: Display module 404 is used to visualize the categories of policy texts to be classified, obtain visualization results, and display the visualization results.
[0066] The apparatus provided in this embodiment can execute the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0067] This disclosure also provides an electronic device, which includes: a memory storing a computer program; and a processor for executing the computer program, wherein when the computer program is executed by the processor, it can implement the methods of any of the above embodiments.
[0068] Example, Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 5The diagram illustrates a structural schematic suitable for implementing the electronic device 1000 in the embodiments of this disclosure. The electronic device 1000 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0069] like Figure 5 As shown, the electronic device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0070] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0071] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0072] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0073] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0074] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0075] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following actions: It acquires a policy text set, data information of at least one dimension of the enterprise, and preset classification description data information; it inputs the policy text set, the data information of at least one dimension of the enterprise, and the preset classification description data information into a first preset large language model; wherein the data information of at least one dimension of the enterprise and the preset classification description data information are used to construct prompt words; based on the first preset large language model, it processes the policy text set according to the prompt words to obtain multiple key element information; wherein the key element information is used to characterize the indicator information in the policy text set; the multiple key element information is distinct from each other; based on a second preset large language model, it determines a preset number of valid key element information from the multiple key element information, and classifies the policy text to be classified according to the preset number of valid key element information to obtain the category of the policy text to be classified.
[0076] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0077] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0078] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0079] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0080] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0081] This disclosure also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0082] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0083] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of classifying a policy text, characterized by, The method comprises: obtaining a policy text set, data information of at least one dimension of an enterprise, and preset classification description data information, and inputting the policy text set, the data information of at least one dimension of the enterprise, and the preset classification description data information into a first preset large language model; wherein the data information of at least one dimension of the enterprise and the preset classification description data information are used to construct prompt words; based on the first preset large language model, processing the policy text set according to the prompt words to obtain a plurality of key element information; wherein the key element information is used to represent index information in the policy text set; the plurality of key element information are different from each other; based on a second preset large language model, determining a preset number of effective key element information from the plurality of key element information, and classifying the policy text to be classified according to the preset number of effective key element information to obtain the category of the policy text to be classified.
2. The method of claim 1, wherein, The classification processing of the policy text to be classified according to the preset number of effective key element information to obtain the category of the policy text to be classified comprises: determining whether there is content matching the effective key element information in the policy text to be classified, and obtaining a determination result; classifying the policy text to be classified according to the determination result and a preset classification rule to obtain the category of the policy text to be classified.
3. The method of claim 2, wherein, The determination of whether there is content matching the effective key element information in the policy text to be classified and the determination result comprises: obtaining a scoring vector corresponding to each of the effective key element information; if there is content matching the effective key element information in the policy text to be classified, adding a first element in the corresponding scoring vector; wherein the first element is used to represent the content in the policy text to be classified that meets the effective key element information; if there is no content matching the effective key element information in the policy text to be classified, adding a second element in the corresponding scoring vector; wherein the second element is used to represent the content in the policy text to be classified that does not meet the effective key element information; splicing the scoring vectors corresponding to the preset number of effective key element information to obtain the determination result.
4. The method of claim 2, wherein, The preset classification rule comprises a classification model or a weight allocation rule; wherein the classification model is obtained based on historical policy texts.
5. The method of claim 1, wherein, The determination of a preset number of effective key element information from the plurality of key element information comprises: determining the discrimination degree of the plurality of key element information based on the second preset large language model and a validation set; wherein the validation set comprises a plurality of validation policy texts; the categories of the plurality of validation policy texts are different; the number of categories of the categories of the validation policy texts is used to evaluate the discrimination degree; sorting the discrimination degree of the plurality of key element information to obtain a sorting result, and determining the preset number of effective key element information from the sorting result.
6. The method of claim 5, wherein, The determining of the discrimination degrees of the plurality of key element information based on the second preset large language model and the verification set comprises: Based on the second preset large language model and the verification set, the following operations are performed for each key element information: If the key element information belongs to the category of the first preset number of verification policy texts, the discrimination degree of the key element information is determined to be a first-level discrimination degree, and the key element information is removed; If the key element information belongs to the category of the second preset number of verification policy texts, the discrimination degree of the key element information is determined to be a second-level discrimination degree, and the key element information is semantically rewritten to obtain rewritten key element information; wherein the rewritten key element information is used to replace the key element information; If the key element information belongs to the category of the third preset number of verification policy texts, the discrimination degree of the key element information is determined to be a third-level discrimination degree.
7. The method of claim 1, wherein, The method further comprises: Visualizing the category of the policy text to be classified to obtain a visualization result, and displaying the visualization result.
8. A policy text classification device characterized by comprising: The device comprises: An acquisition module configured to acquire a policy text set, data information of at least one dimension of an enterprise, and preset classification description data information, and input the policy text set, the data information of at least one dimension of the enterprise, and the preset classification description data information into a first preset large language model; wherein the data information of at least one dimension of the enterprise and the preset classification description data information are used to construct prompt words; A determination module configured to process the policy text set according to the prompt words based on the first preset large language model to obtain a plurality of key element information; wherein the key element information is used to represent index information in the policy text set; and the plurality of key element information are different from each other; A processing module configured to determine a preset number of effective key element information from the plurality of key element information based on a second preset large language model, and perform classification processing on a policy text to be classified according to the preset number of effective key element information to obtain a category of the policy text to be classified.
9. An electronic device, comprising: Comprise: A processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by the processor, the method of any one of claims 1-7 is implemented.
