Unlock instant, AI-driven research and patent intelligence for your innovation.

Hierarchical data management method, hierarchical data management system and instant messaging system

A data management system and data management technology, applied in the field of instant messaging, can solve problems such as reducing the efficiency of MySql reading and writing, difficulty in supporting user communication, and limiting the scope of use, so as to enhance adaptability and portability, improve reading and writing efficiency, Performance-enhancing effects

Active Publication Date: 2018-03-06
TENCENT TECH (SHENZHEN) CO LTD
View PDF5 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since the data model of the communication software based on the flat architecture cannot handle the hierarchical data in a tree structure used to represent the multi-level architecture, it is difficult for the communication software based on the flat architecture to support communication between users with superior-subordinate relationships. thus limiting its use
[0003] In addition, most of the software based on multi-level architecture communication is based on the relational database MySql to organize hierarchical data, and MySql uses hard disks as storage, and the reading and writing efficiency is low. When reading and writing hierarchical data, SQL statements need to be used for recursive query. The reading and writing efficiency of MySql is reduced. Therefore, the existing software based on multi-level architecture communication using MySql also needs to be improved in terms of reading and writing speed.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Hierarchical data management method, hierarchical data management system and instant messaging system
  • Hierarchical data management method, hierarchical data management system and instant messaging system
  • Hierarchical data management method, hierarchical data management system and instant messaging system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0042] A hierarchical data management approach such as figure 1 shown, including:

[0043] S101. Store first-level data in a non-relational database in the form of key-value pairs, where the first-level data is tree-structured data.

[0044] In the first level of data storage and non-relational databases, non-relational databases can store data on hard disks or by combining memory and hard disks for data storage. The speed of reading and writing data is higher than that of relational databases MySql.

[0045] S102. Read the first-level data into memory, and reorganize the first-level data in the memory to generate second-level data.

[0046] The hierarchical data organized according to the organization method of the database is the first-level data, and the hierarchical data organized according to the organization method suitable for memory query is the second-level data. The second-level data is stored in memory as a cache of the first-level data. Different from the existi...

Embodiment 2

[0063] A hierarchical data management approach comprising:

[0064] S201. Store first-level data in a non-relational database in the form of key-value pairs, where the first-level data is tree-structured data.

[0065] In the non-relational database, a key-value key-value pair represents a tree, the root node of the tree is used as a key (key), and all nodes of the tree and the hierarchical relationship between the nodes are stored in the corresponding key in the form of an adjacency list. The value (value). For the hierarchical data in 2(a), the storage method of the first-level data in the non-relational database is shown in Table 2.

[0066] Table 2 Storage method of first-level data

[0067] key

value

1

[1,0][2,1][3,1][4,2][5,2][6,2][7,3][8,4][9,5][10,9]

[0068] Use the first-level data in the non-relational database as the target data for data interaction, and still need to pull the data of the entire tree where the target data is located du...

Embodiment 3

[0087] A method for querying hierarchical data, where the hierarchical data is managed by the hierarchical data management method described in Embodiment 1 or Embodiment 2, such as Figure 5 shown, including:

[0088] S301. Query the second-level data:

[0089] S302. If the query result is obtained, output the query result;

[0090] S303. If the query result is not obtained, query the first-level data:

[0091] S304. If the query result is obtained, output the query result, construct the second-level data corresponding to the query result, and update the second-level data in the cache according to the constructed result;

[0092] S305. If no query result is obtained, the query fails.

[0093] Specifically, in S304, updating the second-level data in the cache according to the construction result includes: if the cache capacity is sufficient, storing the construction result in the cache; if the cache capacity is insufficient, eliminating the least used part of the second-leve...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a hierarchical data management method, a hierarchical data management system and an instant messaging system. The hierarchical data management method comprises the following steps of: storing first hierarchical data in a non-relational database in a key-value pair form, wherein the first hierarchical data is tree-structure data; reading the first hierarchical data into a memory, and re-organizing the first hierarchical data in the memory so as to generate second hierarchical data; and creating a cache in the memory, storing the second hierarchical data in the cache andmanaging the second hierarchical data by using a cache replacement algorithm. According to the method, the non-relational database with a higher read-write speed is used for storing hierarchical data,and the hierarchical data read-write efficiency is remarkably enhanced through reconstructing the hierarchical data and using a cache replacement manner. Through interaction between the hierarchicaldata management system and a flat structure-based communication system, the flat structure-based communication system also can support communication of multi-hierarchy structures.

Description

technical field [0001] The invention relates to the field of instant communication, in particular to a hierarchical data management method, a hierarchical data management system and an instant communication system. Background technique [0002] The field of instant messaging is mainly based on two architectures for communication: flat architecture and multi-level architecture. The flat architecture is used to communicate between users who do not have a superior-subordinate relationship. Both QQ groups and WeChat groups communicate based on a flat architecture; the multi-level communication architecture is used to communicate between users who have a superior-subordinate relationship. Both Ding and WeChat Work communicate based on a multi-level architecture. Since the data model of the communication software based on the flat architecture cannot handle the hierarchical data in a tree structure used to represent the multi-level architecture, it is difficult for the communicat...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/282
Inventor 王家彬周海发杨磊
Owner TENCENT TECH (SHENZHEN) CO LTD