Method and equipment for constructing cue words based on domain knowledge to carry out granular computation, and medium

By using domain knowledge in particle calculation to construct prompt words, optimize the particle calculation process, the problems of invalid and erroneous reasoning in particle calculation results are solved, and higher quality and correlation particle calculation results are achieved, which are suitable for multiple industry fields. application.

CN119476444AActive Publication Date: 2025-02-18SOUTH CHINA NORMAL UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411755995.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-18
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

During the particle calculation process, the same problem may have different technical backgrounds, constraints or solution goals in different industries, resulting in a large number of invalid or incorrect solution directions for the inference results obtained by particle calculation, which increases the computational complexity and resources Consumption.

Method used

By acquiring domain knowledge, building prompt words, and inputting them into large language models, we can generate attribute-to-probability matrix and judge the correlation between particles to be calculated. When the correlation meets the requirements, particle calculation operations are performed, including particle division, recombination and isomorphism, to optimize particle calculation results.

Benefits of technology

Through domain knowledge, we can build prompt words, reduce the discovery of invalid object patterns during particle calculation, improve the relevance and quality of particle calculation results, provide more targeted solution directions, and are suitable for particle calculation applications in different industries and fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476444A_ABST
    Figure CN119476444A_ABST
Patent Text Reader

Abstract

The invention discloses a method and equipment for constructing cue words based on domain knowledge to carry out granular computation, and a medium. The method comprises the following steps: acquiring domain knowledge, and constructing cue words according to the domain knowledge; inputting cue words into the large language model to obtain an attribute pair probability matrix; according to the attribute pair probability matrix, the correlation between the particles to be calculated is judged; and when the correlation among the to-be-calculated particles meets the requirement, carrying out particle calculation operation on the to-be-calculated examples. According to the embodiment of the invention, the constraint condition is constructed in the granular calculation process through the domain knowledge, the discovery of invalid object modes in the granular calculation process can be reduced, and the object mode with higher relevancy is obtained as a reasoning result with higher quality. The object mode obtained by the embodiment of the invention can better remind industry personnel of attribute information needing to be focused, a better guiding effect is provided for problem solving, and the method is widely applied to particle calculation solving processes in different industry fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of particle computing technology, and in particular to a method, device and medium for performing particle computing based on domain knowledge-based prompt words. Background Art

[0002] Granular computing is a new concept and computing paradigm in the current field of intelligent information processing. It is a methodology for studying thinking methods, complex problem solving, information processing models and related theories, technologies and tools based on multi-level granular structures. In the process of granular computing, people decompose multi-granular and multi-modal data in social networks into particles, explore the relationship between particles from multiple angles and multiple levels, and obtain more comprehensive and sufficient reasoning results.

[0003] However, in different industries, the same problem may have different technical backgrounds, constraints or solution goals; the reasoning results obtained by granular computing often contain a large number of reasoning results that are not helpful for solving the problem. This part of the reasoning results will not only increase the complexity of the calculation and the consumption of computing resources, but may also provide the wrong solution direction for the problem, resulting in the solution being unreasonable. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method, device and medium for constructing prompt words based on domain knowledge to perform granular computing.

[0005] The first aspect of the present invention provides a method for granular computing based on domain knowledge to construct prompt words, comprising the following steps: Acquire domain knowledge and construct prompt words based on the domain knowledge; Input the prompt word into a large language model to obtain an attribute pair probability matrix; Determine the correlation between the particles to be calculated based on the attribute probability matrix; When the correlation between the particles to be calculated meets the requirement, a particle calculation operation is performed on the examples to be calculated.

[0006] Furthermore, the domain knowledge is a data set consisting of terms, definitions, concepts, tools, standards, processes, cases and statistical data used in the domain.

[0007] Furthermore, the prompt words include task content, task object, task example and task attribute; The task content is used to describe the reasoning operation that the large language model needs to perform; The task object is used to describe the object played by the large language model when performing reasoning operations; The task example is used to describe the format of the inference result output by the large language model; The task attributes are used to describe the limiting conditions for the large model to perform reasoning operations.

