Knowledge graph construction method and device for table data relationship, equipment and medium
By monitoring user operations and generating cell tracking relationship knowledge graphs, the limitations of the spreadsheet system when tracking data relationships are solved, the detailed display of complex formulas and cross-checking relationships is realized, and the data tracking capabilities and overall view are enhanced.
Patent Information
- Application Number
- CN202411175040.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-13
AI Technical Summary
The existing spreadsheet system lacks a comprehensive tracking and intuitive display of formulas and cross-checking relationships in the table when tracking and describing data relationships. It can only display the pairwise relationships between cells, and cannot display all formulas and cross-checking relationships involved in the cell. relation.
By monitoring users' operations on cells, obtaining reference formula information and performing text analysis, determining reference dependencies, generating cell tracking relationship knowledge graphs, displaying entity relationships between cells and associated cells, and using regular expressions to identify parameter identification Characters, automatically parse cell reference formulas, record and display the relationship between data in detail.
It significantly improves the ability to track complex formulas and cross-check relationships, provides a more comprehensive view of data relationships, helps users understand the overall picture of data flow, and enhances data tracking capabilities.
Smart Images

Figure CN119129555A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph technology, and specifically to a method for constructing a knowledge graph of tabular data relations, a device for constructing a knowledge graph of tabular data relations, an electronic device and a computer-readable storage medium. Background Art
[0002] In existing spreadsheet systems (taking EXCEL as an example), the tracking and description of data relationships is achieved through the "Trace Referenced Cells" function, which can help users understand how the data of a cell is referenced by other cells, or which other cells are affected by the data of a cell.
[0003] Currently, to track referenced cells in Excel, you first need to select the target cell in the worksheet, then click the "Formula" tab on the menu bar and select "Trace Referenced Cells". At this time, Excel will use blue arrows to indicate the cells that affect the target cell. If cross-worksheet references are involved, black dotted arrows may appear. When the analysis is completed, you can access "Trace Referenced Cells" under the "Formula" tab again and select "Remove Arrows" to clear these indicator arrows, thereby helping users understand the dependencies and impact ranges in the data model.
[0004] However, existing spreadsheet systems have the following problems: (1) In existing spreadsheet systems, the tracking and description of data relationships is achieved through the "Trace Reference Cells" function. This function only shows that there is a relationship between two cells, and only shows the relationship between two cells, and lacks the tracking and description of formulas and cross-references in the table; (2) Existing spreadsheet systems lack direct functions and intuitive display methods to describe all formulas and cross-references involved in cells.
[0005] In general, existing spreadsheet systems can only track and display the pairwise relationships between cells, and cannot fully track, describe and display all the formulas and cross-references involved in the cells. Summary of the invention
[0006] The purpose of the embodiments of the present invention is to provide a method, device, equipment and medium for constructing a knowledge graph of tabular data relationships to solve the above-mentioned problems.
[0007] In order to achieve the above object, an embodiment of the present invention provides a method for constructing a knowledge graph of table data relations, comprising: When a trigger operation instruction of the user for the current cell is detected, the reference formula information, worksheet information and coordinate information of the current cell are obtained; Perform text parsing on the reference formula information of the current cell, determine the reference dependency of the current cell, and determine the associated cells based on the reference dependency of the current cell; Get the worksheet information and coordinate information of the associated cell, and determine whether the associated cell has reference formula information; If so, the associated cell is used as the current cell, and the steps of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell are returned; If not, a cell tracking relationship knowledge graph is generated based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependencies of the current cell, and the cell tracking relationship knowledge graph is displayed.
[0008] Optionally, perform text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell, including: Perform word segmentation on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Use regular expressions to identify parameter identifiers and determine the reference dependencies of the current cell.
[0009] Optionally, based on the reference dependency of the current cell, the associated cell is determined, including: If the reference dependency of the current cell is a reference cell range, multiple reference cells are determined based on the reference cell range of the current cell, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
[0010] Optionally, based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependency of the current cell, a cell tracking relationship knowledge graph is generated, including: For the current cell and the associated cell, a current cell entity and an associated cell entity are created; wherein the attributes of the current cell entity include the work page information and coordinate information of the current cell; and the attributes of the associated cell entity include the work page information and coordinate information of the associated cell; The reference dependency of the current cell is taken as the entity relationship between the current cell and the associated cell; The current cell entity, the associated cell entity, and the entity relationship between the current cell and the associated cells are imported into the knowledge graph database to obtain a cell tracking relationship knowledge graph.
[0011] Optionally, it also includes: Get the reference formula information of all cells; Perform text parsing on the reference formula information of all cells to determine the reference dependencies of all cells; Determine the reference dependencies including the cells of the current cell as the upstream associated cells of the current cell.
[0012] In a second aspect of the embodiments of the present invention, a knowledge graph construction device for table data relations is provided, comprising: The data acquisition module is used to acquire the reference formula information, work page information and coordinate information of the current cell when a trigger operation instruction of the user for the current cell is detected; The association determination module is used to perform text parsing on the reference formula information of the current cell, determine the reference dependency of the current cell, and determine the associated cell based on the reference dependency of the current cell; An information judgment module is used to obtain the work page information and coordinate information of the associated cell, and to judge whether there is reference formula information in the associated cell; The first determination module is used for, if yes, taking the associated cell as the current cell, and returning the step of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell; The second determination module is used to generate a cell tracking relationship knowledge graph based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependency of the current cell when there is no reference formula information in the associated cells, and display the cell tracking relationship knowledge graph.
[0013] Optionally, the association determination module is specifically used to: Perform word segmentation on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Use regular expressions to identify parameter identifiers and determine the reference dependencies of the current cell.
[0014] Optionally, the association determination module is specifically used to: If the reference dependency of the current cell is a reference cell range, multiple reference cells are determined based on the reference cell range of the current cell, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
[0015] In a third aspect of the embodiments of the present invention, there is provided an electronic device, comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method for constructing a knowledge graph of the above-mentioned tabular data relationship is executed.
[0016] In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, storing computer instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for constructing a knowledge graph of tabular data relationships.
[0017] Beneficial effects of the present invention: (1) Enhanced data tracking capabilities: By automatically parsing cell reference formulas, the relationship between data is recorded and displayed in detail, significantly improving the ability to track complex formulas and cross-references in tables.
[0018] (2) Comprehensive display of data relationships: Through the form of knowledge graphs, a more comprehensive view of data relationships is provided to help users understand the overall picture of data flow.
[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a flowchart of a method for constructing a knowledge graph of table data relationships provided by an embodiment of the present invention; Figure 2 is a schematic diagram of a table data relationship provided by an embodiment of the present invention; Figure 3 is a schematic diagram of a cell tracking relationship knowledge graph provided by an embodiment of the present invention; Figure 4 It is a structural diagram of a device for constructing a knowledge graph of tabular data relations provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0023] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0024] Embodiment 1 Please refer to Figure 1 , Figure 1 : is a flow chart of a method for constructing a knowledge graph of table data relationships provided by an embodiment of the present invention, the method comprising the following steps: S100, when a trigger operation instruction of the user for the current cell is detected, the reference formula information, work page information and coordinate information of the current cell are obtained; It is understandable that only when the user performs a trigger operation on a cell, the system will obtain the reference formula information, worksheet information and coordinate information of the cell being triggered. The trigger operation includes but is not limited to: button click, mouse hover and finger click.
[0025] For example: Figure 2 As shown, the current cell is J14. When the user clicks the button on cell J14, the system obtains the reference formula information, work page information and coordinate information of cell J14. The reference formula information is =AVGRAGE(H12, H14, H16), the work page information is sheet1, and the position coordinate information is "J, 14".
[0026] S200, performing text parsing on the reference formula information of the current cell, determining the reference dependency of the current cell, and determining the associated cell based on the reference dependency of the current cell; In one embodiment, step S200 specifically includes: S210, performing word segmentation processing on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Word segmentation refers to the process of dividing a continuous text (usually sentences or paragraphs) into meaningful vocabulary units (words or phrases).
[0027] Specifically, Figure 2As shown, the reference formula information of the current cell J14 is =AVGRAGE(H12, H14, H16). After word segmentation, the lexical units obtained include "=" and "AVGRAGE". "(", "H12", ",", "H14", ",", "H16", ")".
[0028] S220, using regular expressions to identify parameter identifiers and determine reference dependencies of the current cell.
[0029] Reference dependency refers to the situation where a module, class or function needs to rely on other modules, classes or functions to run properly. This dependency describes the interaction between different components.
[0030] For ease of understanding, the following example is given: 1. First, define a regular expression pattern that can match cell identifiers. Cell identifiers usually consist of a letter (representing the column) and one or more numbers (representing the row). Therefore, the regular expression pattern should be \b[A-Za-z][0-9]+\b.
[0031] 2. Explain the components of regular expressions: \b represents a word boundary, which ensures that we are matching an independent cell identifier and not part of a longer word in the string.
[0032] [A-Za-z] matches the alphabetic portion of a cell identifier, which can be any uppercase or lowercase English letter.
[0033] [0-9]+ matches the numeric portion of a cell identifier, where + means one or more digits.
[0034] \b again indicates a word boundary.
[0035] 3. Apply the regular expression to the string containing the cell reference. In this example, the string is "H12H14 H16".
[0036] 4. The regular expression will traverse the entire string, looking for substrings that match the pattern.
[0037] 5. For each matching substring, the regular expression will identify the cell identifiers and extract them.
[0038] 6. In our example, the regular expression will recognize "H12", "H14" and "H16" as separate cell references.
[0039] 7. These identified cell references are dependencies of the current cell because they may be necessary to calculate the current cell value.
[0040] S230, if the reference dependency of the current cell is a reference cell range, then based on the reference cell range of the current cell, multiple reference cells are determined, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
[0041] Specifically, if a cell range is referenced (for example: A1:A3), then A2 exists between A1 and A3, so the associated cells of the current cell are ultimately determined to be A1, A2, and A3.
[0042] Specifically, Figure 2 As shown, combined with the analysis result of step S220, the reference dependencies of the current cell are H12, H14 and H16. It can be known that the reference dependencies of the previous cell are multiple reference cells, not a reference cell range, so H12, H14 and H16 are used as the associated cells of the current J14.
[0043] S300, obtaining the work page information and coordinate information of the associated cell, and determining whether the associated cell has reference formula information; Specifically, Figure 2 As shown, among the three associated cells H12, H14 and H16 of the current cell J14, only H12 and H16 have reference relationship information, the reference formula information of the associated cell H12 is =F10+F12+F14, and the reference formula information of the associated cell H12 is =SUM(F16:F19), so the work page information and coordinate information of the associated cells H12 and H16 are obtained, that is, the work page information of the associated cell H12 is "sheet1", and the coordinate information is "H, 12", and the work page information of the associated cell H16 is "sheet1", and the coordinate information is "H, 16".
[0044] S400, if yes, then taking the associated cell as the current cell, and returning to the step of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell; Specifically, when determining that the associated cells H12 and H16 have reference formula information, the text analysis of their reference formula information is the same as the text analysis of the reference formula information of the current cell J14, so it will not be repeated here. Just refer to the text analysis of the reference formula information of the current cell J14. After parsing that the associated cells of the associated cell H12 are F10, F12 and F14, and the associated cells of the associated cell H16 are F16, F17, F18 and F19, determine whether F10, F12, F14, F16, F17, F18 and F19 have reference formula information, such as Figure 2 As shown, at this time, F10, F12, F14, F16, F17, F18 and F19 do not have reference formula information, so the process of building the knowledge graph is carried out.
[0045] If not, a cell tracking relationship knowledge graph is generated based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependencies of the current cell, and the cell tracking relationship knowledge graph is displayed.
[0046] In one embodiment, step S400 specifically includes: S410, for the current cell and the associated cell, create a current cell entity and an associated cell entity; wherein the attributes of the current cell entity include the work page information and coordinate information of the current cell; the attributes of the associated cell entity include the work page information and coordinate information of the associated cell; Specifically, Figure 2 As shown, the current cell is J14, and its associated cells are H12, H14 and H16. The associated cells of the associated cell H12 are F10, F12, F14, and the associated cells of the associated cell H16 are F16, F17, F18 and F19. Then J14 is taken as the current cell entity, and H12, H14, H16, F10, F12, F14, F16, F17, F18 and F19 are taken as associated cell entities. The work page information and coordinate information of these entities are known, so the attributes of these entities are also determined.
[0047] S420, taking the reference dependency of the current cell as the entity relationship between the current cell and the associated cell; Regarding reference dependencies, they have been explained in step S220, so the reference dependencies between the current cell J14 and the associated cells H12, H14 and H16, the reference dependencies between the associated cell H12 and the associated cells F10, F12, F14, and the reference dependencies between the associated cell H16 and the associated cells F16, F17, F18 and F19 will not be described in detail.
[0048] S430, importing the current cell entity, the associated cell entity, and the entity relationship between the current cell and the associated cells into the knowledge graph database to obtain a cell tracking relationship knowledge graph.
[0049] The knowledge graph database is a structured semantic knowledge base that is mainly used to quickly describe concepts and their relationships in the physical world. This database effectively processes, processes and integrates data in complex documents into simple and clear "entity, relationship, entity" triples, thereby aggregating a large amount of knowledge and achieving rapid response and reasoning of knowledge. The knowledge graph consists of nodes, edges and labels. Nodes represent objects, events, conditions or concepts in the real world, while edges define the relationships between nodes.
[0050] Specifically, Figure 3 As shown, Figure 3 What is expressed is the cross-reference relationship between the current cell J14 and H12, H14, H16, F10, F12, F14, F16, F17, F18 and F19. From top to bottom, the top layer is the current cell entity J14, the second layer is the associated cell entities H12, H14 and H16, the bottom layer is the associated cell entities F10, F12, F14 of the associated cell entity H12, and the associated cell entities F16, F17, F18 and F19 of the associated cell entity H16. Figure 3 It can fully display the logical relationship between the current cell J14 and other cells, thereby helping users to sort out the overall picture of data flow.
[0051] In one or more of the above embodiments, after step S400, the following steps are further included: S500, obtain the reference formula information of all cells; S600, performing text parsing on the reference formula information of all cells respectively to determine the reference dependencies of all cells; S700: Determine the reference dependency cell including the current cell as the upstream associated cell of the current cell.
[0052] For ease of understanding, the following example is given: Assume we have an Excel workbook that contains the following formulas in the cells:
[0053] The parsed results are: A1: depends on B1 and C1; B1: no dependency; C1: depends on D1, D2, and D3; D1: depends on E1 and F1; D2: depends on E2 and F2; D3: depends on E3 and F3; E1: no dependency; F1: no dependency; E2: no dependency; F2: no dependency; E3: no dependency; F3: no dependency.
[0054] Assume that the current cell is C1. According to the parsed result, only A1 depends on C1. Then A1 is used as the upstream associated cell.
[0055] In this embodiment, cells that depend on the current cell are found by tracing back, which enables the user to quickly discover and correct data source errors to avoid chain reactions of errors. In addition, the user can reasonably arrange the calculation order to reduce repeated calculations and improve work efficiency.
[0056] Beneficial effects of the present invention: (1) Enhanced data tracking capabilities: By automatically parsing cell reference formulas, the relationship between data is recorded and displayed in detail, significantly improving the ability to track complex formulas and cross-references in tables.
[0057] (2) Comprehensive display of data relationships: Through the form of knowledge graphs, a more comprehensive view of data relationships is provided to help users understand the overall picture of data flow.
[0058] Embodiment 2 Based on the same inventive concept, Figure 4 As shown, the embodiment of the present invention also provides a knowledge graph construction device 200 of a table data relationship, including: The data acquisition module 210 is used to acquire the reference formula information, worksheet information and coordinate information of the current cell when a trigger operation instruction of the user for the current cell is detected; The association determination module 220 is used to perform text analysis on the reference formula information of the current cell, determine the reference dependency of the current cell, and determine the associated cell based on the reference dependency of the current cell; The information determination module 230 is used to obtain the work page information and coordinate information of the associated cell, and determine whether the associated cell has reference formula information; The first determination module 240 is used for, if yes, taking the associated cell as the current cell, and returning the step of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell; The second determination module 250 is used to generate a cell tracking relationship knowledge graph based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependency of the current cell when there is no reference formula information in the associated cell, and display the cell tracking relationship knowledge graph.
[0059] Optionally, the association determination module 220 is specifically configured to: Perform word segmentation on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Use regular expressions to identify parameter identifiers and determine the reference dependencies of the current cell.
[0060] Optionally, the association determination module 220 is specifically configured to: If the reference dependency of the current cell is a reference cell range, multiple reference cells are determined based on the reference cell range of the current cell, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
[0061] It should be understood that the device corresponds to the above-mentioned knowledge graph construction method embodiment of the table data relationship, and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in the memory in the form of software or firmware or solidified in the operating system (OS) of the device.
[0062] Embodiment 3 Based on the same inventive concept, an embodiment of the present invention also provides an electronic device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, and the machine-readable instructions, when executed by the processor, execute the above-mentioned knowledge graph construction method of the tabular data relationship.
[0063] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0064] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0065] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0066] Embodiment 4 Based on the same inventive concept, an embodiment of the present invention also provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed on a computer, the computer executes the above-mentioned knowledge graph construction method of the tabular data relationship.
[0067] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0068] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0069] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0071] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0072] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0073] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0074] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A knowledge graph construction method for tabular data relations, It is characterized in that include: When a trigger operation instruction of the user for the current cell is detected, the reference formula information, worksheet information and coordinate information of the current cell are obtained; Perform text parsing on the reference formula information of the current cell, determine the reference dependency of the current cell, and determine the associated cells based on the reference dependency of the current cell; Get the worksheet information and coordinate information of the associated cell, and determine whether the associated cell has reference formula information; If so, the associated cell is used as the current cell, and the steps of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell are returned; If not, a cell tracking relationship knowledge graph is generated based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependencies of the current cell, and the cell tracking relationship knowledge graph is displayed.
2. The method for constructing a knowledge graph of table data relationships according to claim 1, It is characterized in that Perform text parsing on the reference formula information of the current cell to determine the reference dependencies of the current cell, including: Perform word segmentation on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Use regular expressions to identify parameter identifiers and determine the reference dependencies of the current cell.
3. The method for constructing a knowledge graph of table data relationships according to claim 1, It is characterized in that Based on the reference dependency of the current cell, determine the associated cells, including: If the reference dependency of the current cell is a reference cell range, multiple reference cells are determined based on the reference cell range of the current cell, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
4. The method for constructing a knowledge graph of table data relationships according to claim 1, It is characterized in that Based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependency of the current cell, a cell tracking relationship knowledge graph is generated, including: For the current cell and the associated cell, a current cell entity and an associated cell entity are created; wherein the attributes of the current cell entity include the work page information and coordinate information of the current cell; and the attributes of the associated cell entity include the work page information and coordinate information of the associated cell; The reference dependency of the current cell is taken as the entity relationship between the current cell and the associated cell; The current cell entity, the associated cell entity, and the entity relationship between the current cell and the associated cells are imported into the knowledge graph database to obtain a cell tracking relationship knowledge graph.
5. The method for constructing a knowledge graph of table data relations according to claim 3, It is characterized in that Also includes: Get the reference formula information of all cells; Perform text parsing on the reference formula information of all cells to determine the reference dependencies of all cells; Determine the reference dependencies including the cells of the current cell as the upstream associated cells of the current cell.
6. A knowledge graph construction device for table data relations, It is characterized in that include: The data acquisition module is used to acquire the reference formula information, work page information and coordinate information of the current cell when a trigger operation instruction of the user for the current cell is detected; The association determination module is used to perform text parsing on the reference formula information of the current cell, determine the reference dependency of the current cell, and determine the associated cell based on the reference dependency of the current cell; An information judgment module is used to obtain the work page information and coordinate information of the associated cell, and to judge whether there is reference formula information in the associated cell; The first determination module is used for, if yes, taking the associated cell as the current cell, and returning the step of performing text parsing on the reference formula information of the current cell to determine the reference dependency of the current cell; The second determination module is used to generate a cell tracking relationship knowledge graph based on the work page information and coordinate information of the current cell, the work page information and coordinate information of the associated cells, and the reference dependency of the current cell when there is no reference formula information in the associated cells, and display the cell tracking relationship knowledge graph.
7. The knowledge graph construction device of the table data relationship according to claim 6, It is characterized in that The association determination module is specifically used for: Perform word segmentation on the reference formula information of the current cell to obtain different lexical units; wherein the different lexical units include: assignment operators, function identifiers, delimiters, operators, parameter identifiers and parameter separators; Use regular expressions to identify parameter identifiers and determine the reference dependencies of the current cell.
8. The knowledge graph construction device of the table data relationship according to claim 6, It is characterized in that The association determination module is specifically used for: If the reference dependency of the current cell is a reference cell range, multiple reference cells are determined based on the reference cell range of the current cell, and the multiple reference cells are determined as associated cells; or If the reference dependencies of the current cell are multiple reference cells, the multiple reference cells are determined as associated cells.
9. An electronic device, It is characterized in that include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method for constructing a knowledge graph of tabular data relations according to any one of claims 1 to 5 is executed.
10. A computer-readable storage medium storing computer instructions, It is characterized in that When the computer instructions are executed on a computer, the computer executes the method for constructing a knowledge graph of tabular data relations according to any one of claims 1 to 5.
Citation Information
Cited By
Intelligent contract auditing method and device based on multi-modal large model and medium
CN120524239A
Data relation network generation method and system based on data standard
CN120950606A
A data relationship network generation method and system based on data standards
CN120950606B
