Knowledge base deployment method and device based on data sharding, electronic equipment and medium

CN115907010BActive Publication Date: 2026-09-08SECZONE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211405365.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2026-09-08
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

因此,由于将整个知识库数据整体打包到用户服务器进行部署,导致知识库部署的效率较低

Benefits of technology

[0012]This invention first acquires a knowledge base for data sharding and storage. Further, it queries the knowledge data and structure of the knowledge base to enable rapid data deployment based on a pre-defined structure during subsequent sharding deployment. Furthermore, it constructs a structure file for the knowledge structure, allowing for orderly deployment of the sharded knowledge base based on its pre-sharded structure. This facilitates batch deployment, improving management and deployment speed. Additionally, it shards the knowledge data for batch and language-specific deployment, enhancing management and control over the development language data, thus reducing server costs. Finally, it performs periodic storage of the sharded knowledge, storing it in time slots to reduce costs. To address the pressure of storing excessive content at once, this invention further addresses this issue by constructing an upgrade verification file for the knowledge data based on the periodically stored knowledge. This file records all information packaged within a period, ensuring that subsequent upgrades of already packaged data can be performed sequentially according to the packaging information and packaging period recorded in the upgrade verification file. Furthermore, this invention utilizes the structure file for structure deployment in a pre-built user private service to prepare for the subsequent deployment of knowledge base data within the user private service. Moreover, this invention uses the upgrade verification file to deploy and upgrade the knowledge data in the structure deployment service, ensuring that the knowledge base data is deployed in the user private service and upgraded to the latest version after the structure is deployed, guaranteeing that users automatically retrieve the data package most recent to the current time. Therefore, this invention proposes a knowledge base deployment method, apparatus, electronic device, and medium based on data sharding, which can deploy a knowledge base containing the development language data that users need, improving knowledge base deployment efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115907010B_ABST
    Figure CN115907010B_ABST
Patent Text Reader

Abstract

The application relates to the field of data fragmentation, and discloses a knowledge base deployment method and device based on data fragmentation, electronic equipment and a medium. The method comprises the following steps: acquiring a knowledge base, querying knowledge data and a knowledge structure of the knowledge base, and constructing a structure file of the knowledge structure; performing data fragmentation on the knowledge data to obtain fragmented knowledge, periodically storing the fragmented knowledge to obtain periodically stored knowledge, constructing an upgrade check file of the knowledge data according to the periodically stored knowledge; performing structure deployment in a pre-constructed user private service by using the structure file to obtain a structure deployment service, and performing deployment upgrade on the knowledge data in the structure deployment service by using the upgrade check file to obtain a deployment result of the knowledge base. The application can improve the deployment efficiency of the knowledge base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data sharding, and more particularly to a knowledge base deployment method, apparatus, electronic device, and medium based on data sharding. Background Technology

[0002] Knowledge base deployment based on data sharding refers to the process of sharding the data in the knowledge base and deploying it in different locations on the server.

[0003] Currently, when deploying open-source detection tools privately, the existing knowledge base deployment involves packaging the entire knowledge base data onto the user's server. This approach suffers from the problem of excessively large data packages and slow deployment speeds. Furthermore, users often only need one or a portion of the knowledge base's programming language components, associated vulnerabilities, and associated license data (hereinafter referred to as programming language data), rather than the full set of programming language data. Therefore, deploying the entire knowledge base by packaging it onto the user's server results in low deployment efficiency. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a knowledge base deployment method, apparatus, electronic device, and medium based on data sharding. Its main purpose is to deploy a knowledge base containing the development language data that users need to select, thereby improving the efficiency of knowledge base deployment.

[0005] To achieve the above objectives, this invention provides a knowledge base deployment method based on data sharding, comprising: acquiring a knowledge base; querying the knowledge data and knowledge structure of the knowledge base; constructing a structure file for the knowledge structure; sharding the knowledge data to obtain sharded knowledge; periodically storing the sharded knowledge to obtain periodically stored knowledge; constructing an upgrade verification file for the knowledge data based on the periodically stored knowledge; deploying the structure in a pre-built user private service using the structure file to obtain a structure deployment service; and using the upgrade verification file to deploy and upgrade the knowledge data in the structure deployment service to obtain the deployment result of the knowledge base.