[0008] Furthermore, constructing prompt words according to domain knowledge specifically includes the following steps: Determine the task content and task object of the prompt word; Using a preset two-dimensional correlation matrix example as a task example of the prompt word; The task attribute of the prompt word is determined according to domain knowledge.

[0009] Furthermore, the large language model is any one of a language large model and a multimodal large model; after receiving the prompt word input, the large language model completes reasoning based on task attributes in the large language model according to the task object and task content, and obtains an attribute pair probability matrix in a task example format as the output of the large language model.

[0010] Furthermore, judging the correlation between the particles to be calculated according to the attribute pair probability matrix specifically includes the following steps: Obtain the core properties of the particles to be calculated; The core attributes of the particles to be calculated are searched in the attribute pair probability matrix, and the intersection of the core attributes of the particles to be calculated is used as the correlation between the particles to be calculated.

[0011] Furthermore, the particles to be calculated are expressed by a three-branch partial order structure graph.

[0012] Furthermore, when the correlation between the particles to be calculated meets the requirement, the particle calculation operation is performed on the example to be calculated, which specifically includes the following steps: Get the particles to be calculated; Determine whether the correlation between the core attributes of the particles to be calculated reaches a preset particle splitting threshold requirement; when the correlation between the particles to be calculated reaches the preset particle splitting threshold requirement, perform a particle splitting operation on the particles to be calculated, splitting one particle into multiple new particles; Determine whether the correlation between the particles to be calculated reaches a preset particle reorganization threshold requirement; when the correlation between the particles to be calculated reaches the preset particle reorganization threshold requirement, perform a particle reorganization operation on the particles to be calculated, and combine multiple particles into a new particle; Determine whether the correlation between the particles to be calculated reaches a preset particle isomorphism threshold requirement; when the correlation between the particles to be calculated reaches the preset particle isomorphism threshold requirement, perform a particle isomorphism operation on the particles to be calculated, isomorphize multiple particles into new particles and generate a new object mode; Determine whether a new object pattern is generated in the particle isomorphism operation; when a new object pattern is generated, add the new particle to the particles to be calculated, and return to the step of performing a particle reorganization operation on the particles to be calculated when the correlation between the particles to be calculated reaches a preset particle reorganization threshold requirement until no new object pattern is generated; When no new object schema is generated, all newly generated object schemas are obtained and summarized for output.

[0013] A second aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method of constructing prompt words based on domain knowledge to perform granular computing.

[0014] A third aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method of constructing prompt words based on domain knowledge to perform granular computing.

[0015] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0016] The embodiments of the present invention have the following beneficial effects: The embodiments of the present invention provide a method, device and medium for granular computing based on domain knowledge to construct prompt words. By constructing constraints in the granular computing process through domain knowledge, it is possible to reduce the discovery of invalid object patterns in the granular computing process, and obtain object patterns with higher relevance as higher quality reasoning results. The object patterns obtained by the embodiments of the present invention can better prompt industry personnel to focus on attribute information, provide better guidance for problem solving, and are widely used in the granular computing solution process in different industry fields.

[0017] Additional aspects and advantages of the present invention will be given in part in the following description, and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 It is a basic implementation flow chart of a method for constructing prompt words based on domain knowledge to perform granular computing in the present invention.

[0020] Figure 2 It is a schematic diagram of large language model classification.

[0021] Figure 3 It is a flowchart of how a large language model processes prompt words to obtain an attribute pair probability matrix.

[0022] Figure 4 It is a schematic diagram of the particles to be calculated expressed by a three-branch partial order structure diagram.

[0023] Figure 5 It is a schematic diagram of determining the correlation between particles to be calculated based on the attribute probability matrix.

[0024] Figure 6 It is a detailed implementation flow chart of the method for constructing prompt words based on domain knowledge to perform granular computing in the present invention.

[0025] Figure 7 It is a structural schematic diagram of an electronic device of the present invention.

