CN109033347A - A kind of real-time quick collision method of multidate information based on red black tree - Google Patents

A kind of real-time quick collision method of multidate information based on red black tree Download PDF

Info

Publication number
CN109033347A
CN109033347A CN201810823084.7A CN201810823084A CN109033347A CN 109033347 A CN109033347 A CN 109033347A CN 201810823084 A CN201810823084 A CN 201810823084A CN 109033347 A CN109033347 A CN 109033347A
Authority
CN
China
Prior art keywords
black tree
red black
multidate information
real
data
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.)
Pending
Application number
CN201810823084.7A
Other languages
Chinese (zh)
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.)
Guangzhou University
Original Assignee
Guangzhou University
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 Guangzhou University filed Critical Guangzhou University
Priority to CN201810823084.7A priority Critical patent/CN109033347A/en
Publication of CN109033347A publication Critical patent/CN109033347A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of real-time quick collision methods of the multidate information based on red black tree, comprising: operation system extracts target data from emphasis data, and after establishing red black tree using several target datas, obtains multidate information in several data sources;The multidate information and the red black tree are carried out after colliding real-time, quickly, judge the collision result of the multidate information Yu the red black tree.Using the present invention, the real-time quick collision of multi-source multidate information may be implemented, improve the real-time processing speed of multidate information significantly, and save memory headroom for operation system.

Description

A kind of real-time quick collision method of multidate information based on red black tree
Technical field
The present invention relates to software technology field more particularly to a kind of multidate information based on the red black tree sides of collision real-time, quickly Method.
Background technique
There are a large amount of emphasis data of a batch with the high speed development of software systems, in operation system, in emphasis data The generated data in other different data sources of main body representated by indication field are referred to as multidate information, therefore, dynamic Information has multiple and different data sources.And emphasis data and multidate information have identical indication field, such as ID card No. Deng.Whenever there are a large amount of new multidate informations to generate, multidate information and emphasis data is needed to carry out data collision real-time, quickly, See in multidate information whether include emphasis data, so that operation system can make corresponding processing in real time.
In the prior art, it generallys use based on operation provided by data base management system, to realize the fast of multidate information Speed processing.But database has stringent theoretical basis, needs to have data base optimization adequately grasp to be just able to achieve efficiently Data manipulation, otherwise will cause exploitation for convenience and lose the performance of data processing.Meanwhile being based on data base administration system Operation provided by system inevitably depends on the performance of data base management system to realize, therefore, multidate information processing Real-time is difficult to be guaranteed.
Summary of the invention
The present invention proposes a kind of real-time quick collision method of the multidate information based on red black tree, for overcoming existing dynamic to believe The efficiency that breath real-time collision technology is handled in speed is not high enough, and the problem of being guaranteed is being difficult in real-time.
The embodiment of the present invention provides a kind of real-time quick collision method of the multidate information based on red black tree, comprising: from first N number of target data is extracted in emphasis data;N≥1;
Red black tree is established using N number of target data;
Multidate information is obtained in several data sources, by the second emphasis data and the red black tree in the multidate information It is collided real-time, quickly;
Obtain the collision result of the multidate information Yu the red black tree.
Further, N number of target data is extracted from the first emphasis data, specifically:
N number of first indication field is provided in the first emphasis data, and N number of first indication field is for indicating N number of target data;
By inquiring N number of first indication field, N number of target data is extracted from the first emphasis data.
Further, red black tree is established using N number of target data, specifically:
N number of target data is successively obtained, using the equilibrium response of the red black tree, sequentially generates N number of destination node, And according to N number of destination node, the red black tree is established;
After completing the red black tree foundation, the red black tree is stored.
Further, multidate information is obtained in several data sources, specifically:
By establishing view in internal database, it is mapped to several data sources;
By carrying out one query to the internal database, while obtaining the several described of several data sources generations Multidate information.
Further, the second emphasis data in the multidate information are collided real-time, quickly with the red black tree, Specifically:
By periodically triggering the read operation of the multidate information, make the second emphasis data in the multidate information It is collided real-time, quickly with the red black tree.
Further, judge the collision of the multidate information and the red black tree as a result, specifically:
The second emphasis data are provided with M the second indication fields;M≥1;
Second indication field is traversed into the red black tree, is touched with the destination node in the red black tree It hits;
If second indication field is identical as the destination node in the red black tree, then it represents that collide successfully;
If second indication field and the destination node collide successfully, institute is obtained by second indication field The second emphasis data in multidate information are stated, follow-up business processing is carried out.
The real-time quick collision method of a kind of multidate information based on red black tree provided in an embodiment of the present invention, it is red by creating Black tree collides multidate information real-time, quickly with red black tree, and the creation of red black tree is carried out using target data, saves Memory headroom shared by red black tree.Using the present invention, the real-time processing speed of multidate information can be improved significantly, and is business System saves memory headroom.
Detailed description of the invention
Fig. 1 is a kind of one embodiment of the real-time quick collision method of multidate information based on red black tree provided by the invention Flow diagram;
Fig. 2 is the flow diagram of one embodiment of step S102 in the embodiment of the present invention;
Fig. 3 is that the structure of one embodiment of the red black tree of building provided by the invention is intended to;
Fig. 4 is the process signal of one embodiment that operation system provided by the invention obtains multidate information from data source Figure.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It is one of the real-time quick collision method of a kind of multidate information based on red black tree provided by the invention referring to Fig. 1 The flow diagram of embodiment.Include:
S101 extracts N number of target data, N >=1 from the first emphasis data.
Specifically, there are a collection of first emphasis data in operation system.N number of first mark is provided in first emphasis data Field, indication field point data of attaching most importance to provide mark, such as ID card No. etc. be used to indicate corresponding first emphasis number According to.By inquiring N number of first indication field, N number of indication field is extracted from the first emphasis data as target data.
It should be noted that N is positive integer.
S102 establishes red black tree using N number of target data.
S103 obtains multidate information in several data sources.
S104 is collided the second emphasis data in multidate information with red black tree real-time, quickly.
Specifically, including timer in operation system, which leads to the read operation for periodically triggering multidate information, Using the equilibrium response of red black tree, collide multidate information real-time, quickly with red black tree.
S105 obtains the collision result of multidate information and red black tree.
Specifically, the second emphasis data in multidate information are provided with M the second indication fields;M≥1.Wherein M is positive whole Number.Second indication field is traversed the destination node in red black tree, with red black tree to be collided.If the second indication field and red and black All destination nodes in tree are different, then collide and fail, and determine do not have in need the in the multidate information comprising the corresponding data Double point data;If the second indication field is identical as the destination node in red black tree, then it represents that collide successfully.
If the second indication field and target data are collided successfully, the in multidate information is obtained by the second indication field Double point data carries out follow-up business processing.
It further, referring to fig. 2, is the flow diagram of one embodiment of step S102 in the embodiment of the present invention.Packet It includes:
S201 successively obtains N number of target data.
S202 sequentially generates N number of destination node using the equilibrium response of red black tree.
S203 establishes red black tree according to N number of destination node.
S203 stores red black tree after completing red black tree foundation.
It should be noted that N is positive integer.
It further, is that the structure of one embodiment of the red black tree of building provided by the invention is intended to referring to Fig. 3.Knot It closes shown in Fig. 2 and Fig. 3, during the creation of red black tree, when being inserted into new destination node to red black tree, passes through changing section The color of destination node and the pointer of changing section destination node are directed toward to restore the balance of red black tree.What pointer was directed toward changes Flexible overwinding transfers realization, and when carrying out anticlockwise to x, it is not empty any that x, which can be right child's destination node in red black tree, Destination node.Anticlockwise makes root object node of the y as current subtree, and x becomes left child's destination node of y, a left side of y Child's destination node becomes right child's destination node of x.
Further, referring to fig. 4, it is a reality that operation system provided by the invention obtains multidate information from data source Apply the flow diagram of example.
Operation system 101 establishes view in internal database 201, and by the View Mapping to several data sources 102.It is logical It crosses and one query is carried out to database 201, the multidate information 202 that several data sources 102 generate can be obtained simultaneously.
The real-time quick collision method of a kind of multidate information based on red black tree provided in an embodiment of the present invention, it is red using utilizing The equilibrium response of black tree completes primary collision within O (log2n) time, and passes through the periodicity of timer in operation system Triggering, makes to collide real-time quick progress, and by establishing view, and uses timer, realizes the real-time of multi-source multidate information Fast Collision.In addition, also carrying out the creation of red black tree using target data, memory headroom shared by red black tree is saved.
The above is a preferred embodiment of the present invention, it is noted that for those skilled in the art For, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also considered as Protection scope of the present invention.

Claims (6)

1. a kind of real-time quick collision method of multidate information based on red black tree characterized by comprising
N number of target data is extracted from the first emphasis data;N≥1;
Red black tree is established using N number of target data;
Multidate information is obtained in several data sources, by the second emphasis data and red black tree progress in the multidate information Collision real-time, quickly;
Obtain the collision result of the multidate information Yu the red black tree.
2. the real-time quick collision method of a kind of multidate information based on red black tree according to claim 1, which is characterized in that N number of target data is extracted from the first emphasis data, specifically:
N number of first indication field is provided in the first emphasis data, and N number of first indication field is described for indicating N number of target data;
By inquiring N number of first indication field, N number of target data is extracted from the first emphasis data.
3. the real-time quick collision method of a kind of multidate information based on red black tree according to claim 1, which is characterized in that Red black tree is established using N number of target data, specifically:
N number of target data is successively obtained, using the equilibrium response of the red black tree, sequentially generates N number of destination node, and root According to N number of destination node, the red black tree is established;
After completing the red black tree foundation, the red black tree is stored.
4. the real-time quick collision method of a kind of multidate information based on red black tree according to claim 1, which is characterized in that Multidate information is obtained in several data sources, specifically:
By establishing view in internal database, it is mapped to several data sources;
By carrying out one query to the internal database, while obtaining several dynamics that several data sources generate Information.
5. the real-time quick collision method of a kind of multidate information based on red black tree according to claim 1, which is characterized in that The second emphasis data in the multidate information are collided real-time, quickly with the red black tree, specifically:
By periodically triggering the read operation of the multidate information, make the second emphasis data and institute in the multidate information Red black tree is stated to be collided real-time, quickly.
6. the real-time quick collision method of a kind of multidate information based on red black tree according to claim 3, which is characterized in that Judge the collision of the multidate information and the red black tree as a result, specifically:
The second emphasis data are provided with M the second indication fields;M≥1;
Second indication field is traversed into the red black tree, is collided with the destination node in the red black tree;
If second indication field is identical as the destination node in the red black tree, then it represents that collide successfully;
If second indication field and the destination node collide successfully, obtained by second indication field described dynamic The second emphasis data in state information carry out follow-up business processing.
CN201810823084.7A 2018-07-23 2018-07-23 A kind of real-time quick collision method of multidate information based on red black tree Pending CN109033347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810823084.7A CN109033347A (en) 2018-07-23 2018-07-23 A kind of real-time quick collision method of multidate information based on red black tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810823084.7A CN109033347A (en) 2018-07-23 2018-07-23 A kind of real-time quick collision method of multidate information based on red black tree

Publications (1)

Publication Number Publication Date
CN109033347A true CN109033347A (en) 2018-12-18

Family

ID=64645803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810823084.7A Pending CN109033347A (en) 2018-07-23 2018-07-23 A kind of real-time quick collision method of multidate information based on red black tree

Country Status (1)

Country Link
CN (1) CN109033347A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980497A (en) * 2010-10-20 2011-02-23 北京开心人信息技术有限公司 Method and system for displaying friend trends in classified way
CN102831245A (en) * 2012-09-17 2012-12-19 洛阳翔霏机电科技有限责任公司 Real-time data storage and reading method of relational database
US20160321778A1 (en) * 2015-04-28 2016-11-03 Dell Products, L.P. Rendering graphics using framebuffer nodes with event handler mapping in a binary search tree
CN106383493A (en) * 2016-09-30 2017-02-08 同济大学 Numerical control machine tool real-time anti-collision method
CN106777163A (en) * 2016-12-20 2017-05-31 携程旅游网络技术(上海)有限公司 IP address institute possession querying method and system based on RBTree

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101980497A (en) * 2010-10-20 2011-02-23 北京开心人信息技术有限公司 Method and system for displaying friend trends in classified way
CN102831245A (en) * 2012-09-17 2012-12-19 洛阳翔霏机电科技有限责任公司 Real-time data storage and reading method of relational database
US20160321778A1 (en) * 2015-04-28 2016-11-03 Dell Products, L.P. Rendering graphics using framebuffer nodes with event handler mapping in a binary search tree
CN106383493A (en) * 2016-09-30 2017-02-08 同济大学 Numerical control machine tool real-time anti-collision method
CN106777163A (en) * 2016-12-20 2017-05-31 携程旅游网络技术(上海)有限公司 IP address institute possession querying method and system based on RBTree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
林厚从: "《高级数据结构(C++版)》", 31 May 2017 *

Similar Documents

Publication Publication Date Title
CN103247041B (en) A kind of dividing method of the cloud data of the many geometric properties based on local sampling
CN112069573B (en) City group space simulation method, system and equipment based on cellular automaton
CN109690512A (en) GPU telecommunication with trigger action
CN103514261A (en) Data asynchronization storage and access mechanism applied to industrial control system
CN108645411A (en) Robot path planning method, device based on particle cluster algorithm and terminal device
CN103678705A (en) Vector data concurrent conversion method from VCT file to shapefile file
CN104298541A (en) Data distribution algorithm and data distribution device for cloud storage system
CN103294799B (en) A kind of data parallel batch imports the method and system of read-only inquiry system
CN111310344B (en) Method for considering coupling effect of wind field and fire field in forest fire spreading simulation
CN103337091A (en) Flexible scene continuous collision detection method based on thickness
CN104570077A (en) Method for extracting offset domain common imaging gathers based on reverse time migration
CN113836184A (en) Service persistence method and device
CN106254270A (en) A kind of queue management method and device
CN1987775A (en) Method and apparatus for resolving events
CN106802958A (en) Conversion method and system of the CAD data to GIS data
CN109033347A (en) A kind of real-time quick collision method of multidate information based on red black tree
Tan et al. An agent-based DDM for high level architecture
CN104361215A (en) Monte Carlo fusion reactor repeat processing method based on label information
CN111581306B (en) Driving track simulation method and device
CN108710504A (en) Database operation method and device
CN114282366B (en) Aerial formation and entity two-stage resolution simulation modeling method
CN103235902B (en) Comprise the RNA Structure Prediction Methods of false knot
CN111737237B (en) Missing milepost data generation method, device, equipment and storage medium
CN109000650A (en) Atural object relative position determines method and device
CN101271592A (en) Triangular net cutting and reconstruction method based on AIF

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181218

RJ01 Rejection of invention patent application after publication