[0006] To address the aforementioned problems, this invention provides a knowledge base deployment device based on data sharding. The device includes: a structure construction module, used to acquire a knowledge base, query the knowledge data and knowledge structure of the knowledge base, and construct a structure file for the knowledge structure; a verification construction module, used to shard the knowledge data to obtain sharded knowledge, periodically store the sharded knowledge to obtain periodically stored knowledge, and construct an upgrade verification file for the knowledge data based on the periodically stored knowledge; and a data upgrade module, used to deploy the structure in a pre-built user-private service using the structure file to obtain a structure deployment service, and use the upgrade verification file to deploy and upgrade the knowledge data in the structure deployment service to obtain the deployment result of the knowledge base.

[0007] To address the above problems, the present invention provides an electronic device, comprising:

[0008] At least one processor; and a memory communicatively connected to said at least one processor;

[0009] The memory stores a computer program that can be executed by the at least one processor, enabling the at least one processor to execute the data sharding-based knowledge base deployment method as described in any of the first aspects above.

[0010] To address the aforementioned problems, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the knowledge base deployment method based on data sharding as described in any of the first aspects above.

[0011] Compared with existing technologies, the technical principles and beneficial effects of this solution are as follows:

[0012] This invention first acquires a knowledge base for data sharding and storage. Further, it queries the knowledge data and structure of the knowledge base to enable rapid data deployment based on a pre-defined structure during subsequent sharding deployment. Furthermore, it constructs a structure file for the knowledge structure, allowing for orderly deployment of the sharded knowledge base based on its pre-sharded structure. This facilitates batch deployment, improving management and deployment speed. Additionally, it shards the knowledge data for batch and language-specific deployment, enhancing management and control over the development language data, thus reducing server costs. Finally, it performs periodic storage of the sharded knowledge, storing it in time slots to reduce costs. To address the pressure of storing excessive content at once, this invention further addresses this issue by constructing an upgrade verification file for the knowledge data based on the periodically stored knowledge. This file records all information packaged within a period, ensuring that subsequent upgrades of already packaged data can be performed sequentially according to the packaging information and packaging period recorded in the upgrade verification file. Furthermore, this invention utilizes the structure file for structure deployment in a pre-built user private service to prepare for the subsequent deployment of knowledge base data within the user private service. Moreover, this invention uses the upgrade verification file to deploy and upgrade the knowledge data in the structure deployment service, ensuring that the knowledge base data is deployed in the user private service and upgraded to the latest version after the structure is deployed, guaranteeing that users automatically retrieve the data package most recent to the current time. Therefore, this invention proposes a knowledge base deployment method, apparatus, electronic device, and medium based on data sharding, which can deploy a knowledge base containing the development language data that users need, improving knowledge base deployment efficiency. Attached Figure Description

[0013] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1This is a flowchart illustrating a knowledge base deployment method based on data sharding, provided as an embodiment of the present invention.

[0016] Figure 2 As shown in one embodiment of the present invention Figure 1 A schematic diagram illustrating the storage content of the upgrade verification file in a knowledge base deployment method based on data sharding;

[0017] Figure 3 This is a schematic diagram of a knowledge base deployment device based on data sharding, provided in an embodiment of the present invention.

[0018] Figure 4 This is a schematic diagram of the internal structure of an electronic device that implements a knowledge base deployment method based on data sharding, according to an embodiment of the present invention. Detailed Implementation

[0019] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0020] This invention provides a knowledge base deployment method based on data sharding. The execution entity of this method includes, but is not limited to, at least one of the following: a server, a terminal, or other electronic devices configured to execute the method provided in this invention. In other words, the knowledge base deployment method based on data sharding can be executed by software or hardware installed on a terminal device or a server device. The software can be a blockchain platform. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cluster of cloud servers. The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0021] See Figure 1 The diagram shown is a flowchart illustrating a knowledge base deployment method based on data sharding according to an embodiment of the present invention. Figure 1 The knowledge base deployment methods based on data sharding described in the document include:

[0022] S1. Obtain the knowledge base, query the knowledge data and knowledge structure of the knowledge base, and construct the structure file of the knowledge structure.

[0023] This invention provides an embodiment of a knowledge base for storing data in fragments. The knowledge base is a special database used for knowledge management, typically employing a concept-fact-rule knowledge representation system. Concepts provide the most basic content of knowledge and are at the lowest level; facts are composed of concepts, establishing connections between concepts; and rules are composed of facts, establishing connections between facts.

[0024] Furthermore, this embodiment of the invention queries the knowledge data and knowledge structure of the knowledge base so that when deploying the sharded knowledge base subsequently, data can be quickly deployed using a pre-determined structure. Here, knowledge data refers to the knowledge in the knowledge base, and the knowledge structure refers to the structural architecture of the knowledge in the knowledge base, including the creation of tables, indexes, views, stored procedures, and triggers in the database, as well as the definition of knowledge data, such as the type, name, and integer definition of the knowledge data.

[0025] In one embodiment of the present invention, querying the knowledge data and knowledge structure of a knowledge base includes: acquiring knowledge from the knowledge base and using the knowledge as knowledge data; querying the data relationships between data in the knowledge data and the storage location of the knowledge data; and determining the knowledge structure of the knowledge base based on the data relationships and storage locations.

[0026] Data association refers to the relationships between data, such as the consistency of column number and column name among the data in a table, the relationship that data in table B belongs to data 'a' in table A, and the sequential and left-right relationships between data. For example, based on data association and storage location, the knowledge structure of the knowledge base can be determined as follows: based on the relationships between data and the storage location, data at a certain storage location can be stored using a table structure, an index structure, etc.

[0027] Furthermore, this embodiment of the invention constructs a structure file for the knowledge structure, enabling orderly deployment of the sharded knowledge base based on its pre-sharding structure during subsequent deployment. This facilitates batch deployment of the knowledge base, improving both management and deployment speed. The structure file refers to a file declaring the structure of the knowledge base, such as a MySQL DDL or an Elasticsearch index mapping. The MySQL DDL is a language file used for creating, deleting, and modifying objects within the database; the Elasticsearch index mapping defines the names and data types of fields in the index. The mapping's function is to execute a series of instructions to transform input data into searchable index items.

[0028] In one embodiment of the present invention, constructing a structure file for a knowledge structure includes: determining a description method for the knowledge structure in a pre-constructed initial file; and constructing a structure file for the knowledge structure using the description method.

[0029] The pre-built initial files include an initial blank MySQL DDL file and an Elasticsearch index mapping file. The description method refers to the method of expressing the knowledge structure in the file, such as the method of expressing the sequential relationship of the knowledge structure, the method of expressing the subordinate relationship between tables, and the method of expressing the structure of adding, deleting, modifying and querying knowledge in the knowledge base.

[0030] S2. Perform data segmentation on the knowledge data to obtain segmented knowledge, perform periodic storage on the segmented knowledge to obtain periodically stored knowledge, and construct an upgrade verification file for the knowledge data based on the periodically stored knowledge.

[0031] This invention embodiment segments knowledge data to deploy the knowledge base in batches and by development language, which facilitates management and control, and the development language data of the knowledge base is controllable, reducing server costs.

[0032] In one embodiment of the present invention, data fragmentation of knowledge data to obtain fragmented knowledge includes: identifying horizontal features of the knowledge data; determining fragmentation rules of the knowledge data based on the horizontal features; and performing horizontal fragmentation of the knowledge data based on the fragmentation rules to obtain fragmented knowledge.

