A method, device, equipment and medium for generating private knowledge model knowledge

By scanning the business database metadata and building a knowledge model, the problem of relying on manual mining and construction of existing private knowledge models is solved, and the automated generation and efficient construction of private knowledge models are realized.

CN119476447BActive Publication Date: 2025-06-06HANGZHOU NEWGRAND TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510052753.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-06-06
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

The mining and construction of existing private knowledge models relies on manual completion, with low automation and low efficiency. Especially for small and medium-sized companies, model fine-tuning poses challenges to computing power costs.

Method used

By scanning the business database metadata, building a knowledge model, and building a private knowledge model based on the Q&A data, the generation speed and efficiency of the model are improved.

Benefits of technology

The automated generation of private knowledge models is realized, the mining and construction efficiency is improved, and the dependence on manual intervention is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476447B_ABST
    Figure CN119476447B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and medium for generating private knowledge model knowledge. The method comprises: scanning metadata in a business database to obtain different types of metadata objects; constructing a knowledge model according to the association relationship between the different types of metadata objects, and supplementing the metadata master object in the metadata object according to the knowledge model; determining the question and answer data corresponding to the metadata master object, and constructing a private knowledge model according to the question and answer data. The embodiment of the present invention can improve the efficiency of mining and constructing private knowledge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for generating private knowledge model knowledge. Background Art

[0002] Private Large Models (PLMs) are large models developed specifically for a specific enterprise or industry. Such models can be customized to meet specific needs and can be trained and deployed in a private environment to protect the security and privacy of sensitive data. For private large models, there are two common enhancement and optimization modes: model fine-tuning (Fine-Tuning) and RAG enhancement (Retrieval-Augmented Generation).

[0003] Model fine-tuning means further training a pre-trained large model using a domain-specific dataset to adapt it to the needs of a specific task or domain. This method enables the model to better understand the terminology, concepts, and language style of a specific domain. RAG enhanced mode means obtaining relevant information about a question from private knowledge sources through information retrieval technology based on an existing large model, and then combining this information to generate a more accurate and coherent answer.

[0004] Model fine-tuning poses great challenges to the accumulation of artificial intelligence technology and computing power costs for small and medium-sized companies. Therefore, for most companies, RAG enhancement is a better choice. However, the RAG enhancement model relies more on the mining and construction of private knowledge, and the mining and construction of existing private knowledge are mainly completed manually, with a low degree of automation and low efficiency in mining and construction. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for generating private knowledge model knowledge, so as to improve the efficiency of mining and constructing private knowledge.

[0006] According to one aspect of the present invention, a method for generating private knowledge model knowledge is provided, comprising:

[0007] Scan the metadata in the business database to obtain different types of metadata objects;

[0008] Building a knowledge model according to the association relationship between the different types of metadata objects, and supplementing the metadata main object in the metadata object according to the knowledge model;

[0009] Question and answer data corresponding to the metadata main object is determined, and a private knowledge model is constructed based on the question and answer data.

[0010] According to another aspect of the present invention, there is provided a device for generating private knowledge model knowledge, comprising:

[0011] A scanning module is used to scan metadata in the business database to obtain different types of metadata objects;

[0012] A perfecting module, used to construct a knowledge model according to the association relationship between the metadata objects of different types, and to supplement the data of the metadata master object in the metadata object according to the knowledge model;

[0013] The construction module is used to determine the question and answer data corresponding to the metadata main object and to construct a private knowledge model based on the question and answer data.

[0014] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating private knowledge model knowledge according to any embodiment of the present invention is implemented.

[0015] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating private knowledge model knowledge described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating private knowledge model knowledge described in any embodiment of the present invention when executed.

[0017] The embodiment of the present invention automatically detects and scans the business database of the business system, takes the metadata main object obtained by the scan as the core, automatically builds a private knowledge model, and improves the generation speed of the model.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 is a flow chart of a method for generating private knowledge model knowledge according to an embodiment of the present invention;

[0021] Figure 2 is a flow chart of a method for generating private knowledge model knowledge according to another embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of the structure of a device for generating private knowledge model knowledge according to another embodiment of the present invention;

[0023] Figure 4 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] Figure 1This is a flowchart of a method for generating private knowledge model knowledge provided by an embodiment of the present invention. This embodiment can be applied to the situation where the data of the business database is sorted before using the large model to obtain the knowledge of building the RAG private knowledge model to assist the subsequent use of the large model. The method can be executed by a device for generating private knowledge model knowledge, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device with corresponding data processing capabilities. Figure 1 As shown, the method includes:

[0027] S110 , scanning metadata in a business database to obtain metadata objects of different types.

[0028] S120: construct a knowledge model according to the association relationship between the different types of metadata objects, and supplement the metadata main object in the metadata object according to the knowledge model.

[0029] S130: Determine the question and answer data corresponding to the metadata main object, and construct a private knowledge model based on the question and answer data.

[0030] Among them, metadata objects are important components for describing and managing each entry in the knowledge base, helping the system to retrieve and process entries more efficiently. Question and answer data includes questions, answers, answer types, answer paths, and associated actions. Questions are requests raised by users or systems that need to be answered or processed. Answers are specific responses or solutions to questions. It can be text, links, files, or other forms of information. Answer types are classifications of answer forms, helping the system to better manage and process different types of answers. In this invention, they are mainly divided into static and dynamic categories. The answer path refers to the storage location or access path of the answer in the private knowledge base. Associated actions refer to additional operations or steps that the system needs to perform after generating the answer. These actions can help users complete tasks faster or obtain more information.

[0031] Specifically, the business database of the business system is scanned, and all the metadata information obtained from the scan is put into the metadata container, which mainly includes the object name, object field, object field type and description of the metadata object. Business databases mainly include structured databases and unstructured databases. Compared with metadata objects, structured databases have clear data structures and can be matched one by one for normalization. There are many types of unstructured databases, and the data storage structures are different. When scanning metadata, for unstructured databases with a single storage structure, a piece of data is obtained and the data is inferred to obtain the metadata object (such as mongdb). For unstructured databases with non-single storage structures, a piece of data is obtained, and the field headers are camel-case spliced ​​according to the field headers corresponding to the data to create metadata objects. After the scan is completed, the metadata objects are inferred to determine the type of each metadata object, which is mainly divided into three categories: metadata master object, metadata slave object, and metadata auxiliary object.

[0032] After the metadata classification is completed, the main object is placed in the knowledge model container, and an object association graph of the main object and the slave object is generated. The slave object is placed as a node of the main object. For the auxiliary object, reasoning is required again to determine whether the auxiliary object is a log or a relational object. The log type is discarded. The relational object needs to associate the associated fields. The metadata object is associated to determine whether the main object and the slave object of the knowledge model are associated. If they are already associated, the object is discarded. If not, the relationship between the main and slave objects is established according to the fields of the auxiliary object. The knowledge model container is iterated to determine the mapper file (mapper.xml) of the persistence layer framework (mybatis) corresponding to the metadata object of the knowledge model container, and the encapsulation (bean) class corresponding to the metadata object is extracted. The file of the encapsulation class is obtained in the current workspace for parsing, and the fields of the metadata object are parsed to correspond to the attribute description of the encapsulation class, and the description is supplemented to the metadata object to complete the data supplement of the metadata main object.

[0033] After completing the mining and supplementation of the metadata main object, for each metadata main object, the corresponding question and answer data is generated according to the specific information of the metadata main object. That is, there are as many sets of question and answer data as there are metadata main objects. These question and answer data are stored and managed to obtain a private knowledge model.

[0034] The embodiment of the present invention automatically detects and scans the business database of the business system, takes the metadata main object obtained by the scan as the core, automatically builds a private knowledge model, and improves the generation speed of the model.

[0035] Figure 2This is a flowchart of a method for generating private knowledge model knowledge provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2 As shown, the method includes:

[0036] S210, scanning metadata in a business database to obtain metadata objects to be classified and object contents of the metadata objects; and confirming whether the metadata object is a metadata primary object, a metadata secondary object or a metadata auxiliary object according to the object contents of the metadata object.

[0037] Specifically, the reasoning clues for slave objects and auxiliary objects are relatively simple. For the joint query in the mapper file of the persistence layer framework, the one on the right is the slave object. At the same time, when the query result is a record set (List), when traversing the record set, the associated object is the slave object. For the storage structure of the data manager corresponding to the metadata object, there is no index field, so it is determined to be an auxiliary object.

[0038] Based on the above embodiment, optionally, the confirming whether the metadata object is a main object according to the object content of the metadata object includes:

[0039] If the structure of the data manager corresponding to the metadata object is an index field and the hit field is a unique row data type, then determining that the metadata object is a metadata master object;

[0040] If the metadata object is the table structure on the left in the joint query result or the main query structure in the subquery result, the metadata object is determined to be the metadata main object; the joint query result and the subquery result are obtained by parsing the mapper file of the persistence layer framework;

[0041] If the metadata object is a storage structure corresponding to the traversal record set, it is determined that the metadata object is a metadata master object.

[0042] There are many clues for reasoning about the primary object, which can be divided into three. The first is to analyze whether the structure of the data manager corresponding to the object is an index field, and at the same time aggregate and count the hit fields to determine whether the current field is a unique row data type. If so, the object is determined to be the primary object. The second is to scan in the current program, scan all the mapper files of the persistence layer framework, parse all the mapper files, and extract all the situations containing union queries and subqueries. If this situation exists, the table structure on the left side of the union query is the primary object; in the subquery, the main query is the primary object. The third is to scan all the service class methods under the current working path to see if the query result is a record set, and traverse the current record set for query, returning the storage structure corresponding to the record set as the primary object.

[0043] S220: construct a knowledge model according to the association relationship between the different types of metadata objects, and supplement the metadata main object in the metadata object according to the knowledge model.

[0044] S230: For each metadata main object, determine whether the metadata main object belongs to an entity object or a data object.

[0045] S240. If the metadata main object belongs to an entity object, the question and answer data of the metadata main object is generated by string conversion or calling a large model; if the metadata main object belongs to a data object, the question and answer data of the metadata main object is generated by summary generation and calling a large model.

[0046] Specifically, determine the presentation layer object corresponding to the metadata main object, and according to all the http service information corresponding to the presentation layer object. The service information includes file reports (report) and those without clear actions such as adding, modifying, and deleting are data objects, and the rest are entity objects.

[0047] For entity objects, first determine whether the entity object has a string conversion (toString) method. If so, use this method as the main way to generate answers. Secondly, determine the paging query service based on the http service information, and determine whether the service has a corresponding value object (vo). If so, use the value object's fields as the "question" key metadata. If there are no corresponding value object fields, scan the corresponding query interface in the corresponding client code based on the http service information, and extract the query fields of the interface as the "question fields". If there is no string conversion method, extract the query result fields of the interface and the display address of the query details interface at the same time. With the question field, result field, and display address of the details interface, iterate the table of the data storage corresponding to the metadata entity object, extract each record to generate a model object of the private big model, concatenate the value of the question field as the "question", if there is a string conversion method, call the method to generate the answer, if not, get the value of the result field, and generate a description as the model answer based on the value by calling the public big model. When generating the model answer, if there is a slave object, it needs to be appended to the answer of the main object according to the logic of generating the answer by the main object; at the same time, set the answer type to static, and use the value of the current record as the display parameter of the details interface, assemble it according to the address, set it to the associated action, and complete the question and answer data generation of the entity object.

[0048] For data objects, determine whether the data object corresponds to an organization and a file report download address based on the http service information. If it is determined that there is a file report, parse the file report template and extract the report summary. At the same time, scan the client to obtain the data parameters of the file report, and read the organization data for traversal. Iterate the table of the data storage device corresponding to the entity object, extract each record to generate the parameters, assemble the parameters, call the http service information, obtain the data report corresponding to each organization, and extract the report summary and conclusion. If there is no conclusion, use the summary as the answer to the question, and use the report address as the associated action. Based on the query parameter value, generate a description as a question in the large model to complete the question and answer data generation of the data object.

[0049] S250: construct a private knowledge model based on the question and answer data.

[0050] S260. Based on the private knowledge model, determine target question and answer data that matches the question to be answered; and use the target question and answer data as output knowledge of the private knowledge model.

[0051] Specifically, after obtaining the question to be answered, the question to be answered is matched with the questions in each question and answer data for similarity, and the question data with the highest similarity is determined as the target question and answer data. The target question and answer data is output as private knowledge that is helpful for answering the question to be answered, and can be used to answer the question to be answered or perform other further processing based on it.

[0052] The embodiment of the present invention classifies metadata main objects and generates question-answer data in different ways according to data formats, thereby improving the reliability of question data.

[0053] Figure 3 A schematic diagram of a structure of a device for generating private knowledge model knowledge provided by another embodiment of the present invention. Figure 3 As shown, the device comprises:

[0054] Scanning module 310, used to scan metadata in the business database to obtain different types of metadata objects;

[0055] The improvement module 320 is used to construct a knowledge model according to the association relationship between the different types of metadata objects, and to supplement the metadata main object in the metadata object according to the knowledge model;

[0056] The construction module 330 is used to determine the question and answer data corresponding to the metadata main object and construct a private knowledge model based on the question and answer data.

[0057] The device for generating private knowledge model knowledge provided in the embodiment of the present invention can execute the method for generating private knowledge model knowledge provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.

[0058] Optionally, the scanning module 310 includes:

[0059] A scanning unit, used to scan metadata in a business database to obtain metadata objects to be classified and object contents of the metadata objects;

[0060] The classification unit is used to confirm whether the metadata object is a metadata primary object, a metadata secondary object or a metadata auxiliary object according to the object content of the metadata object.

[0061] Optionally, the classification unit includes a main object classification sub-unit, which is specifically used to: if the structure of the data manager corresponding to the metadata object is an index field and the hit field is a unique row data type, then determine that the metadata object is a metadata main object; if the metadata object is the table structure on the left in the joint query result or the main query structure in the subquery result, then determine that the metadata object is a metadata main object; the joint query result and the subquery result are obtained by parsing the mapper file of the persistence layer framework; if the metadata object is a storage structure corresponding to the traversal record set, then determine that the metadata object is a metadata main object.

[0062] Optionally, the question and answer data includes questions, answers, answer types, answer paths, and associated actions.

[0063] Optionally, the building block 330 includes:

[0064] a classification unit, configured to determine, for each metadata main object, whether the metadata main object belongs to an entity object or a data object;

[0065] A first generating unit, configured to generate question-answer data of the metadata main object by character string conversion or calling a large model if the metadata main object belongs to an entity object;

[0066] The second generating unit is used for generating question-answer data of the metadata main object by summarizing and calling a large model if the metadata main object belongs to a data object.

[0067] Optionally, the device further comprises:

[0068] A knowledge matching module, used to determine question-answer data matching the question to be answered based on the private knowledge model;

[0069] The knowledge output module is used to use the question and answer data as output knowledge of the private knowledge model.

[0070] The device for generating private knowledge model knowledge further described can also execute the method for generating private knowledge model knowledge provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0071] Figure 4 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0072] like Figure 4 As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0073] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0074] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a method for generating private knowledge model knowledge.

[0075] In some embodiments, the method for generating private knowledge model knowledge may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the method for generating private knowledge model knowledge described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method for generating private knowledge model knowledge in any other appropriate manner (e.g., by means of firmware).

[0076] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0077] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0078] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0079] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0080] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0081] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0082] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0083] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating private knowledge model knowledge, characterized in that: The method comprises: Scan metadata in the business database to obtain different types of metadata objects; the metadata objects are important components for describing and managing each entry in the knowledge base, helping the system to retrieve and process entries more efficiently; Building a knowledge model according to the association relationship between the different types of metadata objects, and supplementing the metadata main object in the metadata object according to the knowledge model; Determine the question and answer data corresponding to the metadata main object, and build a private knowledge model based on the question and answer data; The scanning of metadata in the business database to obtain different types of metadata objects includes: Scanning metadata in a business database to obtain metadata objects to be classified and object contents of the metadata objects; Determine whether the metadata object is a metadata primary object, a metadata secondary object, or a metadata auxiliary object according to the object content of the metadata object; Wherein, the confirming whether the metadata object is a metadata primary object according to the object content of the metadata object comprises: If the structure of the data manager corresponding to the metadata object is an index field and the hit field is a unique row data type, then determining that the metadata object is a metadata master object; If the metadata object is the table structure on the left in the joint query result or the main query structure in the subquery result, the metadata object is determined to be the metadata main object; the joint query result and the subquery result are obtained by parsing the mapper file of the persistence layer framework; If the metadata object is a storage structure corresponding to the traversal record set, determining that the metadata object is a metadata master object; The question-and-answer data corresponding to the metadata main object includes: For each metadata primary object, determining whether the metadata primary object belongs to an entity object or a data object; If the metadata main object belongs to an entity object, generating question and answer data of the metadata main object by character string conversion or calling a large model; If the metadata main object belongs to a data object, question and answer data of the metadata main object is generated by summarizing and calling a large model.

2. The method according to claim 1, characterized in that The question and answer data includes questions, answers, answer types, answer paths, and associated actions.

3. The method according to claim 1, characterized in that After constructing the private knowledge model according to the question and answer data, the method further includes: Determining question-answer data matching the question to be answered based on the private knowledge model; The question-answer data is used as output knowledge of the private knowledge model.

4. A device for generating private knowledge model knowledge, characterized in that: The device comprises: A scanning module is used to scan metadata in the business database to obtain different types of metadata objects; the metadata objects are important components for describing and managing each entry in the knowledge base, helping the system to retrieve and process entries more efficiently; A perfecting module, used to construct a knowledge model according to the association relationship between the metadata objects of different types, and to supplement the data of the metadata master object in the metadata object according to the knowledge model; A construction module, used to determine the question and answer data corresponding to the metadata main object, and to construct a private knowledge model based on the question and answer data; Wherein, the scanning module includes: A scanning unit, used to scan metadata in a business database to obtain metadata objects to be classified and object contents of the metadata objects; a classification unit, configured to determine whether the metadata object is a metadata primary object, a metadata secondary object, or a metadata auxiliary object according to the object content of the metadata object; The classification unit is specifically used for: if the structure of the data manager corresponding to the metadata object is an index field and the hit field is a unique row data type, then the metadata object is determined to be a metadata master object; if the metadata object is a table structure on the left in a joint query result or a main query structure in a subquery result, then the metadata object is determined to be a metadata master object; the joint query result and the subquery result are obtained by parsing the mapper file of the persistence layer framework; if the metadata object is a storage structure corresponding to a traversal record set, then the metadata object is determined to be a metadata master object; Wherein, the building blocks include: a classification unit, configured to determine, for each metadata main object, whether the metadata main object belongs to an entity object or a data object; A first generating unit, configured to generate question-answer data of the metadata main object by character string conversion or calling a large model if the metadata main object belongs to an entity object; The second generating unit is used for generating question and answer data of the metadata main object by summarizing and calling a large model if the metadata main object belongs to a data object.

5. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for generating private knowledge model knowledge according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for generating private knowledge model knowledge according to any one of claims 1 to 3 when executed.

Citation Information

Patent Citations

  • Knowledge base construction method, data processing method, equipment, storage medium and program product

    CN119166740A

  • Question answering method and device for knowledge in security ring field, electronic equipment and storage medium

    CN119271772A