A method, device, medium and equipment for generating interface based on knowledge graph

The use of knowledge graphs to model task logic and interface actions in manufacturing enterprises addresses inefficiencies in API interface development, enabling rapid and cost-effective interface generation and product replication.

CN118778947BActive Publication Date: 2024-12-31TUKUAI DIGITAL TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411262788.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-31
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing API interface development methods for manufacturing enterprises are inefficient, requiring significant manpower and cyclic adjustments, and fail to meet the demands for rapid product launch and replication due to the need for multiple-party coordination and frequent task scenario changes.

Method used

A method and device utilizing a knowledge graph to model task logic, flow charts, UML models, and interface actions, enabling intuitive presentation of task models and direct reflection of task combing on interfaces, with online model modification capabilities.

Benefits of technology

Reduces operating costs, accelerates interface generation, and meets the requirements for rapid product launch and replication by quickly generating database and interface information without developer intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118778947B_ABST
    Figure CN118778947B_ABST
Patent Text Reader

Abstract

The present invention is a method, device, medium and equipment for generating an interface based on a knowledge graph, which relates to the field of data processing technology, including: constructing a target knowledge graph and caching it to a browser side, the browser side submitting the information included in the target knowledge graph to the server side in JSON format for storage and generating a final label corresponding to the target knowledge graph, constructing a target data table based on the information included in the target knowledge graph stored in a target database, generating an interface based on the target data table and accessing the generated interface; using the knowledge graph to model tasks, the corresponding task model diagram can be intuitively presented, the operating cost is reduced, the database and interface information are quickly generated, the intermediate process of task combing is reduced, the speed of interface generation is accelerated, the requirements of manufacturing enterprises for rapid launch and rapid replication of digital products are met, and the operating efficiency is improved.
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, medium and equipment for generating an interface based on a knowledge graph. Background Art

[0002] In the process of digital transformation of small and medium-sized manufacturing enterprises, the emergence of data platforms used to support the storage, processing, analysis and application of big data has played a key role in the rapid integration of various application systems. API interface is an indispensable part of modern Internet applications. It provides a standardized communication method between different application systems. At present, API interface development is mainly carried out through traditional development methods and page low-code development methods. Among them, the traditional development method is the method of demand analysis, outline design, detailed design, coding, testing, and deployment and online deployment. The page low-code development method is to use the interface development platform to set the form information according to the demand document and business information, and directly write SQL statements to publish it into relevant interfaces. There is no need to write relevant program code. Although these methods can reduce the workload, they do not pay attention to the proportion of manpower consumed. When the task scenario changes, the relevant operations need to be reconstructed. At the same time, combing the task logic, improving the task flow chart, adjusting the UML model, improving the database design, and data interface development require coordination and cooperation of multiple parties. Each change in demand requires a series of cyclic adjustments, which increases the operating cost and cannot meet the requirements of rapid launch and rapid replication of digital products of manufacturing enterprises, reducing the operating efficiency. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is a method for generating an interface based on a knowledge graph, and the method comprises the following steps:

[0004] Construct a target knowledge graph and cache it on the browser side, wherein the target knowledge graph includes a number of task entities, a number of data structure entities, a number of interface operation entities, and the relationships between the above entities.

[0005] The browser submits the information included in the target knowledge graph to the server in JSON format for storage and generates a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database, and the final label is a string consisting of time and serial number.

[0006] A target data table is constructed based on the information included in the target knowledge graph saved in the target database.

[0007] An interface is generated based on the target data table and the generated interface is accessed.

[0008] The present invention also provides a device for generating an interface based on a knowledge graph, the device comprising:

[0009] The first execution module is used to construct a target knowledge graph and cache it to the browser side, wherein the target knowledge graph includes a plurality of task entities, a plurality of data structure entities, a plurality of interface operation entities and the relationships between the above entities.

[0010] The second execution module is used for the browser to submit the information included in the target knowledge graph to the server in JSON format for storage and generate a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database, and the final label is a string consisting of time and serial number.

[0011] The third execution module is used to construct a target data table based on the information included in the target knowledge graph saved in the target database.

