Method for automatically creating GraphQL and API servers for OPC UA-derived RDF atlas
By converting and executing SPARQL queries in the GraphQL server, information is extracted from the OPC UA specification, and the problems of query and search difficulties and security risks in the prior art are solved, and flexible and secure information extraction is achieved.
Patent Information
- Application Number
- CN202280099136.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-16
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively extract and utilize semantic information from the OPC UA architecture, especially in terms of query and search, and there are security risks in the SPARQL query interface.
By presenting a query that complies with the GraphQL API in the GraphQL server, it is converted to a query that complies with SPARQL, and using SPARQL query to extract information from the RDF knowledge graph, and finally format the result into the format expected by the user.
It realizes flexibility and security in extracting information from OPC UA specifications, avoids dependence on SPARQL expertise, and provides advanced semantic query capabilities.
Smart Images

Figure CN119631067A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to industrial systems. More specifically, the present application relates to the interoperability of different components of an industrial system. Background Art
[0002] Open Platform Communications Unified Architecture (OPC UA) defines industry standard models, often referred to as companion specifications because they typically address specific industry problems. These specifications, together with the underlying OPC UA infrastructure, enable information exchange between industry models, thus achieving semantic-level interoperability between shop floor entities and the factory's information technology (IT) systems.
[0003] However, searching for information in these models is difficult for conventional IT systems. Existing work has developed methods to represent OPC UA specifications in a queryable and searchable way using the Resource Description Framework (RDF) knowledge graph. RDF typically uses SPARQL as a means to query RDF databases. RDF provides the closest means for retaining, storing, and presenting semantic information about the hierarchical structure between OPC UA relationships and process objects in industrial automation scenarios.
[0004] The OPC UA standard is a cross-platform, open source IEC62541 standard for data exchange between devices in industrial systems. OPC UA provides standard interfaces and semantics that enable interoperability of products from different vendors in factories. However, the information represented in the OPC UA architecture is difficult to query and search for other purposes. One technique for providing queries to OPC UA is to convert the OPC UA ontology into an RDF knowledge graph. However, developing applications that access OPC UA-inspired RDF graph databases is time-consuming and requires expertise in SPARQL, the default query language for RDF and the semantic web. In addition, SPARQL allows access to the entire RDF data store and therefore provides poor security with respect to the entire system.
[0005] Other methods for acquiring and utilizing semantic information from the OPC UA architecture are desired. Summary of the invention
[0006] According to various aspects of one embodiment of the present disclosure, a computer-implemented method for extracting information from an OPC UA specification represented by an RDF knowledge graph includes: proposing a query that conforms to a GraphQL API in a GraphQL server; receiving a GraphQL query; in the GraphQL server, converting the GraphQL query to a query that conforms to SPARQL; extracting information from the RDF knowledge graph using the SPARQL query; and formatting the results of the SPARQL query into a format desired by a user. In addition, in some embodiments, the GraphQL server includes: a GraphQL schema containing information identifying objects and relationships between objects, the GraphQL schema representing the OPC UA specification; and a GraphQL parser for receiving a GraphQL query and extracting the requested information from the RDF knowledge graph. According to an embodiment, the format desired by the user is javascript object notation (JSON).
[0007] GraphQL schemas can be configured in a hierarchical tree format similar to the hierarchical structures used in OPC UA and RDF.
[0008] Upon receiving a GraphQL compliant query, the GraphQL server recursively traverses the GraphQL hierarchy tree to identify the object specified in the GraphQL query and any child objects in the hierarchy tree. Then, based on the recursive traversal of the hierarchy tree, a SPARQL compliant query is constructed to extract information related to the objects identified in the GraphQL hierarchy tree. The GraphQL server stores a GraphQL type for each OPC UA object class in the OPC UA specification, and each child member of an OPC UA object class is specified as a GraphQL type in the GraphQL server.
[0009] According to some embodiments of the present disclosure, a computer-implemented method for extracting information from an OPC UA specification represented in an RDF knowledge graph includes: in a semantic introspection and GraphQL schema generator, automatically generating a GraphQL-compliant schema and metadata from the RDF knowledge graph; and proposing a GraphQL query to a general GraphQL server, which formats the GraphQL query to extract information from the RDF knowledge base and returns the results of the GraphQL query to the user in a desired format. Automatically generating a GraphQL-compliant schema and metadata from the RDF knowledge graph also includes: receiving an endpoint or file containing an RDF knowledge graph and a root node at the semantic introspection and GraphQL schema generator, the root node identifying a starting point in the RDF knowledge graph; recursively traversing the RDF knowledge graph to identify objects in the RDF knowledge graph and relationships between objects in the RDF knowledge graph; for each identified object in the RDF knowledge graph, creating a list of each GraphQL type corresponding to each RDF object; and creating custom metadata containing information characterizing the organization of the list of GraphQL types.
[0010] A general GraphQL server may perform the following steps: receive a GraphQL query from a user; access a GraphQL schema and metadata; create a SPARQL query based on the GraphQL schema and metadata; apply the SPARQL query to an RDF knowledge graph; extract information from the RDF knowledge graph as a result of the SPARQL query; and process the result of the SPARQL query to create a properly formatted response to the user. The properly formatted response to the user may be formatted in a (JSON) format that complies with GraphQL.
[0011] According to an embodiment, when creating a SPARQL query, the GraphQL server may recursively traverse the hierarchical tree structure of the GraphQL schema to identify GraphQL types related to the query from the user, and consult the metadata to identify the relationships between the identified GraphQL types, so as to construct a SPARQL query based on the identified GraphQL types and the relationships between the GraphQL types to request information stored in the RDF knowledge graph.
[0012] According to other embodiments of the present disclosure, a computer-implemented system for retrieving information from an open platform communication unified architecture (OPC UA) specification represented by a resource description format (RDF) knowledge graph is provided, the system may include a computer processor, in communication with a non-volatile memory, wherein the memory stores computer executable instructions, which, when executed by the computer processor, cause the computer processor to execute a GraphQL schema generator to recursively traverse the RDF knowledge graph so as to create a list of GraphQL types based on RDF object classes identified in the RDF knowledge graph, and additionally create metadata describing the relationships between the GraphQL types contained in the created list. The list and metadata may be stored in the non-volatile memory as a GraphQL schema representing the OPC UA specification. The non-volatile memory may also include instructions, which, when executed by the computer processor, cause the computer processor to establish a general GraphQL server, which may receive a GraphQL query from a user, and in response to the GraphQL query, call a GraphQL parser core to access the GraphQL schema, and generate a SPARQL query based on the GraphQL schema. The results of the SPARQL query are processed into a GraphQL-compliant response to the user's query.
[0013] According to some embodiments, the GraphQL schema generator includes: a data representation module that identifies objects in an RDF knowledge graph; generates a SPARQL query based on the identified objects; applies the SPARQL query to the RDF knowledge base; and receives the result of the SPARQL query. The data representation module then identifies whether any additional objects are identified in the SPARQL query result; if so, generates additional SPARQL queries for the additional objects; otherwise, post-processes the SPARQL query result to create a standard format used by the data representation module.
[0014] According to some embodiments, the GraphQL schema generator also includes a data generation module that processes the information created in the data representation module to create a list of GraphQL types corresponding to each object identified in the RDF knowledge base, and creates metadata containing information describing the relationships between the GraphQL types contained in the list. In addition, the general GraphQL server also includes a GraphQL API service for receiving a GraphQL query from a user and, in response to receiving the query, calling a GraphQL resolver core. The tree explorer module in the general GraphQL server receives a request from the GraphQL resolver core and recursively traverses the hierarchical tree embodied in the metadata, and provides the GraphQL resolver core with information related to the relationships of objects in the RDF knowledge base for generating SPARQL queries. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other aspects of the present invention can be best understood when the following detailed description is read in conjunction with the accompanying drawings. For the purpose of illustrating the present invention, presently preferred embodiments are shown in the accompanying drawings. However, it should be understood that the present invention is not limited to the specific means disclosed. The accompanying drawings include the following illustrations:
[0016] Figure 1 is a block diagram of an architecture for providing an API to access data from an OPC UA schema in accordance with aspects of an embodiment of the present disclosure.
[0017] Figure 2 is a block diagram of a pattern generator according to aspects of an embodiment of the present disclosure.
[0018] Figure 3 is a block diagram of a general API server according to aspects of an embodiment of the present disclosure.
[0019] Figure 4 is a process flow diagram for recursively exploring an OPC UA ontology in accordance with aspects of an embodiment of the present disclosure.
[0020] Figure 5 is a process flow diagram for generating an API schema from an OPC_UA derived RDF graph according to aspects of embodiments of the present disclosure.
[0021] Figure 6 is a block diagram of a computer system that may be used to perform methods and implement a system for accessing information from an OPC UA-derived RDF knowledge graph according to aspects of embodiments of the present disclosure.
[0022] Figure 7is a process flow diagram for extracting information from an OPC UA-derived RDF knowledge graph according to various aspects of embodiments of the present disclosure. DETAILED DESCRIPTION
[0023] The embodiments described below illustrate a process of automatically inspecting an OPC UA derived RDF ontology and providing useful OPC UA semantic knowledge as a GraphQL API with a generic GraphQL server for serving several types of automatically generated APIs.
[0024] OPC UA is an open standard protocol for communication between various machines. Allowing OPC UA data to be converted to RDF provides a particularly useful method to allow semantic extraction of information. However, data converted to RDF data may be difficult for developers to use if they do not have a solid knowledge of RDF. The described implementation will automatically crawl OPC UA derived RDF ontologies to find semantic mappings that are useful to users. These mappings will expose semantic information that describes how various machines and their components interact with each other.
[0025] In a first aspect of the embodiments presented in this specification, certain challenges associated with extracting data contained in an RDF data store derived from OPC UA data are addressed. For example, SPARQL is not a preferred API for IT applications, and specialized and skilled expert knowledge of SPARQL is required to perform query, search, and aggregation tasks. These skills are relatively scarce in the field of industrial automation. This limits the practicality of OPC UA-inspired RDF knowledge graphs. Further, providing a direct SPARQL query interface poses security risks. SPARQL is a powerful interface that allows engineers to complete access across an entire RDF database. Therefore, it opens the door to writing malicious code queries that may degrade system performance or cause damage or erasure of valuable data.
[0026] Currently, there are purpose-built applications and libraries that provide access to OPC UA data. However, these solutions are application-specific and do not provide semantic query and aggregation capabilities. Embodiments of the present disclosure recognize that GraphQL is a popular approach for providing web-based APIs. GraphQL has the advantage of an object-oriented API, providing more flexibility than other technologies such as REST APIs. While some open source applications attempt to expose OPC UA with a GraphQL-like interface, these applications do not provide the advanced semantics and aggregation capabilities provided by graph query languages such as SPARQL. As previously discussed, converting OPC UA data stores into RDF graphs and providing direct access via SPARQL makes such graph databases difficult and costly for process and factory automation engineers to use.
[0027] In one embodiment of the present disclosure, a system for providing a GraphQL API server based on OPC UA semantic knowledge is provided. The GraphQL API is configured to provide query facilities to OPC UA entities having hierarchical tree relationships. The GraphQL API also provides advanced semantic query capabilities, which can search based on sibling relationships and can also aggregate values based on different search criteria. These advanced functions take advantage of the advantages provided by using the RDF knowledge graph as the underlying data structure of OPC UA information. Without the need for expert knowledge of RDF and its supporting query language SPARQL, the method according to the embodiment of the present disclosure automatically crawls the OPC UA-inspired RDF ontology and finds information related to semantic mappings that expose semantic information describing the interactions between various machines or entities and their subcomponents.
[0028] The first step in developing a GraphQL API service for an OPC UA-inspired RDF database is to explore a specific OPC UA companion specification. For example, a companion specification could be a specification for a "robot". The companion specification would describe how an OPC UA-compliant robot is composed of various subcomponents (including motors, gears, shafts, etc.). The relationships between various OPC UA entities are converted to an RDF graph database by tools known in the art. The resulting RDF triples will be representative and contain information about the relationships between OPC UA entities. Experts who are proficient in OPC UA and RDF can analyze the companion specification and the corresponding RDF graph to develop a useful GraphQL schema that provides access to hierarchical data in an object-oriented manner. The design of the schema should consider the utility of each entity and select entities with the greatest utility for providing data that is closely related to the operation and support of industrial systems. Information with limited utility (such as entities that are unlikely to be query objects) can be omitted from the schema to create a useful and well-planned API.
[0029] The GraphQL schema is created so that each primitive OPC UA class becomes a new GraphQL type. For example, a Machine or Controller becomes a GraphQL data type with its associated properties and child members. These child members also become GraphQL types or objects until the end of the hierarchical tree is reached. Once the tree has been traversed and the GraphQL types created, the remaining values in the tree will be primitive object types such as strings, floats, integers, and numbers.
[0030] Figure 7 An API server is shown that includes several components working in a recursive loop, allowing for generic processing of GraphQL requests 703 from users. The server starts with the GraphQL schema 701 described above. Upon receiving the GraphQL query 703, the server's GraphQL API service 705 receives the request and presents the request to the resolver core 707. The resolver core contains classes, where each GraphQL type is represented by a class in the resolver code. Each class includes a member list that contains any child members associated with the class. For example, a robot class will include child components that include a controller and a power system. During a user request in the form of a GraphQL query 703, the resolver core is called, which employs an object explorer 709 that recursively explores the classes in the GraphQL schema 701 starting from the root node and looking for information in the class that indicates what information to retrieve from the next child member and how parent and child members are related. This information is returned to the resolver core 707.
[0031] During the recursive processing, the API parser core 707 calls the SPARQL generator 711. The SPARQL generator 711 creates a query in SPARQL 713, which can be posed to the RDF data 717 reflecting the OPC UA specification via the SPARQL connector 715. The SPARQL query 713 extracts semantic information from the RDF triple store. This process is repeated for each GraphQL type. When each GraphQL type has been processed, the GraphQL API service 705 processes the final result to conform to a properly formatted javascript object notation (JSON) file 719, which is provided to the user.
[0032] GraphQL is a well-known open source data query and manipulation language for APIs that can be used to extract rich semantic information from the OPC UA knowledge graph via a SPARQL parser. However, this requires manual design of the API. Creating a manually written GraphQL API and a server with an associated GraphQL parser requires significant R&D resources. Engineers with a deep understanding of SPARQL, OPC UA, and GraphQL must leverage all three technologies to create a GraphQL API derived from the OPC UA ontology. This API design and development is a time-consuming and costly process that requires highly skilled engineers. In addition, the generated API is limited to the specific OPC UA companion specification for which it was designed and cannot be extended to other types of machines. To this end, the generation of the GraphQL schema can be automated along with the design of a generic GraphQL server.
[0033] Using a manual approach, engineers developing GraphQL APIs must manually study and understand the OPC UA companion specification. Next, they must study the OPC UA-derived RDF ontology and introspect how the various OPC UA nodes and objects are connected or related to each other. Finally, they must create a custom GraphQL schema that describes all possible queries that clients can make. This GraphQL schema must correspond to how data is stored in the RDF graph. To leverage the GraphQL schema, engineers will then have to create a custom GraphQL server and resolvers to handle client requests and write custom SPARQL queries and associated post-processing to retrieve semantic information.
[0034] All the steps required to create an API schema and associated parser must be manually written by experts after extensive analysis. The generated API is also specific to a single specification. Therefore, this approach cannot be adapted to arbitrary specifications or machines without correct specifications.
[0035] In an embodiment of the present disclosure, an exemplary architecture for automatically generating GraphQL schemas and generic GraphQL servers from an RDF knowledge base derived from the OPC UA specification is provided. The architecture includes two parts that can work independently while having a public interface between them. The first component is a GraphQL schema generator that performs semantic inspection of RDF data to generate a GraphQL schema. This component inspects the OPC UA-derived RDF ontology metamodel and creates a list of GraphQL types or classes. Each GraphQL type represents a type of object, such as a machine, or may also represent an aggregate with common properties. The GraphQL schema generator also generates custom metadata for data retrieval from the generic GraphQL API server described below.
[0036] The second component is a generic GraphQL server that exposes an HTTP API using an automatically generated GraphQL schema and associated metadata. The generic GraphQL server can be queried for useful semantic information about OPC UA machines connected to the RDF database without the need for extensive analysis and development by subject matter experts.
[0037] Both the Schema Generator and the Generic GraphQL Server use a recursive data investigation and retrieval approach that relies on the OPC UA ontology itself being structured as a hierarchical tree with parent-child relationships. Typically, the top level or root node of this tree is a host machine, such as a robot or a stamping machine. This root node includes child nodes that represent various subcomponents of the machine, such as motors, gearboxes, and other components. Those subcomponents are then further broken down into their associated sub-components. This hierarchical relationship can be examined and queried by performing a recursive tree traversal starting from the root node. Both the Schema Generator component and the GraphQL Server component take advantage of this approach.
[0038] Figure 1 1 is a block diagram of an architecture 100 for extracting information from an OPC UA ontology according to an embodiment of the present disclosure. The architecture 100 receives input in the form of an entry point or root node 103 and an endpoint or file 101 indicating where the RDF information can be found. The root node reduces the search space and prevents unnecessary information from being collected from the schema and associated metadata.
[0039] The core 110 of the architecture includes a schema generator 111 and a generic GraphQL server 113 corresponding to the data format of the schema generated by the schema generator 111. The schema generator 111 and the generic GraphQL server 113 use a recursive data exploration and retrieval method that exploits the nature of OPC UA ontologies arranged in a tree structure that exhibits parent-child relationships.
[0040] Schema generator 111 generates SPARQL queries 125 to examine RDF store 120 containing RDF database metadata 121 and object or entity information for each component of system 123. Schema generator 111 collects data about objects in RDF store 120 and converts the data into a format compatible with generic API server 113. The data is provided as SPARQL schema 114 and RDF parser metadata 116.
[0041] The generic API server 113 may receive requests from the user 130 via a user-defined API request 115. The generic API server 113 will receive the API request 115 in a compatible language such as GraphQL. The request 115 is used to allow the generic API server 113 to explore the SPARQL schema 114 and the RDF parser metadata 116. The information from the SPARQL schema 114 and the RDF parser metadata 116 is converted by the generic API server 113 into a format used by the user 130 and provided to the user 130.
[0042] The GraphQL schema generator 111 is responsible for performing checks on a given endpoint / file 101 and generating all the information 114, 116 needed to run a GraphQL API server 113 and associated generic GraphQL resolvers. The schema generator 111 receives two inputs: a root node 103, which is used to reduce space search and reduce unnecessary information about the schema and metadata; and an endpoint / file 103, which informs the schema generator 111 where to get the data to check. Now refer to Figure 2 The components of the pattern generator 111 will be described in more detail.
[0043] Figure 2 yes Figure 1 The block diagram of the pattern generator 111 is shown in FIG. Figure 1 As shown, schema generator 111 receives as input root node 103 and endpoint / file 101. Data representation module 210 includes computer software instructions that enable a computer processor to examine RDF store 120 to generate data representations of semantic objects and relationships in RDF store 120 inspired by OPC UA.
[0044] The two main components of the GraphQL schema generator 111 are the data representation module 210 and the data generation module 220. The data representation module 210 performs a recursive introspection of the RDF store at the endpoint 101 to identify the data types contained therein. The data representation module 210 creates a representation of the identified data types in the Abstract Syntax Free (ASF) format.
[0045] To collect data, the data representation module 210 calls a SPARQL query containing the specific type of data being searched by the data representation module 210. The data representation module 210 identifies the object type within the RDF store 120 schema from the root node 103. Using the SPARQL query template 201, a SPARQL query is generated in the query generation module 211, which populates the query template 201 with the object type being searched. The generated SPARQL query 212 is processed by the SPARQL connector 213 to access the RDF schema and metadata in the RDF store 120. The response 214 of the query 212 is provided to the pre-processing module 215. The pre-processing module 215 converts the query response 214 to a standard format 216 that can be processed by the data representation module 210. The data representation module 210 generates the semantic information from the RDF store 120 into a processable format. In an exemplary embodiment, the data representation module 120 can organize the semantic information into an AST format.
[0046] After all object types have been detected and queried, the data collected and stored in AST format by the data representation module 210 is provided to the data generation module 230. The data generation module 230 converts the data from the data representation module 210 into a GraphQL schema that can be queried by the generic API server and further generates the RDF parser metadata 116. As part of the query response 214, additional object types may be identified. The data representation module 210 provides the additional object types to the query generation module 211 to perform additional queries in the RDF storage schema for each additional object type that falls within the tree structure of the root node 103.
[0047] After the data generation module 120 has queried and stored all object types, the schema data is provided to the data generation module 230. The data generation module 230 converts the data from the data representation module into the GraphQL schema format 114 and the associated metadata from the RDF parser 116. The GraphQL schema 114 and the associated metadata 116 can be used by a general API server such as Figure 3 ) is used to access semantic information in an OPC UA inspired RDF store 120.
[0048] Figure 3 yes Figure 1. In one embodiment, the API server 113 is configured to receive and process queries from the GraphQL API. The generic API server 113 runs in a recursive loop to primarily process client GraphQL requests 115. In addition to the user request 115, the input to the generic API server 113 also includes a GraphQL schema 114 generated from an RDF knowledge base and a Figure 2 115. The RDF parser metadata 116 generated by the schema generator 111 in the product data management (PDM) endpoint 120. In one embodiment, the metadata 116 can be stored in JSON format. The GraphQL API service 301 calling the parser core 310 receives the client request 115. The parser core 310 uses a tree explorer component 311, which recursively explores the RDF parser metadata 116 via the parser data manager 312. The RDF parser metadata 116 contains information identifying a method for crawling an OPC UA derived RDF ontology database at an RDF store implemented in a product data management (PDM) endpoint 120. The tree explorer 311 recursively starts from the root node of the metadata tree 116 and follows the path of the tree based on the client request 115.
[0049] While traversing the metadata tree, the parser core 310 calls the SPARQL generator 320, which generates a SPARQL query 321 to retrieve RDF semantic data from the RDF store 120. This process is repeated for all GraphQL nodes with a class type. Finally, the parser core 310 processes the final result into a properly formatted GraphQL response 315 (e.g., JSON) for the client.
[0050] Figure 4 A process for recursive introspection of an RDF store 120 using a generic API server according to an embodiment of the present disclosure is depicted. A query is submitted to the generic API server in GraphQL format 115. The process begins at a root node in an RDF data tree 401. The generic API server looks at the current node and identifies any child nodes 402. Based on the identified types contained in the node of interest, a SPARQL query is generated 403 that can extract data from the RDF knowledge base at endpoint 120. Data is retrieved based on the query and the SPARQL result is processed 404. The data elements retrieved in the SPARQL result are checked to determine whether any child members represent data objects or types 405. If any child nodes represent data objects, the process is called again to determine whether the new child node containing the data object contains additional child members 402. The process is performed recursively until the result no longer produces any child nodes containing additional data objects.
[0051] Figure 5 501 is a process flow diagram for generating a GraphQL schema based on an OPC UA specification according to various aspects of an embodiment of the present disclosure. For a UA OPC specification that has been converted to be represented in an RDF knowledge base, a base object type and an endpoint containing the RDF knowledge base are provided as input 501. As long as there are remaining object types to be included in the schema, the schema generation process will continue 503. If remaining object types exist 505, a query is generated based on the object type of interest 507. The query will be in a format compatible with retrieving information from an RDF knowledge graph, such as SPARQL. The query is run on the RDF knowledge graph, and the results are preprocessed and reformatted into a standard format 509. According to an embodiment, the standard format can be represented as a GraphQL object type or class together with metadata obtained from the RDF knowledge graph. The data representation in the schema is updated 511 using the standardized query results.
[0052] The present invention has significant advantages over previous GraphQL APIs that were manually designed and developed by professional engineers. Schema generation via inspection uses automated intelligence to crawl the OPC UA RDF tree and retrieve all possible data points available in the ontology. This makes the system versatile and flexible. New machines with completely new component structures can be introspected and data can be exposed to clients without manually studying the specification and ontology structure. The generic GraphQL server is also intelligent, flexible, and able to retrieve OPC UA machine data without manually hand-writing SPARQL queries.
[0053] Schema generation and a common API server approach also standardize the API format, which makes it easier for consumers of the API to automate the consumption process as well, further reducing costs.
[0054] The key algorithm that gives rise to the advantages is recursive inspection of the OPC UA RDF tree and generation of a GraphQL schema and associated metadata, and a generic GraphQL server that is flexible enough to automatically create SPARQL queries for data retrieval based on the generated schema.
[0055] Figure 6 An exemplary computing environment 600 is shown within which embodiments of the present invention may be implemented. Computers and computing environments, such as computer system 610 and computing environment 600, are known to those skilled in the art and are therefore briefly described herein.
[0056] like Figure 6As shown, computer system 610 may include a communication mechanism such as a system bus 621 or other communication mechanism for transferring information within computer system 610. Computer system 610 also includes one or more processors 620 coupled to system bus 621 for processing information.
[0057] Processor 620 may include one or more central processing units (CPUs), graphics processing units (GPUs), or any other processors known in the art. More generally, a processor as used in the present invention is a device for executing machine-readable instructions for performing tasks stored on a computer-readable medium, and may include any one of hardware and firmware or a combination of hardware and firmware. The processor may also include a memory that stores executable machine-readable instructions for performing tasks. The processor takes action based on information by manipulating, analyzing, modifying, converting, or transmitting information for use by an executable program or information device and / or by routing the information to an output device. For example, a processor may use or include the capabilities of a computer, a controller, or a microprocessor, and may be adjusted using executable instructions to perform special functions that cannot be performed by a general-purpose computer. The processor may be coupled (electrically coupled and / or as including executable components) to any other processor to enable interaction and / or communication therebetween. A user interface processor or generator is a known element that includes an electronic circuit or software or a combination of both for generating a display image or a portion thereof. The user interface includes one or more display images, thereby enabling a user to interact with a processor or other device.
[0058] Continue to refer Figure 6, the computer system 610 also includes a system memory 630 coupled to the system bus 621 for storing information and instructions executed by the processor 620. The system memory 630 may include computer-readable storage media in the form of volatile and / or non-volatile memory, such as read-only memory (ROM) 631 and / or random access memory (RAM) 632. RAM 632 may include other dynamic storage devices (e.g., dynamic RAM, static RAM, and synchronous DRAM). ROM 631 may include other static storage devices (e.g., programmable ROM, erasable PROM, and electrically erasable PROM). In addition, the system memory 630 may be used to store temporary variables or other intermediate information during the execution of instructions by the processor 620. The basic input / output system 633 (BIOS) contains basic routines that help transfer information between elements within the computer system 610, such as at startup, and may be stored in ROM 631. RAM 632 may contain data and / or program modules that are immediately accessible to and / or currently being operated on by the processor 620. System memory 630 may additionally include, for example, operating system 634 , application programs 635 , other program modules 636 , and program data 637 .
[0059] The computer system 610 also includes a disk controller 640 coupled to the system bus 621 to control one or more storage devices for storing information and instructions, such as a magnetic hard disk 641 and a removable media drive 642 (e.g., a floppy disk drive, an optical drive, a tape drive, and / or a solid-state drive). Storage devices may be added to the computer system 610 using an appropriate device interface, such as a small computer system interface (SCSI), integrated device electronics (IDE), a universal serial bus (USB), or FireWire.
[0060] The computer system 610 may also include a display controller 665 coupled to the system bus 621 to control a display or monitor 666 (such as a cathode ray tube (CRT) or a liquid crystal display (LCD)) for displaying information to a computer user. The computer system includes an input interface 660 and one or more input devices, such as a keyboard 662 and a pointing device 661, for interacting with a computer user and providing information to the processor 620. The pointing device 661 may be, for example, a mouse, a light pen, a trackball, or a click stick for transmitting direction information and command selections to the processor 620 and for controlling cursor movement on the display 666. The display 666 may provide a touch screen interface that allows input to supplement or replace the direction information and command selections transmitted by the pointing device 661. In some embodiments, a user-wearable augmented reality device 667 may provide input / output functionality, allowing the user to interact with both the physical and virtual worlds. The augmented reality device 667 communicates with the display controller 665 and the user input interface 660, allowing the user to interact with virtual items generated in the augmented reality device 667 by the display controller 665. The user may also provide gestures that are detected by the augmented reality device 667 and transmitted as input signals to the user input interface 660 .
[0061] The computer system 610 may perform some or all of the processing steps of embodiments of the present invention in response to the processor 620 executing one or more sequences of one or more instructions contained in a memory such as a system memory 630. Such instructions may be read into the system memory 630 from another computer-readable medium such as a magnetic hard disk 641 or a removable media drive 642. The magnetic hard disk 641 may contain one or more data stores and data files used by embodiments of the present invention. The data store contents and data files may be encrypted to increase security. The processor 620 may also be employed in a multi-processing device to execute one or more sequences of instructions contained in the system memory 630. In alternative embodiments, hard-wired circuits may be used in place of or in combination with software instructions. Therefore, embodiments are not limited to any particular combination of hardware circuits and software.
[0062] As stated above, the computer system 610 may include at least one computer-readable medium or memory for holding instructions programmed according to embodiments of the present invention and for containing data structures, tables, records, or other data described herein. The term "computer-readable medium" as used in the present invention refers to any medium that participates in providing instructions to the processor 620 for execution. Computer-readable media can take many forms, including but not limited to non-temporary media, non-volatile media, volatile media, and transmission media. Non-limiting examples of non-volatile media include optical disks, solid-state drives, magnetic disks, and magneto-optical disks, such as magnetic hard disks 641 or removable media drives 642. Non-limiting examples of volatile media include dynamic memory, such as system memory 630. Non-limiting examples of transmission media include coaxial cables, copper wires, and optical fibers, including wires that make up the system bus 621. Transmission media can also take the form of sound waves or light waves, such as those generated during radio wave and infrared data communications.
[0063] The computing environment 600 may also include a computer system 610 operating in a networked environment using logical connections to one or more remote computers, such as a remote computing device 680. The remote computing device 680 may be a personal computer (laptop or desktop), a mobile device, a server, a router, a network PC, a peer device, or other common network node, and typically includes many or all of the elements described above with respect to the computer system 610. When used in a networked environment, the computer system 610 may include a modem 672 for establishing communications over a network 671, such as the Internet. The modem 672 may be connected to the system bus 621 via the user network interface 670 or via another appropriate mechanism.
[0064] The network 671 can be any network or system generally known in the art, including the Internet, an intranet, a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a direct connection or a series of connections, a cellular telephone network, or any other network or medium that can facilitate communication between the computer system 610 and other computers (e.g., a remote computing device 680). The network 671 can be wired, wireless, or a combination thereof. The wired connection can be implemented using Ethernet, a universal serial bus (USB), RJ-6, or any other wired connection generally known in the art. The wireless connection can be implemented using Wi-Fi, WiMAX, and Bluetooth, infrared, cellular networks, satellites, or any other wireless connection methods generally known in the art. In addition, several networks can work alone or communicate with each other to facilitate communication in the network 671.
[0065] An executable application as used in the present invention includes code or machine-readable instructions for adjusting a processor to implement predetermined functions (such as those of an operating system, a contextual data acquisition system, or other information processing system), for example, in response to user commands or inputs. An executable program is a section of code or machine-readable instructions, a subroutine, or other distinct code segment, or portion of an executable application that is used to perform one or more specific processes. These processes may include receiving input data and / or parameters, performing operations on received input data and / or performing functions in response to received input parameters, and providing resulting output data and / or parameters.
[0066] As used in the present invention, a graphical user interface (GUI) includes one or more display images generated by a display processor and implementing user interaction with a processor or other device and associated data acquisition and processing functions. The GUI also includes an executable program or executable application. The executable program or executable application adjusts the display processor to generate signals representing the GUI display images. These signals are provided to a display device, which displays the images for viewing by the user. The processor, under the control of the executable program or executable application, manipulates the GUI display images in response to signals received from an input device. In this way, a user can use an input device to interact with the display image, thereby implementing user interaction with a processor or other device.
[0067] The functions and process steps of the present invention may be performed automatically or in whole or in part in response to user commands. Automatically performed activities (including steps) are performed in response to one or more executable instructions or device operations without the user directly initiating the activity.
[0068] The systems and processes of the accompanying drawings are not exclusive. Other systems, processes, and menus can be derived based on the principles of the present invention to achieve the same goals. Although the present invention has been described with reference to specific embodiments, it should be understood that the embodiments and variations shown and described in the present invention are for illustrative purposes only. Modifications to the current design can be implemented by those skilled in the art without departing from the scope of the present invention. As described in the present invention, various systems, subsystems, agents, managers, and processes can be implemented using hardware components, software components, and / or combinations thereof. Any claim element in the present invention shall not be interpreted according to the provisions of 35 USC 112, sixth paragraph, unless the element is explicitly stated using the phrase "for ... device".
Claims
1. A computer-implemented method for extracting information from an Open Platform Communications Unified Architecture (OPC UA) specification represented in a Resource Description Format (RDF) knowledge graph, comprising: Make queries that conform to the GraphQL API; In the GraphQL server, receiving the GraphQL query; In the GraphQL server, converting the GraphQL query into a SPARQL compliant query; Extract information from RDF knowledge graphs using SPARQL queries; The result of the SPARQL query is formatted into a format desired by the user.
2. The method according to claim 1, wherein the GraphQL server comprises: A GraphQL schema, comprising information identifying objects and relationships between objects, the GraphQL schema representing an OPC UA specification; as well as A GraphQL parser is used to receive a GraphQL query and extract the requested information from the RDF knowledge graph.
3. The method according to claim 1, wherein: The format expected by the user is javascript object notation (JSON).
4. The method according to claim 1, wherein: The GraphQL schema is configured as a hierarchical tree format.
5. The method according to claim 4, further comprising: In the GraphQL server, upon receiving a GraphQL-compliant query: Recursively traverse a GraphQL hierarchy tree to identify the object specified in the GraphQL query and any child objects in the hierarchy tree.
6. The method according to claim 5, further comprising: Based on a recursive traversal of the hierarchical tree, the SPARQL-compliant query is constructed to extract information related to objects identified in the GraphQL hierarchical tree.
7. The method according to claim 1, wherein: The GraphQL Server contains GraphQL types for each OPC UA object class in the OPC UA specification.
8. The method according to claim 7, wherein: Each sub-member of an OPC UA Object Class is specified as a GraphQL Type in the GraphQL Server.
9. A computer-implemented method for extracting information from an Open Platform Communications Unified Architecture (OPC UA) specification represented in a Resource Description Format (RDF) knowledge graph, comprising: In the semantic introspection and GraphQL schema generator, GraphQL-compliant schemas and metadata are automatically generated from RDF knowledge graphs; as well as A GraphQL query is presented to a generic GraphQL server, which formats the GraphQL query to extract information from an RDF knowledge base and returns the results of the GraphQL query to a user in a desired format.
10. The method according to claim 9, wherein: Automatically generating GraphQL-compliant schemas and metadata from the RDF knowledge graph includes: Receiving, at the semantic introspection and GraphQL schema generator, an endpoint or file containing the RDF knowledge graph and a root node, the root node identifying a starting point in the RDF knowledge graph; Recursively traverse the RDF knowledge graph to identify objects in the RDF knowledge graph and relationships between objects in the RDF knowledge graph; For each identified object in the RDF knowledge graph, create a list containing each GraphQL type corresponding to each RDF object; and Creates custom metadata containing information that characterizes the organization of a List of GraphQL type.
11. The method according to claim 9, wherein: The generic GraphQL server performs the following steps: Receiving the GraphQL query from the user; Access the GraphQL schema and metadata; Based on the GraphQL schema and metadata, create a SPARQL query; Applying the SPARQL query to the RDF knowledge graph; extracting information from the RDF knowledge graph as a result from the SPARQL query; as well as The results of the SPARQL query are processed to create a properly formatted response to the user.
12. The method according to claim 11, wherein: The properly formatted response to the user is in GraphQL-compliant JavaScript Object Notation (JSON) format.
13. The method according to claim 11, wherein: The GraphQL schema is formatted as a hierarchical tree structure.
14. The method according to claim 13, wherein: Creating the SPARQL query involves: recursively traversing the hierarchical tree structure of the GraphQL schema to identify GraphQL types relevant to a query from the user; consulting the metadata to identify relationships between the identified GraphQL types; and Based on the identified GraphQL types and the relationships between the GraphQL types, the SPARQL query is constructed to request information stored in the RDF knowledge graph.
15. A computer-implemented system for retrieving information from an Open Platform Communications Unified Architecture (OPCUA) specification represented in a Resource Description Format (RDF) knowledge graph, comprising: A computer processor in communication with a non-volatile memory, the memory containing computer executable instructions that, when executed by the computer processor, cause the computer processor to: In the GraphQL schema generator, recursively traverse the RDF knowledge graph; Creating a list of GraphQL types based on the RDF object classes identified in the RDF knowledge graph; Create metadata describing the relationships between the GraphQL types contained in the created list; as well as The list and metadata are stored in the non-volatile memory as a GraphQL schema representing an OPC UA specification.
16. The system of claim 15, the non-volatile memory further comprising instructions that, when executed by the computer processor, cause the computer processor to: Set up a generic GraphQL server, which is configured to: Receive GraphQL queries from users; In response to receiving the GraphQL query, calling a GraphQL resolver core; In the GraphQL resolver core, access the GraphQL schema; In the GraphQL resolver core, generating a SPARQL query based on the GraphQL schema; and In the GraphQL server, a result of the SPARQL query is processed into a GraphQL-compliant response to the user's query.
17. The system of claim 15, wherein: The GraphQL schema generator includes: a data representation module, wherein the data representation module is configured to: Identify objects in the RDF knowledge graph; Based on the identified objects, a SPARQL query is generated; Applying the SPARQL query to the RDF knowledge base; Receiving a result of the SPARQL query; identifying whether any additional objects are identified in the SPARQL query result; and In the event that additional objects are identified, additional SPARQL queries are generated for the additional objects, or in the event that no new objects are identified in the SPARQL query results, the SPARQL query results are post-processed into a standard format used by the data representation module.
18. The system of claim 17, wherein: The GraphQL schema generator further includes: a data generation module, wherein the data generation module is configured to: processing the information created in the data representation module to create a list of GraphQL types corresponding to each object identified in the RDF knowledge base; and Metadata is created that includes information describing relationships between the GraphQL types contained in the list.
19. The system of claim 16, wherein the general GraphQL server further comprises: A GraphQL API service is configured to receive a GraphQL query from the user and, in response to receiving the GraphQL query, call a GraphQL resolver core.
20. The system of claim 19, wherein the general GraphQL server further comprises: A tree explorer module is configured to receive a request from the GraphQL resolver core, recursively traverse the hierarchical tree embodied in the metadata, and provide information related to relationships of objects in the RDF knowledge base to the GraphQL resolver core for generating the SPARQL query.
Citation Information
Cited By
Systems and methods for data scraping encrypted content sources comprising multi-layered encryptions and nested content
US12585713B1