Method, computer program and storage medium for discovering and eliminating errors within mapping process

By using the debugger function in the graph mapping language, automatic detection and correction of errors in the mapping file is achieved, and the problems of difficulty and low efficiency of error detection in the existing technology are solved, and development efficiency and accuracy are improved.

CN119631066APending Publication Date: 2025-03-14SIEMENS AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380057745.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-04
Filing Date
2023-07-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, errors in mapping files are difficult to detect automatically, and usually require trial and error methods, resulting in time-consuming and inefficient.

Method used

Using the debugger function in the graph mapping language, by gradually processing mapping files, using conditional breakpoints and interactive interfaces, errors during mapping are automatically detected and corrected.

Benefits of technology

It realizes efficient and automatic detection and elimination of errors in mapping files, avoids inefficiency of trial and error methods, and improves development efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119631066A_ABST
    Figure CN119631066A_ABST
Patent Text Reader

Abstract

The invention relates to a method for discovering and eliminating errors within a mapping process, the method being configured to transform an input file (IDB) into a map based on a transform instruction. Furthermore, the invention relates to a computer program and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The invention relates to a method for detecting and eliminating errors in a mapping process, which method is in particular part of an electronic computing device, according to patent claim 1. Furthermore, the invention relates to a computer program according to patent claim 9 and a storage medium according to patent claim 10.

[0002] The mapping of data (particularly relational data) to a graph is usually implemented by generating a mapping file that can be processed by a processor or an engine, respectively. The processor or the engine constructs at least a part of the mapping process, which is particularly configured as a computing device.

[0003] The computing device reads or imports the mapping file and processes the transformation instructions or mappings contained in the mapping file with the data contained in the input file. The results are stored in a graph database and / or an RDF file, where RDF stands for Resource Description Framework.

[0004] However, the mapping file used to transform the input file into the output file may contain errors. These errors may be syntactic, semantic, or even data-specific. Such errors affect the operation of the mapping process.

[0005] The present invention is based on the understanding that the mapping file may have errors. Searching for such errors may be very time-consuming and tedious. In this regard, the search depends on, for example, the processor implementation and its error handling. The processor implementation may be configured in such a way that finding errors becomes difficult and can usually only be solved by trial and error.

[0006] In order to speed up the process of transforming relational data in graph data, the present invention aims to find a way to automatically detect errors rather than through trial and error.

[0007] From all industrial processes, the transformation of relational data to graph data is important because relational data is usually a type of data generated by different measuring instruments, and graph data is a type of data that artificial intelligence AI or any type of control machine may process. In addition, when data from different relational data sources need to be integrated, the graph structure is more suitable.

[0008] Therefore, the process of converting relational data to be monitored, generated by sensors, cameras, etc., representing the physical conditions and / or industrial environment of a production line and corresponding product precursors, such as a production workshop, into graph data to be processed by a processor and / or AI sets the pace for the future success of automated and / or AI-controlled industrial processes.

[0009] However, AI is not always configured to process raw generated data, i.e. relational data. Some AI operate on graph data, so in these cases, the step of transforming relational data into graph data is an important and fundamental step within the production line and determines the time and / or energy necessary for production.

[0010] It is therefore an object of the present invention to provide a tool to perform the search for errors in a mapping file, preferably a tool that works automatically, overcoming the state-of-the-art trial-and-error method as described above.

[0011] According to the invention, this object is solved by the subject matter of the independent patent claims. Advantageous embodiments and further embodiments of the invention are indicated in the dependent claims as well as in the description and the drawings.

[0012] A first aspect of the invention relates to a method for discovering and eliminating errors in a mapping process, the method being configured to transform an input file (IDB) into a graph on the basis of at least one transformation instruction written in a graph mapping language and to save the graph in an output file (GDB), the method comprising the following steps:

[0013] - obtained through a mapping process of an input file (IDB) which is to be transformed into a graph; (S1)