[0012] The fourth execution module is used to generate an interface based on the target data table and access the generated interface.

[0013] The present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned method of generating an interface based on a knowledge graph.

[0014] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the above-mentioned method of generating an interface based on a knowledge graph.

[0015] The present invention has at least the following beneficial effects: constructing a target knowledge graph and caching it to a browser, the browser submits the information included in the target knowledge graph to a server in JSON format for storage and generates a final label corresponding to the target knowledge graph, constructing a target data table based on the information included in the target knowledge graph stored in the target database, generating an interface based on the target data table and accessing the generated interface. It can be seen that by using the knowledge graph to model tasks, the task logic, task flow chart, UML model, ERP diagram and interface action are uniformly modeled using the knowledge graph, the corresponding task model diagram can be presented intuitively, the operating cost can be reduced, the database and interface information can be quickly generated, the intermediate process of task combing can be reduced, the task combing can be directly reflected on the interface without the need for the developer to intervene again, the task model can be modified online, the model can be quickly converted into an interface, the speed of interface generation is accelerated, the requirements of manufacturing enterprises for rapid launch and rapid replication of digital products are met, and the operating efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] 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.

[0017] Figure 1 A flow chart of a method for generating an interface based on a knowledge graph provided in Embodiment 1 of the present invention;

[0018] Figure 2 This is a flowchart of S1 provided in Embodiment 1 of the present invention;

[0019] Figure 3 This is a flow chart of S3 provided in Embodiment 1 of the present invention;

[0020] Figure 4 A schematic diagram of the structure of a device for generating an interface based on a knowledge graph provided in the second embodiment of the present invention;

[0021] Figure 5 A schematic diagram of the structure of a first execution module 1 provided in Embodiment 2 of the present invention;

[0022] Figure 6 This is a schematic diagram of the structure of the third execution module 3 provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims 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 interchangeable 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 are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server 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.

[0025] Embodiment 1,

[0026] This embodiment provides a method for generating an interface based on a knowledge graph, the method comprising the following steps: Figure 1 As shown:

[0027] S1, construct a target knowledge graph and cache it to the browser, wherein the target knowledge graph includes a number of task entities, a number of data structure entities, a number of interface operation entities and the relationships between the above entities.

[0028] Specifically, S1 also includes steps S11 to S14, such as Figure 2 As shown:

[0029] S11, the user creates or modifies target project information on the browser side, wherein the target project information is data related to the specific project and describing the characteristics of the specific project.

[0030] Specifically, the browser side adopts the VUE architecture that integrates the target visualization tool.

[0031] Preferably, the target visualization tool is a D3.js function library.

[0032] Specifically, the target project information includes: a graph label list, a project description text, a project object, etc., wherein the graph label list includes several graph labels, and the graph labels are labels used to classify entities in the project description text. For example, in a retail knowledge graph, graph labels may include "product", "customer", "order", "supplier", etc.

[0033] Furthermore, the project description is a text that describes the purpose, scope and content of the project.

[0034] Furthermore, the engineering object is an object of engineering service.

[0035] S12, the user creates a new knowledge graph domain name, where the knowledge graph domain name is the identifier corresponding to each knowledge graph obtained from the Label information in the Neo4j database.

[0036] Specifically, the knowledge graph field name can be understood as: the name or subject of the knowledge graph, a name that characterizes the scope and application field of the knowledge graph, for example, newly created knowledge graph field names such as "medical health" and "automobile manufacturing".

[0037] S13, the user creates a canvas corresponding to each knowledge graph through the D3.js function library on the browser side and configures information on the canvas, where each knowledge graph field name corresponds to a canvas.

[0038] Specifically, the configuration information includes processes such as dragging and dropping configuration entities, attributes, relationship information, importing graphs, deleting entities, deleting relationships, modifying attributes, and viewing data.

[0039] S14, the user creates or modifies entities, attributes and entity relationships of the knowledge graph to obtain the target knowledge graph, wherein S14 also includes steps S141 to S143:

[0040] S141, creating a new task entity, a data structure entity and an interface operation entity, wherein the establishment of the task entity, the data structure entity and the interface operation entity follows the rule of first creating the task entity, then the data structure entity and finally the interface operation entity.

