CN115794838B - Storage method, device, terminal equipment and storage medium of bidirectional linked list - Google Patents

Storage method, device, terminal equipment and storage medium of bidirectional linked list Download PDF

Info

Publication number
CN115794838B
CN115794838B CN202310071100.2A CN202310071100A CN115794838B CN 115794838 B CN115794838 B CN 115794838B CN 202310071100 A CN202310071100 A CN 202310071100A CN 115794838 B CN115794838 B CN 115794838B
Authority
CN
China
Prior art keywords
node
storage
linked list
target file
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310071100.2A
Other languages
Chinese (zh)
Other versions
CN115794838A (en
Inventor
朱劲松
万振华
王颉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seczone Technology Co Ltd
Original Assignee
Seczone Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seczone Technology Co Ltd filed Critical Seczone Technology Co Ltd
Priority to CN202310071100.2A priority Critical patent/CN115794838B/en
Publication of CN115794838A publication Critical patent/CN115794838A/en
Application granted granted Critical
Publication of CN115794838B publication Critical patent/CN115794838B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a storage method, a storage device, terminal equipment and a storage medium of a double-linked list, belonging to the technical field of linked list storage, wherein the storage method of the double-linked list comprises the following steps: receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node; determining a storage mode according to the storage instruction; storing the node to a corresponding target file according to the storage mode and the storage information of the node; and modifying the storage description information in the target file. Based on the scheme, the effect of conveniently storing the doubly linked list without using a database is achieved by storing different types of nodes into corresponding target files.

Description

Storage method, device, terminal equipment and storage medium of bidirectional linked list
Technical Field
The present invention relates to the field of linked list storage technologies, and in particular, to a method, an apparatus, a terminal device, and a storage medium for storing a bidirectional linked list.
Background
For data storage, a database is used for storage in many cases, and the database has a unified storage scheme and a retrieval scheme. However, the data storage form of the database still has the following problems: for complex data structures, the use of database storage is inconvenient; when the data volume is large and the data structure is complex, the retrieval performance is not ideal enough; in an environment where a database is difficult to be deployed, such as a microcomputer, the storage scheme of the database cannot be used. For example, the storage of the doubly linked list needs to be designed on the existing storage mode of the database, and when the database cannot be used or is inconvenient to use, the storage of the doubly linked list has difficulty.
Therefore, how to conveniently store the doubly linked list is a current problem to be solved.
Disclosure of Invention
The main purpose of the present application is to provide a method, an apparatus, a terminal device and a storage medium for storing a doubly linked list, which aims at solving the problem that how to store a doubly linked list conveniently is currently in need of solving.
In order to achieve the above purpose, the present application provides a method for storing a doubly linked list, which is applied to the technical field of linked list storage, and the method for storing the doubly linked list includes the following steps:
receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
determining a storage mode according to the storage instruction;
storing the node to a corresponding target file according to the storage mode and the storage information of the node;
and modifying the storage description information in the target file.
Optionally, the step of determining a storage mode according to the storage instruction includes:
when the storage instruction of the node is the storage instruction of the first type node, determining that the storage mode of the node is the first type node storage mode;
and when the storage instruction of the node is the storage instruction of the second class node, determining the storage mode of the node as the second class node storage mode.
Optionally, the step of storing the node to the corresponding target file according to the storage mode and the storage information of the node includes:
when the storage mode is a first type node storage mode, determining the target file according to the storage information of the node;
and determining the storage position of the node according to the value of the offset bit of the target file, and storing the node.
Optionally, the second type node is an affiliated node of the first type node, and the step of storing the node to the corresponding target file according to the storage mode and the storage information of the node further includes:
when the storage mode is a second-class node storage mode, determining the target file according to a first-class node attached to the storage information of the node;
and determining the storage position of the node according to the offset bit of the attached first type node in the target file, and storing the node.
Optionally, when the storage mode is a first type node storage mode, the step of determining the target file further includes:
traversing a first type node of the target file;
if traversing to the same first type node as the node, stopping storing.
Optionally, when the storage mode is the second type node storage mode, the step of determining the target file further includes:
traversing the attached nodes of the nodes according to the first type of nodes attached to the stored information of the nodes;
and if the corresponding child node traversed to the affiliated first type node is the same as the node, stopping storing.
Optionally, the storage description information at least includes the number of the first class nodes, the number of the second class nodes, the offset of the target file, the offset of the first class nodes, and the end bit of the linked list, and the step of modifying the storage description information in the target file includes:
when the node is a first type node, modifying the number of the first type node, the offset bit of the target file and the end bit of the linked list;
when the node is a second type node, modifying the number of the second type node, and the offset of the first type node attached to the node and the end bit of the linked list.
The embodiment of the application also provides a storage device of the doubly-linked list, which comprises:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for receiving a storage instruction of a node and storage information of the node, and the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
the judging module is used for determining a storage mode according to the storage instruction;
the storage module is used for storing the nodes to the corresponding target files according to the storage mode and the storage information of the nodes;
and the modification module is used for modifying the storage description information in the target file.
The embodiment of the application also provides the terminal equipment, which comprises a memory, a processor and a storage program of the doubly-linked list, wherein the storage program of the doubly-linked list is stored in the memory and can run on the processor, and the storage program of the doubly-linked list realizes the steps of the storage method of the doubly-linked list when being executed by the processor.
The embodiment of the application also provides a storage medium, wherein a storage program of the doubly-linked list is stored on the storage medium, and the storage program of the doubly-linked list realizes the steps of the storage method of the doubly-linked list when being executed by a processor.
The storage method, the storage device, the terminal equipment and the storage medium of the bidirectional linked list are provided. Receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node; determining a storage mode according to the storage instruction; storing the node to a corresponding target file according to the storage mode and the storage information of the node; and modifying the storage description information in the target file. Based on the method and the device, the aim of storing the nodes of the doubly-linked list into the target file is achieved, and the effect of conveniently storing the doubly-linked list is achieved.
Drawings
FIG. 1 is a schematic diagram of a functional module of a terminal device to which a storage device of a doubly linked list of the present application belongs;
FIG. 2 is a flowchart of a first exemplary embodiment of a method for storing a doubly linked list of the present application;
FIG. 3 is a schematic diagram of a doubly linked list structure according to the method for storing a doubly linked list of the present application;
FIG. 4 is a flowchart of a second exemplary embodiment of a method for storing a doubly linked list of the present application;
FIG. 5 is a first class node storage structure related to a storage method of a doubly linked list of the present application;
FIG. 6 is a flowchart of a third exemplary embodiment of a method for storing a doubly linked list according to the present application;
FIG. 7 is a flowchart of a fourth exemplary embodiment of a method for storing a doubly linked list of the present application;
FIG. 8 is a flowchart of a fifth exemplary embodiment of a method for storing a doubly linked list of the present application;
fig. 9 is a flowchart of a sixth exemplary embodiment of a storing method of a doubly linked list of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The main solution of the embodiment of the application is that the storage instruction of the node and the storage information of the node are received, wherein the storage instruction of the node comprises the storage instruction of the first type node and the storage instruction of the second type node; determining a storage mode according to the storage instruction; storing the node to a corresponding target file according to the storage mode and the storage information of the node; and modifying the storage description information in the target file. Based on the method and the device, the aim of storing the nodes of the doubly-linked list into the target file is achieved, and the effect of conveniently storing the doubly-linked list is achieved.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of a functional module of a terminal device to which a storage device of a doubly linked list of the present application belongs. The storage device of the doubly linked list is a device which is based on terminal equipment and can conveniently store the doubly linked list into a target file, and the device can be carried on the terminal equipment in a hardware or software mode.
In this embodiment, the terminal device to which the storage device of the doubly linked list belongs at least includes an output module 110, a processor 120, a memory 130 and a communication module 140.
The memory 130 stores an operating system and a storage program of a doubly linked list, where the storage device of the doubly linked list may receive a storage instruction of a node and storage information of the node, where the storage instruction of the node includes a storage instruction of a first type node and a storage instruction of a second type node; determining a storage mode according to the storage instruction; storing the node to a corresponding target file according to the storage mode and the storage information of the node; modifying information such as storage description information in the target file and storing the information in the memory 130; the output module 110 may be a display screen or the like. The communication module 140 may include a WIFI module, a mobile communication module, a bluetooth module, and the like, and communicates with an external device or a server through the communication module 140.
Wherein, the storage program of the doubly linked list in the memory 130, when executed by the processor, realizes the following steps:
receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
determining a storage mode according to the storage instruction;
storing the node to a corresponding target file according to the storage mode and the storage information of the node;
and modifying the storage description information in the target file.
Further, the stored program of the doubly linked list in the memory 130 when executed by the processor further performs the steps of:
when the storage instruction of the node is the storage instruction of the first type node, determining that the storage mode of the node is the first type node storage mode;
and when the storage instruction of the node is the storage instruction of the second class node, determining the storage mode of the node as the second class node storage mode.
Further, the stored program of the doubly linked list in the memory 130 when executed by the processor further performs the steps of:
when the storage mode is a first type node storage mode, determining the target file according to the storage information of the node;
and determining the storage position of the node according to the value of the offset bit of the target file, and storing the node.
Further, the second type node is an auxiliary node of the first type node, and the stored program of the doubly linked list in the memory 130 further implements the following steps when executed by the processor:
when the storage mode is a second-class node storage mode, determining the target file according to a first-class node attached to the storage information of the node;
and determining the storage position of the node according to the offset bit of the attached first type node in the target file, and storing the node.
Further, the stored program of the doubly linked list in the memory 130 when executed by the processor further performs the steps of:
traversing a first type node of the target file;
if traversing to the same first type node as the node, stopping storing.
Further, the stored program of the doubly linked list in the memory 130 when executed by the processor further performs the steps of:
traversing the attached nodes of the nodes according to the first type of nodes attached to the stored information of the nodes;
and if the corresponding child node traversed to the affiliated first type node is the same as the node, stopping storing.
Further, the storage description information at least includes the number of the first type nodes, the number of the second type nodes, the offset of the target file, the offset of the first type nodes, the end bit of the linked list, and the following steps are implemented when the storage program of the bidirectional linked list in the memory 130 is executed by the processor:
when the node is a first type node, modifying the number of the first type node, the offset bit of the target file and the end bit of the linked list;
when the node is a second type node, modifying the number of the second type node, and the offset of the first type node attached to the node and the end bit of the linked list.
Based on the above terminal device architecture, but not limited to the above architecture, the method embodiments of the present application are presented.
Referring to fig. 2 and 3, fig. 2 is a flow chart of a first exemplary embodiment of a method for storing a doubly linked list, and fig. 3 is a structural diagram of a doubly linked list of the present application, where the method for storing a doubly linked list includes:
step S110, receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
specifically, the storage instruction of the node designates the type of the storage node, and specifically includes the storage instruction of the first type node and the storage instruction of the second type node; the stored information of the node includes content stored by the node.
Step S120, determining a storage mode according to the storage instruction;
specifically, when the storage instruction of the node is a storage instruction of a first type node, determining that the storage mode of the node is a first type node storage mode; and when the storage instruction of the node is the storage instruction of the second class node, determining the storage mode of the node as the second class node storage mode.
Step S130, storing the nodes to corresponding target files according to the storage mode and the storage information of the nodes;
specifically, the name of the file may be determined according to the storage information of the node, where the name of the file is generated according to a part of the storage information of the node, for example, when a hash exists in the node, a part of the hash may be selected as the file name or as a part of the file name according to the data amount, if the hash is a9993e364706816aba3e25717850c26c9cd0d89d, a hash prefix such as a, a9 or a99 may be used as the file name, and all other types of nodes whose hash starts with a9 may be stored in the file a 9. hash is just one type of data used as a sort, and the remaining key data usable as file names may be any type such as numbers, time, character strings, and the like. And storing the storage information of the nodes into the obtained file according to different storage modes.
Step S140, modifying the storage description information in the target file.
Specifically, the storage description information in the file comprises the number of first class nodes, the number of second class nodes, the offset of the target file, the offset of the first class nodes and the end bit of the linked list, and when the nodes are the first class nodes, the number of the first class nodes, the offset of the target file and the end bit of the linked list are modified; when the node is a second type node, modifying the number of the second type node, and the offset of the first type node attached to the node and the end bit of the linked list.
According to the scheme, the storage instructions of the nodes and the storage information of the nodes are received, wherein the storage instructions of the nodes comprise the storage instructions of the first type of nodes and the storage instructions of the second type of nodes; determining a storage mode according to the storage instruction; storing the node to a corresponding target file according to the storage mode and the storage information of the node; and modifying the storage description information in the target file. Based on the scheme, the effect of conveniently storing the doubly linked list without using a database is achieved by storing different types of nodes into corresponding target files.
Further, referring to fig. 4, fig. 5 is a first type of node storage structure according to the present application, fig. 4 is a flow chart of a second exemplary embodiment of a storage method of a doubly linked list, and the step of storing the node to a corresponding target file according to the storage mode and the storage information of the node includes:
step S1301, when the storage mode is a first type node storage mode, determining the target file according to the storage information of the node;
specifically, when the first type node is stored in the storage mode, the name of the file may be determined according to the storage information of the node, the name of the file is generated according to a part of the storage information of the node, for example, when a hash exists in the node, a part of the hash may be selected as the file name or as a part of the file name according to the data amount, if the hash is a9993e364706816aba3e25717850c26c9cd0d89d, a prefix such as a, a9 or a99 may be used as the file name, and all other types of hash nodes beginning with a9 may be stored in the file a 9. hash is just one type of data used as a sort, and the remaining key data usable as file names may be any type such as numbers, time, character strings, and the like.
Step S1302, determining a storage location of the node according to the value of the offset bit of the target file, and storing the node.
Specifically, referring to fig. 5, fig. 5 is a first class node storage structure related to the present application, where the end node offset refers to a first class node, i.e. a class node, in a current target file, and is the last node in the present file; the file offset refers to a class A node at a position next to the position of the file offset, and is an absolute offset position relative to the file header; the last file offset ends with 0.
According to the scheme, the target file is determined according to the storage information of the node when the storage mode is the first-class node storage mode; and determining the storage position of the node according to the value of the offset bit of the target file, and storing the node. Based on the scheme, the storage mode of the first type node is ensured by storing the first type node, so that the subsequent query can be performed according to the storage mode.
Further, referring to fig. 6, fig. 6 is a flowchart of a third exemplary embodiment of a storage method of a doubly linked list, where the second type of node is an auxiliary node of the first type of node, and the step of storing the node to a corresponding target file according to the storage mode and the storage information of the node further includes:
step S1303, when the storage mode is a second class node storage mode, determining the target file according to a first class node attached to the storage information of the node;
specifically, when the storage mode is the second class node storage mode, it is first required to determine what the node is the first class node to which the second class node belongs, and the attached first class node may be obtained from the storage information, so as to determine the target file according to the storage information of the first class node. The determination method is the same as the above step S1301, and is determined by the key data in the stored information.
Step S1304, determining a storage location of the node according to the offset bit of the attached first class node in the target file, and storing the node.
Specifically, according to key data of the class A node which is indicated during storage, the class A node is found through traversing a class A linked list in a file; if not, firstly storing the class A node; after finding out the corresponding class A node, reading a class B node, namely a second class node described in the application, traversing the class B linked list according to the 'file offset' of the class B node, finding out the last node, and modifying the 'file offset' of the node into the offset of the file tail.
According to the scheme, the target file is determined according to the first type of node attached to the storage information of the node when the storage mode is the second type node storage mode; and determining the storage position of the node according to the offset bit of the attached first type node in the target file, and storing the node. Based on the scheme, the purpose of storing the second class node into the target file is achieved, and the effect of storing the doubly linked list into the target file is achieved.
Further, referring to fig. 7, fig. 7 is a flowchart of a fourth exemplary embodiment of a storage method of a doubly linked list, where when the storage mode is a first type node storage mode, the step of determining, according to storage information of the node, the target file further includes:
step S13011, traversing the first class node of the target file;
step S13012, if traversing to the same first class node as the node, stopping storing.
According to the scheme, whether the storage is repeated or not is checked in the storage process, and therefore the purpose of avoiding repeated storage of the nodes is achieved.
Further, referring to fig. 8, fig. 8 is a flowchart of a fifth exemplary embodiment of a storage method of a doubly linked list, where when the storage mode is a second-class node storage mode, the step of determining, according to a first-class node attached to the storage information of the node, the target file further includes:
step S13031, traversing the attached nodes of the nodes according to the first type of nodes attached in the stored information of the nodes;
and step S13032, if the corresponding child node traversed to the affiliated first class node is the same as the node, stopping storing.
According to the scheme, whether the stored second class node is stored repeatedly is checked during storage, so that the aim of avoiding the second class node from being stored repeatedly is fulfilled.
Further, referring to fig. 9, fig. 9 is a flowchart of a sixth exemplary embodiment of a storage method of a doubly linked list, where the storage description information includes at least a first type node number, a second type node number, a target file offset, a first type node offset, and a linked list end bit, and the step of modifying the storage description information in the target file includes:
step S1401, when the node is a first type node, modifying the number of the first type node, the offset of the target file, and the end bit of the linked list;
step S1402, when the node is a second class node, modifying the number of the second class node, the offset of the first class node attached to the node, and the end bit of the linked list.
According to the embodiment of the application, when the node is a first type node, the number of the first type node, the offset bit of the target file and the tail bit of the linked list are modified; when the node is a second type node, modifying the number of the second type node, and the offset of the first type node attached to the node and the end bit of the linked list. Based on the scheme, the storage description information of the target file is modified, so that the storage and the retrieval of the subsequent nodes are facilitated.
In addition, the embodiment of the application also provides a storage device of a doubly-linked list, which comprises:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for receiving a storage instruction of a node and storage information of the node, and the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
the judging module is used for determining a storage mode according to the storage instruction;
the storage module is used for storing the nodes to the corresponding target files according to the storage mode and the storage information of the nodes;
and the modification module is used for modifying the storage description information in the target file.
In addition, the embodiment of the application also provides a terminal device, which comprises a memory, a processor and a storage program of a doubly-linked list, wherein the storage program of the doubly-linked list is stored in the memory and can run on the processor, and the storage program of the doubly-linked list realizes the steps of the storage method of the doubly-linked list when being executed by the processor.
Because the storage program of the bidirectional linked list is executed by the processor, all the technical schemes of all the embodiments are adopted, and therefore, the bidirectional linked list at least has all the beneficial effects brought by all the technical schemes of all the embodiments, and the description is omitted herein.
In addition, the embodiment of the application also provides a readable storage medium, the storage medium stores a program, and when the storage program of the doubly-linked list is executed by a processor, the steps of the storage method of the doubly-linked list are realized.
Because the storage program of the bidirectional linked list is executed by the processor, all the technical schemes of all the embodiments are adopted, and therefore, the bidirectional linked list at least has all the beneficial effects brought by all the technical schemes of all the embodiments, and the description is omitted herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as above, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, a controlled terminal, or a network device, etc.) to perform the method of each embodiment of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (6)