[0014] - obtaining a mapping file (MF) written in a graph mapping language through a mapping process, the mapping file comprising a plurality of transformation instructions for transforming an input file (IDB); (S2)

[0015] - executing the transformation instructions in the order specified by the mapping file (MF); (S3)

[0016] - checking whether the specific transformation instruction to be executed and / or the result of the execution satisfies a predetermined condition; (S4) and

[0017] -Execute a predetermined operation and / or output the executed transformation instruction and / or result and / or output file according to the condition. (S5)

[0018] - Debugging the map file (MF) corresponding to the input file (IDB) (S6).

[0019] The general idea of ​​the invention is to use the functionality of a debugger for graph mapping languages, one of these languages ​​being for example R2RML and / or RML in other terms "(R2)RML", respectively, but the method according to the invention is not limited to a specific graph mapping language.

[0020] Debuggers are known for programming languages ​​and enable the developer to execute program code and interrupt it at desired points, for example, to examine the current state of the program. Another function of a debugger is to execute program code line by line. This is important for finding and identifying errors. In addition, the program can be interactively reviewed by evaluating source code provided by the user during execution. In addition, the results calculated up to that point based on the source code can be displayed.

[0021] In other words, in the method according to the invention, the mapping file can be processed step by step, in particular line by line. Conditions such as breakpoints are used, which take effect under certain conditions in the data (i.e. in the input file or the mapping file). In this way, for example, a controlled interruption of execution can be achieved so that the content that has been output so far can be analyzed. It is advantageous if the current execution status is displayed when the specified operation is performed, or if an output file is output. For example, if the mapping file is a source code of a mapping language, columns and / or lines of the source code can be highlighted. Additionally or in addition, an output file can be displayed and generated, which output file is in particular an RDF output.

[0022] For example, the condition may describe what the transformation must look like, so that, for example, one type of data can only be converted into a specific type of data. For example, a name cannot be converted into a size. If this occurs, the condition may be satisfied.

[0023] The output file contains the graph, which is stored in the output file, and contains the processed data of the input file. These are for example combined into triples.

[0024] Each triple represents a statement in which a subject and an object formed from data are related to each other (a relation). A relation points from a subject to an object and a predicate is used to name the relation. For example, a specific size can be assigned a specific name and the predicate can be the verb "to have". Triples referring to the same subject or object form a semantic network, which is usually represented in the form of a table or graph. Graphically, each statement in RDF is a simple sentence.

[0025] The output file or result is advantageously provided via an interface of the mapping process or, if the mapping process is a computing device, is stored in a memory area of, for example, a memory device of the computing device.

[0026] When the input file and / or mapping file are obtained, they are advantageously read into, for example, a memory storage portion or storage medium, which can be connected to the computing device via an interface. Advantageously, during the acquisition, the input file or mapping file is simultaneously stored in, for example, a RAM memory of the computing device.

[0027] R2RML and RML - "(R2)RML" stands for Both or Either, is a mapping specification for converting source data from various heterogeneous sources into RDF format. For this purpose, one or more R2RML and / or RML processor units are used. Typically, it is used in an ETL pipeline. There are several solutions for handling mappings. The available tools differ in various aspects, with different features and advantages as well as disadvantages. This includes, for example, the interface to the tool, how to use the processor (e.g. as an API or as a graphical user interface or as a library), the form of accessing input and output schemas and / or the supported databases. Also, the RDF generation and serialization times across the available tools are different.

[0028] Conventionally, integrating structured RDB format source data corresponding to different domains and / or formats involves using an ETL "Extract, Transform, Load" process for mapping the structured data to RDF data, especially through the ontology of a knowledge graph.