[0041] Specifically, the task entity is an entity related to a process in a specific engineering project, for example, task entities such as sales order outbound delivery, generation of outbound delivery note, outbound delivery registration, generation of delivery note, etc.

[0042] Specifically, the data structure entity is an entity of a data structure when storing data, for example, data structure entities such as order master table information and order detail table information.

[0043] Specifically, the interface operation entity is an entity related to operations in a specific engineering project, for example, interface operation entities such as generating an order, modifying an order status, and deleting an order.

[0044] S142, configuring entity attributes for the entity, wherein the entity attributes include the Chinese name of the entity class, the English name of the entity class, and field attribute information, and the field attribute information includes the English name of the field, the Chinese name of the field, the field source, the field type, and the field key information.

[0045] Specifically, the Chinese name of the entity class is the Chinese remark information of the storage data information table;

[0046] Specifically, the English name of the entity class is the English name information of the storage data information table, which is generally used as the database table name;

[0047] Specifically, the field attribute information is a list, which is used to describe the attributes of the target task, such as the order name, order number, whether the order has been shipped, etc. of the order entity.

[0048] Furthermore, the field attribute information includes the English name of the field, the Chinese name of the field, the source of the field, the field type, and the field key information, wherein the English name of the field is the English information used to describe the attribute, the Chinese name of the field is the Chinese information used to describe the attribute, the field source is used to identify whether this field is a standard field or a task custom field, the field types include string, integer, floating point number, date, and timestamp, and the field key information includes primary key type, subsidiary key type, and general type. The primary key type identifies the uniqueness of the entity record, and the subsidiary key type identifies whether the information is generated by the entity task or comes from other task entities. If it comes from other entities, the source field information needs to be marked.

[0049] Furthermore, the number of characters corresponding to the English name of the field is less than the number of characters corresponding to the Chinese name of the field.

[0050] S143, construct the relationship between entities and construct attribute relationships and foreign key relationships.

[0051] Specifically, those skilled in the art know that any method of establishing attribute relationships and key relationships in the prior art falls within the protection scope of the present invention and will not be described in detail herein.

[0052] S2, the browser side submits the information included in the target knowledge graph to the server side in JSON format for storage and generates a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database.

[0053] Specifically, the final label is a character string consisting of time and serial number, wherein the time is the time when the target knowledge graph is generated.

[0054] Furthermore, those skilled in the art know that the serial number can be set according to actual needs, which falls within the protection scope of the present invention and will not be described in detail here.

[0055] Specifically, the target database includes a Neo4j database and a MySQL database, wherein the Neo4j database is used to store relevant information of the graph of the knowledge graph itself, and the MySQL database is used to store relevant information describing the graph of the knowledge graph.

[0056] Preferably, the server side adopts Spring Cloud microservice architecture and components such as Spring Boot 2, SpringCloud Honxton, Mybatis, Nacos, etc., and is uniformly deployed using Docker.

[0057] Furthermore, the browser and server communicate via an HTTP protocol interface with an authorization mechanism.

[0058] S3, constructing a target data table based on the information included in the target knowledge graph saved in the target database.

[0059] Specifically, S3 also includes the following steps: Figure 3 As shown:

[0060] S31, checking the configuration information, including primary key check, non-empty check and associated key check.

[0061] S32, generating a data description information set through the verified configuration information and the information included in the target knowledge graph, wherein the data description information set includes data table structure description information, data attribute description information, interface description information and interface attribute description interface.

[0062] S33, generating a target data table based on the data description information set, wherein the target data table is a data table obtained by automatically generating corresponding SQL table creation statements by extracting core elements from the data description information set and executing the constructed SQL table creation statements using a database interface in a programming language.

[0063] S4, generating an interface based on the target data table and accessing the generated interface.

[0064] Specifically, S4 also includes steps S41 to S46:

[0065] S41, receiving an interface access request sent by a client and an interface name corresponding to the interface access request, wherein the interface name is obtained by matching path information in a URI with an interface information table.

[0066] S42, the server authenticates the interface access request.

[0067] Specifically, those skilled in the art know that any method for authenticating an interface access request in the prior art falls within the protection scope of the present invention and will not be described in detail herein.

[0068] S43, verifying the validity of the data, wherein the verification of the validity of the data is performed through field information recorded in the data description information set.

[0069] S44, constructing SQL statements according to the configuration of the interface corresponding to the determined interface name, wherein all SQL statements are executed in a single transaction block.

[0070] S45, when all SQL statements in the transaction are executed successfully and no errors are displayed, all changes are permanently saved to the database by executing a COMMIT statement.

[0071] S46, when a certain SQL statement in the transaction is not successfully executed, the database state is restored to the state before the transaction started by executing the ROLLBACK statement.

[0072] From the above content, we can see that by using knowledge graphs to model tasks and uniformly using knowledge graphs to model task logic, task flow charts, UML models, ERP diagrams, and interface actions, the corresponding task model diagrams can be presented intuitively, reducing operating costs, quickly generating database and interface information, and reducing the intermediate process of task combing. Task combing can be directly reflected in the interface without the need for developers to intervene again. The task model can be modified online and the model can be quickly converted into an interface, which speeds up interface generation, meets the requirements of manufacturing companies for rapid launch and rapid replication of digital products, and improves operating efficiency.

[0073] The first embodiment of the present invention can construct a target knowledge graph and cache it to the browser side. The browser side submits the information included in the target knowledge graph to the server side in JSON format for storage and generates a final label corresponding to the target knowledge graph. A target data table is constructed based on the information included in the target knowledge graph stored in the target database. An interface is generated based on the target data table and the generated interface is accessed. It can be seen that the task is modeled using the knowledge graph, and the task logic, task flow chart, UML model, ERP diagram and interface action are uniformly modeled using the knowledge graph. The corresponding task model diagram can be presented intuitively, reducing the operating cost, quickly generating database and interface information, reducing the intermediate process of task combing, and the task combing can be directly reflected on the interface without the need for the developer to intervene again. The task model can be modified online and the model can be quickly converted into an interface, which speeds up the interface generation, meets the requirements of manufacturing enterprises for rapid launch and rapid replication of digital products, and improves operating efficiency.

[0074] Embodiment 2:

[0075] like Figure 4 As shown, this embodiment provides a device for generating an interface based on a knowledge graph, and the device includes:

[0076] The first execution module 1 is used to construct a target knowledge graph and cache it to the browser side, wherein the target knowledge graph includes a plurality of task entities, a plurality of data structure entities, a plurality of interface operation entities and the relationships between the above entities.

[0077] Specifically, Figure 5 As shown, the first execution module 1 also includes:

[0078] The first acquisition module 11 is used for the user to create or modify target project information on the browser side, wherein the target project information is data related to the specific project and describing the characteristics of the specific project.

[0079] Specifically, the browser side adopts the VUE architecture that integrates the target visualization tool.

[0080] Preferably, the target visualization tool is a D3.js function library.

[0081] Specifically, the target project information includes: a graph label list, a project description text, a project object, etc., wherein the graph label list includes several graph labels, and the graph labels are labels used to classify entities in the project description text. For example, in a retail knowledge graph, graph labels may include "product", "customer", "order", "supplier", etc.

[0082] Furthermore, the project description is a text that describes the purpose, scope and content of the project.

[0083] Furthermore, the engineering object is an object of engineering service.

[0084] The second acquisition module 12 is used for the user to create a new knowledge graph domain name, wherein the knowledge graph domain name is an identifier corresponding to each knowledge graph obtained from the Label information in the Neo4j database.

[0085] Specifically, the knowledge graph field name can be understood as: the name or subject of the knowledge graph, a name that characterizes the scope and application field of the knowledge graph, for example, newly created knowledge graph field names such as "medical health" and "automobile manufacturing".

[0086] The third acquisition module 13 is used for the user to create a canvas corresponding to each knowledge graph through the D3.js function library on the browser side and configure information on the canvas, wherein each knowledge graph field name corresponds to a canvas.