[0026] Figure 8 It is a schematic diagram of the structure of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0028] In order to improve the effectiveness of the reasoning results obtained by granular computing, Figure 1 As shown, the first embodiment of the present invention provides a method for constructing prompt words based on domain knowledge to perform granular computing, including the following steps: S1. Acquire domain knowledge and construct prompt words based on domain knowledge; S2. Input the prompt word into the large language model to obtain the attribute pair probability matrix; S3. Determine the correlation between the particles to be calculated based on the attribute probability matrix; S4. When the correlation between the particles to be calculated meets the requirement, the particle calculation operation is performed on the example to be calculated.

[0029] The embodiment of the present invention constructs prompt words through domain knowledge for large model processing, obtains attribute pair probability matrix from the large model to analyze the correlation of particles to be calculated, and realizes a granular computing process guided by domain knowledge. The embodiment of the present invention can obtain more targeted granular computing results that are more in line with the industry field of problem solving, and has a better guiding role for industry personnel.

[0030] As a preferred embodiment, the implementation process of each step of the present invention is discussed in detail below.

[0031] S1. Acquire domain knowledge and construct prompt words based on the domain knowledge.

[0032] In the embodiments of the present invention, domain knowledge refers to the professional knowledge and experience accumulated in a specific discipline or industry, including but not limited to the terms, definitions and basic concepts used in a specific field, such as disease names and treatment methods in medicine, or species classification in biology; or generally accepted standards and processes in a specific field, such as design specifications in the engineering field, diagnosis and treatment guidelines in the medical field, etc.; or even data sets and statistical information formed by successful cases and failure lessons accumulated through practice and research in a specific field, such as experimental data in biological research, or market data in the financial field, etc.; it may also be special tools and technologies used in a specific field, such as medical image processing software, bioinformatics analysis tools, etc.

[0033] Domain knowledge is crucial to improving the accuracy and applicability of granular computing, as it can help better understand and handle problems related to specific industry fields. By incorporating domain knowledge into the reasoning process of granular computing, the effect and efficiency of reasoning can be improved, making the reasoning results more intelligent and reliable.

[0034] As an optional implementation, constructing prompt words according to domain knowledge in step S1 specifically includes the following steps: S1-1. Determine the task content and task object of the prompt word; S1-2 used the preset two-way correlation matrix paradigm as the task paradigm for the prompt word; S1-3. Determine the task attributes of the prompt word based on domain knowledge.

[0035] It can be understood by those skilled in the art that a prompt word refers to a piece of text or instruction input into a large language model, which is used to guide the large language model to generate a specific type of output or complete a specific task. In an embodiment of the present invention, the prompt words constructed based on domain knowledge include four aspects: task object (role), task content (task), task example (example) and task attributes (attributes). Among them, the task content is used to describe the reasoning operation that the large language model needs to perform; the task object is used to describe the object played by the large language model when performing the reasoning operation; the task example is used to describe the format of the reasoning result output by the large language model; and the task attribute is used to describe the limiting conditions for the large model to perform the reasoning operation. Among them, the task object and task content are determined according to the actual problem to be solved by granular computing, the task example is a preset two-dimensional correlation matrix, and the task attributes are determined by the data set constructed by the above-mentioned domain knowledge.

[0036] As a specific embodiment, the two-dimensional correlation matrix structure is as follows:

[0037] In the binary correlation matrix, the contents of the first row and the first column are attributes in the domain knowledge, and the middle value represents the correlation between the row attribute and the column attribute, ranging from 0 to 1. 0 means that there is no correlation between the row attribute and the column attribute, and 1 means that the row attribute and the column attribute are completely correlated.

[0038] S2. Input the prompt word into the large language model to obtain the attribute pair probability matrix.

[0039] In the embodiment of the present invention, the large language model is any one of a large language model (NLP) and a large multimodal model.

[0040] Among them, language big models refer to a type of big models in the field of natural language processing (NLP), which are usually used to process text data and understand natural language. The main feature of this type of big models is that they are trained on large-scale corpora to learn various grammatical, semantic and contextual rules of natural language. For example: GPT series, Bard, Wenxinyiyan, etc.