[0029] The basic idea of ​​the method according to the present invention is to provide the function of a debugger for graph mapping. Via a display device or a man-machine interface, different interaction modes with the mapping process can be suggested to the user, so that, for example, text-based and / or graphic-based interaction can be performed via a user interface. Therefore, in text mode (for example, by means of a command line), the user can initiate commands or operations according to the method according to the present invention, such as setting breakpoints in a specific row, tracking execution progress and status. Additionally or alternatively, the user can interact via a graphical user interface, wherein this can be provided, for example, as an independent desktop application or as an add-on component of an editor. For example, setting a breakpoint can be completed by clicking on the corresponding row with a mouse pointer.

[0030] With such debugging and analysis possibilities, one advantage of the method according to the invention is that the analysis and processing of input files and / or mapping files can be performed particularly efficiently, so that the mapping process can also be operated particularly efficiently. Thus, for example, premature failures of the mapping process or the computing device can be avoided.

[0031] The method provides a systematic troubleshooting method instead of a trial and error method. This improves the developer's work and additionally increases the development speed, saving time and / or costs. When errors occur, it is easier to find the errors using the method according to the invention than using smaller mapping files and / or manually constructing data. In addition, the learning curve may be flat for developers using the mapping process. Therefore, in summary, the mapping process can be operated in a particularly advantageous manner. In addition, for example, in order to further use the output files, for example in a production environment where parts are manufactured based on maps, a particularly advantageous operation can be achieved.

[0032] In one embodiment of the invention, the breakpoint is determined as a predetermined action at which the execution of the transformed instruction is interrupted. In other words, the execution of the transformed instruction proceeds until a specific transformed instruction is determined or characterized by the breakpoint. In this case, the breakpoint or the action may depend on the result and / or the transformed instruction. This has the advantage that the method can be used to check in a particularly simple way whether a specified condition is met.

[0033] In another embodiment of the present invention, when a specified condition is met, or when the result calculated by means of a mapping file deviates from a target value, an input prompt is provided to a human-machine interface device, by means of which the transformation instruction causing at least the condition can be changed. In particular, when the target value is deviated or when a predetermined condition is met, the updated mapping file or output file can be output by a display device and / or via another interface, respectively. In other words, when the result deviates from the expected value, an editing device is provided, which allows the user to edit the mapping file and / or also edit the input file additionally or alternatively, so as to avoid improper behavior of the mapping process. This has the advantage that, by this method, the mapping process can be operated as reasonably and error-free as possible.

[0034] In a further embodiment, which merely represents an example of the invention, the mapping process comprises an (R2) RML processor device, by means of which the execution is achieved. In other words, for example, a dedicated chip is provided in the computing device, which may include, for example, a GPU (graphics processing unit) and / or a TPU (tensor processing unit) and / or a CPU (central processing unit) with a special instruction set. Additionally or alternatively, a separate memory area or a separate program code may be provided, which in particular serves as a parser for parsing an input file into an output file. This has the advantage that the process can be operated particularly efficiently.

[0035] In another embodiment of the present invention, the execution of the inspection and / or operation is performed by a debugger device, which is connected to the processor device via a communication interface. In other words, two independent devices are used in the method according to the present invention, and these two independent devices can be designed as, for example, a separate processor or computing device and / or as a separate software implementation. In this context, the two devices can be connected via a communication interface, which can be designed with software, and especially with hardware. For example, the debugging device can be executed on its own computing device, which is connected to the mapping process (for example, by means of a network), and the debugging device can therefore control the computing device for analyzing input files and / or mapping files. This has the advantage that the method can be used in a particularly flexible manner. Another advantage is that a particularly large amount of energy can be saved because the debugger device and the processor device can each be designed as dedicated hardware.

[0036] In a further embodiment of the invention, the predetermined operation is determined by means of artificial intelligence and / or the transformation instructions that satisfy the condition are changed. In other words, a self-learning algorithm and / or a neural network is used to specify the predetermined operation to be performed based on the condition when the method is executed. Additionally or alternatively, if the condition deviates from the expected value of the output, the transformation instructions are changed by means of a self-learning algorithm and / or in particular a neural network when creating the graph, respectively, so that the expected value is met. This has the advantage that the method can be performed with particularly little user intervention. As a result, the mapping process can be operated particularly efficiently.