[0087] Specifically, the configuration information includes processes such as dragging and dropping configuration entities, attributes, relationship information, importing graphs, deleting entities, deleting relationships, modifying attributes, and viewing data.

[0088] The fourth acquisition module 14 is used for users to create or modify entities, attributes and entity relationships of the knowledge graph to obtain the target knowledge graph.

[0089] Specifically, the fourth acquisition module 14 further includes:

[0090] The entity acquisition module is used to create new task entities, data structure entities and interface operation entities, wherein the establishment of task entities, data structure entities and interface operation entities follows the rule of first creating task entities, then data structure entities and finally interface operation entities.

[0091] Specifically, the task entity is an entity related to a process in a specific engineering project, for example, task entities such as sales order outbound delivery, generation of outbound delivery note, outbound delivery registration, generation of delivery note, etc.

[0092] Specifically, the data structure entity is an entity of a data structure when storing data, for example, data structure entities such as order master table information and order detail table information.

[0093] Specifically, the interface operation entity is an entity related to operations in a specific engineering project, for example, interface operation entities such as generating an order, modifying an order status, and deleting an order.

[0094] The entity attribute acquisition module is used to configure entity attributes for the entity, wherein the entity attributes include the Chinese name of the entity class, the English name of the entity class, and field attribute information, and the field attribute information includes the English name of the field, the Chinese name of the field, the field source, the field type, and the field key information.

[0095] Specifically, the Chinese name of the entity class is the Chinese remark information of the storage data information table;

[0096] Specifically, the English name of the entity class is the English name information of the storage data information table, which is generally used as the database table name;

[0097] Specifically, the field attribute information is a list, which is used to describe the attributes of the target task, such as the order name, order number, whether the order has been shipped, etc. of the order entity.

[0098] Furthermore, the field attribute information includes the English name of the field, the Chinese name of the field, the source of the field, the field type, and the field key information, wherein the English name of the field is the English information used to describe the attribute, the Chinese name of the field is the Chinese information used to describe the attribute, the field source is used to identify whether this field is a standard field or a task custom field, the field types include string, integer, floating point number, date, and timestamp, and the field key information includes primary key type, subsidiary key type, and general type. The primary key type identifies the uniqueness of the entity record, and the subsidiary key type identifies whether the information is generated by the entity task or comes from other task entities. If it comes from other entities, the source field information needs to be marked.

[0099] Furthermore, the number of characters corresponding to the English name of the field is less than the number of characters corresponding to the Chinese name of the field.

[0100] The relationship acquisition module is used to build relationships between entities and construct attribute relationships and foreign key relationships.

[0101] Specifically, those skilled in the art know that any method of establishing attribute relationships and key relationships in the prior art falls within the protection scope of the present invention and will not be described in detail herein.

[0102] The second execution module 2 is used for the browser to submit the information included in the target knowledge graph to the server in JSON format for storage and generate a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database.

[0103] Specifically, the final label is a character string consisting of time and serial number, wherein those skilled in the art know that the serial number can be set according to actual needs, all of which fall within the protection scope of the present invention and will not be described in detail here.

[0104] Specifically, the target database includes a Neo4j database and a MySQL database, wherein the Neo4j database is used to store relevant information of the graph of the knowledge graph itself, and the MySQL database is used to store relevant information describing the graph of the knowledge graph.

[0105] Preferably, the server side adopts Spring Cloud microservice architecture and components such as Spring Boot 2, SpringCloud Honxton, Mybatis, Nacos, etc., and is uniformly deployed using Docker.

[0106] Furthermore, the browser and server communicate via an HTTP protocol interface with an authorization mechanism.

[0107] The third execution module 3 is used to construct a target data table based on the information included in the target knowledge graph saved in the target database.

[0108] Specifically, Figure 6 As shown, the third execution module 3 also includes:

[0109] The first intermediate module 31 is used to check the configuration information, including primary key check, non-null check and associated key check.

[0110] The second intermediate module 32 is used to generate a data description information set through the verified configuration information and the information included in the target knowledge graph, wherein the data description information set includes data table structure description information, data attribute description information, interface description information and interface attribute description interface.