[0041] Multimodal large models: refers to large models that can process multiple different types of data, such as text, image, audio and other multimodal data. This type of model combines the capabilities of NLP and CV to achieve comprehensive understanding and analysis of multimodal information, so as to more comprehensively understand and process complex data. For example: DingoDB multimodal vector database, DALL-E, Wukong painting, midjourney, etc.

[0042] In some embodiments, multiple large language models can also be combined into a universal large language model. The universal large language model uses large computing power, massive open data, and deep learning algorithms with huge parameters to train on large-scale unlabeled data; to find features and discover patterns, to form a powerful generalization ability that can "draw inferences from one example", and to complete multi-scenario tasks without fine-tuning or with little fine-tuning. like Figure 3 As shown, in the embodiment of the present invention, after the large language model receives the prompt word input, it completes the reasoning based on the task attributes in the large language model according to the task object and task content, and obtains the attribute pair probability matrix with the task example format as the output of the large language model. The attribute pair probability matrix can evaluate the correlation between various attributes in the industry and has a significant optimization effect on the granular computing process.

[0043] S3. Determine the correlation between the particles to be calculated based on the attribute pair probability matrix.

[0044] In an embodiment of the present invention, the data source of granular computing is the particles to be calculated formed by data granulation of domain knowledge within the industry, and the solution result is the object pattern formed between the particles. Each particle to be calculated can be expressed by a triple AG={K,O,A}. In the triple data, K represents the core attribute of the particle to be calculated, O represents the object pattern corresponding to the particle to be calculated, and A represents the domain knowledge attribute set associated with the particle to be calculated. Each object pattern can be described by a two-tuple data OP=(O,A); in the triple, A is the domain knowledge attribute set corresponding to the object pattern, and O is the domain knowledge object set corresponding to the object pattern.

[0045] In a specific embodiment, the particles to be calculated can be Figure 4 The three-branch partial order structure diagram can effectively express the hierarchical structure between particles, making it possible to solve the mapping between different particle layers, the conversion between different particle sizes, and the property preservation. Figure 4 Among the particles to be calculated, the three particles below the top layer (root node) can be expressed by the following triple data: AG11=(b,125,ab), AG12=(c,478,ac), AG13=(bc,36,abc). Each branch in the three-branch partial order structure graph constitutes an object pattern, and the object pattern of each branch can be described in turn as follows: OP1=(5,abdf), OP2=(2,abgh), OP3=(1,abg), OP4=(8,acdf), OP5=(7,acde), OP6=(4,acghi), OP7=(6,abcdf), OP8=(3,abcgh).

[0046] In step S3, the correlation between the particles to be calculated is determined according to the attribute pair probability matrix, which specifically includes the following steps: S3-1. Obtain the core properties of the particle to be calculated; S3-2. Find the core attributes of the particles to be calculated in the attribute pair probability matrix, and use the intersection of the core attributes of the particles to be calculated as the correlation between the particles to be calculated.

[0047] In the embodiment of the present invention, each particle to be calculated has at least one core attribute. In the attribute pair probability matrix, the core attribute of one particle is queried in the first row, and the core attribute of another particle is queried in the first column. The value in the intersection of the rows and columns where the core attributes are located is the correlation between the particles to be calculated. For particles with multiple core attributes, after consulting the correlation values ​​of each core attribute, the corresponding correlation values ​​of each core attribute are averaged as the correlation of the particle as a whole.

[0048] S4. When the correlation between the particles to be calculated meets the requirement, the particle calculation operation is performed on the example to be calculated.

[0049] In step S4, when the correlation between the particles to be calculated meets the requirement, a particle calculation operation is performed on the example to be calculated, which specifically includes the following steps: S4-1. Obtain the particles to be calculated.

[0050] S4-2. Determine whether the correlation between the core attributes of the particles to be calculated reaches the preset particle splitting threshold requirement; when the correlation between the particles to be calculated reaches the preset particle splitting threshold requirement, perform a particle splitting operation on the particles to be calculated, and split one particle into multiple new particles.

