CN115794838A - Method and device for storing bidirectional linked list, terminal equipment and storage medium - Google Patents

Method and device for storing bidirectional linked list, terminal equipment and storage medium Download PDF

Info

Publication number
CN115794838A
CN115794838A CN202310071100.2A CN202310071100A CN115794838A CN 115794838 A CN115794838 A CN 115794838A CN 202310071100 A CN202310071100 A CN 202310071100A CN 115794838 A CN115794838 A CN 115794838A
Authority
CN
China
Prior art keywords
node
storage
type
linked list
storing
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.)
Granted
Application number
CN202310071100.2A
Other languages
Chinese (zh)
Other versions
CN115794838B (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

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for storing a bidirectional linked list, terminal equipment and a storage medium, belonging to the technical field of linked list storage, wherein the method for storing the bidirectional 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 of node and a storage instruction of a second type of node; determining a storage mode according to the storage instruction; storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes; and modifying the storage description information in the target file. Based on the scheme, the effect of conveniently storing the bidirectional linked list without using a database is achieved by storing the nodes of different classes to the corresponding target files.

Description

Method and device for storing bidirectional linked list, terminal equipment and storage medium
Technical Field
The present invention relates to the field of linked list storage technologies, and in particular, to a method and an apparatus for storing a bidirectional linked list, a terminal device, and a storage medium.
Background
For data storage, databases are used for storage in most cases, and have a unified storage scheme and a unified retrieval scheme. However, the data storage form of the database still has the following problems: for complex data structures, it is inconvenient to use database storage; when the data volume is large and the data structure is complex, the retrieval performance is not ideal enough; for an environment in which a database is difficult to deploy such as a microcomputer, a 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 is difficult.
Therefore, how to conveniently store the doubly linked list is a problem to be solved urgently at present.
Disclosure of Invention
The present application mainly aims to provide a storage method, an apparatus, a terminal device and a storage medium for a doubly-linked list, and aims to solve the problem that how to conveniently store the doubly-linked list is currently a problem to be solved urgently.
In order to achieve the above object, the present application provides a method for storing a bidirectional linked list, which is applied to the technical field of linked list storage, and the method for storing the bidirectional 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 of node and a storage instruction of a second type of node;
determining a storage mode according to the storage instruction;
storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes;
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 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 type of node, determining that the storage mode of the node is the storage mode of the second type of node.
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-class 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 attached 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-class node in the target file, and storing the node.
Optionally, when the storage mode is a first-class node storage mode, after the step of determining the target file according to the storage information of the node, the method further includes:
traversing the first type nodes of the target file;
and stopping storing if the first type of nodes same as the nodes are traversed.
Optionally, when the storage mode is a second-class node storage mode, after the step of determining the target file according to the first-class node attached to the storage information of the node, the method further includes:
traversing the affiliated nodes of the nodes according to the affiliated first-class nodes in the storage information of the nodes;
and stopping storing if the corresponding child nodes traversing to the attached first-class node are the same as the node.
Optionally, the storage description information at least includes the number of the first type nodes, the number of the second type nodes, offset bits of the target file, offset bits of the first type nodes, and tail bits 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 tail bit of the linked list;
and when the node is a second-class node, modifying the number of the second-class node, the offset bit of the first-class node attached to the node and the tail bit of the linked list.
The present application further provides a storage device for a bidirectional linked list, where the storage device for the bidirectional linked list includes:
the acquisition module is used for 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 of node and a storage instruction of a second type of 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 corresponding target files according to the storage modes and the storage information of the nodes;
and the modification module is used for modifying the storage description information in the target file.
The implementation case of the present application further provides a terminal device, where the terminal device includes a memory, a processor, and a storage program of a doubly linked list stored in the memory and operable on the processor, and the storage program of the doubly linked list implements the steps of the storage method of the doubly linked list when executed by the processor.
The implementation case 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 steps of the storage method of the doubly linked list are realized when the storage program of the doubly linked list is executed by the processor.
The application provides a storage method and device of a bidirectional linked list, terminal equipment and a storage medium. 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 purpose of storing the nodes of the bidirectional linked list into the target file is achieved, and the effect of conveniently storing the bidirectional linked list is achieved.
Drawings
FIG. 1 is a functional block diagram of a terminal device to which a storage apparatus of a doubly linked list of the present application belongs;
FIG. 2 is a flowchart illustrating a first exemplary embodiment of a method for storing a doubly linked list according to the present application;
FIG. 3 is a schematic structural diagram of a doubly linked list involved in the storage method of the doubly linked list of the present application;
FIG. 4 is a flowchart illustrating a second exemplary embodiment of a method for storing a doubly linked list according to the present application;
FIG. 5 is a first type node storage structure related to the storage method of the bidirectional linked list of the present application;
FIG. 6 is a flowchart illustrating a method for storing a doubly linked list according to a third exemplary embodiment of the present application;
FIG. 7 is a flowchart illustrating a fourth exemplary embodiment of a method for storing a doubly linked list according to the present application;
FIG. 8 is a flowchart illustrating a fifth exemplary embodiment of a method for storing a doubly linked list according to the present application;
FIG. 9 is a flowchart illustrating a method for storing a doubly linked list according to a sixth exemplary embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is that a storage instruction of a node and storage information of the node are received, wherein the storage instruction of the node comprises a storage instruction of a first type of node and a storage instruction of a second type of node; determining a storage mode according to the storage instruction; storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes; and modifying the storage description information in the target file. Based on the method and the device, the purpose of storing the nodes of the bidirectional linked list into the target file is achieved, and the effect of conveniently storing the bidirectional linked list is achieved.
Specifically, referring to fig. 1, fig. 1 is a schematic diagram of functional modules of a terminal device to which a storage apparatus 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 the terminal equipment and can conveniently store the doubly linked list into the target file, and the storage device can be borne 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, the storage device of the doubly linked list can receive 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; determining a storage mode according to the storage instruction; storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes; modifying the information such as the storage description information in the target file and storing the modified 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 program stored in the doubly linked list in the memory 130, when executed by the processor, performs the 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 of node and a storage instruction of a second type of node;
determining a storage mode according to the storage instruction;
storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes;
and modifying the storage description information in the target file.
Further, the stored program of doubly linked list in memory 130 when executed by the processor performs the steps of:
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 type node, determining that the storage mode of the node is the storage mode of the second type node.
Further, the stored program of doubly linked list in memory 130 when executed by the processor performs the steps of:
when the storage mode is a first-class 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 a subordinate node of the first type node, and the program stored in the doubly linked list in the memory 130, when executed by the processor, further implements the steps of:
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-class 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 the first type nodes of the target file;
and stopping storing if the first type of nodes same as the nodes are traversed.
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 affiliated nodes of the nodes according to the affiliated first-class nodes in the storage information of the nodes;
and stopping storing if the corresponding child nodes traversing to the attached first-class node are the same as the node.
Further, the storage description information at least includes the number of the first type nodes, the number of the second type nodes, the offset bit of the target file, the offset bit of the first type nodes, and the last tail bit of the linked list, and when being executed by the processor, the storage program of the bidirectional linked list in the memory 130 further implements the following steps:
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 tail bit of the linked list;
and when the node is a second-class node, modifying the number of the second-class node, the offset bit of the first-class node attached to the node and the tail bit of the linked list.
Based on the above terminal device architecture, but not limited to the above architecture, the embodiments of the method of the present application are proposed.
Referring to fig. 2, fig. 3, fig. 2 is a schematic flowchart of a first exemplary embodiment of a storage method of a doubly linked list, and fig. 3 is a schematic structural diagram of a doubly linked list according to the present application, where the storage method of 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 may specify the type of the storage node, and specifically includes a storage instruction of a first type node and a storage instruction of a second type node; the storage information of the node includes the contents 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 type node, determining that the storage mode of the node is the storage mode of the second type node.
Step S130, storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes;
specifically, the name of the file can be determined according to the storage information of the node, and the name of the file is generated according to a part of the storage information of the node, for example, a hash exists in the node, and a part of the hash can be selected as the file name or as a part of the file name according to the data volume, for example, if the hash is a9993e364706816aba3e25717850c26c9cd0d89d, then a hash prefix such as a, a9 or a99 can be used as the file name, and all other class a nodes with the hash beginning with a9 are stored in the file a 9. The hash is only one kind of data used as a classification, and the rest of the key data that can be used as a file name may be any kind, such as a number, time, character string, and the like. And storing the storage information of the nodes in 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 includes the number of first-class nodes, the number of second-class nodes, the offset bit of the target file, the offset bit of the first-class nodes, and the last tail bit of the linked list, and when the node is the first-class node, the number of the first-class nodes, the offset bit of the target file, and the last tail bit of the linked list are modified; and when the node is a second-class node, modifying the number of the second-class node, the offset bit of the first-class node attached to the node and the tail bit of the linked list.
According to the scheme, the storage instruction of the node and the storage information of the node are received, wherein the storage instruction of the node comprises a storage instruction of a first type of node and a storage instruction of a second type of node; determining a storage mode according to the storage instruction; storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes; and modifying the storage description information in the target file. Based on the scheme, the effect of conveniently storing the two-way chain table without using a database is achieved by storing different classes of nodes into corresponding target files.
Further, referring to fig. 4, fig. 5 is a first-class node storage structure related to the present application, and fig. 4 is a flowchart illustrating a second exemplary embodiment of a storage method of a doubly linked list, where 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 of node is stored in the storage mode, the name of the file may be determined according to the storage information of the node, and the name of the file is generated according to a part of the storage information of the node, for example, if there is a hash in the node, and a part of the hash may be selected as the file name or as a part of the file name according to the data volume, and if the hash is a9993e364706816aba3e25717850c26c9cd0d89d, the hash prefix of a, a9, a99, or the like may be used as the file name, and all other class a nodes with hashes beginning at a9 are stored in the file a 9. The hash is only one kind of data used as a classification, and the rest of the key data that can be used as a file name may be any kind, such as a number, time, character string, 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 a last node offset refers to a first-class node, i.e., a class a node in a current target file, and is a last node in the present file; the file offset refers to an A-type node at the next position of the file offset, and is relative to the absolute offset position of a 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 first-class nodes are stored, so that the storage mode of the first-class nodes is guaranteed, and the subsequent query can be carried out according to the storage mode.
Further, referring to fig. 6, fig. 6 is a flowchart illustrating a third exemplary embodiment of a storage method of a doubly linked list, where the second type node is an attached node of the first type 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 the second-class node storage mode, determining the target file according to the attached first-class node in the storage information of the node;
specifically, when the storage mode is the second-class node storage mode, it is first necessary to determine what the node, i.e., the first-class node to which the second-class node belongs, and the attached first-class node may be acquired from the storage information, so that the target file is determined according to the storage information of the first-class node. The determination method is the same as the step S1301, and is determined by the key data in the storage information.
Step S1304, determining a storage location of the node according to the offset bit of the attached first type node in the target file, and storing the node.
Specifically, according to the key data of the belonged A-type node indicated in the storage process, the A-type node is found through traversing an A-type linked list in the file; if not, storing the A-type node; after finding out the corresponding A-type node, reading the B-type node, namely the second-type node, from the position behind the A-type node, traversing the B-type linked list according to the file offset of the B-type node, finding out the last node, and modifying the file offset of the node into the offset of the tail of the file.
In this embodiment, with the above scheme, specifically, when the storage mode is the second-class node storage mode, the target file is determined according to the 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-class 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 illustrating a fourth exemplary embodiment of a storage method of a doubly linked list, where when the storage mode is a first-class node storage mode, after the step of determining the target file according to the storage information of the node, the method further includes:
step 13011, traversing the first type node of the target file;
in step S13012, if the first type node same as the node is traversed, the storage is stopped.
According to the scheme, whether the storage is repeated or not is checked during storage, so that the aim of avoiding the storage of the nodes repeatedly is fulfilled.
Further, referring to fig. 8, fig. 8 is a schematic flowchart of a fifth exemplary embodiment of a storage method of a doubly-linked list, where when the storage mode is a second type node storage mode, after the step of determining the target file according to a first type node attached to storage information of the node, the method further includes:
step S13031, traversing the affiliated nodes of the node according to the affiliated first type nodes in the storage information of the node;
step 13032, 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 nodes are stored repeatedly is checked during storage, so that the aim of avoiding the second-class nodes from being stored repeatedly is fulfilled.
Further, referring to fig. 9, fig. 9 is a flowchart illustrating a sixth exemplary embodiment of a method for storing a doubly linked list, where the storage description information at least includes a number of first class nodes, a number of second class nodes, an offset bit of a target file, an offset bit of the first class nodes, and a last tail bit of the linked list, and the step of modifying the storage description information in the target file includes:
step 1401, when the node is a first kind of node, modifying the number of the first kind of node, the offset bit of the target file, and the tail bit of the linked list;
step S1402, when the node is a second type node, modifying the number of the second type node, the offset bit of the first type node attached to the node and the tail bit of the linked list.
Through the scheme, the number of the first type nodes, the offset bits of the target file and the tail bits of the linked list are modified when the nodes are the first type nodes; and when the node is a second-class node, modifying the number of the second-class node, the offset bit of the first-class node attached to the node and the tail 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 subsequent nodes are facilitated.
In addition, an embodiment of the present application further provides a storage apparatus for a doubly linked list, where the storage apparatus for a doubly linked list includes:
the acquisition module is used for 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 of node and a storage instruction of a second type of 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 corresponding target files according to the storage modes 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 present application further provides a terminal device, where the terminal device includes a memory, a processor, and a storage program of a doubly linked list that is stored in the memory and is executable on the processor, and the storage program of the doubly linked list implements the step of the storage method of the doubly linked list when executed by the processor.
Since the stored program of the doubly linked list is executed by the processor, all technical solutions of all the embodiments are adopted, so that at least all the advantages brought by all the technical solutions of all the embodiments are achieved, and detailed description is omitted here.
In addition, an embodiment of the present application further provides a readable storage medium, where the storage medium stores a program, and the program for storing a doubly-linked list, when executed by a processor, implements the steps of the method for storing a doubly-linked list as described above.
Since the stored program of the doubly linked list is executed by the processor, all technical solutions of all the embodiments are adopted, so that at least all the advantages brought by all the technical solutions of all the embodiments are achieved, and detailed description is omitted here.
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 phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a controlled terminal, or a network device) to execute the method of each embodiment of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A method for storing a doubly linked list is characterized by comprising 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 of node and a storage instruction of a second type of node;
determining a storage mode according to the storage instruction;
storing the nodes to corresponding target files according to the storage modes and the storage information of the nodes;
and modifying the storage description information in the target file.
2. A method of storing a doubly linked list as claimed in claim 1, wherein said step of determining a storage mode in response to said store command comprises:
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 type node, determining that the storage mode of the node is the storage mode of the second type node.
3. The method of claim 2, wherein the step of storing the node to the corresponding target file according to the storage mode and the storage information of the node comprises:
when the storage mode is a first-class 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.
4. The method of claim 2, wherein the second type node is an attached node to the first type node, and the step of storing the node to the corresponding destination file according to the storage mode and the storage information of the node further comprises:
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-class node in the target file, and storing the node.
5. The method according to claim 3, wherein when the storage mode is a first-class node storage mode, the step of determining the target file according to the storage information of the node is further followed by:
traversing the first type nodes of the target file;
and stopping storing if the first type of nodes same as the nodes are traversed.
6. The method according to claim 4, wherein when the storage mode is a second-class node storage mode, the step of determining the target file according to the attached first-class node in the storage information of the node is further followed by:
traversing the affiliated nodes of the nodes according to the affiliated first-class nodes in the storage information of the nodes;
and stopping storing if the corresponding child nodes traversing to the attached first-class node are the same as the node.
7. The method according to claim 1, wherein the storage description information at least includes a first type node number, a second type node number, an offset bit of the target file, an offset bit of the first type node, and a last tail 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 tail bit of the linked list;
and when the node is a second-class node, modifying the number of the second-class node, the offset bit of the first-class node attached to the node and the tail bit of the linked list.
8. A doubly linked list storage device, comprising:
the acquisition module is used for 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 of node and a storage instruction of a second type of 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 corresponding target files according to the storage modes and the storage information of the nodes;
and the modification module is used for modifying the storage description information in the target file.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor and a stored program of a doubly linked list stored on the memory and operable on the processor, which program, when executed by the processor, carries out the steps of the method of storing a doubly linked list as claimed in any one of claims 1 to 7.
10. A storage medium having stored thereon a program for storing a doubly linked list, which program, when executed by a processor, carries out the steps of the method for storing a doubly linked list as claimed in any one of claims 1 to 7.
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 true CN115794838A (en) 2023-03-14
CN115794838B 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 (7)