[0111] The third intermediate module 33 is used to generate a target data table based on the data description information set, wherein the target data table is a data table obtained by automatically generating corresponding SQL table creation statements by extracting core elements from the data description information set and executing the constructed SQL table creation statements using a database interface in a programming language.

[0112] The fourth execution module 4 is used to generate an interface based on the target data table and access the generated interface.

[0113] Specifically, the fourth execution module 4 further includes:

[0114] The first key module is used to receive an interface access request sent by a client and an interface name corresponding to the interface access request, wherein the interface name is obtained by matching the path information in the URI with the interface information table.

[0115] The second key module is used by the server to authenticate the interface access request.

[0116] Specifically, those skilled in the art know that any method for authenticating an interface access request in the prior art falls within the protection scope of the present invention and will not be described in detail herein.

[0117] The third key module is used to verify the validity of the data, wherein the validity verification of the data is to verify the field information recorded in the data description information set.

[0118] The fourth key module is used to construct SQL statements according to the configuration of the interface corresponding to the determined interface name, wherein all SQL statements are executed in a single transaction block.

[0119] The fifth key module is used to permanently save all changes to the database by executing the COMMIT statement when all SQL statements in the transaction are successfully executed without displaying errors.

[0120] The sixth key module is used to restore the database state to the state before the transaction started by executing the ROLLBACK statement when a certain SQL statement in the transaction is not successfully executed.

[0121] From the above content, we can see that by using knowledge graphs to model tasks and uniformly using knowledge graphs to model task logic, task flow charts, UML models, ERP diagrams, and interface actions, the corresponding task model diagrams can be presented intuitively, reducing operating costs, quickly generating database and interface information, and reducing the intermediate process of task combing. Task combing can be directly reflected in the interface without the need for developers to intervene again. The task model can be modified online and the model can be quickly converted into an interface, which speeds up interface generation, meets the requirements of manufacturing companies for rapid launch and rapid replication of digital products, and improves operating efficiency.

[0122] Embodiment 3,

[0123] An embodiment of the present invention provides a non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps:

[0124] Construct a target knowledge graph and cache it on the browser side, wherein the target knowledge graph includes a number of task entities, a number of data structure entities, a number of interface operation entities, and the relationships between the above entities.

[0125] The browser side submits the information included in the target knowledge graph to the server side in JSON format for storage and generates a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database.

[0126] A target data table is constructed based on the information included in the target knowledge graph saved in the target database.

[0127] An interface is generated based on the target data table and the generated interface is accessed.

[0128] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0129] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0130] Embodiment 4:

[0131] An embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the steps:

[0132] Construct a target knowledge graph and cache it on the browser side, wherein the target knowledge graph includes a number of task entities, a number of data structure entities, a number of interface operation entities, and the relationships between the above entities.

[0133] The browser side submits the information included in the target knowledge graph to the server side in JSON format for storage and generates a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database.

[0134] A target data table is constructed based on the information included in the target knowledge graph saved in the target database.

[0135] An interface is generated based on the target data table and the generated interface is accessed.

[0136] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A method for generating an interface based on a knowledge graph, characterized in that: The method comprises the following steps: Construct a target knowledge graph and cache it on the browser side, wherein the target knowledge graph includes a plurality of task entities, a plurality of data structure entities, a plurality of interface operation entities, and the relationships between the above entities; The browser submits the information included in the target knowledge graph to the server in JSON format for storage and generates a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database, and the final label is a string consisting of time and serial number; Construct a target data table based on the information included in the target knowledge graph saved in the target database; An interface is generated based on the target data table and the generated interface is accessed.

2. The method for generating an interface based on a knowledge graph according to claim 1, characterized in that: The browser side adopts the VUE architecture which integrates the target visualization tool.