1. The storage method of the double linked list is characterized by comprising the following steps of:
receiving a storage instruction of a node and storage information of the node, wherein the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
determining a storage mode according to the storage instruction;
storing the node to a corresponding target file according to the storage mode and the storage information of the node;
modifying the storage description information in the target file;
the step of determining a storage mode according to the storage instruction comprises the following steps:
when the storage instruction of the node is the storage instruction of the first type node, determining that the storage mode of the node is the first type node storage mode;
when the storage instruction of the node is the storage instruction of the second class node, determining that the storage mode of the node is the second class node storage mode;
the step of modifying the storage description information in the target file includes:
the storage description information at least comprises the number of first class nodes, the number of second class nodes, the offset of the target file, the offset of the first class nodes and the end bit of the linked list;
when the node is a first type node, modifying the number of the first type node, the offset bit of the target file and the end bit of the linked list;
when the node is a second class node, modifying the number of the second class node, and modifying the offset of the first class node attached to the node and the end bit of the linked list;
the step of storing the node to the corresponding target file according to the storage mode and the storage information of the node comprises the following steps:
when the storage mode is a first type node storage mode, determining the target file according to the storage information of the node, determining the storage position of the node according to the value of the offset bit of the target file, and storing the node;
when the storage mode is a second-class node storage mode, determining the target file according to a first-class node attached to the storage information of the node; and determining the storage position of the node according to the offset bit of the attached first type node in the target file, storing the node, wherein the second type node is an attached node of the first type node.
2. The method for storing a doubly linked list according to claim 1, wherein when said storage mode is a first type node storage mode, the step of determining said target file further comprises, according to storage information of said node:
traversing a first type node of the target file;
if traversing to the same first type node as the node, stopping storing.
3. The method for storing a doubly linked list according to claim 1, wherein when said storage mode is a second type node storage mode, determining said target file according to a first type node attached to said node's storage information further comprises:
traversing the attached nodes of the nodes according to the first type of nodes attached to the stored information of the nodes;
and if the corresponding child node traversed to the affiliated first type node is the same as the node, stopping storing.
4. A storage device for a doubly linked list, the storage device for a doubly linked list comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for receiving a storage instruction of a node and storage information of the node, and the storage instruction of the node comprises a storage instruction of a first type node and a storage instruction of a second type node;
the judging module is used for determining a storage mode according to the storage instruction;
the storage module is used for storing the nodes to the corresponding target files according to the storage mode and the storage information of the nodes;
the modification module is used for modifying the storage description information in the target file;
wherein, the decision module is further configured to:
when the storage instruction of the node is the storage instruction of the first type node, determining that the storage mode of the node is the first type node storage mode;
when the storage instruction of the node is the storage instruction of the second class node, determining that the storage mode of the node is the second class node storage mode;
the modification module is further configured to:
the storage description information at least comprises the number of first class nodes, the number of second class nodes, the offset of the target file, the offset of the first class nodes and the end bit of the linked list;
when the node is a first type node, modifying the number of the first type node, the offset bit of the target file and the end bit of the linked list;
when the node is a second class node, modifying the number of the second class node, and modifying the offset of the first class node attached to the node and the end bit of the linked list;
the storage module is further configured to:
when the storage mode is a first type node storage mode, determining the target file according to the storage information of the node, determining the storage position of the node according to the value of the offset bit of the target file, and storing the node;
when the storage mode is a second-class node storage mode, determining the target file according to a first-class node attached to the storage information of the node; and determining the storage position of the node according to the offset bit of the attached first type node in the target file, storing the node, wherein the second type node is an attached node of the first type node.
5. A terminal device comprising a memory, a processor and a stored program stored on the memory and operable on the processor for implementing the steps of the method of storing a doubly linked list as claimed in any one of claims 1-3 when executed by the processor.
6. A storage medium having stored thereon a doubly linked list storage program which when executed by a processor performs the steps of the doubly linked list storage method of any one of claims 1-3.
CN202310071100.2A 2023-02-07 2023-02-07 Storage method, device, terminal equipment and storage medium of bidirectional linked list Active CN115794838B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310071100.2A CN115794838B (en) 2023-02-07 2023-02-07 Storage method, device, terminal equipment and storage medium of bidirectional linked list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310071100.2A CN115794838B (en) 2023-02-07 2023-02-07 Storage method, device, terminal equipment and storage medium of bidirectional linked list

