Method for constructing and querying element periodic table based on two-dimensional linked list
By connecting element nodes using a two-dimensional linked list structure, the rigidity problem of the traditional periodic table is solved, enabling efficient querying and flexible topological access, reducing the cost of adding and deleting operations, and improving the computational efficiency of compounds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 付文恺
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-09
AI Technical Summary
Traditional periodic table storage structures are rigid, difficult to expand dynamically, have low query efficiency, high cost of adding and deleting elements, and high computational complexity for compounds.
A two-dimensional linked list structure is adopted, which connects element nodes through horizontal and vertical pointers to achieve fast query and efficient insertion/deletion operations, and uses a stack to calculate the relative molecular mass of compounds.
It enables flexible topology access and efficient element querying, reduces the cost of adding and deleting operations, and improves the efficiency of compound calculation.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
[0001] This invention relates to the field of chemical element information storage and retrieval technology, specifically to a method for constructing and retrieving the periodic table based on a two-dimensional linked list. Background Technology
[0002] The periodic table is a core tool in chemistry, materials science, and other fields, used to systematically organize the physicochemical properties and periodicity of elements. Traditional electronic periodic tables mostly use static arrays or two-dimensional tables to store element information. Their fixed structure makes it difficult to achieve dynamic expansion and flexible topological access. When performing cross-period or group-related element lookups, multiple traversals of the two-dimensional array are required, resulting in low query efficiency. Adding or deleting element data requires moving a large amount of data, leading to high maintenance costs. Furthermore, for calculating the relative molecular mass of compounds containing brackets, existing techniques typically employ recursive or linear traversal methods, resulting in high computational complexity and failing to meet the requirements for efficient computation. Attached Figure Description
[0003] Figure 1 This is a schematic diagram of the core topology of the periodic table based on a two-dimensional linked list, showing the layout of a two-dimensional linked list where the element above hydrogen (H) is NULL and the nodes of each element are connected to each other through horizontal pointers (same period) and vertical pointers (same family).
[0004] Figure 2 This is a schematic diagram of the initial state of the periodic table row insertion operation of the present invention, showing the target position between the new element X to be inserted and the elements Al and Si.
[0005] Figure 3 This is a schematic diagram illustrating the completed state of the periodic table row insertion operation of the present invention, showing the layout of the two-dimensional linked list after inserting the new element X into the linked list by modifying the right pointer of element Al and the left pointer of element Si.
[0006] Figure 4 This is a schematic diagram of the pointer modification stage of the periodic table column insertion operation of the present invention, showing the adjustment of the up and down pointers of the new element X and its elements in the same period to establish a complete vertical connection relationship of the same family.
[0007] Figure 5 This is a schematic diagram of the atomic number update stage of the periodic table column insertion operation of the present invention. It shows that by calling a function, the atomic number of all elements to the right and below element X is incremented, ensuring that the atomic number increases continuously in the period and group directions after insertion.
[0008] Figure 6 This is a schematic diagram of the initial state of the periodic table node deletion operation of the present invention, showing the position of the element to be deleted, Cl, in the two-dimensional linked list;
[0009] Figure 7 This is a schematic diagram of the pointer removal stage of the periodic table node deletion operation of the present invention, showing the process of disconnecting the up, down, left, and right pointers of element Cl and its subsequent elements in the same period to prepare for the atomic number update.
[0010] Figure 8 This is a schematic diagram of the pointer reconnection stage of the periodic table node deletion operation of the present invention, showing the process of reconnecting the pointers of the left and right elements and the top and bottom elements of element Cl to complete the linked list topology repair.
[0011] Figure 9 This is a schematic diagram of the atomic number update stage of the periodic table node deletion operation of the present invention, showing that the atomic number of all elements to the right and below Cl element is decremented to ensure that the atomic number increases continuously in the period and group directions after deletion.
[0012] Figure 10 This is a schematic diagram illustrating the calculation of the relative molecular mass of compounds based on the stack structure of this invention, showing the process of analyzing and calculating the relative molecular mass of compounds containing brackets (such as (NH4)2). Summary of the Invention
[0013] The purpose of this invention is to provide a method for constructing and querying a periodic table based on a two-dimensional linked list, to solve the problems of rigid storage structure, low query efficiency, high cost of adding and deleting elements, and insufficient compound calculation efficiency in existing technologies. To achieve the above objective, this invention adopts the following technical solution: A method for constructing and querying a periodic table based on a two-dimensional linked list, characterized by comprising the following steps: (1) Constructing node units: Define a single element as a linked list node, and the node shall at least contain element-related physicochemical properties such as atomic number, element symbol, relative atomic mass, period number, and group number; (2) Construct a two-dimensional topology: use rows to represent periods and columns to represent groups, and connect the element nodes in two dimensions according to the periodic table order; where the upper connection of the hydrogen element (H) is NULL; element nodes of the same period are connected by horizontal pointers, and element nodes of the same group are connected by vertical pointers. (3) Implement query operation: Based on the input query conditions, quickly locate and match the target element node in the two-dimensional linked list structure, and return its complete attribute information; (4) Implement addition and deletion operations for elements: When a new element is inserted into the linked list, manipulate its up, down, left, and right pointers to achieve efficient insertion / deletion of new / old elements; (5) Calculate the relative molecular mass of compounds: Utilize the properties of the stack to calculate the relative molecular mass of compounds containing parentheses, saving calculation time.
Claims
1. A method for constructing and querying a periodic table based on a two-dimensional linked list, characterized in that, Includes the following steps: (1) Constructing node units: Define a single element as a linked list node, and the node shall at least contain element-related physicochemical properties such as atomic number, element symbol, relative atomic mass, period number, and group number; (2) Construct a two-dimensional topology: use rows to represent periods and columns to represent groups, and connect the element nodes in two dimensions according to the periodic table order; where the upper connection of the hydrogen element (H) is NULL; element nodes of the same period are connected by horizontal pointers, and element nodes of the same group are connected by vertical pointers. (3) Implement query operation: Based on the input query conditions, quickly locate and match the target element node in the two-dimensional linked list structure, and return its complete attribute information; (4) Implement addition and deletion operations for elements: When a new element is inserted into the linked list, manipulate its up, down, left, and right pointers to achieve efficient insertion / deletion of new / old elements; (5) Calculate the relative molecular mass of compounds: Utilize the properties of the stack to calculate the relative molecular mass of compounds containing parentheses, saving calculation time.
2. The method for constructing and querying the periodic table based on a two-dimensional linked list according to claim 1, characterized in that, The two-dimensional linked list structure includes: (1) Several element nodes are connected sequentially along the horizontal direction to form a one-dimensional main chain; (2) Several attribute nodes are connected to the element nodes in a vertical direction to form a two-dimensional branch structure; (3) The attribute nodes shall at least include elemental physicochemical properties such as atomic number, relative atomic mass, and appearance. (4) The two-dimensional linked list structure supports multi-dimensional access: single-element precise query, multi-element batch query, and conditional query by element name / attribute range.
3. The method for constructing and querying the periodic table based on a two-dimensional linked list according to claim 1 or 2, characterized in that, The NULL design for the hydrogen element specifically includes: (1) Set the node above the hydrogen element (H) to NULL, and set the corresponding direction pointer of the other element nodes to NULL only when there are no adjacent elements; (2) The NULL node of the hydrogen element serves as the reference anchor point of the entire two-dimensional linked list, used to locate the starting position of the two-dimensional topology. (3) By identifying NULL nodes, the two-dimensional linked list forms a stable "topology center", ensuring the accuracy, consistency and efficiency of query, join and add / delete operations.