[0051] In the embodiment of the present invention, the purpose of the granular split (gs) operation is to split a particle into multiple particles according to the core attributes of the particle. In order to constrain the number of results generated by the particle splitting process, the embodiment of the present invention designs a gs threshold. If the average correlation between the core attributes of the particles is higher than the gs threshold, it indicates that the correlation between these attributes is very high, and the probability of these attributes being on the same object is very high, so there is no need to perform a particle splitting operation.

[0052] As a preferred embodiment, the particle splitting operation is performed by the following particle splitting operator: gs(AG)={AG i |AG i .K⊆2K,AG i .A=AG i .K∩AG.A,AG i .O=AG.O∪?, i<2 |K |-1} (Formula 1).

[0053] As shown in Formula 1, for each new particle AG generated by particle splitting gs i , its core attribute set AG i .K and concept connotation AG i .A are subsets of the target particles K and A respectively; and its conceptual extension AGi.O has a certain degree of uncertainty, and the uncertain part {?} is exactly what needs to be filled in the entire knowledge reasoning process.

[0054] For a particle AG in a given attribute partial order structure, if particle AG has the ability to split into new particles, then through the particle splitting operator gs, all newly generated particles gs(AG) must be located at the same layer as AG in the corresponding particle structure; at the same time, gs(AG) and AG have the same parent particle.

[0055] S4-3. Determine whether the correlation between the particles to be calculated reaches the preset particle reorganization threshold requirement; when the correlation between the particles to be calculated reaches the preset particle reorganization threshold requirement, perform a particle reorganization operation on the particles to be calculated, and combine multiple particles into a new particle.

[0056] In the embodiment of the present invention, the purpose of the granular combination (GC) operation is to merge two particles that meet the requirements into one. Based on this, the embodiment of the present invention defines a GC threshold. If the average correlation between the core attributes of the two particles used for particle combination is lower than this threshold, it means that the core attributes of the two particles are not sufficiently correlated, that is, these attributes are unlikely to appear in the same object, so there is no need to perform a GC operation.

[0057] As a preferred embodiment, the particle reorganization operation is performed by the following particle reorganization operator: gc(AG1,AG2)={AG i |AG i .K=AG1.K∪AG2.K,AG i .A=AG1.A∪AG2.A,AG i .O=?, i=1} (Formula 2).

[0058] As shown in Formula 2, the particle recombination operator gc satisfies the commutative law: gc(AG1,AG2)=gc(AG2,AG1); for each new particle AG generated by gc i , its core attribute set AG i .K and concept connotation AG i .A is the union of K and A of the two original particles; and its conceptual extension AG i .O is completely uncertain and needs to be filled in during the process of knowledge reasoning.

[0059] For two particles AG1 and AG2 in a given attribute partial order structure, if they can be combined to form a new particle, then through the particle recombination operator, the newly generated particle gc(AG1,AG2) must be located in the same layer as the original particles AG1 and AG2 and have the same parent particle.

[0060] S4-4. Determine whether the correlation between the particles to be calculated reaches the preset particle isomorphism threshold requirement; when the correlation between the particles to be calculated reaches the preset particle isomorphism threshold requirement, perform particle isomorphism operation on the particles to be calculated, isomorphize multiple particles into new particles and generate a new object mode; In the embodiment of the present invention, the purpose of the granular isomorphism (GI) operation is to isomorphize a sub-particle of a granule into another particle that meets the conditions as a sub-particle. Therefore, the embodiment of the present invention designs a GI threshold. If the average correlation between sub-particles is lower than this threshold, it means that the core attribute of this sub-particle is not sufficiently correlated with the attribute of another sub-particle, so there is no need to perform the GI operation.

[0061] As a preferred embodiment, the particle isomorphism operation is performed by the following particle isomorphism operator: (Formula 3).

[0062] As shown in Formula 3, the particle isomorphism operator gi does not satisfy the commutative law: gi(AG1,AG2)≠gi(AG2,AG1); for each new particle AG generated by gi(AG1,AG2) i , its core attribute set AG i .K must be the same as one of the child node particles of AG2 and not appear in the original child node of AG1; at the same time, its conceptual connotation AG i .A is AG i .K is the union of AG2.A; and its conceptual extension AG i .O is completely uncertain and needs to be filled in during the process of knowledge reasoning. For each new particle AG generated by gi(AG2,AG1) i , the situation is similar.

[0063] For two particles AG1 and AG2 in a given attribute partial order structure, if they can be isomorphically formed into new particles, then through the particle isomorphism operator, the newly generated particles gi(AG1,AG2) and gi(AG2,AG1) must be located in the next layer of the original particles AG1 and AG2, respectively, and are the sub-particles of AG1 and AG2, respectively. In addition, for AG i ∈{gi(AG1,AG2)∪gi(AG2,AG1)}, if AGi .K=Ø, then AGi is a possible object mode and can be described as: OP=(AG i .O, AG i .A).

[0064] Figure 5 The figure shows a specific process for determining the correlation between particles. Figure 5 The designed particle splitting threshold, particle reorganization threshold and particle isomorphism threshold are 0.85, 0.15 and 0.15 respectively. In the particle splitting step, for particles a, b and a, c, the average correlation of (a, b) is 0.8, which is less than the particle splitting threshold of 0.85, so the particle separation operation can be performed; the average correlation of (a, c) is 0.8, which is greater than the particle splitting threshold of 0.85, so there is no need to perform a particle splitting operation. In the particle reorganization step, for particles a, d and a, e, the particle correlation of (a, d) is 0.2, which is greater than the particle reorganization threshold of 0.15, so there is a possibility of particle reorganization; the particle correlation of (a, e) is 0.1, which is less than the particle reorganization threshold of 0.15, so there is no need to perform a particle reorganization operation. In the particle isomorphism step, for the child particle d of ab and the child particles c and e of a, the particle correlation (average) of (fab, d) is 0.4, which is greater than the particle isomorphism threshold of 0.15, so the particle isomorphism operation can be performed; the particle correlation (average) of (fa, c) is 0.5, which is greater than the particle isomorphism threshold of 0.15, so the particle isomorphism operation can be performed; the particle correlation (average) of (fa, e) is 0.1, which is less than the particle isomorphism threshold of 0.15, so no particle isomorphism operation is required.

[0065] S4-5. Determine whether a new object pattern is generated in the particle isomorphism operation; when a new object pattern is generated, add the new particle to the particles to be calculated, and return to the step of performing a particle reorganization operation on the particles to be calculated when the correlation between the particles to be calculated reaches a preset particle reorganization threshold requirement until no new object pattern is generated.

[0066] S4-6. When no new object pattern is generated, obtain all newly generated object patterns and summarize and output them.

[0067] After all granular computing processes are completed, in the embodiment of the present invention, all newly generated object patterns are output as inference results of granular computing.

[0068] The detailed implementation process of the method of the present invention is as follows Figure 6 As a specific example, the Tuberculosis dataset is a relationship diagram between tuberculosis symptoms and tuberculosis patients, as shown in the following table:

[0069] The columns represent 12 possible symptoms of tuberculosis: persistent cough, sputum production, mucopurulent sputum, blood in sputum, clear sputum, weight loss, severe night sweats, loss of appetite, chest pain, shortness of breath, tuberculosis contact, and fatigue; the rows represent 23 tuberculosis patients. The goal of this embodiment is to infer the symptom combination that may be caused by tuberculosis, i.e., the object pattern, based on the symptom combination of certain tuberculosis patients. This embodiment constructs a three-branch partially ordered particle structure based on the first 14 patients, and then uses the particle computing method and the method proposed in the present invention to compare the object pattern and the results and quantity of the particles generated by reasoning. The results are shown in the following table:

[0070] For the inference results, since this embodiment only selects the first 14 patients, it is necessary to determine whether the symptom combinations of the last 9 patients can be derived. Using python to analyze the detailed domain knowledge and object pattern results (not shown), for conventional granular computing methods, the symptom combinations of the 9 patients can all be derived, while the symptom combinations of the remaining 8 patients can all be derived except for the symptom combination of patient No. 20 that cannot be derived using the granular computing method based on domain knowledge of the present invention. Based on this, when making judgments, it is necessary to pay more attention to symptom e: clear sputum, which can be achieved by increasing the correlation between symptom e and other symptoms, or adjusting the threshold, or inviting experts to design a complete two-dimensional correlation matrix.

[0071] As for the number of inferences, it can be seen from the above table that by using simple granular calculation, excluding known symptom combinations, 2315 possible combinations of tuberculosis patient symptoms will be derived and calculated. However, if the method proposed by the present invention is used, the results of the derivation calculation are only 1214, which is about half the number.

[0072] In combination with the above content, it is found that the method of constructing prompt words based on domain knowledge for granular computing in the embodiment of the present invention not only greatly reduces the number of tuberculosis symptom combinations, but also guides doctors to pay more attention to the symptom of clear sputum. It reminds doctors that clear sputum may also be a phenomenon of tuberculosis patients, which helps doctors avoid misdiagnosis and missed diagnosis during the diagnosis of tuberculosis.

[0073] Figure 7: is a schematic diagram of the structure of the electronic device proposed in the second embodiment of the present invention. The memory of this embodiment stores program instructions for implementing the method of constructing prompt words based on domain knowledge for granular computing in any of the above embodiments. The processor is used to execute the program instructions stored in the memory to construct prompt words based on domain knowledge for granular computing. Among them, the processor can also be called CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0074] The contents of the method in the first embodiment of the present invention are all applicable to the electronic device embodiment. The functions specifically implemented by the electronic device embodiment are the same as those of the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method.

[0075] Figure 8 The computer-readable storage medium of the third embodiment of the present invention is a schematic diagram of the structure. The computer-readable storage medium of the fourth embodiment of the present invention stores program instructions that can implement the above-mentioned method of constructing prompt words based on domain knowledge for granular computing, wherein the program instructions can be stored in the above-mentioned storage medium in the form of a software product, including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0076] The contents of the method in the first embodiment of the present invention are all applicable to the computer-readable storage medium embodiment. The functions specifically implemented by the computer-readable storage medium embodiment are the same as those of the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method.

[0077] This embodiment also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for constructing prompt words based on domain knowledge to perform granular computing provided by the above embodiment.

[0078] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0079] Those skilled in the art will appreciate that the modules in the devices in the embodiments of the present invention may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments of the present invention may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the corresponding claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the corresponding claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0080] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0081] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0082] In addition, each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. In particular, for embodiments such as devices and equipment, since they are basically similar to method embodiments, the relevant parts can refer to the partial description of the method embodiments. The embodiments of the devices and equipment described above are merely schematic, wherein the modules, units, etc. described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed in multiple places, such as nodes of a system network. Specifically, some or all of the modules and units may be selected according to actual needs to achieve the purpose of the above-mentioned embodiment scheme. Those skilled in the art can understand and implement it without paying creative labor.

[0083] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0084] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0085] In addition, the terms "first", "second", etc. used in the embodiments of the present invention are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the present embodiment. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present invention can explicitly or implicitly indicate that the embodiment includes at least one of the features. In the description of the present invention, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.

[0086] In the embodiments of the present invention, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element. In addition, components, features, and elements with the same name in different embodiments of the present invention may have the same meaning or different meanings, and their specific meanings need to be determined by their explanation in the specific embodiment or further combined with the context in the specific embodiment.

[0087] Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and cannot be construed as limitations of the present invention, and those of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention. Those skilled in the art will readily come to think of other embodiments of the present invention after considering the specification and practicing the present invention. This application is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art that are not disclosed in the present invention. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

Claims