Publications (2)

Publication Number Publication Date
CN115794838A CN115794838A (en) 2023-03-14
CN115794838B true CN115794838B (en) 2023-05-26

Family

ID=85430162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310071100.2A Active CN115794838B (en) 2023-02-07 2023-02-07 Storage method, device, terminal equipment and storage medium of bidirectional linked list

Country Status (1)

Country Link
CN (1) CN115794838B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843750A (en) * 2016-03-22 2016-08-10 深圳森格瑞通信有限公司 Linear data structure query efficiency improving method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546305A (en) * 2012-01-19 2012-07-04 华为技术有限公司 Method and device for accessing error detection of bidirectional linked list
US10216627B1 (en) * 2016-11-08 2019-02-26 Levyx, Inc. Tree structure serialization and deserialization systems and methods
CN111984646A (en) * 2020-08-12 2020-11-24 中国科学院昆明植物研究所 Binary tree-based plant data storage and identification method and system
CN112860592B (en) * 2021-01-29 2023-07-18 广州极飞科技股份有限公司 Data caching method and device based on linked list, electronic equipment and storage medium
CN114443646A (en) * 2021-12-28 2022-05-06 许昌开普检测研究院股份有限公司 Bi-directional linear linked list directory retrieval based multi-way tree structure, electronic device and readable storage medium
CN114756591B (en) * 2022-04-15 2022-10-14 成都卓讯智安科技有限公司 Data screening method and system based on bidirectional linked list

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105843750A (en) * 2016-03-22 2016-08-10 深圳森格瑞通信有限公司 Linear data structure query efficiency improving method