[0033] For example, the process of data sharding for knowledge data refers to splitting tables into different databases according to business dimensions, with each database dedicated to a specific business function. For instance, in an order table, order-related information is placed in a table in the order database, product information in a table in the product database, and address information in a table in the user information database. Horizontal features refer to the information type of each row in each table. For example, each row represents the information corresponding to each order number. If the sharding rule is determined by the horizontal feature, i.e., the order number, it is to shard according to whether the order number is odd or even. Based on the sharding rule, the data in the table is split into a table for odd-numbered orders and a table for even-numbered orders, depending on whether the order number is odd or even.

[0034] Furthermore, this embodiment of the invention reduces the pressure of storing too much content at once by periodically storing the fragmented knowledge in different time periods.

[0035] In one embodiment of the present invention, periodic storage of fragmented knowledge is performed to obtain periodically stored knowledge, including: constructing a periodic storage sub-package of fragmented knowledge based on the fragmentation type of the fragmented knowledge; determining the storage period of the fragmented knowledge; and periodically storing the fragmented knowledge using the periodic storage sub-package according to the storage period to obtain periodically stored knowledge.

[0036] The shard types include basic information types such as version, vulnerability, and solution, and development language data types such as Maven and npm. Periodic storage packages refer to the storage packages corresponding to each shard type. For example, basic information such as version, vulnerability, and solution is stored in the base data package, while development language data such as Maven and npm are stored in separate packages. This packaging process is carried out cyclically according to a certain period. For example, the base data package is stored on the first day, the Maven language package on the second day, the npm language package on the third day, and so on, with the base data package stored on the nth day, the Maven language package stored on the n+1th day, and so on, following this pattern.

[0037] Furthermore, this embodiment of the invention constructs an upgrade verification file for knowledge data based on periodically stored knowledge. This file records all information packaged within the period, ensuring that subsequent upgrades of already packaged data can be performed sequentially according to the packaging information and packaging period recorded in the upgrade verification file. Specifically, the upgrade verification file is used to verify the time sequence of data packets before upgrading them. The information in the upgrade verification file (check file) mainly includes three parts: first, the splitting information of the base package or language package, such as how many smaller packages a language package is split into; second, the file hash value of each data packet to verify data security during upgrades; and third, the type and version information of these packages, facilitating the acquisition and verification of data versions during subsequent upgrades, providing a version basis for subsequent incremental data upgrades. In short, all knowledge base data is cyclically packaged into single packages of various types within the period. Each package consists of one check file and multiple data packet files, with the check file recording all information about the packages within that period.

[0038] See Figure 2 As shown, this illustrates an embodiment of the present invention. Figure 1 This diagram illustrates the storage content of upgrade verification files in a knowledge base deployment method based on data sharding. Figure 2 In the diagram, the index structure package, basic data package, pip language package, golang language package, other language packages, maven language package, and npm language package represent the knowledge base data being cyclically packaged into single packages of various types within a period, i.e., periodically storing knowledge. The verification information in the diagram includes the file hash value of each data package, the package type, and version information. The file hash value of each data package is used to verify the security of the data during data upgrades, and the package type and version information facilitate the acquisition and verification of the data version during subsequent upgrades, providing a version basis for subsequent incremental data upgrades.

[0039] In one embodiment of the present invention, an upgrade verification file for knowledge data is constructed based on periodically stored knowledge, including: querying the package hash value, type information, and version information of periodically stored knowledge; constructing verification information for knowledge data based on the package hash value, type information, and version information; and constructing an upgrade verification file for knowledge data based on periodically stored knowledge and verification information.

[0040] S3. Deploy the structure in a pre-built user private service using the structure file to obtain the structure deployment service. Then, use the upgrade verification file to deploy and upgrade the knowledge data in the structure deployment service to obtain the deployment result of the knowledge base.

[0041] This invention utilizes structure files to deploy a structure within a pre-built user-private service, preparing for the subsequent deployment of knowledge base data within that service. The pre-built user-private service refers to a cloud service built for exclusive use by private users.

[0042] Optionally, the structure can be deployed in a pre-built user-private service using the structure file. The process of obtaining the structure deployment service can be to build an initial data table based on the CRUD operations on the data table, the description of the structural relationships of the data table, and the definition of the character type and field type of the knowledge base data defined in the structure file, and obtain a cloud service with the structure deployed.