1. A method for granular computing based on domain knowledge to construct prompt words, characterized in that: The following steps are involved: Acquire domain knowledge and construct prompt words based on the domain knowledge; Input the prompt word into a large language model to obtain an attribute pair probability matrix; Determine the correlation between the particles to be calculated based on the attribute probability matrix; When the correlation between the particles to be calculated meets the requirement, a particle calculation operation is performed on the examples to be calculated.

2. The method for granular computing based on domain knowledge-based prompt words according to claim 1, characterized in that: The domain knowledge is a data set consisting of terms, definitions, concepts, tools, standards, processes, cases and statistical data used in the domain.

3. The method for granular computing based on domain knowledge-based prompt words according to claim 1, characterized in that: The prompt words include task content, task object, task example and task attribute; The task content is used to describe the reasoning operation that the large language model needs to perform; The task object is used to describe the object played by the large language model when performing reasoning operations; The task example is used to describe the format of the inference result output by the large language model; The task attributes are used to describe the limiting conditions for the large model to perform reasoning operations.

4. The method for granular computing based on domain knowledge-based prompt words according to claim 3, characterized in that: The step of constructing prompt words based on domain knowledge specifically includes the following steps: Determine the task content and task object of the prompt word; Using a preset two-dimensional correlation matrix example as a task example of the prompt word; The task attribute of the prompt word is determined according to domain knowledge.

5. The method for granular computing based on domain knowledge-based prompt words according to claim 3, characterized in that: The large language model is any one of a language large model and a multimodal large model; after receiving the prompt word input, the large language model completes reasoning based on task attributes in the large language model according to the task object and task content, and obtains an attribute pair probability matrix in a task example format as the output of the large language model.

6. The method for granular computing based on domain knowledge-based prompt words according to claim 1, characterized in that: The method of determining the correlation between the particles to be calculated according to the attribute pair probability matrix specifically includes the following steps: Obtain the core properties of the particles to be calculated; The core attributes of the particles to be calculated are searched in the attribute pair probability matrix, and the intersection of the core attributes of the particles to be calculated is used as the correlation between the particles to be calculated.

7. The method for granular computing based on domain knowledge-based prompt words according to claim 1, characterized in that: The particles to be calculated are expressed by a three-branch partial order structure graph.

8. The method for granular computing based on domain knowledge-based prompt words according to claim 1, characterized in that: When the correlation between the particles to be calculated meets the requirement, the particle calculation operation is performed on the example to be calculated, which specifically includes the following steps: Get the particles to be calculated; Determine whether the correlation between the core attributes of the particles to be calculated reaches a preset particle splitting threshold requirement; when the correlation between the particles to be calculated reaches the preset particle splitting threshold requirement, perform a particle splitting operation on the particles to be calculated, splitting one particle into multiple new particles; Determine whether the correlation between the particles to be calculated reaches a preset particle reorganization threshold requirement; when the correlation between the particles to be calculated reaches the preset particle reorganization threshold requirement, perform a particle reorganization operation on the particles to be calculated, and combine multiple particles into a new particle; Determine whether the correlation between the particles to be calculated reaches a preset particle isomorphism threshold requirement; when the correlation between the particles to be calculated reaches the preset particle isomorphism threshold requirement, perform a particle isomorphism operation on the particles to be calculated, isomorphize multiple particles into new particles and generate a new object mode; Determine whether a new object pattern is generated in the particle isomorphism operation; when a new object pattern is generated, add the new particle to the particles to be calculated, and return to the step of performing a particle reorganization operation on the particles to be calculated when the correlation between the particles to be calculated reaches a preset particle reorganization threshold requirement until no new object pattern is generated; When no new object schema is generated, all newly generated object schemas are obtained and summarized for output.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement a method for granular computing based on domain knowledge-based prompt words as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement a method for granular computing based on domain knowledge-based prompt words as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Storage method for intelligent monitoring of video data

    CN106878676A

  • Ontology-based multi-granularity urban rainstorm waterlogging knowledge graph construction method

    CN115114455A

  • Question and answer method and device and electronic equipment

    CN117194646A