Also Published As

Publication number Publication date
CN115794838A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US10250526B2 (en) Method and apparatus for increasing subresource loading speed
EP2347561B1 (en) Determining a network interface to access a network
KR100932803B1 (en) Method and system for an atomically updated, central cache memory
RU2494554C2 (en) Targeted queries using oma dm protocol
US8301838B2 (en) Method and apparatus for providing an application-level cache with a locked region and a floating region
JP2006505872A (en) Techniques for managing multiple hierarchies of data from a single interface
CN108776592B (en) Page construction method, device, equipment and storage medium
US8595224B2 (en) Smart path finding for file operations
CN105843867A (en) Metadata model-based search method and search device based on metadata model
EP1503304A2 (en) Method and apparatus for late binding/dynamic pathname resolution
US6631378B1 (en) Communication unit and communication method with profile management
CN115421764A (en) Method, device, equipment and storage medium for identifying module to be upgraded
US9990397B2 (en) Optimized query ordering for file path indexing in a content repository
CN115794838B (en) Storage method, device, terminal equipment and storage medium of bidirectional linked list
US8725765B2 (en) Hierarchical registry federation
US8812465B2 (en) Time-outs with time-reversed linear probing
US20140122499A1 (en) Optimized queries for file path indexing in a content repository
US6883036B1 (en) System and method for managing network directories
CN107643959B (en) Mirror image file processing method and device
US8484182B1 (en) Wireless device content searching
CN111858018B (en) Cgroup configuration method and device, computer equipment and storage medium
WO2007081677A1 (en) Structured data storage
US20120209823A1 (en) Method and system for managing database access contention
CN112115156B (en) Object-oriented block chain query method and device
CN116795829A (en) Data processing method, data processing device and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant