[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN112422668B - Storage method and device for network community, electronic equipment and readable medium - Google Patents

Storage method and device for network community, electronic equipment and readable medium Download PDF

Info

Publication number
CN112422668B
CN112422668B CN202011245811.XA CN202011245811A CN112422668B CN 112422668 B CN112422668 B CN 112422668B CN 202011245811 A CN202011245811 A CN 202011245811A CN 112422668 B CN112422668 B CN 112422668B
Authority
CN
China
Prior art keywords
partition
information
pointer
linked list
sticker
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
CN202011245811.XA
Other languages
Chinese (zh)
Other versions
CN112422668A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011245811.XA priority Critical patent/CN112422668B/en
Publication of CN112422668A publication Critical patent/CN112422668A/en
Application granted granted Critical
Publication of CN112422668B publication Critical patent/CN112422668B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a storage method for a network community, and relates to the technical field of internet and information flow. The specific implementation scheme is as follows: storing each partition in the network in a single-direction linked list mode; the partition node corresponding to the partition stores partition information; storing all the labels in each partition in a bidirectional linked list mode; and the paste node corresponding to the paste stores paste information. The storage method has universality, and realizes quick creation and quick application, thereby reducing the management cost of the network community. The application also provides a storage device, an electronic device and a readable medium for the network community.

Description

Storage method and device for network community, electronic equipment and readable medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to internet and information flow technologies, and in particular, to a storage method and apparatus for a network community, an electronic device, and a readable medium.
Background
In the era of mobile internet, various Applications (APPs) are emerging endlessly, and the competition among the APPs is more and more intense, especially the competition among the APPs of the same category is more and more intense. To be able to survive intense competition, APP providers and operators need not only to provide better service and product experience, but also to be able to iterate quickly to gain pre-emption and gain more users.
Disclosure of Invention
A partitioned storage method and device, an electronic device and a computer readable medium are provided.
According to a first aspect, there is provided a storage method for a web community, comprising:
storing each partition in the network in a single-direction linked list mode; the partition node corresponding to the partition stores partition information;
storing all the patches in each partition in a bidirectional linked list mode; and the paste node corresponding to the paste stores paste information.
According to a second aspect, there is provided a storage apparatus for a web community, comprising:
the first storage module is used for storing each partition in the network in a single linked list mode; the partition nodes corresponding to the partitions store partition information;
the second storage module is used for storing all the labels in each partition in a bidirectional linked list mode; and the paste node corresponding to the paste stores paste information.
According to a third aspect, there is provided a network community management method, comprising:
creating partitions in a network community, and storing the partitions in a single-direction linked list mode; the partition node corresponding to the partition stores partition information;
acquiring the stickers in the subareas, and storing the stickers in a bidirectional linked list mode; and the paste node corresponding to the paste stores paste information.
According to a fourth aspect, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of a storage method and a management method for a web community.
According to a fifth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform any one of the above-described storage method and management method for a web community.
According to a sixth aspect, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above storage methods for a web community.
According to the storage method for the network community, the partitions in the community are stored in the single-direction linked list mode, and the stickers in each partition are stored in the double-direction linked list mode, so that the network community has universality.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be considered limiting of the present application. Wherein:
fig. 1 is a flowchart of a storage method for a network community according to an embodiment of the present application;
fig. 2 is a storage architecture diagram of a network community provided in an embodiment of the present application;
FIG. 3 is a schematic block diagram of a storage device for a web community according to an embodiment of the present disclosure;
fig. 4 is a flowchart of a network community management method according to an embodiment of the present application;
FIG. 5 is an architecture diagram of a web community provided in an embodiment of the present application;
fig. 6 is a flowchart of creating a partition according to an embodiment of the present application;
FIG. 7 is a flow chart of modifying partition names according to an embodiment of the present application;
fig. 8 is a flowchart of deleting a partition according to an embodiment of the present application;
FIG. 9 is a flowchart of adding or deleting a post according to an embodiment of the present application;
fig. 10a is a schematic view of a new sticker provided in an embodiment of the present application;
FIG. 10b is a schematic diagram of a delete post according to an embodiment of the present application;
fig. 11 is a block diagram of an electronic device for implementing the storage method for the web community according to the embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In case of conflict, the embodiments and features of the embodiments of the present application can be combined with each other.
As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes," and/or "made from" \8230; \8230 ";" made from ";" specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The network community APP is one of application programs with high use frequency, such as a bar, a watch, a pulse, news about Teng, a headline and the like. The different types of APP comprise a plurality of subareas tab, such as latest subareas, attention subareas, recommended subareas, essence subareas, hot-list subareas and the like, and a sticky list is arranged below each subarea. The names of the partitions are fixed, the names of the partitions of each user are the same, the names cannot be modified, and the display sequence of the partitions cannot be adjusted. Moreover, the storage mode of the APP cannot give consideration to the generality, so that the APP cannot be quickly applied. When a partition needs to be added, not only a new partition needs to be created, but also a tab list needs to be established solely in the tab content under the partition, which requires development and online. In addition, when the product is on line, the product needs to be configured in a small flow mode, so that the product needs to be released on line. Development and product release are both on-line and on-line, which consumes a lot of manpower.
For example, when an APP service provider needs to develop a partition for a hot event a, a developer needs to design and develop a new product of the hot event a, and build a sticky list for the new product to be online. Moreover, when online, a small flow mode is needed to release the new product to be online, which consumes a large amount of human resources, and the application speed is slow, so that the service provider cannot quickly launch the new product to seize the market, so as to obtain more customers.
In view of at least one of the above problems in the network community APP, a storage method, a storage apparatus, a management method of the network community, an electronic device, and a computer-readable storage medium for the network community are provided.
In a first aspect, an embodiment of the present application provides a storage method for a network community, where the storage method mainly improves storage manners of partitions and stickers of the network community, so that the network community has universality and can be quickly applied.
Fig. 1 is a flowchart of a storage method for a network community provided in an embodiment of the present application, and fig. 2 is a storage architecture diagram of the network community provided in the embodiment of the present application. Referring to fig. 1 and fig. 2, a storage method for a web community provided in an embodiment of the present application includes:
step 101, storing each partition in the network community in a single linked list mode.
The single linked list means that the partition has only one pointer pointing to the next partition, and each partition node can only be read in a single direction. The metadata of the partition is structured data and can be stored in a MySQL mode.
As shown in fig. 2, the network community includes n partitions, where n is an integer greater than or equal to 1. Partition 1 has only pointers to partition 2, partition 2 has only pointers to partition 3, and so on, and partition n-1 has only pointers to partition n.
In some embodiments, the partition node corresponding to a partition of the network community stores partition information of the partition. The partition information comprises at least one of a partition name and a partition identification of a partition, pointer information of a next partition, the number of posts in the partition, pointer information of a first post and pointer information of a last post in the partition.
When a certain partition is edited, only the partition information of the partition and the partition adjacent to the partition need to be modified. For example, when a partition is newly created, it is only necessary to insert the partition into a desired position and modify partition information of the partition and the previous and next partitions adjacent thereto. When a partition is deleted, the partition is deleted and the partition information of the previous partition and the next partition adjacent thereto is modified. When the name of the partition needs to be modified, only the partition information of the partition needs to be modified.
And 102, storing the labels in each partition in a bidirectional linked list mode.
The bidirectional linked list refers to that the sticker has a pointer pointing to the next sticker and also has a pointer pointing to the previous sticker. Each paste can be read downwards in one direction and can also be used for finding the previous paste forwards.
In some embodiments, the post data is zipper structured data, and can be stored in a MySQL manner.
As shown in fig. 2, each partition in the network community includes m posts, where m is an integer greater than or equal to 1. For example, m tiles are included within partition 1, tile 1 includes the pointer for tile 2, tile 2 includes both the pointer for tile 2 and the pointer for tile 3, and so on, and tile m-1 includes the pointer for tile m-2 and the pointer for tile m.
In some embodiments, the post node corresponding to a post stores post information including an identification of the post, a time of posting, a pointer to a previous post, and a pointer to a next post.
When the sticker needs to be modified, only the sticker information of the sticker and the sticker information of the sticker adjacent to the sticker need to be modified. For example, when a post is newly created, the post is inserted into the corresponding position, and the post information of the post is modified, that is, in addition to the identification and posting time of the post, the pointer of the previous post and the pointer of the next post adjacent to the previous post are added. When a tile is deleted, the tile is deleted, and tile information of a previous tile and a next tile adjacent thereto is modified. For the paste information of the previous paste adjacent to the deleted paste, the pointer of the next paste needs to be modified; for the tile information of the next tile adjacent to the deleted tile, the pointer of its previous tile needs to be modified. For example, when tile 2 is deleted, the pointer to the next tile of tile 1 needs to be modified, i.e., the pointer to the next tile of tile 1 points to tile 3, and the pointer to the previous tile of tile 3, i.e., the pointer to the previous tile of tile 3 points to tile 1.
In some embodiments, the posts within each zone are stored in chronological order of posting. For example, the stickers 1, 2, 8230, m are arranged according to the posting time sequence. When a new paste is needed, the paste is inserted into the corresponding position by searching the posting time, and then the pointer of the previous paste and the pointer of the next paste of the paste are added.
It should be noted that, when a partition and a sticker are newly created, the partition may be stored in a single linked list manner first, and then the sticker under the partition may be stored in a double linked list manner. When only the partition is established and the sticker is not established under the partition, only the partition is stored in a single linked list mode. When only a tile is created, the tile is stored in a doubly linked list.
According to the storage method for the network community, the partitions in the network community are stored in the single-direction linked list mode, the stickers in each partition are stored in the double-direction linked list mode, so that the network community has universality, when the partitions are created or modified, developers do not need to redesign and develop products, only partition information needs to be modified at the nodes of the partitions, rapid creation and rapid application are achieved, and the management cost of the network community is reduced.
In a second aspect, an embodiment of the present application provides a storage device for a network community, where the storage device improves storage manners of partitions and stickers of the network community, and enables the network community to have universality, so that the storage device can be quickly applied.
Fig. 3 is a schematic block diagram of a storage device for a network community according to an embodiment of the present application. Referring to fig. 2 and 3, a storage device for a network community provided by an embodiment of the present application includes:
the first storage module 301 is configured to store each partition in the network in a single linked list manner.
The single linked list means that the partition has only one pointer pointing to the next partition, and each partition node can only be read in a single direction.
As shown in fig. 2, the network community includes n partitions, where n is an integer greater than or equal to 1. Partition 1 has only pointers to partition 2, partition 2 has only pointers to partition 3, and so on, and partition n-1 has only pointers to partition n.
In some embodiments, partition nodes corresponding to partitions of the network community store partition information of the partitions. The partition information comprises at least one of a partition name and a partition identifier of a partition, pointer information of a next partition, the number of posts in the partition, pointer information of a first post and pointer information of a last post in the partition.
The second storage module 302 stores the patches in each of the partitions in a doubly linked list manner.
The bidirectional linked list refers to that the sticker has a pointer pointing to the next sticker and a pointer pointing to the previous sticker. Each sticker can be read downwards in one direction, and a previous sticker can be found forwards.
As shown in fig. 2, each partition in the network community includes m posts, where m is an integer greater than or equal to 1. For example, m tiles are included within partition 1, tile 1 includes the pointer for tile 2, tile 2 includes both the pointer for tile 2 and the pointer for tile 3, and so on, and tile m-1 includes the pointer for tile m-2 and the pointer for tile m.
In some embodiments, the post node corresponding to a post stores post information including an identification of the post, a time of posting, a pointer to a previous post, and a pointer to a next post.
When the paste needs to be modified, only the paste information of the paste and the paste information of the paste adjacent to the paste need to be modified. For example, when a tile is newly created, the tile is inserted into the corresponding position, and the tile information of the tile is modified, that is, in addition to the identifier and the posting time of the tile, the pointer of the previous tile and the pointer of the next tile adjacent to the previous tile are added. When a sticker is deleted, the sticker is deleted, and sticker information of a previous sticker and a next sticker adjacent thereto is modified. For the paste information of the previous paste adjacent to the deleted paste, the pointer of the next paste needs to be modified; for the tile information of the next tile adjacent to the deleted tile, the pointer of the previous tile needs to be modified. For example, when tile 2 is deleted, the pointer to the next tile of tile 1 needs to be modified, i.e., the pointer to the next tile of tile 1 points to tile 3, and the pointer to the previous tile of tile 3, i.e., the pointer to the previous tile of tile 3 points to tile 1.
In some embodiments, the posts within each zone are stored in chronological order of posting. For example, the stickers 1, 2, 8230, m are arranged according to the posting time sequence. When a new patch is needed, the patch is inserted into the corresponding position by retrieving the posting time, and then the pointer of the previous patch and the pointer of the next patch of the patch are added.
It should be noted that, when a partition and a sticker are newly created, the partition may be stored in a single linked list manner first, and then the sticker under the partition may be stored in a double linked list manner. When only the partition is established and the post is not established under the partition, only the partition is stored according to the single linked list mode. When only a tile is created, the tile is stored in a doubly linked list.
The application provides a storage device for network community, first storage module adopts the one-way linked list mode to store with each subregion in the network community, second storage module adopts the two-way linked list mode to store each note in every subregion, so that the network community has the commonality, when establishing or modifying the subregion, need not the developer redesign, the development product, only need modify the subregion information at the subregion node, realized quick establishment and quick application, thereby reduce network community's administrative cost.
In a third aspect, an embodiment of the present application provides a network community management method, which improves storage manners of partitions and stickers of a network community, and enables the network community to have universality, so that the method can be quickly applied.
Fig. 4 is a flowchart of a network community management method according to an embodiment of the present application. Referring to fig. 4, the network community management method provided in this embodiment includes:
step 401, creating a partition in a network community, and storing the partition in a single-direction linked list mode.
The single linked list means that the partition has only one pointer pointing to the next partition, and each partition node can only be read in a single direction.
As shown in fig. 2, the network community includes n partitions, where n is an integer greater than or equal to 1. Partition 1 has only pointers to partition 2, partition 2 has only pointers to partition 3, and so on, and partition n-1 has only pointers to partition n.
In some embodiments, partition nodes corresponding to partitions of the network community store partition information of the partitions. The partition information comprises at least one of a partition name and a partition identifier of a partition, pointer information of a next partition, the number of posts in the partition, pointer information of a first post and pointer information of a last post in the partition.
Step 402, obtaining the stickers in the subareas, and storing the stickers in a bidirectional linked list mode.
The bidirectional linked list refers to that the sticker has a pointer pointing to the next sticker and also has a pointer pointing to the previous sticker. Each paste can be read downwards in one direction and can also be used for finding the previous paste forwards.
In some embodiments, the post node corresponding to a post stores post information including an identification of the post, a time of posting, a pointer to a previous post, and a pointer to a next post.
In some embodiments, the posts within each zone are stored in chronological order of posting. For example, the stickers 1, 2, \8230 \ 8230;, m are arranged in the posting time order. When a new paste is needed, the paste is inserted into the corresponding position by searching the posting time, and then the pointer of the previous paste and the pointer of the next paste of the paste are added.
The stickers are stored in a bidirectional linked list mode, and are stored according to the posting time sequence, so that the retrieval according to the time positive sequence and the time negative sequence can be supported, the use convenience of a network community is improved, and the user experience is improved.
In some embodiments, step 401, creating a partition in a network, and storing the partition in a single linked list manner includes: acquiring the partition name and the partition identification of the partition; creating the partition based on the partition name and the partition identification; and storing the created partitions in a single-direction linked list mode.
Wherein, the partition name can be customized by the client, and the identification of the partition is generated by the number sender. Because the number of communities is multiplied by the magnitude of each community, the partitioned data in the network community APP needs to be stored in a plurality of database tables, and partition identification repetition is easily caused by using database self-increment identification. Compared with the data self-increment identification, the generation of the partition identification by the sender can avoid the duplication of the partition identification, and is convenient for subsequent expansion.
When a partition is created, the partition is created based on the partition name and the partition identifier, the partition is stored in a single-direction linked list mode, and pointer information of the next partition, the number of the posts in the partition, the pointer information of the first post in the partition and the pointer information of the last post are stored in a partition node.
In some embodiments, before creating a partition in a network and storing the partition in a singly linked list manner, the method further includes: and judging the reasonability of the partition names, and creating the partitions based on the partition names and the partition identifications under the condition that the partition names are reasonable.
Wherein, the rationality refers to the common value of the society, and the common value of the society is not met by yellow, gambling and toxic. The name related to yellow gambling poison is a name that is not plausible. And judging whether the partition names are reasonable or not, and if not, not establishing the partitions. Creating the partition based on the partition name and the partition identification only if the partition name is legitimate.
In some embodiments, after storing the created partition in a singly linked list manner, the method may further include: receiving a deleting instruction for deleting the partition; wherein the delete instruction comprises an identification of the partition; and deleting the partitions based on the deleting instruction, and updating the partition sequence in the single-direction linked list.
And after receiving the deleting instruction, the storage device finds the partition to be deleted according to the partition identification, deletes the partition, updates the partition sequence in the single-direction linked list and deletes the attached zipper under the partition.
In some embodiments, after storing the created partition in a singly linked list manner, the method further includes: receiving a modification instruction for modifying the partition; the modification instruction comprises the identifier of the partition, the name of the modified partition and the serial number of the partition; modifying and updating partition information for the partition based on the modification instructions.
And the user sends a modification instruction through the terminal, and the storage device needs to modify the partition information of the partition based on the partition identifier corresponding to the modification instruction.
Fig. 5 is an architecture diagram of a web community according to an embodiment of the present application. Referring to fig. 5, the partition creation, partition editing, and partition query are based on a partition caching module 501, the partition caching module 501 stores metadata in a Redis Hash structure, metadata related to a partition is stored in a first storage module 502 in a MySQL manner, and the child data in the partition is stored in a second storage module 503 in a MySQL manner, where the child data is zipper data. The first memory module 502 and the second memory module 503 are permanent memory modules.
When the data of the network community is used, as the scene of data reading is far greater than the scene of modification writing, in order to deal with high-concurrency scenes, the data of the partitions are stored by using a Redis Hash structure, namely, when the data are used, the partition information is placed in a cache layer and is stored by using the Redis Hash structure, so that the caching effect is achieved.
The partition structure may adopt the following manner:
partition ID = > { field: value }. Wherein field is the partition id, value is the combination of the name and display sequence of the partition,
e.g. a partition ID
tab _ id _ 1.
tab _ id _2
tab _ id _3
tab _ id _4
}
The partitioned data set for the entire network community may be represented as:
Set={fid1:{f1:v1,f2:v2},fid2:{f1:v1,f2:v2},fid3:{f1:v1,f2:v2}…,fidn:{f1:v1,f2:v2}
wherein fidn represents the nth web community; the nth network community comprises two partitions, wherein the identifier of the first partition is f1, and the combination of the partition name and the display sequence is V1; the second partition is identified as f2 and the combination of partition name and presentation order is V2.
In some embodiments, the metadata of the partitions is permanently stored in MySQL, and each partition is recorded as follows:
record:{fid,tab_id,tab_name,sort,is_del}
wherein, fid is a network community ID, tab _ ID is a partition identifier, tab _ name is a partition name, sort is a sorting order of partitions, and is _ del is whether to delete (a partition deleting operation may be a logical deletion, and data is still reserved).
In some embodiments, the post data in the partition is stored in a MySQL mode, and efficient and flexible access is realized by using a bidirectional linked list mode of a zipper structure.
In order to better understand the network community management method provided by the embodiment of the present application, a practical application scenario is introduced below.
Fig. 6 is a flowchart of creating a partition according to an embodiment of the present application. Referring to fig. 6, the step of creating a partition includes:
step 601, obtaining the partition name.
In some embodiments, the user may define the partition name himself or the partition name may be recommended by the service provider. When the service provider recommends the partition names, the service provider can recommend a plurality of partition names according to the same or similar types of network communities for the user to select.
Step 602, filtering the partition names.
The filtering means judging the rationality of the partition names and filtering out unreasonable names. For unreasonable partition names, subsequent processes are directly stopped or suspended.
For example, when the partition name relates to unreasonable names such as yellow, gambling, poison, etc., the user may be prompted to select another partition name until the partition name satisfies the condition for the subsequent process.
Step 603, obtaining the partition identifier.
The partition identification is an identification of partition identities, and all partition identifications cannot be repeated in the whole network community.
In some embodiments, the partition identifier is generated by a sender service, which not only avoids duplication of partition identifiers, but also facilitates expansion of subsequent partitions.
Step 604, store the partition identification and partition name.
The partition identification and the partition name are stored in Redis and persisted to a first storage module. The partitions are stored in a single linked list mode, so that the sequencing of the newly-built partitions can be defaulted to the maximum number of the partitions in the network community plus 1.
Step 605, create a sticker under the newly created partition.
And creating a sticker under the newly created partition, wherein the sticker can be a sticker of other partitions or a newly created sticker.
And 606, storing the stickers in a bidirectional linked list mode.
And storing the sticker in a second storage module. For example, the identification of the post and the post time are stored in the second storage module. In the embodiment of the application, the posts are stored in a two-way linked list mode, and each post node further stores a pointer pointing to the previous post and a pointer pointing to the next post.
After creating the patch written in the partition, modifying the partition node information of the first storage module, the number of the patches in the partition, the pointer information of the first patch in the partition and the pointer information of the last patch.
Fig. 7 is a flowchart of modifying a partition name according to an embodiment of the present application. Referring to fig. 7, the step of modifying the partition name provided in the embodiment of the present application includes:
step 701, obtaining a partition name.
In some embodiments, the user may define the partition name himself or the partition name may be recommended by the service provider. When the service provider recommends the partition names, the service provider can recommend a plurality of partition names according to the same or similar types of network communities for the user to select.
At step 702, the partition names are filtered.
The filtering means judging the rationality of the partition names and filtering out unreasonable names. For unreasonable partition names, subsequent processes are directly stopped or suspended.
For example, when the partition name relates to an unreasonable name such as yellow, bet, poison, etc., the user may be prompted to select another partition name until the partition name satisfies the condition for the subsequent process.
Step 703, update the partition name.
In some embodiments, when the partition name meets the requirement, the partition names in the cache module and the first storage module are updated and stored.
In some embodiments, the user may adjust the order of partitions within the web community. For example, the user edits a new partition sequence through the client, sends the new partition sequence to the network community server, and adjusts and modifies the partition sequence in the cache module and the first storage module.
Fig. 8 is a flowchart of deleting a partition according to an embodiment of the present application. Referring to fig. 8, the step of deleting a partition includes:
step 801, responding to a partition deleting instruction, and deleting a corresponding partition in the buffer module.
In some embodiments, after the deleting instruction is received, the corresponding partition in the buffering module is deleted according to the network community identifier and the partition identifier, and the sequence of other partitions in the network community is updated.
For example, when partition 4 in the network community is deleted, the sequence number of the partition after partition 4 needs to be modified, i.e., the sequence number of each partition after partition 4 is automatically decremented by 1.
Step 802, soft delete is performed on the corresponding partitions in the database.
Wherein, the soft deletion refers to the deletion in logic, and the data is retained.
In some embodiments, according to the network community identifier and the partition identifier, the corresponding partition is deleted in the database in a soft mode, and the sequence of other partitions in the network community is updated.
Step 803, delete the sticker within the partition.
And deleting the intra-zone sticky sub-zippers which need to be deleted according to the network community identification and the zone identification.
Fig. 9 is a flowchart of adding or deleting a post according to an embodiment of the present application. Referring to fig. 9, the step of adding or deleting a post includes:
step 901, finding an operation position in response to the sub-operation request.
The operation request of the post includes network community identification, partition identification, post identification and operation type, wherein the operation type can be adding and deleting the post.
In some embodiments, the corresponding network community is found according to the network community identifier, the corresponding partition is found in the network community according to the partition identifier, and then the corresponding post position is found in the doubly linked list according to the post time.
According to the network community provided by the embodiment of the application, the stickers are stored in a two-way linked list mode, so that the stickers can be searched in a positive sequence or a reverse sequence when the position of the sticker is inquired, the searching time is shortened, and the sticker modifying efficiency is improved.
Step 902, determine the operation type.
The operation types can be a new paste adding and a paste deleting.
And 903, inserting the sticky note into the sticky note linked list under the condition that the operation type is the newly added sticky note, and modifying the sticky note pointer information in the sticky note node adjacent to the sticky note. The pointer information includes a pointer to the previous tile and a pointer to the next tile, as shown in fig. 10 a.
In step 904, in the case that the operation type is delete paste, delete paste from the paste linked list, and modify the paste pointer information in the adjacent paste node, as shown in fig. 10 b.
According to the network community management method provided by the embodiment, each partition in the community is stored in a single-direction linked list mode, and each sticker in each partition is stored in a double-direction linked list mode, so that the network community has universality.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
Fig. 11 is a block diagram of an electronic device for a storage method and a management method of a web community according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 11, the electronic apparatus includes: one or more processors 1101, a memory 1102, and interfaces for connecting the various components, including a high speed interface and a low speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 11, a processor 1101 is taken as an example.
The memory 1102 is a non-transitory computer readable storage medium as provided herein. The storage is used for storing instructions which can be executed by at least one processor, so that the at least one processor can execute the storage method and the management method for the network community. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the storage method and the management method for a web community provided by the present application.
The memory 1102, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the storage method and the management method for the web community in the embodiments of the present application. The processor 1101 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 1102, that is, implements the storage method and the management method for the web community in the above-described method embodiments.
The memory 1102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to a storage method for the web community and use of the management electronic device, and the like. Further, the memory 1102 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 1102 may optionally include memory located remotely from the processor 1101, which may be connected over a network to a storage method and management electronics for a web community. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device for the storage method and the management method of the web community may further include: an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103 and the output device 1104 may be connected by a bus or other means, and are exemplified by being connected by a bus in fig. 11.
The input device 1103 may receive input numeric or character information and generate key signal inputs related to a storage method for the web community and user settings and function control of the management electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, etc. The output devices 1104 may include a display device, auxiliary lighting devices (e.g., LEDs), tactile feedback devices (e.g., vibrating motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
The embodiment of the present disclosure provides a computer readable medium, on which a computer program is stored, and the program, when executed by a processor, implements any one of the above-mentioned storage methods for a network community.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A storage method for a web community, comprising:
storing each partition in the network in a single-direction linked list mode; the partition node corresponding to the partition stores partition information; the partition information comprises a partition identifier and pointer information of a next partition;
storing all the posts in each subarea in a bidirectional linked list mode, wherein the posts in each subarea are stored according to the posting time sequence; the method comprises the steps that a sticker node corresponding to a sticker stores sticker information; the post information includes a post identifier, a posting time, and a pointer to a previous post and a pointer to a next post.
2. The method of claim 1, wherein the partition information further comprises at least one of a partition name of the partition and a number of tiles within the partition, pointer information of a first tile and pointer information of a last tile within the partition.
3. A storage device for a web community, comprising:
the first storage module is used for storing each partition in the network in a single linked list mode; the partition nodes corresponding to the partitions store partition information; the partition information comprises a partition identifier and pointer information of a next partition;
the second storage module is used for storing all the pasters in each partition in a two-way linked list mode, and the pasters in each partition are stored according to the posting time sequence; the method comprises the steps that a sticker node corresponding to a sticker stores sticker information; the post information includes a post identifier, a posting time, and a pointer to a previous post and a pointer to a next post.
4. The apparatus of claim 3, wherein the partition information further comprises at least one of a partition name of the partition and a number of tiles within the partition, pointer information of a first tile within the partition, and pointer information of a last tile within the partition.
5. A network community management method is characterized by comprising the following steps:
creating partitions in a network community, and storing the partitions in a single-direction linked list mode; the partition node corresponding to the partition stores partition information; the partition information comprises a partition identifier and pointer information of a next partition;
acquiring the stickers in the subareas, storing the stickers in a two-way linked list mode, and storing the stickers in each subarea according to the posting time sequence; the method comprises the steps that a sticker node corresponding to a sticker stores sticker information; the post information includes a post identifier, a posting time, and a pointer to a previous post and a pointer to a next post.
6. The method of claim 5, wherein the partition information further comprises at least one of a partition name of the partition and a number of tiles within the partition, pointer information of a first tile within the partition, and pointer information of a last tile within the partition.
7. The method of claim 6, wherein creating partitions in the network community and storing the partitions in a singly linked list manner comprises:
acquiring the partition name and the partition identification of the partition;
creating the partition based on the partition name and the partition identification;
and storing the created partitions in a single-direction linked list mode.
8. The method of claim 7, wherein prior to creating the partition based on the partition name and the partition identification, further comprising:
and judging the reasonability of the partition names, and under the condition that the partition names are reasonable, creating the partitions based on the partition names and the partition identifications.
9. The method of claim 7, wherein after storing the created partitions in a singly linked list manner, further comprising:
receiving a deleting instruction for deleting the partition; wherein the delete instruction comprises an identification of the partition;
and deleting the partitions based on the deleting instruction, and updating the partition sequence in the single-direction linked list.
10. The method of claim 7, wherein after storing the created partitions in a singly linked list manner, further comprising:
receiving a modification instruction for modifying the partition; wherein the modification instruction comprises the identifier of the partition, the name of the modified partition and the serial number of the partition;
modifying and updating partition information for the partition based on the modification instructions.
11. The method of claim 5, wherein after obtaining the tiles in the partition and storing the tiles in a doubly linked list manner, the method further comprises:
receiving a modification instruction for modifying the sticker; wherein the modification instruction comprises the sticker information of the sticker;
and modifying and updating the sub information and the doubly linked list based on the modifying instruction.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-2 or 5-11.
13. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-2 or 5-11.
CN202011245811.XA 2020-11-10 2020-11-10 Storage method and device for network community, electronic equipment and readable medium Active CN112422668B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011245811.XA CN112422668B (en) 2020-11-10 2020-11-10 Storage method and device for network community, electronic equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011245811.XA CN112422668B (en) 2020-11-10 2020-11-10 Storage method and device for network community, electronic equipment and readable medium

Publications (2)

Publication Number Publication Date
CN112422668A CN112422668A (en) 2021-02-26
CN112422668B true CN112422668B (en) 2023-04-07

Family

ID=74782245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011245811.XA Active CN112422668B (en) 2020-11-10 2020-11-10 Storage method and device for network community, electronic equipment and readable medium

Country Status (1)

Country Link
CN (1) CN112422668B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1209866A2 (en) * 2000-11-22 2002-05-29 Xerox Corporation System and method for managing messages
CN1874440A (en) * 2005-06-03 2006-12-06 联想(北京)有限公司 Method for displaying relevant programs in electric program guide
CN1949220A (en) * 2006-10-12 2007-04-18 百度在线网络技术(北京)有限公司 Structuring system and method of network community dynamic list
CN101000634A (en) * 2007-01-05 2007-07-18 北京握奇数据系统有限公司 Method for realizing arbitrary catalog applied management to telecommunication smart card
CN101478652A (en) * 2008-12-31 2009-07-08 深圳市同洲电子股份有限公司 Searching method, system and digital television receiving terminal for memory data
CN101833576A (en) * 2010-04-23 2010-09-15 广州联炬科技企业孵化器有限公司 Method for adding web shortcut navigation menu
CN102117278A (en) * 2009-12-31 2011-07-06 联想(北京)有限公司 Linked list create method and system and data search method and system
CN104572879A (en) * 2014-12-19 2015-04-29 乐视网信息技术(北京)股份有限公司 Method and device for updating index table and method and device for searching based on index table
CN104750866A (en) * 2015-04-17 2015-07-01 上海斐讯数据通信技术有限公司 Embedded WEB server based dynamic menu bar generation method and system
CN105260475A (en) * 2015-10-30 2016-01-20 努比亚技术有限公司 Data searching method, data saving method and related equipment
CN106575427A (en) * 2014-08-12 2017-04-19 艾高特有限责任公司 A zero-knowledge environment based social networking engine
CN109271383A (en) * 2018-09-05 2019-01-25 广州视源电子科技股份有限公司 Dynamic label processing method and device, computer equipment and storage medium
CN110673908A (en) * 2019-09-03 2020-01-10 北京量子保科技有限公司 Interface generation method, device, medium and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080005234A1 (en) * 2006-06-30 2008-01-03 International Business Machines Corporation Providing Discussion Thread Context for Posts Displayed in a Flat List
US20100217804A1 (en) * 2009-02-23 2010-08-26 Oracle International Corporation Collaborative draft forum-messages
US20150120357A1 (en) * 2013-10-25 2015-04-30 Kenneth D. Tuchman Method and system for providing live-connected content
US9721022B2 (en) * 2014-08-28 2017-08-01 International Business Machines Corporation Searching and displaying related content to a post in an activity stream

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1209866A2 (en) * 2000-11-22 2002-05-29 Xerox Corporation System and method for managing messages
CN1874440A (en) * 2005-06-03 2006-12-06 联想(北京)有限公司 Method for displaying relevant programs in electric program guide
CN1949220A (en) * 2006-10-12 2007-04-18 百度在线网络技术(北京)有限公司 Structuring system and method of network community dynamic list
CN101000634A (en) * 2007-01-05 2007-07-18 北京握奇数据系统有限公司 Method for realizing arbitrary catalog applied management to telecommunication smart card
CN101478652A (en) * 2008-12-31 2009-07-08 深圳市同洲电子股份有限公司 Searching method, system and digital television receiving terminal for memory data
CN102117278A (en) * 2009-12-31 2011-07-06 联想(北京)有限公司 Linked list create method and system and data search method and system
CN101833576A (en) * 2010-04-23 2010-09-15 广州联炬科技企业孵化器有限公司 Method for adding web shortcut navigation menu
CN106575427A (en) * 2014-08-12 2017-04-19 艾高特有限责任公司 A zero-knowledge environment based social networking engine
CN104572879A (en) * 2014-12-19 2015-04-29 乐视网信息技术(北京)股份有限公司 Method and device for updating index table and method and device for searching based on index table
CN104750866A (en) * 2015-04-17 2015-07-01 上海斐讯数据通信技术有限公司 Embedded WEB server based dynamic menu bar generation method and system
CN105260475A (en) * 2015-10-30 2016-01-20 努比亚技术有限公司 Data searching method, data saving method and related equipment
CN109271383A (en) * 2018-09-05 2019-01-25 广州视源电子科技股份有限公司 Dynamic label processing method and device, computer equipment and storage medium
CN110673908A (en) * 2019-09-03 2020-01-10 北京量子保科技有限公司 Interface generation method, device, medium and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Discuz系列应用教程:[5]如何创建论坛版块;zhulinluo;《https://jingyan.baidu.com/article/7082dc1c4ca612e40a89bd08.html》;20140712;全文 *
hehehe.如何在后台要动态添加tab标签页的格式以及每个页面列表格式,前端应该如何请求.《http://segmentfault.com/q/1010000008262893》.2017, *
如何在后台要动态添加tab标签页的格式以及每个页面列表格式,前端应该如何请求;hehehe;《http://segmentfault.com/q/1010000008262893》;20170206;全文 *

Also Published As

Publication number Publication date
CN112422668A (en) 2021-02-26

Similar Documents

Publication Publication Date Title
CN111639027B (en) Test method and device and electronic equipment
CN112115113B (en) Data storage system, method, device, equipment and storage medium
JP7200277B2 (en) Method and apparatus, electronic device, storage medium and computer program for identifying word slots
CN113656407B (en) Data topology generation method and device, electronic equipment and storage medium
CN111767321A (en) Node relation network determining method and device, electronic equipment and storage medium
CN111698326B (en) Method and device for determining cost attribution of cloud service resources
CN111752960B (en) Data processing method and device
CN110765075A (en) Storage method and equipment of automatic driving data
CN110750419B (en) Offline task processing method and device, electronic equipment and storage medium
US9323780B2 (en) Locale-based sorting on mobile devices
CN110554951A (en) Method and device for managing embedded points
CN112115313A (en) Regular expression generation method, regular expression data extraction method, regular expression generation device, regular expression data extraction device, regular expression equipment and regular expression data extraction medium
CN113821249A (en) Project development configuration method and device, electronic equipment and readable storage medium
CN112422668B (en) Storage method and device for network community, electronic equipment and readable medium
CN112308602A (en) Method and apparatus for generating a model
CN111597112A (en) Automatic test method and device and electronic equipment
US20140244698A1 (en) Method for Skipping Empty Folders when Navigating a File System
CN112507100B (en) Update processing method and device of question-answering system
US20230308350A1 (en) Structured network change controls
CN111767444B (en) Page feature construction method, device, equipment and storage medium
CN109658276A (en) Approaches to IM, device, storage medium and the electronic equipment of social networks
CN114741444A (en) Tissue architecture adjusting method and device, electronic equipment and storage medium
CN114661274A (en) Method and device for generating intelligent contract
CN110851192B (en) Method and device for responding to degraded switch configuration
CN108573042B (en) Report synchronization method, electronic equipment and computer readable 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