Cloud database service system
By distributing storage nodes in the cloud database and establishing associated channels, combining request characteristics and node characteristics to match, and controlling the on-off state, the problem of low data retrieval efficiency in the cloud database is solved, and efficient data retrieval is achieved.
Patent Information
- Application Number
- CN202410028048.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-09
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-01-09
AI Technical Summary
The existing cloud database service system lacks distributed storage for data feature structures when storing massive data, resulting in low accuracy of search results during data retrieval and inability to quickly retrieve the required data, which reduces the efficiency of data retrieval.
The distributed storage module is used to mark the data structure characteristics, generate distributed storage nodes, and establish associated channels of adjacent nodes through the associated channel module, and match the request characteristics and node characteristics to generate on-off control instructions to control the on-off status of the associated channel. Achieve accurate data interaction.
It improves the data retrieval efficiency of cloud databases, and can accurately and quickly retrieve target feature data from cloud databases, greatly improving the retrieval efficiency.
Smart Images

Figure CN117708202B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information retrieval technology, and more specifically, to a cloud database service system. Background Art
[0002] A cloud database refers to a database that is optimized or deployed in a virtual computing environment. It can achieve advantages such as pay-as-you-go, on-demand expansion, high availability, and storage integration. It is generally divided into relational databases and non-relational databases according to the database type. When retrieving data in a cloud database, the retrieval system searches the database for data related to the query based on the user's query request, calculates the similarity of the information through a certain matching mechanism, and converts and outputs the information in a certain order.
[0003] The Chinese patent application with the publication number CN106855890A discloses a method for realizing high-performance database final consistency full-text search, which effectively realizes the consistency between the data content in the search engine and the content of the field in the database that needs to be searched for full text, ensures the accuracy of the search process, improves the search efficiency, and completely eliminates and overcomes various problems that may occur in the process of data construction and transmission, and ensures the integrity and accuracy of the data establishment in the database and the search engine. The search engine is completely transparent to the business, and the business does not need to be double-written. It only needs to be written to the database and then returned, which simplifies the data establishment and use process;
[0004] The prior art has the following deficiencies:
[0005] When storing massive amounts of data, the existing cloud database service system does not perform distributed storage based on the characteristic structure of the data. When retrieving data, a large amount of data with different relevance will be retrieved from the cloud database, and there is a lack of measures to match and analyze the large amount of data retrieved with the retrieval request data, resulting in low accuracy of the output data retrieval results, and the inability to accurately and quickly retrieve the required data, reducing the data retrieval efficiency of the cloud database.
[0006] In view of this, the present invention proposes a cloud database service system to solve the above problems. Summary of the invention
[0007] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a cloud database service system, applied to a cloud server, comprising:
[0008] The distributed storage module marks the structural features of the data, distributes and stores the data based on the structural features, and generates distributed storage nodes;
[0009] The associated channel building module collects the channel characteristics of the distributed storage nodes and builds the associated channels of the adjacent distributed storage nodes based on the channel characteristics;
[0010] A request feature recognition module receives the search request data, splits the search request data based on a splitting criterion, and screens out the request features;
[0011] The node identification and selection module marks the node features of the distributed storage nodes, matches the request features with the node features, and selects the target node;
[0012] The on-off control module generates an on-off control instruction based on the target node, and selects a corresponding associated channel based on the on-off control instruction;
[0013] The identification and retrieval module combines the target node and the associated channel to retrieve the target feature data corresponding to the requested feature.
[0014] Furthermore, structural features include structured data, unstructured data, and semi-structured data;
[0015] The labeling methods for structured data, unstructured data, and semi-structured data include:
[0016] Traverse all the data in the cloud database and obtain h data length values, recorded as CD sjh ;
[0017] Set the data length value CD sjh One by one with the preset first length threshold CD yz1 and a preset second length threshold CD yz2 Compare, CD yz1 Smaller than CD yz2 ;
[0018] CD sjh Smaller than CD yz1 The data is marked as structured data;
[0019] CD yz1 Less than or equal to CD sjh , and CD sjh Smaller than CD yz2 The data is marked as semi-structured data;
[0020] CD sjh Greater than or equal to CD yz2 The data is marked as unstructured data.
[0021] Further, the distributed storage nodes include a first distributed storage node, a second distributed storage node and a third distributed storage node;
[0022] The method for generating the first distributed storage node, the second distributed storage node and the third distributed storage node includes:
[0023] Build three nodes with zero capacity;
[0024] The number of structured data, unstructured data, and semi-structured data are counted in turn, and are denoted as LZ1, LZ2, and LZ3 respectively;
[0025] Expand the capacity of the three nodes to the safety capacity corresponding to LZ1, LZ2 and LZ3 respectively;
[0026] The structured data, the unstructured data and the semi-structured data are stored in three nodes respectively, so as to obtain a first distributed storage node, a second distributed storage node and a third distributed storage node.
[0027] Furthermore, channel features include capacity features and width features;
[0028] Methods for obtaining capacity features and width features include:
[0029] comparing the safety capacity of the first distributed storage node, the safety capacity of the second distributed storage node, and the safety capacity of the third distributed storage node;
[0030] The maximum value of the safety capacity is recorded as the capacity characteristic;
[0031] Mark the potential transmission openings of the first distributed storage node, the second distributed storage node, and the third distributed storage node, measure the distance values of two adjacent potential transmission openings, and obtain a first distance value set GLZ1, a second distance value set GLZ2, and a third distance value set GLZ3 respectively;
[0032] The maximum value GLZ in GLZ1 is 1max , the maximum value GLZ in GLZ2 2max and the maximum value of GLZ in GLZ3 3max Make comparisons;
[0033] When GLZ 1max Larger than GLZ 2max and GLZ 3max When GLZ 1max is the width feature;
[0034] When GLZ 2max Larger than GLZ 1max and GLZ 3max When GLZ 2max is the width feature;
[0035] When GLZ 3max Larger than GLZ 1max and GLZ 2max When GLZ 3max is the width feature.
[0036] Furthermore, the method for establishing the associated channel includes:
[0037] Connect two association lines between the first distributed storage node, the second distributed storage node and the third distributed storage node respectively;
[0038] Taking two potential transmission openings as a group of selection points, two groups of selection points distributed at intervals are selected on the first distributed storage node, the second distributed storage node and the third distributed storage node respectively;
[0039] Adjust the distance values of two potential transmission openings in the two sets of selected points until they are consistent with the distance values corresponding to the width features;
[0040] Connect two groups of selected points on the first distribution storage node, the second distribution storage node and the third distribution storage node in a one-to-one correspondence to obtain a channel skeleton;
[0041] The channel framework is covered with a channel enclosure that can accommodate a safety capacity exceeding the capacity characteristic, and the enclosure is closed to obtain an associated channel.
[0042] Furthermore, the splitting criterion is: the position where the feature appears is the splitting point, and the position where the feature ends is the termination point for one-way orderly splitting;
[0043] The filter methods for request characteristics include:
[0044] The cloud database receives the search request data and pre-cleans the search request data;
[0045] Based on the splitting criteria, the pre-cleaned retrieval request data is split into common features, uncommon features and special features;
[0046] Count the number of uncommon features and special features, denoted as FCJ respectively lz and TS lz ;
[0047] FCJ lz and TS lz Respectively with the preset value YS lz Compare;
[0048] When FCJ lz Greater than YS lz , and TS lz Smaller than YS lz When , the uncommon features are requested features;
[0049] When TS lz Greater than YS lz , and FCJ lz Smaller than YS lz When , the special feature is the request feature;
[0050] When FCJ lzand TS lz Both are greater than YS lz When , the uncommon features or special features randomly selected are all requested features;
[0051] When FCJ lz and TS lz Both are smaller than YS lz When a large number of uncommon features or special features are requested features.
[0052] Further, the node feature includes a first node feature, a second node feature, and a third node feature;
[0053] The marking method of the first node feature, the second node feature and the third node feature includes:
[0054] Divide the data stored in the first distribution storage node into i first features according to the feature type, and count the number of the i first features and the total amount of data in the first distribution storage node;
[0055] Compare the number of i first features with the total amount of data in the first distribution storage node one by one to obtain the proportion values of the i first features;
[0056] The expression of the first feature ratio is:
[0057]
[0058] Where TZ 1zbi is the proportion of the first feature of the i-th element, TZ 1i is the number of the first feature of the i-th element, TZ 1z is the total amount of data of the first distribution storage node;
[0059] TZ 1zbi The first feature corresponding to the maximum value of is marked as the first node feature;
[0060] Divide the data stored in the second distribution storage node into p second features according to the feature type, and count the number of the p second features and the total amount of data in the second distribution storage node;
[0061] Compare the number of the p second features with the total amount of data of the second distribution storage node one by one to obtain the proportion values of the p second features;
[0062] The expression of the second feature ratio is:
[0063]
[0064] Where TZ 2zbp is the pth second feature proportion value, TZ 2p is the number of the pth second feature, TZ 2zThe total amount of data of the second distribution storage node;
[0065] TZ 2zbp The second feature corresponding to the maximum value of is marked as the second node feature;
[0066] Divide the data stored in the third distribution storage node into k third features according to the feature type, and count the number of the k third features and the total amount of data in the third distribution storage node;
[0067] Compare the number of k third features with the total amount of data of the third distribution storage node one by one to obtain the proportion values of the k third features;
[0068] The expression of the third feature ratio is:
[0069]
[0070] Where TZ 3zbk is the kth third feature proportion value, TZ 3p is the number of the kth third feature, TZ 3z The total amount of data of the third distribution storage node;
[0071] TZ 3zbk The third feature corresponding to the maximum value is marked as the third node feature.
[0072] Furthermore, the target node selection method includes:
[0073] Identify request features and obtain request semantics through natural language processing technology;
[0074] Identify the first node feature through natural language processing technology to obtain m first semantics to be identified;
[0075] Count the number of m first semantics to be recognized to obtain a first quantity value set, which is recorded as SLZ1;
[0076] Set the maximum value of SLZ1 to SLZ 1max The corresponding first semantics to be recognized is recorded as the first node semantics;
[0077] Identify the second node feature by natural language processing technology to obtain n second semantics to be identified;
[0078] Count the number of n second semantics to be recognized to obtain a second quantity value set, which is recorded as SLZ2;
[0079] Set the maximum value of SLZ2 to SLZ 2max The corresponding second semantics to be identified is recorded as the second node semantics;
[0080] Identify the third node features through natural language processing technology to obtain q third semantics to be identified;
[0081] Count the number of q third semantics to be recognized and obtain the third quantity value set, recorded as SLZ 3q ;
[0082] SLZ 3q The maximum value of SLZ 3max The corresponding third semantics to be identified is recorded as the third node semantics;
[0083] Compare SLZ 1max , SLZ 2max and SLZ 3max ;
[0084] When SLZ 1max Larger than SLZ 2max and SLZ 3max , then the first distributed storage node is the target node;
[0085] When SLZ 2max Larger than SLZ 1max and SLZ 3max , then the second distributed storage node is the target node;
[0086] When SLZ 3max Larger than SLZ 1max and SLZ 2max , then the third distributed storage node is the target node;
[0087] When SLZ 1max , SLZ 2max and SLZ 3max If the sizes are the same, one of the first distributed storage node, the second distributed storage node or the third distributed storage node is randomly selected as the target node;
[0088] When SLZ 1max Equal to SLZ 2max And greater than SLZ 3max , then randomly select the first distribution storage node or the second distribution storage node as the target node;
[0089] When SLZ 2max Equal to SLZ 3max And greater than SLZ 1max , then randomly select the second distribution storage node or the third distribution storage node as the target node;
[0090] When SLZ 1max Equal to SLZ 3max And greater than SLZ 2max , the first distribution storage node or the third distribution storage node is randomly selected as the target node.
[0091] Further, the on-off control instruction includes an instruction to turn on one associated channel, an instruction to turn on two associated channels, and an instruction to turn on all associated channels;
[0092] The generation method of the instruction of turning on one associated channel, the instruction of turning on two associated channels and the instruction of turning on all associated channels includes:
[0093] When the target node is the first distributed storage node, generating a connection instruction for an associated channel;
[0094] When the target node is the second distributed storage node, an instruction to turn on two associated channels is generated:
[0095] When the target node is the third distributed storage node, generating a command to turn on all associated channels;
[0096] The methods for selecting associated channels include:
[0097] When the on-off control instruction is an instruction to turn on an associated channel, the associated channel between the first distribution storage node and the third distribution storage node is turned on;
[0098] When the on-off control instruction is an instruction to turn on two associated channels, the associated channel between the first distribution storage node and the second distribution storage node is turned on, and the associated channel between the second distribution storage node and the third distribution storage node is turned on:
[0099] When the on-off control instruction is an instruction to turn on all associated channels, all associated channels between the first distribution storage node, the second distribution storage node and the third distribution storage node are turned on.
[0100] Furthermore, the target feature data retrieval method includes:
[0101] When the target node is the first distribution storage node, and the association channel between the first distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the first distribution storage node;
[0102] When all target feature data corresponding to the request feature in the first distribution storage node is retrieved, then the target feature data corresponding to the request feature is retrieved in the third distribution storage node until all target feature data is retrieved;
[0103] When the target node is the second distribution storage node, and the association channel between the first distribution storage node and the second distribution storage node is connected, and the association channel between the second distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the second distribution storage node;
[0104] When all target feature data corresponding to the request feature in the second distribution storage node are retrieved, then the target feature data corresponding to the request feature is retrieved in the first distribution storage node;
[0105] When the target feature data corresponding to the request feature in the first distribution storage node is completely retrieved, the target feature data corresponding to the request feature is finally retrieved in the third distribution storage node until the target feature data is completely retrieved;
[0106] When the target node is the third distribution storage node, and the associated channels among the first distribution storage node, the second distribution storage node and the third distribution storage node are all connected, firstly, the target feature data corresponding to the request feature is retrieved in the third distribution storage node;
[0107] When the target feature data corresponding to the request feature in the third distribution storage node is completely retrieved, the first distribution storage node or the second distribution storage node is randomly selected to retrieve the target feature data until the target feature data is completely retrieved.
[0108] Technical effects and advantages of the cloud database service system of the present invention:
[0109] The present invention distributes and stores the data based on the structural features by marking the structural features of the data, generates distributed storage nodes, collects channel features of the distributed storage nodes, establishes associated channels of adjacent distributed storage nodes based on the channel features, receives retrieval request data, splits the retrieval request data based on a splitting criterion, screens out the request features, marks the node features of the distributed storage nodes, matches the request features with the node features, selects the target node, generates an on-off control instruction based on the target node, selects the corresponding associated channel based on the on-off control instruction, and retrieves the target feature data corresponding to the request feature in combination with the target node and the associated channel; compared with the prior art, the data in the cloud database can be distributed and stored in different distributed storage nodes, and associated channels can be established between the distributed storage nodes for data interaction, and the identified request features can be matched with the node features at the same time, so that the best distributed storage node can be accurately and quickly screened out, and the on-off control instruction of the associated channel can be formulated, and the on-off state of the associated channel can be controlled during data retrieval, so as to achieve the interactive on-off control effect of data between adjacent distributed storage nodes, and then the target feature data can be accurately and efficiently retrieved from the cloud database, which greatly improves the data retrieval efficiency of the cloud database. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] Figure 1 A schematic diagram of a cloud database service system provided by Embodiment 1 of the present invention;
[0111] Figure 2A flowchart of a cloud database service method provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0112] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0113] Example 1: Please refer to Figure 1 As shown, the cloud database service system described in this embodiment is applied to a cloud server and includes:
[0114] The distributed storage module marks the structural features of the data, distributes and stores the data based on the structural features, and generates distributed storage nodes;
[0115] Structural features refer to the characteristic distinguishing points of data of different structural types, which are used to represent data of different structural types, thereby improving data retrieval efficiency and accuracy when searching for data of different structural types in the future;
[0116] Structural features include structured data, unstructured data, and semi-structured data; structured data refers to data that can be stored in a relational database and has a relatively complete set of rules, including table data; unstructured data refers to data that can be stored in a document database and does not have a relatively complete set of rules, including XML data; semi-structured data refers to data between structured data and unstructured data, and can be stored in object storage or file storage;
[0117] The labeling methods for structured data, unstructured data, and semi-structured data include:
[0118] Traverse all the data in the cloud database and obtain h data length values, recorded as CD sjh ;
[0119] Set the data length value CD sjh One by one with the preset first length threshold CD yz1 and a preset second length threshold CD yz2 Compare, CD yz1 Smaller than CD yz2; The preset first length threshold and the preset second length threshold are used as the basis for dividing the data length into three different ranges, so that all data can be within a specific range, and then the data within each range can be distinguished, which is convenient for identifying different structural features; the preset first length threshold and the preset second length threshold are obtained by collecting data length demarcation point values corresponding to a large amount of historical structured data, unstructured data and semi-structured data, and then optimizing the coefficients;
[0120] CD sjh Smaller than CD yz1 The data is marked as structured data;
[0121] CD yz1 Less than or equal to CD sjh , and CD sjh Smaller than CD yz2 The data is marked as semi-structured data;
[0122] CD sjh Greater than or equal to CD yz2 The data is marked as unstructured data;
[0123] Distributed storage nodes refer to distributed node structures that store structured data, unstructured data, and semi-structured data separately. They can store data of different structural types independently, which can ensure the independence of data of different structural types, facilitate fast and accurate data search, and avoid mutual interference between data of different structural types.
[0124] The distributed storage nodes include a first distributed storage node, a second distributed storage node, and a third distributed storage node. The generation method of the first distributed storage node, the second distributed storage node, and the third distributed storage node includes:
[0125] Build three nodes with zero capacity;
[0126] The number of structured data, unstructured data, and semi-structured data are counted in turn, and are denoted as LZ1, LZ2, and LZ3 respectively;
[0127] The capacity of the three nodes is expanded to the safety capacity corresponding to LZ1, LZ2 and LZ3 respectively; the safety capacity is the capacity value of the node under the safe load state. In order to avoid the node being fully loaded or even overloaded, the value of the safety capacity usually needs to be greater than the value corresponding to the data, so as to avoid the phenomenon of full load or even overload caused by incorrect data storage in the node;
[0128] The structured data, the unstructured data and the semi-structured data are stored in three nodes respectively, so as to obtain a first distributed storage node, a second distributed storage node and a third distributed storage node;
[0129] The associated channel building module collects the channel characteristics of the distributed storage nodes and builds the associated channels of the adjacent distributed storage nodes based on the channel characteristics;
[0130] After the first distributed storage node, the second distributed storage node and the third distributed storage node are generated, each distributed storage node reserves a potential channel for data interaction transmission while maintaining relative independence, and by analyzing the channel characteristics of the potential channel, an associated channel can be established between two adjacent distributed storage nodes, thereby realizing data interaction between two adjacent distributed storage nodes;
[0131] Channel characteristics refer to the parameters used to determine the comprehensive correlation performance of the associated channel, which in turn restricts the establishment of the associated channel; channel characteristics include capacity characteristics and width characteristics. The capacity characteristic refers to the maximum safe capacity value of the distributed storage node, and the width characteristic refers to the width value of the potential transmission point of the distributed storage node;
[0132] Methods for obtaining capacity features and width features include:
[0133] comparing the safety capacity of the first distributed storage node, the safety capacity of the second distributed storage node, and the safety capacity of the third distributed storage node;
[0134] The maximum value of the safety capacity is recorded as the capacity feature; since the safety capacity of the first distributed storage node, the safety capacity of the second distributed storage node, and the safety capacity of the third distributed storage node are obtained after the capacity is expanded, their values are not allowed to be consistent in size during the capacity expansion, so there are no two or three cases where the safety capacity of the first distributed storage node, the safety capacity of the second distributed storage node, and the safety capacity of the third distributed storage node are consistent in size;
[0135] Mark the potential transmission openings of the first distributed storage node, the second distributed storage node and the third distributed storage node, measure the distance values of two adjacent potential transmission openings, and obtain the first distance value set GLZ1, the second distance value set GLZ2 and the third distance value set GLZ3 respectively; potential transmission openings refer to the data transmission entrances and exits reserved on the distributed storage nodes. Since the distributed storage nodes need to perform regular or irregular data updates, supplements and deletions, the distributed storage nodes are not completely closed, and a certain number of data transmission entrances and exits will be reserved on the distributed storage nodes to realize data entry and exit and interaction;
[0136] The maximum value GLZ in GLZ1 is 1max , the maximum value GLZ in GLZ2 2max and the maximum value of GLZ in GLZ3 3max Make comparisons;
[0137] When GLZ 1max Larger than GLZ 2max and GLZ 3max When GLZ 1max is the width feature;
[0138] When GLZ 2max Larger than GLZ 1max and GLZ 3max When GLZ 2max is the width feature;
[0139] When GLZ 3max Larger than GLZ 1max and GLZ 2max When GLZ 3max is the width feature;
[0140] By selecting the maximum distance value, it can be ensured that each distributed storage node can maintain smooth data in and out, thereby avoiding congestion and delay in channels with smaller widths when transmitting large amounts of data, ensuring the speed and smoothness of data transmission;
[0141] The association channel refers to the transmission channel used for data interaction between adjacent distributed storage nodes. The data interaction effect between adjacent distributed storage nodes can be achieved through the association channel;
[0142] The methods for establishing an associated channel include:
[0143] Connect two association lines between the first distributed storage node, the second distributed storage node and the third distributed storage node respectively;
[0144] Taking two potential transmission openings as a set of selection points, two sets of selection points with interval distribution are selected on the first distributed storage node, the second distributed storage node and the third distributed storage node respectively; by using the two sets of selection points with interval distribution, it can be ensured that the selection points on each distributed storage node will not be closely distributed, so that there is a certain safety distance between the two sets of selection points, so that the subsequent associated channels can maintain their independence after being established, avoiding interference with data interaction;
[0145] Adjust the distance values of two potential transmission openings in the two sets of selected points until they are consistent with the distance values corresponding to the width features;
[0146] Connect two groups of selection points on the first distribution storage node, the second distribution storage node and the third distribution storage node in a one-to-one correspondence to obtain a channel skeleton;
[0147] Cover the channel frame with a channel enclosure that can accommodate a safety capacity that exceeds the capacity characteristic, and close the enclosure to obtain an associated channel;
[0148] It should be noted that the associated channel is a closed transmission structure composed of a channel skeleton and a channel enclosure. The two ends of the associated channel have two endpoints, and the two endpoints correspond to a potential transmission opening, so as to ensure that the data in the distributed storage nodes can achieve the effect of two-way interactive transmission under the action of the associated channel;
[0149] A request feature recognition module receives the search request data, splits the search request data based on a splitting criterion, and screens out the request features;
[0150] The splitting criteria are rules for feature splitting of retrieval request data. Based on the splitting criteria, it can ensure that the retrieval request data can be quickly and accurately split into the required multiple feature structures, and facilitate the identification and screening of request features;
[0151] The splitting criteria are: the position where the feature appears is the splitting point, and the position where the feature ends is the termination point, and the splitting is done in an orderly manner in one direction;
[0152] Request features refer to the features in the retrieval request data that can interact with the data in the distributed storage nodes. Since the retrieval request data is a comprehensive data with a large amount of data and many feature types, in order to accurately represent the key features in the retrieval request data, the request features need to be identified and screened;
[0153] The filter methods for request characteristics include:
[0154] The cloud database receives the search request data and pre-cleans the search request data; the pre-cleaning is to clean up the duplicate, erroneous and useless data in the search request data, so that the search request data maintains high reliability and integrity;
[0155] Based on the splitting criteria, the pre-cleaned retrieval request data is split into common features, uncommon features and special features; common features are common features in all retrieval request data, which have no impact on data retrieval results; uncommon features are uncommon features in all retrieval request data, which may have an impact on data retrieval results; special features are custom features in retrieval request data, which may have an impact on data retrieval results;
[0156] Count the number of uncommon features and special features, denoted as FCJ respectively lz and TS lz ;
[0157] FCJ lz and TS lz Respectively with the preset value YS lzComparison; The preset value is the numerical basis for judging whether the uncommon value and the special value are within the range of the requested feature. It is also the minimum numerical standard for judging whether the feature is the requested feature. The minimum number of requested features can be limited to improve the recognition accuracy of the requested features. The preset value is obtained by collecting the minimum value corresponding to a large number of historical request features and optimizing the coefficients.
[0158] When FCJ lz Greater than YS lz , and TS lz Smaller than YS lz When , the uncommon features are requested features;
[0159] When TS lz Greater than YS lz , and FCJ lz Smaller than YS lz When , the special feature is the request feature;
[0160] When FCJ lz and TS lz Both are greater than YS lz When , the uncommon features or special features randomly selected are all requested features;
[0161] When FCJ lz and TS lz Both are smaller than YS lz When a large number of uncommon features or special features are requested features;
[0162] It should be noted that, usually, the features corresponding to the request features are uncommon features or special features, which makes the request features unique. However, under certain special data retrieval conditions, the request features may not be unique, so as to achieve a wider range of data retrieval effects and meet customized data retrieval requirements.
[0163] The node identification and selection module marks the node features of the distributed storage nodes, matches the request features with the node features, and selects the target node;
[0164] The node feature is the feature with the largest proportion in each distributed storage node, which can accurately summarize the data type and characteristics of each distributed storage node, so that when the distributed storage node receives the request feature, it can quickly match the request feature, thereby improving the data retrieval rate of retrieving the requested data;
[0165] The node features include a first node feature, a second node feature, and a third node feature. The marking methods of the first node feature, the second node feature, and the third node feature include:
[0166] Divide the data stored in the first distribution storage node into i first features according to the feature type, and count the number of the i first features and the total amount of data in the first distribution storage node; the feature type refers to the form of expression of the data feature, so that the feature can be expressed in open, semi-open and closed forms, wherein the open type of data has no restrictions on data interaction, the semi-open type of data has a certain range of restrictions on data interaction, and the closed type of data has complete restrictions on data interaction;
[0167] Compare the number of i first features with the total amount of data in the first distribution storage node one by one to obtain the proportion values of the i first features;
[0168] The expression of the first feature ratio is:
[0169]
[0170] Where TZ 1zbi is the proportion of the first feature of the i-th element, TZ 1i is the number of the first feature of the i-th element, TZ 1z is the total amount of data of the first distribution storage node;
[0171] TZ 1zbi The first feature corresponding to the maximum value of is marked as the first node feature;
[0172] Divide the data stored in the second distribution storage node into p second features according to the feature type, and count the number of the p second features and the total amount of data in the second distribution storage node;
[0173] Compare the number of the p second features with the total amount of data of the second distribution storage node one by one to obtain the proportion values of the p second features;
[0174] The expression of the second feature ratio is:
[0175]
[0176] Where TZ 2zbp is the pth second feature proportion value, TZ 2p is the number of the pth second feature, TZ 2z The total amount of data of the second distribution storage node;
[0177] TZ 2zbp The second feature corresponding to the maximum value of is marked as the second node feature;
[0178] Divide the data stored in the third distribution storage node into k third features according to the feature type, and count the number of the k third features and the total amount of data in the third distribution storage node;
[0179] Compare the number of k third features with the total amount of data of the third distribution storage node one by one to obtain the proportion values of the k third features;
[0180] The expression of the third feature ratio is:
[0181]
[0182] Where TZ 3zbk is the kth third feature proportion value, TZ 3p is the number of the kth third feature, TZ 3z The total amount of data of the third distribution storage node;
[0183] TZ 3zbk The third feature corresponding to the maximum value of is marked as the third node feature;
[0184] The target node refers to the node feature corresponding to the maximum value of the overlap between the node feature and the request feature, so that the best distributed storage node can be selected from the first distributed storage node, the second distributed storage node and the third distributed storage node for data retrieval according to the request feature;
[0185] The target node selection methods include:
[0186] Identify request features and obtain request semantics through natural language processing technology;
[0187] Identify the first node feature through natural language processing technology to obtain m first semantics to be identified;
[0188] Count the number of m first semantics to be recognized to obtain a first quantity value set, which is recorded as SLZ1;
[0189] Set the maximum value of SLZ1 to SLZ 1max The corresponding first semantics to be recognized is recorded as the first node semantics;
[0190] Identify the second node feature by natural language processing technology to obtain n second semantics to be identified;
[0191] Count the number of n second semantics to be recognized to obtain a second quantity value set, which is recorded as SLZ2;
[0192] Set the maximum value of SLZ2 to SLZ 2max The corresponding second semantics to be identified is recorded as the second node semantics;
[0193] Identify the third node features through natural language processing technology to obtain q third semantics to be identified;
[0194] Count the number of q third semantics to be recognized and obtain the third quantity value set, recorded as SLZ 3q ;
[0195] SLZ 3q The maximum value of SLZ 3max The corresponding third semantics to be identified is recorded as the third node semantics;
[0196] Compare SLZ 1max , SLZ 2max and SLZ 3max ;
[0197] When SLZ 1max Larger than SLZ 2max and SLZ 3max , then the first distributed storage node is the target node;
[0198] When SLZ 2max Larger than SLZ 1max and SLZ 3max , then the second distributed storage node is the target node;
[0199] When SLZ 3max Larger than SLZ 1max and SLZ 2max , then the third distributed storage node is the target node;
[0200] When SLZ 1max , SLZ 2max and SLZ 3max If the sizes are the same, one of the first distributed storage node, the second distributed storage node or the third distributed storage node is randomly selected as the target node;
[0201] When SLZ 1max Equal to SLZ 2max And greater than SLZ 3max , then randomly select the first distribution storage node or the second distribution storage node as the target node;
[0202] When SLZ 2max Equal to SLZ 3max And greater than SLZ 1max , then randomly select the second distribution storage node or the third distribution storage node as the target node;
[0203] When SLZ 1max Equal to SLZ 3max And greater than SLZ 2max , then randomly select the first distribution storage node or the third distribution storage node as the target node;
[0204] It should be noted that, in actual situations, since the data in the cloud database is in a state of continuous updating and flow, the first quantity value of the first node semantics, the second quantity value of the second node semantics, and the third quantity value of the third node semantics will not have two or three identical values. Only when the cloud database is closed and non-interactive, it is possible for multiple values to have the same size.
[0205] The on-off control module generates an on-off control instruction based on the target node, and selects a corresponding associated channel based on the on-off control instruction;
[0206] The on-off control instruction refers to the on-off instruction used to control the data transmission channel in the associated channel. The associated channel can be turned on and off by the control instruction, thereby achieving the on-off effect of data transmission between adjacent distributed storage nodes;
[0207] The on-off control instructions include an instruction to turn on one associated channel, an instruction to turn on two associated channels, and an instruction to turn on all associated channels;
[0208] The generation method of the instruction of turning on one associated channel, the instruction of turning on two associated channels and the instruction of turning on all associated channels includes:
[0209] When the target node is the first distributed storage node, it means that the data in the first distributed storage node is the data retrieved by the request feature. At this time, the retrieved data corresponding to the request feature is structured data, and an associated channel instruction is generated;
[0210] When the target node is the second distributed storage node, it means that the data in the second distributed storage node is the data retrieved by the request feature. At this time, the retrieved data corresponding to the request feature is unstructured data, and an instruction to connect two associated channels is generated:
[0211] When the target node is the third distributed storage node, it means that the data in the third distributed storage node is the data retrieved by the request feature. At this time, the retrieved data corresponding to the request feature is semi-structured data, and the instruction to turn on all associated channels is generated:
[0212] It should be noted that since there are three associated channels, when the on-off control instruction is generated, if the number of associated channels to be on and off does not match the number of associated channels, it is necessary to select the associated channels corresponding to the on-off control instruction one by one;
[0213] The methods for selecting associated channels include:
[0214] When the on-off control instruction is an instruction to turn on an associated channel, the associated channel between the first distribution storage node and the third distribution storage node is turned on;
[0215] When the on-off control instruction is an instruction to turn on two associated channels, the associated channel between the first distribution storage node and the second distribution storage node is turned on, and the associated channel between the second distribution storage node and the third distribution storage node is turned on:
[0216] When the on-off control instruction is an instruction to turn on all associated channels, all associated channels between the first distribution storage node, the second distribution storage node and the third distribution storage node are turned on;
[0217] The identification and retrieval module combines the target node and the associated channel to retrieve the target feature data corresponding to the requested feature;
[0218] The target characteristic data refers to the data in the distributed storage node that is adapted to the request characteristic. The target characteristic data may exist in one distributed storage node or in multiple distributed storage nodes, and needs to be retrieved accordingly according to the on / off status of the associated channel;
[0219] The retrieval methods of target feature data include:
[0220] When the target node is the first distribution storage node, and the association channel between the first distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the first distribution storage node;
[0221] When all target feature data corresponding to the request feature in the first distribution storage node is retrieved, then the target feature data corresponding to the request feature is retrieved in the third distribution storage node until all target feature data is retrieved;
[0222] When the target node is the second distribution storage node, and the association channel between the first distribution storage node and the second distribution storage node is connected, and the association channel between the second distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the second distribution storage node;
[0223] When all target feature data corresponding to the request feature in the second distribution storage node are retrieved, then the target feature data corresponding to the request feature is retrieved in the first distribution storage node;
[0224] When the target feature data corresponding to the request feature in the first distribution storage node is completely retrieved, the target feature data corresponding to the request feature is finally retrieved in the third distribution storage node until the target feature data is completely retrieved;
[0225] When the target node is the third distribution storage node, and the associated channels among the first distribution storage node, the second distribution storage node and the third distribution storage node are all connected, firstly, the target feature data corresponding to the request feature is retrieved in the third distribution storage node;
[0226] When all target feature data corresponding to the request feature in the third distribution storage node are retrieved, the first distribution storage node or the second distribution storage node is randomly selected to retrieve the target feature data until all target feature data are retrieved;
[0227] In this embodiment, by marking the structural features of the data, the data is distributed and stored based on the structural features, a distributed storage node is generated, the channel features of the distributed storage nodes are collected, and the associated channels of adjacent distributed storage nodes are established based on the channel features, the retrieval request data is received, the retrieval request data is split based on the splitting criteria, the request features are screened out, the node features of the distributed storage nodes are marked, the request features are matched with the node features, the target node is selected, and an on-off control instruction is generated based on the target node. Based on the on-off control instruction, the corresponding associated channel is selected, and the target feature data corresponding to the request feature is retrieved in combination with the target node and the associated channel; compared with the prior art, the data in the cloud database can be distributed and stored in different distributed storage nodes, and associated channels can be established between the distributed storage nodes for data interaction, and the identified request features can be matched with the node features, so that the best distributed storage node can be accurately and quickly screened out, and the on-off control instruction of the associated channel can be formulated, and the on-off state of the associated channel can be controlled during data retrieval, so as to achieve the interactive on-off control effect of data between adjacent distributed storage nodes, and then the target feature data can be accurately and efficiently retrieved from the cloud database, which greatly improves the data retrieval efficiency of the cloud database.
[0228] Example 2: Please refer to Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, and a cloud database service method is provided, which is applied to a cloud server and implemented based on a cloud database service system, including:
[0229] S1: Mark the structural features of the data, distribute and store the data based on the structural features, and generate distributed storage nodes;
[0230] S2: Collect channel features of distributed storage nodes, and establish associated channels of adjacent distributed storage nodes based on the channel features;
[0231] S3: receiving the search request data, splitting the search request data based on the splitting criteria, and filtering out the request features;
[0232] S4: mark the node features of the distributed storage nodes, match the request features with the node features, and select the target node;
[0233] S5: Generate an on / off control instruction based on the target node, and select a corresponding associated channel based on the on / off control instruction;
[0234] S6: Retrieve target feature data corresponding to the requested feature by combining the target node and the associated channel.
[0235] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. Cloud database service system, applied to cloud server, characterized in that: include: The distributed storage module marks the structural features of the data, distributes and stores the data based on the structural features, and generates distributed storage nodes; Structural features include structured data, unstructured data, and semi-structured data; The labeling methods for structured data, unstructured data, and semi-structured data include: Traverse all the data in the cloud database and obtain h data length values, recorded as CD sjh ; Set the data length value CD sjh One by one with the preset first length threshold CD yz1 and a preset second length threshold CD yz2 Compare, CD yz1 Smaller than CD yz2 ; CD sjh Smaller than CD yz1 The data is marked as structured data; CD yz1 Less than or equal to CD sjh , and CD sjh Smaller than CD yz2 The data is marked as semi-structured data; CD sjh Greater than or equal to CD yz2 The data is marked as unstructured data; The distributed storage nodes include a first distributed storage node, a second distributed storage node and a third distributed storage node; The method for generating the first distributed storage node, the second distributed storage node and the third distributed storage node includes: Build three nodes with zero capacity; The number of structured data, unstructured data, and semi-structured data are counted in turn, and are denoted as LZ1, LZ2, and LZ3 respectively; The capacities of the three nodes are expanded to the safety capacities corresponding to LZ1, LZ2 and LZ3 respectively; the structured data, the unstructured data and the semi-structured data are stored in the three nodes respectively, and the first distributed storage node, the second distributed storage node and the third distributed storage node are obtained; The associated channel building module collects the channel characteristics of the distributed storage nodes and builds the associated channels of the adjacent distributed storage nodes based on the channel characteristics; Channel characteristics include capacity characteristics and width characteristics; Methods for obtaining capacity features and width features include: comparing the safety capacity of the first distributed storage node, the safety capacity of the second distributed storage node, and the safety capacity of the third distributed storage node; The maximum value of the safety capacity is recorded as the capacity characteristic; Mark the potential transmission openings of the first distributed storage node, the second distributed storage node, and the third distributed storage node, measure the distance values of two adjacent potential transmission openings, and obtain a first distance value set GLZ1, a second distance value set GLZ2, and a third distance value set GLZ3 respectively; Set the maximum value CLZ in GLZ1 to 1max , the maximum value GLZ in GLZ2 2max and the maximum value of GLZ in GLZ3 3max Make comparisons; When GLZ 1max Larger than GLZ 2max and GLZ 3max When GLZ 1max is the width feature; When GLZ 2max Larger than GLZ 1max and GLZ 3max When GLZ 2max is the width feature; When GLZ 3max Larger than GLZ 1max and GLZ 2max When GLZ 3max is the width feature; A request feature recognition module receives the search request data, splits the search request data based on a splitting criterion, and screens out the request features; The splitting criteria are: the position where the feature appears is the splitting point, and the position where the feature ends is the termination point, and the splitting is done in an orderly manner in one direction; The filter methods for request characteristics include: The cloud database receives the search request data and pre-cleans the search request data; Based on the splitting criteria, the pre-cleaned retrieval request data is split into common features, uncommon features and special features; Count the number of uncommon features and special features, denoted as FCJ respectively lz and TS lz ; FCJ lz and TS lz Respectively with the preset value YS lz Compare; When FCJ lz Greater than YS lz , and TS lz Smaller than YS lz When , the uncommon features are requested features; When TS lz Greater than YS lz , and FCJ lz Smaller than YS lz When , the special feature is the request feature; When FCJ lz and TS lz Both are greater than YS lz When , the uncommon features or special features randomly selected are all requested features; When FCJ lz and TS lz Both are smaller than YS lz When a large number of uncommon features or special features are requested features; The node identification and selection module marks the node features of the distributed storage nodes, matches the request features with the node features, and selects the target node; The node features include a first node feature, a second node feature and a third node feature; The marking method of the first node feature, the second node feature and the third node feature includes: Divide the data stored in the first distribution storage node into i first features according to the feature type, and count the number of the i first features and the total amount of data in the first distribution storage node; Compare the number of i first features with the total amount of data in the first distribution storage node one by one to obtain the proportion values of the i first features; The expression of the first feature ratio is: Where TZ 1zbi is the proportion of the first feature of the i-th element, TZ 1i is the number of the first feature of the i-th element, TZ 1z is the total amount of data of the first distribution storage node; TZ 1zbi The first feature corresponding to the maximum value of is marked as the first node feature; Divide the data stored in the second distribution storage node into p second features according to the feature type, and count the number of the p second features and the total amount of data in the second distribution storage node; Compare the number of the p second features with the total amount of data of the second distribution storage node one by one to obtain the proportion values of the p second features; The expression of the second feature ratio is: Where TZ 2zbp is the pth second feature proportion value, TZ 2p is the number of the pth second feature, TZ 2z The total amount of data of the second distribution storage node; TZ 2zbp The second feature corresponding to the maximum value of is marked as the second node feature; Divide the data stored in the third distribution storage node into k third features according to the feature type, and count the number of the k third features and the total amount of data in the third distribution storage node; Compare the number of k third features with the total amount of data of the third distribution storage node one by one to obtain the proportion values of the k third features; The expression of the third feature ratio is: Where TZ 3zbk is the kth third feature proportion, TZ 3p is the number of the kth third feature, TZ 3z The total amount of data of the third distribution storage node; TZ 3zbk The third feature corresponding to the maximum value of is marked as the third node feature; The on-off control module generates an on-off control instruction based on the target node, and selects a corresponding associated channel based on the on-off control instruction; The identification and retrieval module combines the target node and the associated channel to retrieve the target feature data corresponding to the requested feature.
2. The cloud database service system according to claim 1, characterized in that: The method for establishing the associated channel includes: Connect two association lines between the first distributed storage node, the second distributed storage node and the third distributed storage node respectively; Taking two potential transmission openings as a group of selection points, two groups of selection points distributed at intervals are selected on the first distributed storage node, the second distributed storage node and the third distributed storage node respectively; Adjust the distance values of two potential transmission openings in the two sets of selected points until they are consistent with the distance values corresponding to the width features; Connect two groups of selection points on the first distribution storage node, the second distribution storage node and the third distribution storage node in a one-to-one correspondence to obtain a channel skeleton; The channel framework is covered with a channel enclosure that can accommodate a safety capacity exceeding the capacity characteristic, and the enclosure is closed to obtain an associated channel.
3. The cloud database service system according to claim 2, characterized in that: The method for selecting the target node includes: Identify request features and obtain request semantics through natural language processing technology; Identify the first node feature through natural language processing technology to obtain m first semantics to be identified; Count the number of m first semantics to be recognized to obtain a first quantity value set, which is recorded as SLZ1; Set the maximum value of SLZ1 to SLZ 1max The corresponding first semantics to be recognized is recorded as the first node semantics; Identify the second node feature by natural language processing technology to obtain n second semantics to be identified; Count the number of n second semantics to be recognized to obtain a second quantity value set, which is recorded as SLZ2; Set the maximum value of SLZ2 to SLZ 2max The corresponding second semantics to be identified is recorded as the second node semantics; Identify the third node features through natural language processing technology to obtain q third semantics to be identified; Count the number of q third semantics to be recognized and obtain the third quantity value set, recorded as SLZ 3q ; SLZ 3q The maximum value of SLZ 3max The corresponding third semantics to be identified is recorded as the third node semantics; Compare SLZ 1max , SLZ 2max and SLZ 3max ; When SLZ 1max Larger than SLZ 2max and SLZ 3max , then the first distributed storage node is the target node; When SLZ 2max Larger than SLZ 1max and SLZ 3max , then the second distributed storage node is the target node; When SLZ 3max Larger than SLZ 1max and SLZ 2max , then the third distributed storage node is the target node; When SLZ 1max , SLZ 2max and SLZ 3max If the sizes are the same, one of the first distributed storage node, the second distributed storage node or the third distributed storage node is randomly selected as the target node; When SLZ 1max Equal to SLZ 2max And greater than SLZ 3max , then randomly select the first distribution storage node or the second distribution storage node as the target node; When SLZ 2max Equal to SLZ 3max And greater than SLZ 1max , then randomly select the second distribution storage node or the third distribution storage node as the target node; When SLZ 1max Equal to SLZ 3max And greater than SLZ 2max , the first distribution storage node or the third distribution storage node is randomly selected as the target node.
4. The cloud database service system according to claim 3, characterized in that: The on-off control instructions include an instruction to turn on one associated channel, an instruction to turn on two associated channels, and an instruction to turn on all associated channels; The generation method of the instruction of turning on one associated channel, the instruction of turning on two associated channels and the instruction of turning on all associated channels includes: When the target node is the first distributed storage node, generating a connection instruction for an associated channel; When the target node is the second distributed storage node, an instruction to turn on two associated channels is generated: When the target node is the third distributed storage node, generating a command to turn on all associated channels; The methods for selecting associated channels include: When the on-off control instruction is an instruction to turn on an associated channel, the associated channel between the first distribution storage node and the third distribution storage node is turned on; When the on-off control instruction is an instruction to turn on two associated channels, the associated channel between the first distribution storage node and the second distribution storage node is turned on, and the associated channel between the second distribution storage node and the third distribution storage node is turned on: When the on-off control instruction is an instruction to turn on all associated channels, all associated channels between the first distribution storage node, the second distribution storage node and the third distribution storage node are turned on.
5. The cloud database service system according to claim 4, characterized in that: The method for retrieving the target feature data comprises: When the target node is the first distribution storage node, and the association channel between the first distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the first distribution storage node; When all target feature data corresponding to the request feature in the first distribution storage node is retrieved, then the target feature data corresponding to the request feature is retrieved in the third distribution storage node until all target feature data is retrieved; When the target node is the second distribution storage node, and the association channel between the first distribution storage node and the second distribution storage node is connected, and the association channel between the second distribution storage node and the third distribution storage node is connected, firstly, the target feature data corresponding to the request feature is retrieved in the second distribution storage node; When all target feature data corresponding to the request feature in the second distribution storage node are retrieved, then the target feature data corresponding to the request feature is retrieved in the first distribution storage node; When the target feature data corresponding to the request feature in the first distribution storage node is completely retrieved, the target feature data corresponding to the request feature is finally retrieved in the third distribution storage node until the target feature data is completely retrieved; When the target node is the third distribution storage node, and the associated channels among the first distribution storage node, the second distribution storage node and the third distribution storage node are all connected, firstly, the target feature data corresponding to the request feature is retrieved in the third distribution storage node; When the target feature data corresponding to the request feature in the third distribution storage node is completely retrieved, the first distribution storage node or the second distribution storage node is randomly selected to retrieve the target feature data until the target feature data is completely retrieved.