[0043] Furthermore, in this embodiment of the invention, the knowledge data is deployed and upgraded in the structure deployment service by using an upgrade verification file. This is to deploy the knowledge base data in the user's private service and upgrade it to the latest version, provided that the structure is deployed correctly. This ensures that when the user obtains a data packet, the data packet that is most recent to the current time will be automatically obtained.

[0044] In one embodiment of the present invention, knowledge data is deployed and upgraded in the structure deployment service using an upgrade verification file to obtain the deployment result of the knowledge base. This includes: verifying whether the basic data package and language package corresponding to the knowledge data are correct using the upgrade verification file; when the basic data package and language package information is correct, determining the deployment order of the basic data package and language package using the upgrade verification file; deploying the knowledge data based on the deployment order to obtain the deployment data; and upgrading the deployment data to obtain the deployment result of the knowledge base.

[0045] For example, the basic data package and language package corresponding to the knowledge data are deployed and upgraded on the user's private service. When the user obtains the data package, the data package most recent to the current time is automatically obtained. When upgrading the language package, the basic data package must be checked. The language package can only be upgraded if the basic data package has been upgraded. Before each upgrade, it is necessary to verify whether the package's check file matches the information of the basic data package and language package file, and whether the language version of the package has been upgraded in the system. This prevents the knowledge base data package from being tampered with and ensures the consistency of knowledge base data and version. Since the data package of the data shard upgrade may be a package from n days ago, while knowledge base information such as components, vulnerabilities, and licenses is released and updated every moment, it is necessary to incrementally upgrade the knowledge base version during the shard upgrade to the latest version of the knowledge base.

[0046] As can be seen, this embodiment of the invention first acquires a knowledge base for storing data in shards. Further, it queries the knowledge data and knowledge structure of the knowledge base to enable rapid data deployment based on a pre-determined structure during subsequent deployment of the sharded knowledge base. Furthermore, it constructs a structure file for the knowledge structure, allowing for orderly deployment of the sharded knowledge base based on its pre-sharded structure. This facilitates batch deployment, improving both management and deployment speed. Moreover, it shards the knowledge data for batch deployment by different development languages, enhancing management and ensuring control over the development language data, thus reducing server costs. Finally, it periodically stores the sharded knowledge for time-segmented storage. This invention reduces the pressure of storing excessive content at once. Furthermore, by constructing an upgrade verification file for knowledge data based on periodic knowledge storage, this embodiment records all information packaged within a period, ensuring that subsequent upgrades of already packaged data can be performed sequentially according to the packaging information and packaging period recorded in the upgrade verification file. Further, this embodiment utilizes a structure file for structure deployment in a pre-built user-private service, preparing for subsequent deployment of knowledge base data within the user-private service. Further still, this embodiment utilizes the upgrade verification file to deploy and upgrade knowledge data in the structure deployment service, ensuring that the knowledge base data is deployed in the user-private service with the structure already deployed and upgraded to the latest version, guaranteeing that users automatically retrieve the data package most recent to the current time when obtaining data packages. Therefore, the knowledge base deployment method based on data sharding proposed in this invention can deploy knowledge bases containing the development language data that users need, improving knowledge base deployment efficiency.

[0047] like Figure 3 The diagram shown is a functional block diagram of the knowledge base deployment device based on data sharding according to the present invention.

[0048] The data-sharded knowledge base deployment device 300 of this invention can be installed in an electronic device. Depending on the functions implemented, the data-sharded knowledge base deployment device may include a structure construction module 301, a verification construction module 302, and a data upgrade module 303. A module of this invention can also be called a unit, referring to a series of computer program segments that can be executed by the processor of an electronic device and perform a fixed function, stored in the memory of the electronic device.

[0049] In this embodiment of the invention, the functions of each module / unit are as follows:

[0050] The structure building module 301 is used to acquire the knowledge base, query the knowledge data and knowledge structure of the knowledge base, and build the structure file of the knowledge structure.