3. The method for generating an interface based on a knowledge graph according to claim 1, characterized in that: The construction of the target knowledge graph and caching it on the browser side includes the following steps: The user creates or modifies target project information on the browser side, wherein the target project information is data related to a specific project and describing the characteristics of a specific project, and the target project information includes: a graph label list, a project description text, and a project object, wherein the graph label list includes a plurality of graph labels, and the graph label is a label used to classify entities in the project description text; The user creates a new knowledge graph domain name, where the knowledge graph domain name is the identifier corresponding to each knowledge graph obtained from the Label information in the Neo4j database; The user creates a canvas corresponding to each knowledge graph through the D3.js function library on the browser side and configures information on the canvas. Each knowledge graph field name corresponds to a canvas. Users create or modify entities, attributes, and entity relationships of the knowledge graph to obtain the target knowledge graph.

4. The method for generating an interface based on a knowledge graph according to claim 1, characterized in that: The target database includes a Neo4j database and a MySQL database, wherein the Neo4j database is used to store relevant information of the graph of the knowledge graph itself, and the MySQL database is used to store relevant information describing the graph of the knowledge graph.

5. The method for generating an interface based on a knowledge graph according to claim 1, characterized in that: Constructing a target data table based on the information included in the target knowledge graph saved in the target database comprises the following steps: Verify the configuration information, including primary key verification, non-null verification and association key verification; Generate a data description information set through the verified configuration information and the information included in the target knowledge graph, wherein the data description information set includes data table structure description information, data attribute description information, interface description information and interface attribute description interface; Generate a target data table based on the data description information set, wherein the target data table is a data table obtained by automatically generating a corresponding SQL table creation statement by extracting core elements from the data description information set and executing the constructed SQL table creation statement using a database interface in a programming language; An interface is generated based on the target data table and the generated interface is accessed.

6. A device for generating an interface based on a knowledge graph, characterized in that: The device comprises: A first execution module is used to construct a target knowledge graph and cache it to a browser, wherein the target knowledge graph includes a plurality of task entities, a plurality of data structure entities, a plurality of interface operation entities, and the relationships between the above entities; The second execution module is used for the browser to submit the information included in the target knowledge graph to the server in JSON format for storage and generate a final label corresponding to the target knowledge graph, wherein the information included in the target knowledge graph is saved in the target database, and the final label is a string consisting of time and serial number; A third execution module, configured to construct a target data table based on the information included in the target knowledge graph saved in the target database; The fourth execution module is used to generate an interface based on the target data table and access the generated interface.

7. The device for generating an interface based on a knowledge graph according to claim 6, characterized in that: The browser side adopts the VUE architecture which integrates the target visualization tool.

8. The device for generating an interface based on a knowledge graph according to claim 6, characterized in that: The first execution module also includes: A first acquisition module is used for a user to create or modify target project information on a browser side, wherein the target project information is data related to a specific project and describing characteristics of the specific project; The second acquisition module is used for users to create a new knowledge graph field name, wherein the knowledge graph field name is an identifier corresponding to each knowledge graph obtained from the Label information in the Neo4j database; The third acquisition module is used for the user to create a canvas corresponding to each knowledge graph through the D3.js function library on the browser side and configure information on the canvas, wherein each knowledge graph field name corresponds to a canvas; The fourth acquisition module is used for users to create or modify entities, attributes and entity relationships of the knowledge graph to obtain the target knowledge graph.

9. The device for generating an interface based on a knowledge graph according to claim 6, characterized in that: The target database includes a Neo4j database and a MySQL database, wherein the Neo4j database is used to store relevant information of the graph of the knowledge graph itself, and the MySQL database is used to store relevant information describing the graph of the knowledge graph.

10. The device for generating an interface based on a knowledge graph according to claim 6, characterized in that: The third execution module also includes: The first intermediate module is used to check the configuration information, including primary key check, non-null check and associated key check; A second intermediate module is used to generate a data description information set through the verified configuration information and the information included in the target knowledge graph, wherein the data description information set includes data table structure description information, data attribute description information, interface description information and interface attribute description interface; The third intermediate module is used to generate a target data table based on the data description information set, wherein the target data table is a data table obtained by automatically generating corresponding SQL table creation statements by extracting core elements from the data description information set and executing the constructed SQL table creation statements using a database interface in a programming language.

11. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the method for generating an interface based on a knowledge graph as described in any one of claims 1-5.

12. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method for generating an interface based on a knowledge graph as described in any one of claims 1-5.