CN100470463C - Method for combining and sequencing distributed data - Google Patents

Method for combining and sequencing distributed data Download PDF

Info

Publication number
CN100470463C
CN100470463C CNB031522580A CN03152258A CN100470463C CN 100470463 C CN100470463 C CN 100470463C CN B031522580 A CNB031522580 A CN B031522580A CN 03152258 A CN03152258 A CN 03152258A CN 100470463 C CN100470463 C CN 100470463C
Authority
CN
China
Prior art keywords
data
buffer zone
sequencing
group
ordering
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.)
Expired - Fee Related
Application number
CNB031522580A
Other languages
Chinese (zh)
Other versions
CN1581060A (en
Inventor
王然益
李其桦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Accton Technology Corp
Original Assignee
Accton Technology Corp
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 Accton Technology Corp filed Critical Accton Technology Corp
Priority to CNB031522580A priority Critical patent/CN100470463C/en
Publication of CN1581060A publication Critical patent/CN1581060A/en
Application granted granted Critical
Publication of CN100470463C publication Critical patent/CN100470463C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to a method for merge-sorting distributed data, and said method includes the following steps; according to the user's requirements defining several selected data groups from several data groups, and only fetching data of preset number (for example 40) from every selected data group for every time and recording said data into buffer zone correspondent to every selected data group, then utilizing said invented merge-sorting mode to obtain the data of the number (for example 100) which is required to retrieve by user, in which these data can be sorted in the order from small to large or from large to small or in other class order, so that said invention can greatly reduce storage capacity required for buffer zone, and can effectively shorten the time for merge-sorting distributed data.

Description

The method of sequencing by merging distributed data
Technical field
The present invention relates to the method for a kind of sequencing by merging (Merge Sort) distributed data, relate in particular to a kind of master-slave mode (Master-Slave) device of can be applicable to, and only need the method for sequencing by merging distributed data of the buffer zone (Buffers) of little memory capacity.
Background technology
Along with increasing substantially of network application, more and more need the powerful and network equipment that have a high-reliability of processing power that stable support and running is provided.Wherein, but because the characteristics such as high-reliability, high-level efficiency and elasticity connection that the network equipment of stacking-type has, but so for example stacking-type interchanger (Stackable Switch) but stacking-type hub (Stackable Hub) but stacking-type switching hub (Stackable Switching Hub) but or stacking-type switch router (Stackable Switching Router) but etc. the stacking-type network equipment, be used in various networks widely and build and put, expand or adjust the usefulness of network layout topology (Topology) with convenient network in the future.
But the network equipment of stacking-type is a kind of master-slave mode device, and it is by a main end device and a plurality ofly formed from end device.Main end device and each have a plurality of connectivity ports (Ports) separately from end device, and so as to being connected to a plurality of communication devices, and each communication device all has media interviews control (the Medium Access Control of only one (Unique); MAC) address (Address).Main end device has a main end data group, and each has one from the end data group separately from end device, is connected in the MAC Address of the communication device of its connectivity port in order to record.These MAC Address are recorded in main end data group and a plurality of from the end data group dispersedly, are so-called distributed data.For managerial needs, the user usually must inquire about the MAC Address that is scattered in each connectivity port from end data group and main end data group.
Please refer to Fig. 1, Fig. 1 is the structural representation of its distributed data of master-slave mode device sequencing by merging of prior art.Wherein, the main end data group 102 of main end device 100 can store 8000 MAC Address data recording, and each also can store 8000 MAC Address data recording from end device 120a, 120b and 120c from end data group 122a, 122b and 122c.Usually, main end device 100 can be with the whole output buffers 130 of 8000 MAC Address data recording in the main end data group 102, each also can carry out the step 200 of data output respectively from end device 120a, 120b and 120c, with will be from the whole output buffers 130 of 8000 MAC Address data recording of end data group 122a, 122b and 122c, then, to the step that the data recording in the buffer zone 130 sorts, inquire about for the user.
Yet the memory capacity of above-mentioned buffer zone 130 required uses is quite big.Suppose to have that (n-1) is individual adds a main end data group 102 from end data group 122a, 122b and 122c, and each all has 8000 MAC Address data recording from end data group 122a, 122b and 122c and main end data group 102, and then buffer zone 130 needs to hold the memory capacity of 8000 * n bar MAC Address data recording.Even the user only will take out (Retrieve) for example 1000 MAC Address data recording, buffer zone 130 still need use above-mentioned huge memory capacity.Therefore, cause the increase of cost of manufacture.On the other hand, the mode of existing its distributed data of master-slave mode device sequencing by merging is extremely time-consuming, causes the many inconvenience of user.
In summary, the mode of its distributed data of master-slave mode device sequencing by merging of described prior art on reality is used, obviously exists inconvenience and defective, so be necessary to be improved.
Summary of the invention
At above-mentioned defective, the object of the invention is to provide a kind of method of sequencing by merging distributed data, so as to reducing the memory capacity of the required use of buffer zone significantly, and can shorten the time of sequencing by merging distributed data effectively.
According to above-mentioned purpose, the present invention proposes a kind of method of sequencing by merging distributed data, so as to being applicable to the master-slave mode device, wherein this master-slave mode device comprises the main end device with main end data group at least, with have a plurality of a plurality of from the end data group from end device, and from end device with corresponding in man-to-man mode from the end data group.
According to a preferred embodiment of the present invention, the method for this sequencing by merging distributed data comprises at least: begin to produce the ranking results table; Autonomous end data group and from the end data group, determine a plurality of selected data groups; The step that each selected data group is sorted; Distribute a buffer zone to each selected data group; Carry out the step of first reading of data, to read the data recording that is arranged in top preset number in each selected data group to buffer zone; Article one data recording of each buffer zone is moved on to the ordering scratch list; Carry out the step of mobile data; Carry out the step of pooled data; And the step that repeats this pooled data, wherein, then stop to carry out if the number of the data recording of ranking results table equals the default data number that takes out; If all data recording of these selected data groups have all read finish, then stop to carry out.And the step of this mobile data comprises at least: to the ordering scratch list step of carrying out this ordering; Find out the special buffer zone and the special selected data group in source of article one data recording of ordering scratch list; Article one data recording of ordering scratch list is moved on to the ranking results table; And article one data recording of special buffer zone moved on to the ordering scratch list.The step of pooled data comprises at least: check whether special buffer zone has data recording; If special buffer zone has data recording, then carry out the step of mobile data; And, then carry out the step that second reading is fetched data if special buffer zone does not have data recording, behind the extremely special buffer zone of next group data recording that reads the preset number in the special selected data group, carry out the step of mobile data.
Therefore, use the present invention, when the user will take out the data recording of a default data number that takes out, only read the data recording of the preset number in each selected data group to the pairing buffer zone of each selected data group at every turn, mode by sequencing by merging of the present invention again, just can satisfy user's requirement fully, thereby can reduce the memory capacity of the required use of buffer zone significantly, and shorten the time of sequencing by merging distributed data effectively.
Brief Description Of Drawings
Below in conjunction with accompanying drawing,, will make technical scheme of the present invention and other beneficial effects apparent by detailed description to preferred embodiment of the present invention.
In the accompanying drawing,
Fig. 1 is the structural representation of its distributed data of master-slave mode device sequencing by merging of prior art;
Fig. 2 uses the structural representation of the method for sequencing by merging distributed data of the present invention at the master-slave mode device;
Fig. 3 A to Fig. 3 C is the process flow diagram of the method for sequencing by merging distributed data of the present invention.
Embodiment
Hereinafter, will describe the present invention in detail.
Please refer to Fig. 2, it is to use the method for sequencing by merging distributed data of the present invention in the structural representation of master-slave mode device.To each from end data group 122a, 122b and 122c, and after the step that sorts of main end data group 102, at first, the present invention read respectively each from end data group 122a, 122b and 122c, be arranged in top preset number (for example: 40) data recording is to each from end data group 122a, 122b with the pairing buffer zone 150a of 122c, 150b and 150c (being the step 200 of data output), and read be arranged in top preset number in the main end data group 102 data recording to main end data group 102 pairing buffer zones 152.Wherein Pai Xu step can be according to ascending; Descending or other ordering classification is carried out, for convenience of description for the purpose of, below do explanation with ascending ordering.
Then, article one data recording among buffer zone 152, buffer zone 150a, 150b and the 150c (being minimal data record in each buffer zone) is moved on to an ordering scratch list.
Then, carry out the step of mobile data, the step of this mobile data is: the ordered steps (ascending) that the data recording of ordering in the scratch list carried out; Article one data recording in the scratch list that will sort again (being minimal data record in the total data record) moves on to a ranking results table; And find out the source of this article one data recording: special buffer zone (for example: buffer zone 150a) and special selected data group (for example: from end data group 122a); Then, article one data recording (being time little data recording in the special buffer zone) with special buffer zone moves on to the ordering scratch list.
Then, carry out the step of a pooled data, the step of this pooled data is: check whether special buffer zone still has data recording; If special buffer zone still has data recording, then carry out the step of mobile data, article one data recording in the ordering scratch list after the ordering (being time little data recording in the total data record) is moved on to the ranking results table, and find out the source of this article one data recording: new special buffer zone (for example: buffer zone 150b) and new special selected data group (for example: from end data group 122b); If special buffer zone does not have data recording, then carry out the step that second reading is fetched data, after reading the extremely special buffer zone of 40 data recording of next group (being the step 200 of data output) in the special selected data group, carry out the step of mobile data, article one data recording in the ordering scratch list after the ordering (being time little data recording in the total data record) is moved on to the ranking results table, and find out the source of this article one data recording: new special buffer zone (for example: buffer zone 150b) and new special selected data group (for example: from end data group 122b).
Then, repeat the step of above-mentioned pooled data, equal default up to the number of the data recording of ranking results table and take out () data number for example: 1000; Or, then stop to carry out if all read from all data recording of end data group 122a, 122b and 122c and main end data group 102 and to finish.
Owing at most only simultaneously export 40 MAC Address data recording respectively to its corresponding buffer region 150a, 150b and 150c and buffer zone 152 since end data group 122a, 122b and 122c and main end data group 102, so the employed total memory capacity of above-mentioned buffer zone is 40 * n bar MAC Address data recording.Compare with the method for as shown in Figure 1 prior art, the present invention can reduce significantly and uses memory capacity (being kept to 40 * n bar data recording by 8000 * n data recording bar).
What deserves to be mentioned is that above-mentioned explanation is based on being the selected data group that the user will inquire about from end data group 122a, 122b and 122c and main end data group 102.Yet according to actual needs, the user can determine a plurality of selected data groups earlier in end data group 122a, 122b and 122c and main end data group 102, and then, each selected data group is given in addign a buffer again.So then can further reduce the employed total memory capacity of buffer zone.And this main end data group 102 is arranged in a main end device 100 of a master-slave mode device, and lays respectively at a plurality of from end device 120a, 120b and 120c of this master-slave mode device from end data group 122a, 122b and 122c.But this master-slave mode device can be a stacking-type network equipment, but but but but for example stacking-type interchanger stacking-type hub stacking-type switching hub and stacking-type switch router etc.In addition, the step that determines the selected data group can be undertaken by specifying a plurality of connectivity ports on the master-slave mode device (main end device 100 and from end device 120a, 120b and 120c); Also can carry out with a plurality of connectivity ports of selected master-slave mode device by specifying at least one Virtual Local Area Network (VLAN).
Below will put the flow process of the method for explanation sequencing by merging distributed data of the present invention in order:
Please refer to Fig. 3 A to Fig. 3 C, it is the process flow diagram of the method for sequencing by merging distributed data of the present invention.At first, carry out step 300, to begin to produce a ranking results table.Then, in a plurality of data sets, determine a plurality of selected data groups (step 310).Then, the step (step 320) that each selected data group is sorted, and distribute a buffer zone to each selected data group (step 330).Then, carry out the step 340 of first reading of data, to read the data recording that is positioned at top preset number in each selected data group to its pairing buffer zone.Then, article one data recording of each buffer zone is moved on to ordering scratch list (step 350), and carry out the step (step 360) of mobile data, wherein the step of mobile data comprises at least: to ordering scratch list sort (step 362); Find out the special buffer zone and the special selected data group (step 364) in source of article one data recording of ordering scratch list; Article one data recording of ordering scratch list is moved on to ranking results table (step 366); And article one data recording of special buffer zone moved on to ordering scratch list (step 368).
Then, check whether the number of the data recording of ranking results table equals the default data number (step 370) that takes out, if the result of step 370 is for being then to stop execution (step 400); If the result of step 370 checks then for not whether all data recording of selected data group have all read finish (step 380), if the result of step 380 is for being then to stop execution (step 400); If the result of step 380 then carries out the step 390 of pooled data for not, wherein the step 390 of pooled data comprises at least: check whether special buffer zone has data recording (step 392); If the result of step 392 is for being then to carry out the step 360 of mobile data; If the result of step 392 then carries out the step 394 that second reading is fetched data for not, behind the extremely special buffer zone of next group data recording that reads the preset number in the special selected data group, carry out the step 360 of mobile data.Then, repeating step 370, step 380 and step 390.
By the invention described above preferred embodiment as can be known, using advantage of the present invention is: can reduce the memory capacity of the required use of buffer zone significantly, and shorten the time of sequencing by merging distributed data effectively.Thereby the reduction cost of manufacture, improve service efficiency.
Be understandable that; for the person of ordinary skill of the art; can make other various corresponding changes and distortion according to technical scheme of the present invention and technical conceive, and all these changes and distortion all should belong to the protection domain of accompanying Claim of the present invention.

Claims (10)

1. the method for a sequencing by merging distributed data is characterized in that, comprises at least:
Begin to produce a ranking results table;
In a plurality of data sets, determine a plurality of selected data groups;
Each described selected data group is carried out the step of an ordering;
Distribute a buffer zone to each described selected data group;
Carry out the step of one first reading of data, to read the data recording that is positioned at a top preset number in each described selected data group to this buffer zone;
One article one data recording of this buffer zone of each described selected data group is moved on to an ordering scratch list;
Carry out the step of a mobile data, wherein the step of this mobile data comprises at least:
The step that this ordering scratch list is carried out this ordering;
Find out a special buffer zone and a special selected data group in source of article one data recording of this ordering scratch list;
This article one data recording of this ordering scratch list is moved on to this ranking results table; And article one data recording that will this special buffer zone moves on to this ordering scratch list;
Carry out the step of a pooled data, wherein the step of this pooled data comprises at least:
Check whether this special buffer zone has data recording;
If this special buffer zone has data recording, then carry out the step of this mobile data; And
If this special buffer zone do not have data recording, then carry out the step that a second reading is fetched data, extremely behind this special buffer zone, carry out the step of this mobile data with next group data recording of reading this preset number in this special selected data group; And
Repeat the step of this pooled data, wherein, then stop to carry out if the number of the data recording of this ranking results table equals a default data number that takes out; If all data recording of these selected data groups have all read finish, then stop to carry out.
2. the method for sequencing by merging distributed data according to claim 1 is characterized in that, the step of this ordering is according to ascending or descending order.
3. the method for sequencing by merging distributed data according to claim 1 is characterized in that, each described data set is made up of a plurality of medium access control address.
4. the method for sequencing by merging distributed data according to claim 1 is characterized in that, these data sets comprise a main end data group and a plurality of from the end data group at least.
5. the method for sequencing by merging distributed data according to claim 4 is characterized in that, this main end data group is arranged in a main end device of a master-slave mode device, and these are arranged in a plurality of from end device of this master-slave mode device respectively from the end data group.
6. the method for sequencing by merging distributed data according to claim 5 is characterized in that, but this master-slave mode device is a stacking-type network equipment.
7. the method for sequencing by merging distributed data according to claim 6 is characterized in that, but but but but should be selected from a group that is made up of stacking-type interchanger stacking-type hub and stacking-type switch router by the stacking-type network equipment.
8. the method for sequencing by merging distributed data according to claim 5 is characterized in that, the described step that determines these selected data groups in these data sets is undertaken by a plurality of connectivity ports of specifying this master-slave mode device.
9. the method for sequencing by merging distributed data according to claim 5, it is characterized in that, the described step that determines these selected data groups in these data sets is carried out with a plurality of connectivity ports of selected this master-slave mode device by specifying at least one Virtual Local Area Network.
10. the method for sequencing by merging distributed data according to claim 1 is characterized in that, these selected data groups are these data sets.
CNB031522580A 2003-07-30 2003-07-30 Method for combining and sequencing distributed data Expired - Fee Related CN100470463C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB031522580A CN100470463C (en) 2003-07-30 2003-07-30 Method for combining and sequencing distributed data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB031522580A CN100470463C (en) 2003-07-30 2003-07-30 Method for combining and sequencing distributed data

Publications (2)

Publication Number Publication Date
CN1581060A CN1581060A (en) 2005-02-16
CN100470463C true CN100470463C (en) 2009-03-18

Family

ID=34579812

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB031522580A Expired - Fee Related CN100470463C (en) 2003-07-30 2003-07-30 Method for combining and sequencing distributed data

Country Status (1)

Country Link
CN (1) CN100470463C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015180793A1 (en) * 2014-05-30 2015-12-03 Huawei Technologies Co.,Ltd Parallel mergesorting

Also Published As

Publication number Publication date
CN1581060A (en) 2005-02-16

Similar Documents

Publication Publication Date Title
CN101159619B (en) Fast adding method, device and switching arrangement of ARP table
CN101620617B (en) Method and device for searching and processing log file
CN100566281C (en) The method and apparatus of virtual private network routing search
JP3250544B2 (en) Transfer destination search method, transfer destination search device, search table recording medium, and search program recording medium
CN101437259B (en) Method, apparatus and system for establishing incidence relation between each system of integrated multi-module base station
CN101408895A (en) Method, apparatus and system for constructing node relation tree according to node aggregation
CN101944066A (en) Solid state disk, interface processing method thereof and storage system
US20050021684A1 (en) System and method for auto-configuring stackable network devices
JPS60160746A (en) Communication network
CN100486212C (en) Method for improving routing list capacity
CN104125609B (en) Family base station system and its data access processing method
CN101567014B (en) Equipment information retrieval method, device and cable fastener
CN100470463C (en) Method for combining and sequencing distributed data
CN100397816C (en) Method for classifying received data pocket in network apparatus
CN101291202B (en) Management method and host server for data transmission paths
CN108418752A (en) A kind of creation method and device of aggregation group
CN100488173C (en) A method for carrying out automatic selection of packet classification algorithm
CN102929798B (en) The hierarchical organization structure of storage medium
CN102904803B (en) A kind of message transmitting method and equipment
CN103530019A (en) Method and device for window switching
CN103200111A (en) Method and device for cell exchange
CN102867060A (en) Method, device and system for data fast search
CN101827175A (en) Method and system for storing sorted call bills by catalog
CN205862315U (en) A kind of CAM structure based on FPGA
CN101753208B (en) Node anomaly detection method, device and storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090318

Termination date: 20160730

CF01 Termination of patent right due to non-payment of annual fee