[0051] The verification construction module 302 is used to perform data fragmentation on knowledge data to obtain fragmented knowledge, perform periodic storage on fragmented knowledge to obtain periodic stored knowledge, and construct an upgrade verification file for knowledge data based on periodic stored knowledge.

[0052] The data upgrade module 303 is used to deploy the structure in a pre-built user private service using the structure file to obtain the structure deployment service. The knowledge data is then deployed and upgraded in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base.

[0053] In detail, each module in the knowledge base deployment device 300 based on data sharding in this embodiment of the invention adopts the same approach as described above. Figures 1 to 2 The method uses the same technical means as the knowledge base deployment method based on data sharding, and can produce the same technical effect, so it will not be elaborated here.

[0054] like Figure 4 The diagram shown is a structural schematic of an electronic device that implements the knowledge base deployment method based on data sharding according to the present invention.

[0055] The electronic device may include a processor 40, a memory 41, a communication bus 42 and a communication interface 43, and may also include a computer program stored in the memory 41 and capable of running on the processor 40, such as a knowledge base deployment program based on data sharding.

[0056] In some embodiments, the processor 40 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 40 is the control unit of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It performs various functions of the electronic device and processes data by running or executing programs or modules stored in the memory 41 (e.g., executing a knowledge base deployment program based on data sharding) and calling data stored in the memory 41.

[0057] The memory 41 includes at least one type of readable storage medium, including flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of an electronic device, such as a portable hard drive. In other embodiments, the memory 41 can be an external storage device of the electronic device, such as a plug-in portable hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc. Furthermore, the memory 41 can include both internal and external storage units of the electronic device. The memory 41 can be used not only to store application software and various types of data installed on the electronic device, such as the code of a database configuration connection program, but also to temporarily store data that has been output or will be output.

[0058] The communication bus 42 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. The bus is configured to enable communication between the memory 41 and at least one processor 40, etc.

[0059] The communication interface 43 is used for communication between the aforementioned electronic device 4 and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a Wi-Fi interface, Bluetooth interface, etc.), typically used to establish communication connections between the electronic device and other electronic devices. The user interface may be a display, an input unit (such as a keyboard), or, optionally, a standard wired or wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a screen or display unit, used to display information processed in the electronic device and to display a visual user interface.

[0060] Figure 4 Only electronic devices with components are shown; it will be understood by those skilled in the art that... Figure 4 The structure shown does not constitute a limitation on the electronic device and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0061] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to at least one processor 40 via a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power sources, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0062] It should be understood that the embodiments are for illustrative purposes only and are not limited to this structure in terms of the scope of the patented invention.

[0063] The database configuration linker stored in memory 41 of the electronic device is a combination of multiple computer programs that, when run in processor 40, can achieve the following:

[0064] Obtain the knowledge base, query the knowledge data and knowledge structure of the knowledge base, and construct the structure file of the knowledge structure;

[0065] The knowledge data is segmented to obtain segmented knowledge. The segmented knowledge is periodically stored to obtain periodically stored knowledge. Based on the periodically stored knowledge, an upgrade verification file for the knowledge data is constructed.

[0066] The structure is deployed in a pre-built user-private service using the structure file to obtain the structure deployment service. The knowledge data is then deployed and upgraded in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base.

[0067] Specifically, the specific implementation method of the above computer program by the processor 40 can be found in [reference needed]. Figure 1 The descriptions of the relevant steps in the corresponding embodiments are not repeated here.

[0068] Furthermore, if the modules / units integrated into an electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium. The storage medium can be volatile or non-volatile. For example, a computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, and read-only memory (ROM).

[0069] The present invention also provides a storage medium, a readable storage medium storing a computer program, which, when executed by a processor of an electronic device, can perform the following:

[0070] Obtain the knowledge base, query the knowledge data and knowledge structure of the knowledge base, and construct the structure file of the knowledge structure;

[0071] The knowledge data is segmented to obtain segmented knowledge. The segmented knowledge is periodically stored to obtain periodically stored knowledge. Based on the periodically stored knowledge, an upgrade verification file for the knowledge data is constructed.

