CN110008181A - File polling method and device, computer installation and storage medium - Google Patents

File polling method and device, computer installation and storage medium Download PDF

Info

Publication number
CN110008181A
CN110008181A CN201910277566.1A CN201910277566A CN110008181A CN 110008181 A CN110008181 A CN 110008181A CN 201910277566 A CN201910277566 A CN 201910277566A CN 110008181 A CN110008181 A CN 110008181A
Authority
CN
China
Prior art keywords
network node
node
query
network
requesting party
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
CN201910277566.1A
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910277566.1A priority Critical patent/CN110008181A/en
Publication of CN110008181A publication Critical patent/CN110008181A/en
Pending legal-status Critical Current

Links

Abstract

The present invention provides a kind of file polling method, comprising: receives the file query requests of requesting party;Determine the Query priority for being stored with each network node of file specified by file query requests;The network node of given query priority is chosen according to the sequence of Query priority from high to low;The network node of the total query node number of single group is randomly selected from the network node of given query priority;One group of network node is selected from the network node randomly selected, and the network node for meeting first condition is filtered out from the network node selected as destination node;Destination node is returned into requesting party.The present invention also provides a kind of file polling device, computer installation and storage mediums.The present invention may be implemented during file polling between different zones operator the equilibrium of network node with it is complementary.

Description

File polling method and device, computer installation and storage medium
Technical field
The present invention relates to technical field of the computer network, and in particular to a kind of file polling method and device, computer dress It sets and computer readable storage medium.
Background technique
For existing file searching system using filename, region, operator as key, the device name for storing this document is value, In the database by the corresponding relationship storage of filename, region, operator and device name.In actual application scenarios, exist The file of million ranks, each file correspond to a number of storage equipment (i.e. network node), and individually storage is set It is standby above to store multiple files simultaneously.
When receive obtain meet certain condition storage equipment external request when, existing file polling scheme be by This document, region, the corresponding all storage equipment of operator are taken out, and are successively traversed, the number of devices until finding the condition of satisfaction.
However, there is following problems for existing scheme:
(1) when the corresponding number of devices of single file is huge, single inquiry needs to obtain all implementor names from database Claim, it is very big to the pressure of database.
(2) when heap file is concurrently inquired, memory and the CPU consumption of inquiry system itself are huge.
(3) equipment of the file between region, operator is unable to reach complementary effect.
(4) balance policy of equipment is stored, filtering policy is difficult to realize.
Summary of the invention
In view of the foregoing, it is necessary to propose a kind of file polling method, file polling device, computer installation, calculating Machine readable storage medium storing program for executing and computer program product, can be with network node between different zones operator during file polling Equilibrium with it is complementary.
The first aspect of the application provides a kind of file polling method, which comprises
Receive the file query requests of requesting party;
According to region belonging to the requesting party and operator and it is stored with file specified by the file query requests Each network node belonging to region and operator determine the Query priority of each network node;
Given query priority is chosen from each network node according to the sequence of Query priority from high to low Network node determines the total query node number of the single group of the network node of the given query priority;
The network section of the total query node number of the single group is randomly selected from the network node of the given query priority Point;
One group of network node is selected from the network node randomly selected, and satisfaction is filtered out from the network node of selection The network node of one condition will meet the network node of first condition as destination node;
The destination node is returned into the requesting party.
In alternatively possible implementation, the method also includes:
The IP address section for searching each operator determines the operator of the address field of the IP address comprising the requesting party For operator belonging to the requesting party;
The region that the IP address section of each operator is distributed is searched, by the IP address of the IP address comprising the requesting party The region that section is distributed is determined as region belonging to the requesting party.
In alternatively possible implementation, the first condition includes:
The temperature of network node is the first preset heat or the first preset heat range;And/or
The network type of network node is default network type;And/or
Network node supports preset protocol.
In alternatively possible implementation, the network for meeting first condition is filtered out in the network node from selection Node, after the network node of first condition will be met as destination node, the method also includes:
The network node for being unsatisfactory for the first condition in the network node of selection and meeting second condition is stored as alternatively Node;
If the number of the destination node is not up to preset quantity, the inquiry of the network node of all Query priorities is judged Whether number reaches is organized total inquiry times entirely;
If the inquiry times of the network node of the given query priority of all selections reach organize entirely total inquiry times or The network node selection of all Query priorities finishes, and the insufficient number of of the preset quantity is obtained from the alternate node Network node is as destination node.
In alternatively possible implementation, it is unsatisfactory for the first condition in the network node by selection and meets the The network node of two conditions is stored as alternate node
If the alternate node and the requesting party belong to same operator, the alternate node is stored to first and is deposited Storage area domain;
If the alternate node and the requesting party belong to different operators, the alternate node is stored to second and is deposited Storage area domain.
In alternatively possible implementation, before the requesting party by destination node return, the method Further include:
Judge whether the number of the destination node reaches preset quantity;
If the number of the destination node is not up to preset quantity, the network node of the given query priority is judged Inquiry times whether reach the total inquiry times of single group, if the inquiry times of the network node of the given query priority do not reach To the total inquiry times of the single group, then return is described selects one group of network node from the network node randomly selected;
If the inquiry times of the network node of the given query priority reach the total inquiry times of the single group, institute is judged There is the network node of Query priority whether to choose to finish, takes complete if the network node of all Query priorities is unselected, return Return the net for choosing given query priority from each network node according to the sequence of Query priority from high to low Network node determines the total query node number of the single group of the network node of the given query priority.
In alternatively possible implementation, the method also includes:
If the inquiry times of the network node of the given query priority are not up to the total inquiry times of the single group, sentence Whether the inquiry times of the network node for the given query priority of breaking reach single group inquiry times threshold value;
If the inquiry times of the network node of the given query priority are not up to the single group inquiry times threshold value, One group of network node is selected from the network node randomly selected described in returning;
Otherwise, if the inquiry times of the network node of the given query priority reach the single group inquiry times threshold Whether value, then execute the network node for judging all Query priorities and choose and finish.
The second aspect of the application provides a kind of computer installation, and the computer installation includes memory and processor, The computer program that can be run on the processor is stored on the memory, the computer program is by the processor The file polling method is realized when execution.
The third aspect of the application provides a kind of file polling device, and described device includes:
Receiving unit, for receiving the file query requests of requesting party;
Determination unit for the region according to belonging to the requesting party and operator and is stored with the file polling and asks Region belonging to each network node of specified file and operator is asked to determine the Query priority of each network node;
Query unit, comprising:
First chooses subelement, for according to Query priority sequence from high to low from described each
The network node that given query priority is chosen in network node, determines the network section of the given query priority The total query node number of single group of point;
Second chooses subelement, total for randomly selecting the single group from the network node of the given query priority The network node of query node number;
Subelement is screened, for selecting one group of network node from the network node randomly selected, from the network section of selection The network node for meeting first condition is filtered out in point, will meet the network node of the first condition as destination node;
Return unit, for the destination node to be returned to the requesting party.
The fourth aspect of the application provides a kind of computer readable storage medium, deposits on the computer readable storage medium Computer program is contained, the computer program realizes the file polling method when being executed by processor.
The 5th aspect of the application provides a kind of computer program product, including computer instruction, when it is filled in computer When setting operation, so that computer installation executes the file polling method.
The file query requests of present invention reception requesting party;According to region belonging to the requesting party and operator and deposit It contains region belonging to each network node of file specified by the file query requests and operator determines each net The Query priority of network node;Specified look into is chosen from each network node according to the sequence of Query priority from high to low The network node for asking priority, determines the total query node number of the single group of the network node of the given query priority;From described The network node of the total query node number of the single group is randomly selected in the network node of given query priority;From what is randomly selected One group of network node is selected in network node;The network node for meeting first condition is filtered out from the network node of selection, it will Meet the network node of the first condition as destination node;The destination node is returned into the requesting party.For single Inquiry, the present invention do not need to obtain all network node titles from database, under the premise of guaranteeing query result, significantly subtract The inquiry pressure of few database.The network node that the present invention randomly selects given query priority is inquired, in heap file When concurrently inquiring, it can effectively mitigate the resource consumption of system.The present invention can be with by the combination priority grade of region and operator The complementation for realizing equipment between different zones operator, increases operation rate.The present invention can be for the network node inquired Increase the filter condition of more levels, preferably to service external request.When a large amount of different files request network section simultaneously When point, the present invention can satisfy the number of nodes that each request requires, while guarantee that the use between different network node is equal as far as possible Weighing apparatus.
Detailed description of the invention
Fig. 1 is the flow chart of file polling method provided in an embodiment of the present invention.
Fig. 2 be another embodiment of the present invention provides file polling method flow chart.
Fig. 3 is the flow chart of file polling device provided in an embodiment of the present invention.
Fig. 4 be another embodiment of the present invention provides file polling device flow chart.
Fig. 5 is the schematic diagram of computer installation provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, device, product or equipment need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
Preferably, file polling method of the invention is applied in one or more computer installation.The computer Device is that one kind can be according to the instruction for being previously set or storing, the automatic equipment for carrying out numerical value calculating and/or information processing, Hardware includes but is not limited to microprocessor, specific integrated circuit (Application Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processing unit (Digital Signal Processor, DSP), embedded device etc..
The computer installation can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The computer installation can carry out people by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user Machine interaction.
The computer installation can be composition CDN (Content Delivery Network, content distributing network) net The node of network or block chain network.
Embodiment one
Fig. 1 is the flow chart of file polling method provided in an embodiment of the present invention.The file polling method is applied to meter It calculates in machine equipment (such as dispatch server), for being stored with specified file according to the inquiry of the file query requests of requesting party and expiring The network node inquired is returned to requesting party by the network node of sufficient preset condition.In the present embodiment, the network node can To be personal cloud disk, such as play objective cloud.The quantity of the network node is multiple.Each network node belongs to a network operation Quotient.Each network node stores multiple files.
Shown in 1, the file polling method specifically includes the following steps:
S101 receives the file query requests of requesting party.
The file query requests include the filename of specified file.The file query requests are for requesting inquiry specified File.For example, requesting party issues file query requests, for requesting inquiry video A.
In the present embodiment, it can receive the file query requests that various requesting parties send.The requesting party includes but unlimited In desktop computer, pocket computer on knee, personal digital assistant, tablet computer, personal cloud disk, smart phone, e-book Reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard Audio level 3) or MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression Standard audio level 4) player, POS terminal and vehicle-mounted computer etc..
S102, according to region and operation belonging to region belonging to the requesting party and operator and each network node Quotient determines the Query priority for storing each network node of file specified by the file query requests.
It can be obtained with the corresponding relationship of file-network node according to the pre-stored data and store the file query requests meaning Determine each network node of file.For example, can be using filename, region, operator as key, with the network node of storage file The entitled value of network node, in the database by the storage of file-network node corresponding relationship.According to the file-network node The specified region of file and each network section of operator specified by the available storage file query requests of corresponding relationship Point.
The Query priority strategy of network node can be preset.Belong to same zone with requesting party for example, can be set The network node of domain same operator has the first Query priority (i.e. highest Query priority), belongs to not same district with requesting party The network node of domain same operator has the second Query priority, and the network of same area different operators is belonged to requesting party Node has third Query priority, has the 4th inquiry excellent with the network node that requesting party belongs to different zones different operators First grade (i.e. minimum Query priority).
It can be set according to actual needs the Query priority strategy of the network node more refined.For example, for ask The side of asking belongs to the network node of different zones, can be subdivided into and belong to the same area range with requesting party and be not belonging to requesting party The same area range;For belonging to the network node of different operators with requesting party, can be subdivided into belong to requesting party it is same Operator's range and same operator's range is not belonging to requesting party.Therefore, the Query priority of available more levels.Example Such as, the network node for belonging to same area same operator with requesting party, which can be set, has the first Query priority, with request The network node that side belongs to same area range same operator has the second Query priority, belongs to different zones with requesting party The network node of same operator has third Query priority, and the net of same area same operator range is belonged to requesting party Network node has the 4th Query priority, and the network of different zones same area range same operator range is belonged to requesting party Node has the 5th Query priority, and the network node for belonging to different zones same operator range with requesting party has the 6th to look into Priority is ask, the network node for belonging to same area different operators with requesting party has the 7th Query priority, with requesting party The network node for belonging to different zones same area range different operators has the 8th Query priority, belongs to not with requesting party Network node with region different operators has the 9th Query priority.It should be noted that above-mentioned same area range is Refer to and belong to different zones with requesting party but belong to same area range, same operator range, which refers to, belongs to difference with requesting party Operator still belongs to same operator range.
Multiple regions range and operator's range can be defined.For example, region belonging to requesting party is Shenzhen, network section Region belonging to point is Guangzhou, if defining same province is same area range, region and network node belonging to requesting party Affiliated region belongs to same area range.
Can based on the Query priority strategy of pre-set network node, according to region belonging to the requesting party and Region and operator belonging to operator and the requesting party, determine the Query priority of each network node.For example, described Region belonging to requesting party is " south China ", and affiliated operator is " China Telecom ", then have the first Query priority is area The network node that domain is " south China ", operator is " China Telecom ", with the second Query priority be region be non-" south China ", Operator be " China Telecom " network node, with third Query priority be region be " south China ", operator for it is non-" in The network node of state's telecommunications ", with the 4th Query priority be region be non-" south China ", operator is non-" China Telecom " Network node.
Region and operator belonging to the requesting party being obtained according to the IP address of the requesting party.
The IP address of requesting party may be embodied in the file query requests.
In one embodiment, the region may include " East China ", " North China ", " south China ", " northeast ", " northwest ", " southwest " six large geographical area.The operator may include " China Telecom ", " China Unicom ", " China Mobile ", " Chinese net It is logical ", " China Railway Telecom " five network operators.It is appreciated that the region is also possible to province, city or district.
In embodiments of the present invention, there is its corresponding IP address section in each operation commercial city, and operator can be by its corresponding IP IP address in address field distributes to the requesting party for accessing the carrier network, so that the requesting party can be its point using operator Service server in the IP address matched and the carrier network carries out data interaction.
The IP address section that each operator can be searched, by the operator of the address field of the IP address comprising the requesting party It is determined as operator belonging to the requesting party.Such as: 111.0.0.0/10 is the IP address section of China Mobile, the IP of requesting party Address is 111.0.0.7, and 111.0.0.0/10 includes 111.0.0.7, then operator belonging to the requesting party is China Mobile.
In the present embodiment, its different IP address section is distributed to different zones and used by each operator.It can search The region that the IP address section of each operator is distributed, the area that the IP address section of the IP address comprising the requesting party is distributed Domain is determined as region belonging to the requesting party.For example, the IP address of requesting party is 111.0.0.7, during which is included in In the mobile IP address section 111.0.0.0/10 of state, and the address field distributes to Shenzhen, then can determine area belonging to the requesting party Domain is Shenzhen.
S103, according to the sequence of Query priority from high to low from storing each of file specified by the file query requests A network node chooses the network node of given query priority, determines the single group of the network node of the given query priority Total query node number.
Given query priority is chosen from each network node according to the sequence of Query priority from high to low Network node is exactly to choose specified region and specified operation every time since highest Query priority (i.e. the first Query priority) The network node of quotient.For example, have the first Query priority is the network that region is " south China ", operator is " China Telecom " Node, what it is with the second Query priority is region be non-" south China ", operator is " China Telecom " network node, with the Three Query priorities are region is " south China ", operator is non-" China Telecom " network nodes, have the 4th inquiry preferential Grade is region be non-" south China ", operator be non-" China Telecom " network node, then chooses and inquire with first for the first time The network node (network node that i.e. region is " south China ", operator is " China Telecom ") of priority, second of selection have The network node (network node that i.e. region is non-" south China ", operator is " China Telecom ") of second Query priority, third It is secondary to choose the network node (network that i.e. region is " south China ", operator is non-" China Telecom " with third Query priority Node), (i.e. region is non-" south China " to the 4th network node chosen with the 4th Query priority, operator is non-" China The network node of telecommunications ").
It can be calculated according to the quantity and inquiry coverage rate (such as 50%) of the network node of the given query priority The total query node number of the single group of the network node of given query priority.The single group of the network node of given query priority is always looked into Quantity of the number of nodes equal to the network node of given query priority is ask multiplied by inquiry coverage rate.
For example, the quantity of the network node of given area (such as " south China ") and given operator (such as " China Telecom ") It is 1000, inquiry coverage rate is 50%, and single query node number is 250, then the list of the network node of the given query priority The total query node number of group is 1000*50%=500.
The inquiry coverage rate, single query node number can be configured according to actual needs.
Alternatively, can receive the total query node number of single group set by user, using the total query node number of received single group as The total query node number of the single group of the network node of the given query priority.
S104 randomly selects the net of the total query node number of the single group from the network node of the given query priority Network node.
For example, the total query node number of the single group of the network node of given query priority is 500, then from the given query 500 network nodes are randomly selected in the network node of priority.
S105 selects one group of network node from the network node randomly selected.
The network node of predetermined quantity can be selected from the network node randomly selected.In the present embodiment, Ke Yicong The network node of the single query node number is selected in the network node randomly selected.For example, single query node number is 250,250 network nodes are selected from 500 network nodes randomly selected.
S106 filters out the network node for meeting first condition from the network node of selection, will meet first condition Network node is as destination node.
For example, filtering out 15 network nodes for meeting first condition from 250 network nodes of selection, will be met 15 network nodes of one condition are as destination node.
The first condition can be configured according to actual needs, to realize the different filtering plans to network node Slightly.
The first condition can be the combination of multiple conditions.
The first condition may include that the temperature of network node is the first preset heat or the first preset heat range.Example Such as, the first condition may include that the temperature of network node is less than or equal to the first preset heat (such as 2).Network node is made The number for returning to requesting party for destination node is more, then the temperature of the network node is higher.For example, each conduct of network node Destination node returns to requesting party, then the temperature of the network node adds 1.
The first condition can also include that the network type of network node is default network type.For example, the request Side and network node may include first network type, the second network type, third network type, the 4th network type, the 5th Network type.If requesting party is first network type, the first condition may include that the network type of network node is the 4th Network type or the 5th network type;If requesting party is the 5th network type, the first condition may include network node Network type is first network type, the second network type, third network type or the 4th network type.
The first condition can also include that network node supports preset protocol.For example, the first condition may include Network node supports Transmission Control Protocol.Alternatively, the first condition may include that network node supports external Socket.
The destination node is returned to the requesting party by S107.
The destination node can be returned into the requesting party according to the IP address of the requesting party.
The requesting party can issue file acquisition request to the destination node, to obtain the file of needs.It is described Destination node can quickly respond file acquisition request, and then improve the speed that requesting party obtains file.
In the present embodiment, it is asked described in the resource path of the IP address of destination node and the file being returned together The side of asking.
Existing file searching system has the following problems: (1) when heap file concurrently inquire, file searching system sheet Memory and the CPU consumption of body are huge;(2) when the corresponding network node quantity of single file is huge, single inquiry is needed from number All network node titles are obtained according to library, it is very big to the pressure of database;(3) network of the file between region, operator Node is unable to reach complementary effect;(4) balance policy of network node, filtering policy are difficult to realize.Single is inquired, it is real It applies example one not needing to obtain all network node titles from database, under the premise of guaranteeing query result, substantially reduces number According to the inquiry pressure in library.The network node that embodiment one randomly selects given query priority is inquired, heap file simultaneously When hair inquiry, it can effectively mitigate the resource consumption of system.Embodiment one can be with by the combination priority grade of region and operator The complementation for realizing equipment between different zones operator, increases operation rate.Embodiment one can be for the network section inquired Point increases the filter condition of more levels, preferably to service external request.When a large amount of different files request network simultaneously When node, embodiment one can satisfy the number of nodes that each request requires, while guarantee that the use between different network node is most Amount is balanced.
Embodiment two
Fig. 2 be another embodiment of the present invention provides file polling method flow chart.Shown in 2, the file is looked into Inquiry method specifically includes the following steps:
S201 receives the file query requests of requesting party.
Step S201 is consistent with step S101 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S101, details are not described herein again.
S202 according to region belonging to the requesting party and operator and is stored with specified by the file query requests Region belonging to each network node of file and operator determine the Query priority of each network node.
Step S202 is consistent with step S102 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S102, details are not described herein again.
It is preferential to choose given query according to the sequence of Query priority from high to low from each network node by S203 The network node of grade, determines the total query node number of the single group of the network node of the given query priority.
Step S203 is consistent with step S103 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S103, details are not described herein again.
S204 randomly selects the net of the total query node number of the single group from the network node of the given query priority Network node.
Step S204 is consistent with step S104 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S104, details are not described herein again.
S205 selects one group of network node from the network node randomly selected.
Step S205 is consistent with step S105 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S105, details are not described herein again.
S206 filters out the network node for meeting first condition from the network node of selection, will meet first condition Network node is as destination node.
Step S206 is consistent with step S106 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S106, details are not described herein again.S207 will be unsatisfactory for the first condition and meet second in the network node of selection The network node of condition is stored as alternate node.
The second condition may include that the temperature of network node is the second preset heat or the second preset heat range.Institute Stating the second preset heat or the second preset heat range and the first preset heat or the first preset heat range can identical may be used With difference.For example, the temperature that the first condition includes network node is less than or equal to 2, the second condition also includes network The temperature of node is less than or equal to 2.
The network node that the first condition is unsatisfactory in the network node of selection can be subjected to ascending order row according to temperature The network node of the lesser selection of the temperature that the first condition is unsatisfactory in network node is stored as alternate node by sequence.
The second condition can be configured according to actual needs, and the second condition can be the group of multiple conditions It closes.
The size for storing the storage region of the alternate node can be equal to area needed for the destination node for storing preset quantity The size in domain.
It is unsatisfactory for the first condition in the network node by selection and meets the network node of second condition being stored as Alternate node may include:
If the alternate node and the requesting party belong to same operator, the alternate node is stored to first and is deposited Storage area domain;
If the alternate node and the requesting party belong to different operators, the alternate node is stored to second and is deposited Storage area domain.
First storage region, the size of the second storage region can be equal to needed for the destination node of storage preset quantity The size in region.
S208, judges whether the number of the destination node reaches preset quantity (such as 30).If the destination node Number reach preset quantity, then follow the steps S213.
S209 judges the net of all given query priority if the number of the destination node is not up to preset quantity Whether the inquiry times of network node reach is organized total inquiry times entirely.If the inquiry time of the network node of all given query priority Number not up to organizes total inquiry times entirely, thens follow the steps S211.Otherwise, if the network node of all given query priority is looked into Inquiry number reaches organizes total inquiry times entirely, thens follow the steps S210.
Organizing total inquiry times entirely can be configured according to actual needs.Such as it is set as 10.Utilize the total inquiry time of full group It is to mitigate the resource consumption of single request in order to avoid excessive for single file access request inquiry times that number, which carries out judgement,.
S210 obtains the insufficient number of network node of the preset quantity as target section from the alternate node Point.
For example, preset quantity is 30, the number of the destination node of acquisition is 25, if all given query priority The inquiry times of network node not up to organize total inquiry times entirely, then obtain 5 network nodes from the alternate node and make For destination node.
When obtaining the insufficient number of network node of the preset quantity from the alternate node as destination node, Judge first storage region with the presence or absence of enough alternate nodes.If there are enough alternative sections for first storage region Point then obtains insufficient number of alternate node as destination node from first storage region.Otherwise, if first storage Enough alternate nodes are not present in region, then obtain all alternate nodes as destination node from first storage region, Insufficient section is obtained from the second area again.
It is excellent to judge whether the inquiry times of the network node of the given query priority reach the given query by S211 The total inquiry times of the single group of the network node of first grade.If the inquiry times of the network node of the given query priority are not up to The total inquiry times of single group, then return step S205.
For example, randomly selecting 500 network nodes in step 204, obtained from 500 network nodes randomly selected for the first time 250 network nodes are taken, the number of the destination node obtained in 250 network nodes is not up to preset quantity and given query The inquiry times of the network node of priority are not up to the total inquiry times of the single group, then return step S205, from randomly selecting Network node in obtain remaining 250 network nodes.
Judging whether the inquiry times of the network node of given query priority reach the total inquiry times of single group is in order to true Determine the network node randomly selected in the network node of given query priority and whether inquire to finish.In other examples, It can directly judge whether the network node randomly selected is inquired to finish.
It can be according to the total query node number of single group and single query node of the network node of the given query priority Number (such as 250) calculates the total inquiry times of single group of the network node of given query priority.The network of given query priority The total query node number of single group that the total inquiry times of the single group of node are equal to the network node of given query priority is looked into divided by single Ask number of nodes.
For example, the quantity of the network node of given area (such as " south China ") and given operator (such as " China Telecom ") It is 1000, inquiry coverage rate is 50%, and single query node number is 250, then the list of the network node of the given query priority The total query node number of group is 1000*50%=500, and the total inquiry times of single group of the network node of the given query priority are 500/250=2.
Alternatively, can receive the total inquiry times of single group set by user, using the total inquiry times of received single group as described in The total inquiry times of the single group of the network node of given query priority.
S212, if the inquiry times of the network node of the given query priority reach the total inquiry times of the single group, Judge whether the network node of all Query priorities is chosen to finish.It is taken if the network node of all Query priorities is unselected Finish, then return step S203.Otherwise, if the network node selection of all Query priorities finishes, S210 is thened follow the steps.
The destination node is returned to the requesting party by S213.
Step S213 is consistent with step S107 in embodiment one in the present embodiment, referring specifically to step in embodiment one The associated description of S107, details are not described herein again.
Embodiment two uses alternate strategies, meets Article 2 for the first condition is unsatisfactory in the network node of selection The network node of part is stored as alternate node, and insufficient target section is obtained from alternate node when the destination node deficiency of acquisition Point, to ensure that the destination node for obtaining preset quantity.
In another embodiment, if the inquiry times of the network node of the given query priority are not up to the single group Total inquiry times can also judge the inquiry time of the network node of the given query priority before return step S205 Whether number reaches single group inquiry times threshold value.If the inquiry times of the network node of the given query priority are not up to described Single group inquiry times threshold value, then return step S205.Otherwise, if the inquiry times of the network node of the given query priority Reach the single group inquiry times threshold value, thens follow the steps S212.
Single group inquiry times threshold value can be configured according to actual needs.Such as it is set as 3.Utilize single group inquiry times It is in order to avoid the network to some given query priority (corresponding to a certain region and a certain operator) that threshold value, which carries out judgement, The inquiry times of node are excessive.
Embodiment three
Fig. 3 is the structure chart of file polling device provided in an embodiment of the present invention.The file polling device 30 is applied to In computer equipment (such as dispatch server), for according to the file query requests of requesting party inquiry be stored with specified file and The network node inquired is returned to requesting party by the network node for meeting preset condition.In the present embodiment, the network node It can be personal cloud disk, such as play objective cloud.The quantity of the network node is multiple.Each network node belongs to a network fortune Seek quotient.Each network node stores multiple files.
As shown in figure 3, the file polling device 30 may include: receiving unit 301, determination unit 302, query unit 303, return unit 304.The query unit 303 includes: that the first selection subelement 3031, second chooses subelement 3032, sieve Select subelement 3033.
Receiving unit 301, for receiving the file query requests of requesting party.
The file query requests include the filename of specified file.The file query requests are for requesting inquiry specified File.For example, requesting party issues file query requests, for requesting inquiry video A.
In the present embodiment, it can receive the file query requests that various requesting parties send.The requesting party includes but unlimited In desktop computer, pocket computer on knee, personal digital assistant, tablet computer, personal cloud disk, smart phone, e-book Reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard Audio level 3) or MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression Standard audio level 4) player, POS terminal and vehicle-mounted computer etc..
Determination unit 302 for the region according to belonging to the requesting party and operator and is stored with the file and looks into It askes and region belonging to each network node of specified file and operator is requested to determine that the inquiry of each network node is excellent First grade.
It can be obtained with the corresponding relationship of file-network node according to the pre-stored data and store the file query requests meaning Determine each network node of file.For example, can be using filename, region, operator as key, with the network node of storage file The entitled value of network node, in the database by the storage of file-network node corresponding relationship.According to the file-network node The specified region of file and each network section of operator specified by the available storage file query requests of corresponding relationship Point.
The Query priority strategy of network node can be preset.Belong to same zone with requesting party for example, can be set The network node of domain same operator has the first Query priority (i.e. highest Query priority), belongs to not same district with requesting party The network node of domain same operator has the second Query priority, and the network of same area different operators is belonged to requesting party Node has third Query priority, has the 4th inquiry excellent with the network node that requesting party belongs to different zones different operators First grade (i.e. minimum Query priority).
It can be set according to actual needs the Query priority strategy of the network node more refined.For example, for ask The side of asking belongs to the network node of different zones, can be subdivided into and belong to the same area range with requesting party and be not belonging to requesting party The same area range;For belonging to the network node of different operators with requesting party, can be subdivided into belong to requesting party it is same Operator's range and same operator's range is not belonging to requesting party.Therefore, the Query priority of available more levels.Example Such as, the network node for belonging to same area same operator with requesting party, which can be set, has the first Query priority, with request The network node that side belongs to same area range same operator has the second Query priority, belongs to different zones with requesting party The network node of same operator has third Query priority, and the net of same area same operator range is belonged to requesting party Network node has the 4th Query priority, and the network of different zones same area range same operator range is belonged to requesting party Node has the 5th Query priority, and the network node for belonging to different zones same operator range with requesting party has the 6th to look into Priority is ask, the network node for belonging to same area different operators with requesting party has the 7th Query priority, with requesting party The network node for belonging to different zones same area range different operators has the 8th Query priority, belongs to not with requesting party Network node with region different operators has the 9th Query priority.It should be noted that above-mentioned same area range is Refer to and belong to different zones with requesting party but belong to same area range, same operator range, which refers to, belongs to difference with requesting party Operator still belongs to same operator range.
Multiple regions range and operator's range can be defined.For example, region belonging to requesting party is Shenzhen, network section Region belonging to point is Guangzhou, if defining same province is same area range, region and network node belonging to requesting party Affiliated region belongs to same area range.
Can based on the Query priority strategy of pre-set network node, according to region belonging to the requesting party and Region and operator belonging to operator and the requesting party, determine the Query priority of each network node.For example, described Region belonging to requesting party is " south China ", and affiliated operator is " China Telecom ", then have the first Query priority is area The network node that domain is " south China ", operator is " China Telecom ", with the second Query priority be region be non-" south China ", Operator be " China Telecom " network node, with third Query priority be region be " south China ", operator for it is non-" in The network node of state's telecommunications ", with the 4th Query priority be region be non-" south China ", operator is non-" China Telecom " Network node.
Region and operator belonging to the requesting party being obtained according to the IP address of the requesting party.
The IP address of requesting party may be embodied in the file query requests.
In one embodiment, the region may include " East China ", " North China ", " south China ", " northeast ", " northwest ", " southwest " six large geographical area.The operator may include " China Telecom ", " China Unicom ", " China Mobile ", " Chinese net It is logical ", " China Railway Telecom " five network operators.It is appreciated that the region is also possible to province, city or district.
In embodiments of the present invention, there is its corresponding IP address section in each operation commercial city, and operator can be by its corresponding IP IP address in address field distributes to the requesting party for accessing the carrier network, so that the requesting party can be its point using operator Service server in the IP address matched and the carrier network carries out data interaction.
The IP address section that each operator can be searched, by the operator of the address field of the IP address comprising the requesting party It is determined as operator belonging to the requesting party.Such as: 111.0.0.0/10 is the IP address section of China Mobile, the IP of requesting party Address is 111.0.0.7, and 111.0.0.0/10 includes 111.0.0.7, then operator belonging to the requesting party is China Mobile.
In the present embodiment, its different IP address section is distributed to different zones and used by each operator.It can search The region that the IP address section of each operator is distributed, the area that the IP address section of the IP address comprising the requesting party is distributed Domain is determined as region belonging to the requesting party.For example, the IP address of requesting party is 111.0.0.7, during which is included in In the mobile IP address section 111.0.0.0/10 of state, and the address field distributes to Shenzhen, then can determine area belonging to the requesting party Domain is Shenzhen.
First chooses subelement 3031, for according to Query priority sequence from high to low from each network node The middle network node for choosing given query priority, determines that the single group of the network node of the given query priority always inquires section Points.
Given query priority is chosen from each network node according to the sequence of Query priority from high to low Network node is exactly to choose specified region and specified operation every time since highest Query priority (i.e. the first Query priority) The network node of quotient.For example, have the first Query priority is the network that region is " south China ", operator is " China Telecom " Node, what it is with the second Query priority is region be non-" south China ", operator is " China Telecom " network node, with the Three Query priorities are region is " south China ", operator is non-" China Telecom " network nodes, have the 4th inquiry preferential Grade is region be non-" south China ", operator be non-" China Telecom " network node, then chooses and inquire with first for the first time The network node (network node that i.e. region is " south China ", operator is " China Telecom ") of priority, second of selection have The network node (network node that i.e. region is non-" south China ", operator is " China Telecom ") of second Query priority, third It is secondary to choose the network node (network that i.e. region is " south China ", operator is non-" China Telecom " with third Query priority Node), (i.e. region is non-" south China " to the 4th network node chosen with the 4th Query priority, operator is non-" China The network node of telecommunications ").
It can be according to the total query node number of single group and single query node of the network node of the given query priority Number (such as 250) calculates the total inquiry times of single group of the network node of given query priority.The network of given query priority The total query node number of single group that the total inquiry times of the single group of node are equal to the network node of given query priority is looked into divided by single Ask number of nodes.
For example, the quantity of the network node of given area (such as " south China ") and given operator (such as " China Telecom ") It is 1000, inquiry coverage rate is 50%, and single query node number is 250, then the list of the network node of the given query priority The total query node number of group is 1000*50%=500.
The inquiry coverage rate, single query node number can be configured according to actual needs.
Alternatively, can receive the total query node number of single group set by user, using the total query node number of received single group as The total query node number of the single group of the network node of the given query priority.
Second chooses subelement 3032, for randomly selecting the list from the network node of the given query priority The network node of the total query node number of group.
For example, the total query node number of the single group of the network node of given query priority is 500, then from the given query 500 network nodes are randomly selected in the network node of priority.
Subelement 3033 is screened, for selecting one group of network node from the network node randomly selected, from the net of selection The network node for meeting first condition is filtered out in network node, will meet the network node of first condition as destination node.
The network node of predetermined quantity can be selected from the network node randomly selected.In the present embodiment, Ke Yicong The network node of the single query node number is selected in the network node randomly selected.For example, single query node number is 250,250 network nodes are selected from 500 network nodes randomly selected, are screened from 250 network nodes of selection 15 network nodes for meeting first condition out, will meet 15 network nodes of first condition as destination node.
The first condition can be configured according to actual needs, to realize the different filtering plans to network node Slightly.
The first condition can be the combination of multiple conditions.
The first condition may include that the temperature of network node is the first preset heat or the first preset heat range.Example Such as, the first condition may include that the temperature of network node is less than or equal to the first preset heat (such as 2).Network node is made The number for returning to requesting party for destination node is more, then the temperature of the network node is higher.For example, each conduct of network node Destination node returns to requesting party, then the temperature of the network node adds 1.
The first condition can also include that the network type of network node is default network type.For example, the request Side and network node may include first network type, the second network type, third network type, the 4th network type, the 5th Network type.If requesting party is first network type, the first condition may include that the network type of network node is the 4th Network type or the 5th network type;If requesting party is the 5th network type, the first condition may include network node Network type is first network type, the second network type, third network type or the 4th network type.
The first condition can also include that network node supports preset protocol.For example, the first condition may include Network node supports Transmission Control Protocol.Alternatively, the first condition may include that network node supports external Socket.
Return unit 304, for the destination node to be returned to the requesting party.
The destination node can be returned into the requesting party according to the IP address of the requesting party.
The requesting party can issue file acquisition request to the destination node, to obtain the file of needs.It is described Destination node can quickly respond file acquisition request, and then improve the speed that requesting party obtains file.
In the present embodiment, it is asked described in the resource path of the IP address of destination node and the file being returned together The side of asking.
Existing file searching system has the following problems: (1) when heap file concurrently inquire, file searching system sheet Memory and the CPU consumption of body are huge;(2) when the corresponding network node quantity of single file is huge, single inquiry is needed from number All network node titles are obtained according to library, it is very big to the pressure of database;(3) network of the file between region, operator Node is unable to reach complementary effect;(4) balance policy of network node, filtering policy are difficult to realize.Single is inquired, it is real It applies example three not needing to obtain all network node titles from database, under the premise of guaranteeing query result, substantially reduces number According to the inquiry pressure in library.The network node that embodiment three randomly selects given query priority is inquired, heap file simultaneously When hair inquiry, it can effectively mitigate the resource consumption of system.Embodiment three can be with by the combination priority grade of region and operator The complementation for realizing equipment between different zones operator, increases operation rate.Embodiment three can be for the network section inquired Point increases the filter condition of more levels, preferably to service external request.When a large amount of different files request network simultaneously When node, embodiment three can satisfy the number of nodes that each request requires, while guarantee that the use between different network node is most Amount is balanced.
Example IV
Fig. 4 be another embodiment of the present invention provides file polling device structure chart.As shown in figure 4, the file is looked into Asking device 40 may include: receiving unit 401, determination unit 402, query unit 403, return unit 404.The query unit 403 include: the first selection subelement 4031, second choose subelement 4032, screening subelement 4033, storing sub-units 4034, Judgment sub-unit 4035, supplement subelement 4036.
Receiving unit 401, for receiving the file query requests of requesting party.
Receiving unit 401 is consistent with receiving unit 301 in embodiment three in the present embodiment, referring specifically in embodiment three The associated description of receiving unit 301, details are not described herein again.
Determination unit 402 for the region according to belonging to the requesting party and operator and is stored with the file and looks into It askes and region belonging to each network node of specified file and operator is requested to determine that the inquiry of each network node is excellent First grade.
Determination unit 402 is consistent with determination unit 302 in embodiment three in the present embodiment, referring specifically in embodiment three The associated description of determination unit 302, details are not described herein again.
First chooses subelement 4031, for according to Query priority sequence from high to low from each network node The middle network node for choosing given query priority, determines that the single group of the network node of the given query priority always inquires section Points.
The first selection subelement 4031 chooses subelement 3031 unanimously in embodiment three first in the present embodiment, specifically asks The associated description for choosing subelement 3031 refering in embodiment three first, details are not described herein again.
Second chooses subelement 4032, for randomly selecting the list from the network node of the given query priority The network node of the total query node number of group.
The second selection subelement 4032 chooses subelement 4032 unanimously in embodiment three second in the present embodiment, specifically asks The associated description for choosing subelement 4032 refering in embodiment three second, details are not described herein again.
Subelement 4033 is screened, for selecting one group of network node from the network node randomly selected, from the net of selection The network node for meeting first condition is filtered out in network node, will meet the network node of first condition as destination node.
It is consistent that screening subelement 3033 in subelement 4033 and embodiment three is screened in the present embodiment, referring specifically to implementation The associated description of subelement 3033 is screened in example three, details are not described herein again.
Storing sub-units 4034 meet second condition for being unsatisfactory for the first condition in the network node by selection Network node is stored as alternate node.
The second condition may include that the temperature of network node is the second preset heat or the second preset heat range.Institute Stating the second preset heat or the second preset heat range and the first preset heat or the first preset heat range can identical may be used With difference.For example, the temperature that the first condition includes network node is less than or equal to 2, the second condition also includes network The temperature of node is less than or equal to 2.
The network node that the first condition is unsatisfactory in the network node of selection can be subjected to ascending order row according to temperature The network node of the lesser selection of the temperature that the first condition is unsatisfactory in network node is stored as alternate node by sequence.
The second condition can be configured according to actual needs, and the second condition can be the group of multiple conditions It closes.
The size for storing the storage region of the alternate node can be equal to area needed for the destination node for storing preset quantity The size in domain.
It is unsatisfactory for the first condition in the network node by selection and meets the network node of second condition being stored as Alternate node may include:
If the alternate node and the requesting party belong to same operator, the alternate node is stored to first and is deposited Storage area domain;
If the alternate node and the requesting party belong to different operators, the alternate node is stored to second and is deposited Storage area domain.
First storage region, the size of the second storage region can be equal to needed for the destination node of storage preset quantity The size in region.
Judgment sub-unit 4035, is also used to judge whether the number of the destination node reaches preset quantity (such as 30 It is a).
Judgment sub-unit 4035 judges all fingers if the number for being also used to the destination node is not up to preset quantity Whether the inquiry times for determining the network node of Query priority reach is organized total inquiry times entirely.
Organizing total inquiry times entirely can be configured according to actual needs.Such as it is set as 10.Utilize the total inquiry time of full group It is to mitigate the resource consumption of single request in order to avoid excessive for single file access request inquiry times that number, which carries out judgement,.
Subelement 4036 is supplemented, for obtaining the insufficient number of network section of the preset quantity from the alternate node Point is used as destination node.
For example, preset quantity is 30, the number of the destination node of acquisition is 25, if all given query priority The inquiry times of network node not up to organize total inquiry times entirely, then obtain 5 network nodes from the alternate node and make For destination node.
When obtaining the insufficient number of network node of the preset quantity from the alternate node as destination node, Judge first storage region with the presence or absence of enough alternate nodes.If there are enough alternative sections for first storage region Point then obtains insufficient number of alternate node as destination node from first storage region.Otherwise, if first storage Enough alternate nodes are not present in region, then obtain all alternate nodes as destination node from first storage region, Insufficient section is obtained from the second area again.
Judgment sub-unit 4035, is also used to judge whether the inquiry times of the network node of the given query priority reach To the total inquiry times of single group.
Judgment sub-unit 4035, if the inquiry times for being also used to the network node of the given query priority reach described The total inquiry times of single group judge whether the network node of all Query priorities is chosen and finish.
Return unit 404, for the destination node to be returned to the requesting party.
Return unit 404 is consistent with return unit 304 in embodiment three in the present embodiment, referring specifically in embodiment three The associated description of return unit 304, details are not described herein again.
Example IV uses alternate strategies, meets Article 2 for the first condition is unsatisfactory in the network node of selection The network node of part is stored as alternate node, and insufficient target section is obtained from alternate node when the destination node deficiency of acquisition Point, to ensure that the destination node for obtaining preset quantity.
In another embodiment, the judgment sub-unit 4035 is also used to: if the network section of the given query priority The inquiry times of point are not up to the total inquiry times of the single group, judge the inquiry time of the network node of the given query priority Whether number reaches single group inquiry times threshold value.If the inquiry times of the network node of the given query priority are not up to described Single group inquiry times threshold value then screens subelement 4033 and selects one group of network node from the network node randomly selected, from choosing The network node for meeting first condition is filtered out in the network node selected, and will meet the network node of first condition as target section Point.Otherwise, if the inquiry times of the network node of the given query priority reach the single group inquiry times threshold value, sentence Disconnected subelement 4035 judges whether the network node of all Query priorities is chosen and finishes.
Single group inquiry times threshold value can be configured according to actual needs.Such as it is set as 3.Utilize single group inquiry times It is in order to avoid the network to some given query priority (corresponding to a certain region and a certain operator) that threshold value, which carries out judgement, The inquiry times of node are excessive.
Embodiment five
The present embodiment provides a kind of computer readable storage medium, computer is stored on the computer readable storage medium Program, the computer program realize the step in above-mentioned file polling embodiment of the method when being executed by processor, such as shown in Fig. 1 S101-S107 or S201-S213 shown in Fig. 2.
Alternatively, the function of each module/unit in above-mentioned apparatus embodiment is realized when the computer program is executed by processor, Such as the unit 401-404 in the unit 301-304 or Fig. 4 in Fig. 3.
Embodiment six
Fig. 5 is the schematic diagram of computer installation provided in an embodiment of the present invention.The computer installation 5 includes memory 50, processor 51, bus 53 and it is stored in the computer journey that can be run in the memory 50 and on the processor 51 Sequence 52.The processor 51 realizes the step in above-mentioned file polling embodiment of the method, example when executing the computer program 52 S101-S107 or S201-S213 shown in Fig. 2 as shown in Figure 1.
Alternatively, realizing each module in above-mentioned apparatus embodiment/mono- when the processor 51 executes the computer program 52 Unit 401-404 in the function of member, such as unit 301-304 or Fig. 4 in Fig. 3.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 50, and are executed by the processor 51, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 52 in the computer installation 5 is described.
The computer installation 5 can be PC (Personal Computer, PC), be also possible to smart phone, The terminal devices such as tablet computer, palm PC, portable computer, intelligent router, mine machine, network storage equipment.
Alleged processor 51 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor 51 is also possible to any conventional processor Deng the processor 51 is the control centre of the computer installation 5, utilizes various interfaces and connection entire computer dress Set 5 various pieces.
The memory 50 can be used for storing the computer program 52 and/or module/unit, and the processor 51 passes through Operation executes the computer program and/or module/unit being stored in the memory 50, and calls and be stored in memory Data in 50 realize the various functions of the computer installation 5.The memory 50 can mainly include storing program area and deposit Store up data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound is broadcast Playing function, image player function etc.) etc.;Storage data area, which can be stored, uses created data (ratio according to computer installation 5 Such as audio data, phone directory) etc..In addition, memory 50 may include high-speed random access memory, it can also include non-easy The property lost memory, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk memory, flush memory device or other Volatile solid-state part.
The bus 53 is to be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus 53 can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, only with one in Fig. 5 Bar thick line indicates, it is not intended that an only bus or a type of bus.
Further, computer installation 5 can also include network interface, and network interface optionally may include wireline interface And/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the computer installation 5 and other electronic equipments it Between establish communication connection.
Optionally, which can also include user interface, and user interface may include display (Display), input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface, Wireless interface.Optionally, in some embodiments, it is aobvious to can be light-emitting diode display, liquid crystal display, touch control type LCD for display Show that device and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..Wherein, display Appropriate it can also be known as display screen or display unit, for being shown in the information handled in computer installation 5 and for showing Show visual user interface.
It will be understood by those skilled in the art that the schematic diagram 5 be only computer installation 5 example, constitute pair The restriction of computer installation 5 may include perhaps combining certain components or different than illustrating more or fewer components Component.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.It loads and executes on computer installation 5 When the computer program instructions, entirely or partly generate according to process or function described in the embodiment of the present invention.The meter Calculation machine device 5 can be general purpose computer, special purpose computer, computer network or other programmable devices.The computer Instruction may be stored in a computer readable storage medium, or can to another computer from a computer readable storage medium Storage medium transmission is read, for example, the computer instruction can be from a web-site, computer, server or data center By wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to Another web-site, computer, server or data center are transmitted.The computer readable storage medium can be meter Any usable medium that calculation machine can store either includes integrated server, the data center etc. of one or more usable mediums Data storage device.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, ) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc. DVD.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It may be combined or can be integrated into another device, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Device (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of file polling method, which is characterized in that the described method includes:
Receive the file query requests of requesting party;
According to region belonging to the requesting party and operator and it is stored with each of file specified by the file query requests Region belonging to a network node and operator determine the Query priority of each network node;
The network of given query priority is chosen from each network node according to the sequence of Query priority from high to low Node determines the total query node number of the single group of the network node of the given query priority;
The network node of the total query node number of the single group is randomly selected from the network node of the given query priority;
One group of network node is selected from the network node randomly selected;
The network node for meeting first condition is filtered out from the network node of selection, will meet the network section of the first condition Point is used as destination node;
The destination node is returned into the requesting party.
2. the method as described in claim 1, which is characterized in that the method also includes:
The operator of the address field of IP address comprising the requesting party is determined as institute by the IP address section for searching each operator State operator belonging to requesting party;
The region that the IP address section of each operator is distributed is searched, by the IP address section institute of the IP address comprising the requesting party The region of distribution is determined as region belonging to the requesting party.
3. the method as described in claim 1, which is characterized in that the first condition includes:
The temperature of network node is the first preset heat or the first preset heat range;And/or
The network type of network node is default network type;And/or
Network node supports preset protocol.
4. the method as described in claim 1, which is characterized in that filter out satisfaction first in the network node from selection The network node of part, after the network node of first condition will be met as destination node, the method also includes:
The network node for being unsatisfactory for the first condition in the network node of selection and meeting second condition is stored as alternate node;
If the number of the destination node is not up to preset quantity, the inquiry times of the network node of all Query priorities are judged Whether reach and organizes total inquiry times entirely;
If the inquiry times of the network node of the given query priority of all selections reach organizes total inquiry times or all entirely The network node selection of Query priority finishes, and obtains from the alternate node and compares the insufficient number of of the preset quantity Network node is as destination node.
5. method as claimed in claim 4, which is characterized in that be unsatisfactory for described first in the network node by selection The network node that part meets second condition is stored as alternate node
If the alternate node and the requesting party belong to same operator, by alternate node storage to the first memory block Domain;
If the alternate node and the requesting party belong to different operators, by alternate node storage to the second memory block Domain.
6. the method as described in claim 1, which is characterized in that before the requesting party by destination node return, The method also includes:
Judge whether the number of the destination node reaches preset quantity;
If the number of the destination node is not up to preset quantity, looking into for the network node of the given query priority is judged Ask whether number reaches the total inquiry times of single group, if the inquiry times of the network node of the given query priority are not up to institute The total inquiry times of single group are stated, then return is described selects one group of network node from the network node randomly selected;
If the inquiry times of the network node of the given query priority reach the total inquiry times of the single group, all look into is judged Whether the network node for asking priority is chosen and is finished, and takes complete if the network node of all Query priorities is unselected, returns to institute State the network section for choosing given query priority from each network node according to the sequence of Query priority from high to low Point determines the total query node number of the single group of the network node of the given query priority.
7. method as claimed in claim 6, which is characterized in that the method also includes:
If the inquiry times of the network node of the given query priority are not up to the total inquiry times of the single group, described in judgement Whether the inquiry times of the network node of given query priority reach single group inquiry times threshold value;
If the inquiry times of the network node of the given query priority are not up to the single group inquiry times threshold value, return It is described that one group of network node is selected from the network node randomly selected;
Otherwise, if the inquiry times of the network node of the given query priority reach the single group inquiry times threshold value, It executes the network node for judging all Query priorities and whether chooses and finish.
8. a kind of computer installation, which is characterized in that the computer installation includes memory and processor, on the memory It is stored with the computer program that can be run on the processor, is realized such as when the computer program is executed by the processor File polling method described in any one of claim 1-7.
9. a kind of file polling device, which is characterized in that described device includes:
Receiving unit, for receiving the file query requests of requesting party;
Determination unit for the region according to belonging to the requesting party and operator and is stored with the file query requests institute Region belonging to each network node of specified file and operator determine the Query priority of each network node;
Query unit, comprising:
First chooses subelement, refers to for choosing from each network node according to the sequence of Query priority from high to low The network node for determining Query priority determines the total query node number of the single group of the network node of the given query priority;
Second chooses subelement, always inquires for randomly selecting the single group from the network node of the given query priority The network node of number of nodes;
Subelement is screened, for selecting one group of network node from the network node randomly selected, from the network node of selection The network node for meeting first condition is filtered out, the network node of the first condition will be met as destination node;
Return unit, for the destination node to be returned to the requesting party.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the file polling method as described in any one of claim 1-7 when the computer program is executed by processor.
CN201910277566.1A 2019-04-08 2019-04-08 File polling method and device, computer installation and storage medium Pending CN110008181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910277566.1A CN110008181A (en) 2019-04-08 2019-04-08 File polling method and device, computer installation and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910277566.1A CN110008181A (en) 2019-04-08 2019-04-08 File polling method and device, computer installation and storage medium

Publications (1)

Publication Number Publication Date
CN110008181A true CN110008181A (en) 2019-07-12

Family

ID=67170352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910277566.1A Pending CN110008181A (en) 2019-04-08 2019-04-08 File polling method and device, computer installation and storage medium

Country Status (1)

Country Link
CN (1) CN110008181A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142799A (en) * 2019-12-26 2020-05-12 深圳市网心科技有限公司 Distributed storage method and device, network node and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983237A (en) * 2005-12-15 2007-06-20 北京凯诚高清电子技术有限公司 Method and device for playing cross-platform distributed network controllable multi-medium
CN104216935A (en) * 2013-11-08 2014-12-17 腾讯科技(成都)有限公司 File finding method and terminal
US9208167B1 (en) * 2014-09-04 2015-12-08 Edifire LLC Distributed data synchronization and conflict resolution
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
CN109379448A (en) * 2018-12-27 2019-02-22 深圳市网心科技有限公司 A kind of file distribution dispositions method, device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983237A (en) * 2005-12-15 2007-06-20 北京凯诚高清电子技术有限公司 Method and device for playing cross-platform distributed network controllable multi-medium
CN104216935A (en) * 2013-11-08 2014-12-17 腾讯科技(成都)有限公司 File finding method and terminal
US9208167B1 (en) * 2014-09-04 2015-12-08 Edifire LLC Distributed data synchronization and conflict resolution
CN106716421A (en) * 2016-12-30 2017-05-24 深圳前海达闼云端智能科技有限公司 Data query method, device and node apparatus
CN109379448A (en) * 2018-12-27 2019-02-22 深圳市网心科技有限公司 A kind of file distribution dispositions method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张久旺: ""基于综合优先级的P4P节点选择算法"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111142799A (en) * 2019-12-26 2020-05-12 深圳市网心科技有限公司 Distributed storage method and device, network node and storage medium

Similar Documents

Publication Publication Date Title
CN104932781B (en) Application icon display methods at the terminal and device
CN109639823A (en) Network node dispatching method and device, computer installation and storage medium
CN105103506B (en) For the method and system for the non-homogeneous bandwidth request allocation bandwidth in system for cloud computing
CN109634915A (en) File dispositions method, Cloud Server, system and storage medium
KR20120006158A (en) Method and apparatus for managing menu item in a portable terminal
CN106537878A (en) Private content distribution network
CN102970379A (en) Method for realizing load balance among multiple servers
CN106844397B (en) Task transmission method, device and system based on sub-base and sub-table
KR101858715B1 (en) Management System for Service Resource and Method thereof
CN110035306A (en) Dispositions method and device, the dispatching method and device of file
CN106502840A (en) A kind of data back up method, apparatus and system
CN110430590A (en) Network is sliced matching process and device
CN109582246A (en) Data access method, device, system and readable storage medium storing program for executing based on mine machine
CN109618174A (en) A kind of live data transmission method, device, system and storage medium
CN106296095B (en) A kind of goods and materials concocting method and equipment based on wisdom storage
CN105468619A (en) Resource distribution method and device used for database connection pool
KR101129808B1 (en) Server for providing social Network Service and method for recommending personal connections thereof
CN111142799A (en) Distributed storage method and device, network node and storage medium
CN110347648A (en) File dispositions method and device, computer installation and storage medium
CN110008181A (en) File polling method and device, computer installation and storage medium
CN106156129A (en) File management method and device
CN110300182A (en) Network node dispatching method and device, computer installation and storage medium
CN103425684A (en) Method and device for database operation
CN109309858B (en) Display method, device, equipment and medium of mutually exclusive icon
CN106527979A (en) Data migration method and device

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: 20190712

RJ01 Rejection of invention patent application after publication