* 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
CN105843750A (en) * 2016-03-22 2016-08-10 深圳森格瑞通信有限公司 Linear data structure query efficiency improving method
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
CN112860592A (en) * 2021-01-29 2021-05-28 广州极飞科技股份有限公司 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
CN114756591A (en) * 2022-04-15 2022-07-15 成都卓讯智安科技有限公司 Data screening method and system based on bidirectional linked list

Patent Citations (7)

* 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
CN105843750A (en) * 2016-03-22 2016-08-10 深圳森格瑞通信有限公司 Linear data structure query efficiency improving method
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
CN112860592A (en) * 2021-01-29 2021-05-28 广州极飞科技股份有限公司 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
CN114756591A (en) * 2022-04-15 2022-07-15 成都卓讯智安科技有限公司 Data screening method and system based on bidirectional linked list

Also Published As

Publication number Publication date
CN115794838B (en) 2023-05-26

Similar Documents

Publication Publication Date Title
KR100932803B1 (en) Method and system for an atomically updated, central cache memory
US7730035B2 (en) Method, system and program product for managing a file system that includes an archive
CN106155775B (en) Message processing method, device and system
KR20100125243A (en) Targeted queries using an oma dm protocol
US10375149B2 (en) Application registration and interaction
US20130290301A1 (en) Efficient file path indexing for a content repository
RU2348062C2 (en) Method and device for dynamic connection/authorisation of pathnames
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
US20160239543A1 (en) Optimized query ordering for file path indexing in a content repository
JP2014504469A (en) Network element configuration management
CN117056383A (en) Searching method and electronic equipment
CN114443598A (en) Data writing method and device, computer equipment and storage medium
CN115794838A (en) Method and device for storing bidirectional linked list, terminal equipment and storage medium
CN108446144A (en) A kind of application program launching method, device, terminal and storage medium
US6883036B1 (en) System and method for managing network directories
US10114864B1 (en) List element query support and processing
CN111858018B (en) Cgroup configuration method and device, computer equipment and storage medium
US8484182B1 (en) Wireless device content searching
CN109325057B (en) Middleware management method, device, computer equipment and storage medium
US20060253833A1 (en) System and method for efficient hosting of wireless applications by encoding application component definitions
US20120209823A1 (en) Method and system for managing database access contention
CN111405015A (en) Data processing method, device, equipment and storage medium
US7941452B2 (en) Apparatus and method for efficient encoding of application definition using contiguous arrays
CN114461148A (en) Object storage method, device and system, electronic equipment and storage medium
CN118295795A (en) Character string calling method, device, electronic equipment and storage medium

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