[0072] The structure is deployed in a pre-built user-private service using the structure file to obtain the structure deployment service. The knowledge data is then deployed and upgraded in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base.

[0073] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0074] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0075] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional modules.

[0076] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0077] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.

[0078] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0079] The above are merely specific embodiments of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features of the invention herein.

Claims

1. A knowledge base deployment method based on data sharding, characterized in that, The method includes: Obtain the knowledge base, query the knowledge data and knowledge structure of the knowledge base, and determine the description method of the knowledge structure in the pre-built initial file; The structure file of the knowledge structure is constructed using the described method; wherein, the structure file refers to the file that declares the structure in the knowledge base; The knowledge data is segmented to obtain segmented knowledge, and the segmented knowledge is periodically stored to obtain periodically stored knowledge. An upgrade verification file for the knowledge data is constructed based on the periodically stored knowledge. The structure is deployed in a pre-built user private service using the structure file to obtain a structure deployment service. The knowledge data is then deployed and upgraded in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base.

2. The method according to claim 1, characterized in that, The querying of the knowledge data and knowledge structure of the knowledge base includes: Knowledge is retrieved from the knowledge base and used as the knowledge data. Query the data relationships between data in the knowledge data and the storage location of the knowledge data; The knowledge structure of the knowledge base is determined based on the data association and the storage location.

3. The method according to claim 1, characterized in that, The process of data fragmentation of the knowledge data to obtain fragmented knowledge includes: Identify the horizontal characteristics of the knowledge data; Based on the aforementioned horizontal features, the segmentation rules for the knowledge data are determined; Based on the aforementioned sharding rules, the knowledge data is horizontally sharded to obtain the sharded knowledge.

4. The method according to claim 1, characterized in that, The process of periodically storing the fragmented knowledge to obtain periodically stored knowledge includes: Based on the fragmentation type of the fragmentation knowledge, a periodic storage packet of the fragmentation knowledge is constructed; Determine the storage period for the fragmented knowledge; Based on the storage period, the fragmented knowledge is periodically stored using the periodic storage sub-packet to obtain periodic storage knowledge.

5. The method according to claim 1, characterized in that, The step of constructing an upgrade verification file for the knowledge data based on the periodically stored knowledge includes: Query the packet hash value, type information, and version information of the periodically stored knowledge; Based on the sub-package hash value, the type information, and the version information, construct the verification information for the knowledge data; Based on the periodically stored knowledge and the verification information, an upgrade verification file for the knowledge data is constructed.

6. The method according to claim 1, characterized in that, The step of deploying and upgrading the knowledge data in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base includes: The upgrade verification file is used to verify whether the basic data package and language package corresponding to the knowledge data are correct. When the basic data package and the language pack information are correct, the deployment order of the basic data package and the language pack is determined using the upgrade verification file; Based on the deployment order, the knowledge data is deployed to obtain deployment data; The deployment data is upgraded to obtain the deployment result of the knowledge base.

7. A knowledge base deployment device based on data sharding, characterized in that, The device includes: The structure construction module is used to acquire a knowledge base, query the knowledge data and knowledge structure of the knowledge base, determine the description method of the knowledge structure in a pre-built initial file, and construct the structure file of the knowledge structure using the description method; wherein, the structure file refers to the file that declares the structure in the knowledge base; The verification construction module is used to perform data sharding on the knowledge data to obtain sharded knowledge, periodically store the sharded knowledge to obtain periodically stored knowledge, and construct an upgrade verification file for the knowledge data based on the periodically stored knowledge. The data upgrade module is used to deploy the structure in a pre-built user private service using the structure file to obtain a structure deployment service, and to deploy and upgrade the knowledge data in the structure deployment service using the upgrade verification file to obtain the deployment result of the knowledge base.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the knowledge base deployment method based on data sharding as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the knowledge base deployment method based on data sharding as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Knowledge base construction method and device

    CN107958004A

  • Knowledge base updating method and device, electronic equipment and storage medium

    CN115118504A