[0037] In a further embodiment of the invention, (R2)RML is used as a graph mapping language. In other words, a particularly advantageous way of displaying relational data mappings of an RDF data model is provided. This results in the advantage that the method can be used particularly efficiently. It should be mentioned that the method according to the invention is by no means limited to a specific graph mapping language, but can be applied to any graph mapping language.

[0038] In a further embodiment of the invention, the individual triples of the graph characterizing the output file are stored in serialized form in the output file. In other words, the data are serialized when the input file is converted into the output file using the graph mapping language. This results in the advantage that, for example, the output file can be provided in a particularly compact manner, as a result of which, for example, the memory requirement of the storage device is particularly low. Furthermore, there is the advantage that energy is not wasted unnecessarily when exchanging files, for example via a computer network with further mapping processes or further computing devices.

[0039] A second aspect of the invention relates to a computer program which can be loaded into a memory of a computing device of a mapping process, for example, and comprises program means for executing the steps of the method when the computer program is executed in the computing device.

[0040] In this regard, advantages and advantageous embodiments of the first aspect of the invention are to be regarded as advantages and advantageous embodiments of the second aspect of the invention, and vice versa.

[0041] A third aspect of the present invention relates to a storage medium. The storage medium comprises electronically readable control information stored thereon, the control information comprising at least one computer program according to the second aspect of the present invention, and is configured to execute the method proposed herein according to the first aspect of the present invention when the storage medium is used in a computing device.

[0042] In this regard, advantages and advantageous embodiments of the third aspect of the invention are to be regarded as advantages and advantageous embodiments of both the second and first aspects of the invention, and vice versa in each case.

[0043] The present invention may take the form of a computer program including a program module accessible from a computer-available or computer-readable medium storing program code for use by or in combination with one or more computers, processors, or instruction execution systems. For the purposes of this specification, a computer-available or computer-readable medium may be any device capable of containing, storing, transmitting, propagating, or transmitting for use by or in combination with an instruction execution system, device, or apparatus. The medium may be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or device or apparatus) or a propagation medium, which itself as a signal carrier is not included in the definition of a physical computer-readable medium, which includes semiconductor or solid-state memory, magnetic tape, removable computer floppy disk, random access memory (RAM), read-only memory (ROM), hard disk, and optical disk (such as optical disk read-only memory (CD-ROM), read / write optical disk, and DVD). As known to those skilled in the art, the processor and program code for implementing each aspect of the technology may be centralized or distributed (or a combination of the above).

[0044] For use cases or usage scenarios that may occur when executing the method and are not explicitly described here, the method can provide for outputting error messages and / or prompts for user feedback and / or setting default settings and / or predetermined initial states.

[0045] Although the present invention has been described in detail with reference to specific embodiments, it will be appreciated that the present invention is not limited to these embodiments. In view of this disclosure, many modifications and variations will occur to those skilled in the art without departing from the scope of the various embodiments of the present invention as described herein. Therefore, the scope of the present invention is indicated by the following claims rather than by the preceding description. All changes, modifications and variations within the meaning and range of equivalents of the claims are considered to be within their scope. All advantageous embodiments claimed in the method claims may also apply to the system / device claims.

[0046] It shows:

[0047] Figure 1 is a schematic flow chart of a method of operating and debugging a mapping process; and.

[0048] Figure 2 is another schematic flow chart of the method.

[0049] Hitherto, it has been a problem to operate the mapping process in such a way that error analysis can be performed particularly efficiently, and therefore, for example, that the graph created by the mapping file is correct, or that the mapping process itself can be operated efficiently.

[0050] Therefore, in the following a method, a computer program and a storage medium are presented, by means of which this problem can be solved. Therefore, the proposed method is used to operate a mapping process, which is particularly configured as a computing device, which is configured to transform an input file IDB into a graph by means of at least one transformation instruction, which is written in a graph mapping language, and to store the transformation instruction in an output file GDB, wherein the method comprises several steps:

[0051] Figure 1 A sequence of steps is shown in FIG. 1 , wherein in a first step S1 , an input file IDB is obtained by a mapping process, and the input file IDB is to be converted or transformed into a graph.

[0052] In the second step S2, a mapping file MF is obtained through a mapping process. The mapping file MF is written in a graph mapping language and includes multiple transformation instructions of at least one transformation instruction (especially multiple transformation instructions to be executed continuously) for transforming the input file IDB into a graph file.

[0053] In a third step S3, the execution of the transformed instructions is achieved by a mapping process in the order specified by the mapping file MF.

[0054] In a fourth step S4, a check is performed to determine whether the performance of the transformation criterion or the result of the execution just executed and / or to be executed satisfies a predetermined condition.

[0055] Then, in step S5, according to whether the condition is satisfied, a predetermined operation is performed and / or a transformation instruction is output and / or a result is output and / or a file GDB is output. In particular, if the condition is not satisfied, the process continues to step S3.

[0056] The step of debugging the mapping file (MF) corresponding to the input file (IDB) is either performed after S5 or as S6 in parallel with steps S3, S4 and S5.

[0057] Furthermore, in step S6, the mapping file (MF) corresponding to the input file (IDB) is debugged. This step is either executed after S5 or executed in parallel with steps S3, S4 and S5.

[0058] Scenario 1—Execute S1 to S5. If the final output contains errors, debugging is required. This can be done after S3 through S6.

[0059] Scenario 2—S1 to S5 are being executed and a walk-through or trace of the execution is required at the same time. In this case, S6 occurs in parallel with S3, S4, and S5.

[0060] Through advantageous data mapping, data migration, data integration, data transformation, or data warehousing may be advantageously provided.

[0061] In this context, it will be shown to be advantageous if the mapping process for execution comprises a (R2)RML processor device PR. Additionally or alternatively, the checking and / or execution of the operation is performed by means of a (R2)RML debugger device DB, which is connected to the (R2)RML processor device via a communication interface.

[0062] Figure 2 A further schematic diagram of a sequence of possible embodiments of the method is shown. The inventive modules consist essentially in DB and COM. Input data IDB is imported by a (R2) RML processor device PR, which is connected to a (R2) RML debugger device DB via a communication device CI. In addition, a mapping file MF is also imported by the processor device PR.

[0063] (R2) The RML debugger device DB may be configured in such a manner that a user can determine a breakpoint as a predetermined operation at which execution of a conversion instruction is interrupted.

[0064] Preferably, this is performed as a controlled break in execution, the execution progress and / or status can be tracked, and portions in the IDB and MF can be highlighted against corresponding results in the GDB.

[0065] Additionally or alternatively, when a predetermined condition is met, for example due to a deviation from a target value, an input request can be provided at the human-machine interface device, by which at least the transformation instruction that meets the condition can be changed.

[0066] Additionally or alternatively, a self-learning algorithm or artificial intelligence can be used for this purpose, i.e. to determine the specified operation and / or change the transformation instructions that meet the conditions. For this purpose, the debugger commands COM can be provided in each case via the interface or by the self-learning algorithm. For example, the debugger device DB uses these debugger commands COM to perform the operation.

[0067] The proposed method allows a (R2)RML processor PR to parse an input file and output a mapping of a result output file, in particular an RDF file and / or a graph database GDB, providing a callback for each executed line to allow a debugger to interrupt the execution of the mapping.

[0068] The (R2)RML debugger device DB may exchange callbacks with the (R2)RML processor device PR and track the state of the (R2)RML processor device PR, as well as provide methods for user interaction and control, such as input options for debugger commands COM. The debugger commands COM may include breakpoints, execution flow, continue, single step and skip. Furthermore, printing source code, listing source code, displaying resulting output files, displaying database contents (e.g. using columns and / or rows) and displaying rows and / or columns of source code are possible.

[0069] If a command is provided, in particular a given operation, the debugger device DB executes the command and displays the result, for example, in a command line and / or a graphical user interface. If no command is found, the execution of the program can be continued.

[0070] Thus, the user can directly access the graph mapping by the indicated method. Thus, in addition to checking the current status of the mapping, the user can, for example, particularly advantageously update the mapping file.

[0071] Additionally or alternatively, in other embodiments, time-travel debugging can be implemented. Using this method, you can go back and forward in the mapping process. The advantage of this is that it is easy to rewind and repeat these steps without having to re-execute the mapping.

[0072] Preferably, (R2)RML may be used as the graph mapping language.

[0073] The proposed method, computer program and storage medium allow a particularly simple processing of mapping files, since errors occurring in these mapping files can be easily detected. Thus, it is not necessary to resort to trial and error to track down errors, but a systematic procedure is provided for this purpose. Thus, time and costs can be saved. Furthermore, developers who are familiar with the concept of a debugger have a flat learning curve when using the mapping process. Therefore, a debugger for a graph mapping language is proposed.

[0074] The invention relates to a method for finding and eliminating errors within a mapping process, the method being configured to transform an input file (IDB) into a graph based on transformation instructions. Furthermore, the invention relates to a computer program and a storage medium.

Claims

1. A method for finding and eliminating errors in a mapping process, the method being configured to transform an input file (IDB) into a graph on the basis of at least one transformation instruction written in a graph mapping language and to save the graph in an output file (GDB), the method comprising the following steps: - obtaining an input file (IDB) through a mapping process, said input file (IDB) to be transformed into said graph; (S1) - obtaining a mapping file (MF) written in the graph mapping language through a mapping process, and the mapping file includes a plurality of transformation instructions for transformation of the input file (IDB); (S2) - executing said transformation instructions in the order specified by said mapping file (MF); (S3) - checking whether a specific transformation instruction to be executed and / or the result of the execution satisfies a predetermined condition; (S4) and - Execute a predetermined operation according to the condition and / or output the executed transformation instruction and / or the result and / or the output file. (S5) - debugging the mapping file (MF) corresponding to the input file (IDB) (S6).

2. The method according to claim 1, characterized in that The predetermined operation determines a breakpoint at which the execution of the transformed instruction is interrupted, preferably enabling a controlled interruption of the execution, enabling tracking of the execution progress and / or status, and enabling highlighting of parts in IDB and MF against corresponding results in GDB.

3. The method according to claim 1 or 2, characterized in that: (R2)RML is used as the graph mapping language.

4. The method according to any one of the preceding claims, characterized in that The mapping process comprises a (R2) RML processor device (PR) by which the execution is performed.

5. The method according to claim 4, characterized in that Checking whether said predetermined condition is met and / or said execution of an operation is performed by a (R2) RML debugger device (DB), said (R2) RML debugger device (DB) being connected to said (R2) RML processor device (PR) via a communication interface (CI).

6. The method according to any one of the preceding claims, characterized in that The predetermined operation is determined by means of artificial intelligence and / or the transformation instruction that satisfies the condition is changed.

7. The method according to any one of the preceding claims, characterized in that When the predetermined condition is met, a prompt is provided at the human-machine interface, by means of which at least the transformation instruction causing the condition can be changed.

8. The method according to any one of the preceding claims, characterized in that The various triples representing the graph of the output file (GDB) are stored in serialized form in the output file (GDB).

9. Computer program directly loadable into a memory of a computing device, the computer program comprising program means for carrying out the steps of the method according to any one of claims 1 to 8 when the program is executed in an electronic computing device.

10. Storage medium having electronically readable control information stored thereon, the storage medium comprising at least one computer program according to claim 9 and being configured to execute the method according to one of claims 1 to 8 when the storage medium is used in a computing device.