Summary of the invention
The main purpose of the present invention is to provide a kind of based on income distribution method, server and the storage of sharing flowMedium, it is intended to which solving the existing distribution of income to the user for sharing flow can not achieve rationally dividing for different business terminal userWith the technical issues of.
To achieve the above object, provided by the invention based on the income distribution method for sharing flow, the method is applied toIn server, the server and first node equipment group and second node equipment group are communicated to connect, the first node equipmentGroup includes at least one first node equipment, and the second node equipment group includes at least one second node equipment;The sideMethod includes:
Obtain the income total amount in preset time period;
The each first node equipment obtained in the first node equipment group provides in the preset time periodFlow and the second node equipment group in the stream that is provided in the preset time period of each second node equipmentAmount;
According in the preset time period income total amount, each first node equipment is when described defaultBetween the flowmeter that is provided in the preset time period of the flow that provides in section, each second node equipment calculateThe income of each first node equipment.
Preferably, the income total amount according in the preset time period, each first node equipment existThe flow of offer, each second node equipment provide in the preset time period in the preset time periodThe income that flowmeter calculates each first node equipment specifically includes:
According in the preset time period income total amount, each first node equipment is when described defaultBetween the flowmeter that is provided in the preset time period of the flow that provides in section, each second node equipment calculateThe income of the first node equipment group;
According to the income of the first node equipment group and each first node equipment in the preset timeThe flowmeter provided in section calculates the income of each first node equipment.
Preferably, the income total amount according in the preset time period, each first node equipment existThe flow of offer, each second node equipment provide in the preset time period in the preset time periodThe income that flowmeter calculates the first node equipment group includes:
It calculates total flow that the first node equipment group provides in the preset time period and the second node is setThe total flow that standby group provides in the preset time period;
According in the preset time period income total amount, the first node equipment group is in the preset time periodThe mass flow meters that the total flow of offer, the second node equipment group provide in the preset time period calculate described firstThe income of node device group.
Preferably, the income total amount according in the preset time period, the first node equipment group are described pre-If the total flow that the total flow provided in the period, the second node equipment group provide in the preset time period calculatesThe income of the first node equipment group includes: out
The income of the first node equipment group, first formula are calculated according to the first formula are as follows:
Wherein, CmIndicate the income of the first node equipment group, CtIndicate the income total amount in the preset time period,F1Indicate the total flow that the first node equipment group provides in the preset time period, F2Indicate the second node equipmentThe total flow that group provides in the preset time period, e1Indicate the cost factor of first node equipment, e2Indicate second nodeThe cost factor of equipment.
Preferably, described to be existed according to the income and each first node equipment of the first node equipment groupThe income that the flowmeter provided in the preset time period calculates each first node equipment includes:
The flow provided in the preset time period according to each first node equipment is by the first segmentPoint device group is divided into several contribution level groupings, and each contribution level grouping includes at least one first node equipment,Each contribution level is grouped a corresponding flow rate zone;
The income of each contribution level grouping is calculated according to each flow rate zone;
According to the income of each contribution level grouping and each first node equipment described pre-If the flowmeter provided in the period calculates the income of each first node equipment.
Preferably, include: according to the income that each flow rate zone calculates each contribution level grouping
Set the distribution weight of each contribution level grouping;
Go out each contribution level according to the income calculation of the distribution weight and the first node equipment groupThe income of grouping.
Preferably, the income according to each contribution level grouping and each first nodeThe income that the flowmeter that equipment provides in the preset time period calculates each first node equipment includes:
Each institute is calculated according to the flowmeter that each first node equipment provides in the preset time periodState the node device score of first node equipment;
Go out each described the according to the income calculation of the node device score and each contribution level groupingThe income of one node device.
Preferably, the flow provided in the preset time period according to each first node equipmentThe node device score for calculating each first node equipment includes:
The node device score of each first node equipment, second formula are calculated according to the second formula are as follows:
M=max (actual contribution flow, flow of the guaranteeing the minimum) × isp factor × (online hours/24 hour), wherein timeContribution flow indicates that the flow that the first node equipment provides in the preset time period, M indicate that the first node is setStandby node device score, the isp factor representation Internet Service Provider factor.
Preferably, described according to the node device score and the income calculation of each contribution level groupingThe income of each first node equipment includes: out
The income of each first node equipment, the third formula are calculated according to third formula are as follows:
Wherein, i=1,2...n CiIndicate the income of i-th of first node equipment, MiIndicate i-th of first node equipmentNode device score, CjIndicate the income of the contribution level grouping where i-th of first node equipment.
To achieve the above object, the present invention further provides a kind of server, the equipment includes memory and processingDevice is stored with the computer program that can be run on the processor on the memory, and the computer program is by the placeReason device realizes above-mentioned method when executing.
To achieve the above object, the present invention further provides a kind of computer readable storage mediums, described computer-readableComputer program is stored on storage medium, the computer program can be executed by one or more processor, on realizingThe method stated.
The flow and second node equipment group that the present invention provides within a preset period of time according to first node equipment group are pre-If the flow provided in the period, by the income totalizing method in preset time period to first node equipment group and second nodeEquipment group, and then the income of each first node equipment is calculated, to realize the income between different business terminal userReasonable distribution, transfer user share flow enthusiasm.
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,The present invention will be described in further detail.It should be appreciated that described herein, specific examples are only used to explain the present invention,It is not intended to limit the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative laborEvery other embodiment obtained under the premise of dynamic, 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 drawingFour " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that making in this wayData are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein or describingContent other than sequence implement.In addition, term " includes " and " having " and their any deformation, it is intended that coveringNon-exclusive includes, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited toStep or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produceThe 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, withoutIt can be interpreted as its relative importance of indication or suggestion or implicitly indicate the quantity of indicated technical characteristic.It defines as a result,The feature of " first ", " second " can explicitly or implicitly include at least one of the features.In addition, between each embodimentTechnical solution can be combined with each other, but must based on can be realized by those of ordinary skill in the art, work as technical sideThere is conflicting or cannot achieve when and will be understood that the combination of this technical solution is not present in the combination of case, also not in this hairWithin the protection scope of bright requirement.
The present invention provides a kind of income distribution method based on sharing flow, and Fig. 1 is provided in an embodiment of the present invention is based onShare flow income distribution method application scenario diagram, method provided by the invention be applied to server 1 in, server 1 withFirst node equipment group and the communication connection of second node equipment group, first node equipment group includes that at least one first node is setStandby 2, second node equipment group includes at least one second node equipment 3;
For example, first node equipment 2 can be equipped with software package, for passing through software package to corresponding clientFlow is provided, second node equipment 3 can be equipped with entity plug-in unit 4 and provide flow to corresponding client by entity plug-in unit 4.In the present embodiment, first node equipment 2 and second node equipment 3 can be PC (PersonalComputer, personal electricityBrain), it is also possible to smart phone, tablet computer, palm PC, portable computer, intelligent router, node device, network and depositsDevice end equipment is stored up, software package is mobile phone treasured software, and entity plug-in unit 4 can be the objective cloud of object for appreciation, and playing objective cloud is that can carry out farThe private cloud disk of journey manipulation and file management.
As shown in Fig. 2, in one embodiment, this method comprises:
S10 obtains the income total amount in preset time period.
Wherein, income is virtual digit assets, for example, the chain gram that sudden peal of thunder company provides.Preset time period be from it is default whenBetween starting point to the duration between preset time terminal.For example, preset time period is a consecutive days, preset time starting point is every0 point of one day, preset time terminal are 24 points of every day.Income total amount is the chain gram total output on the same day, and chain gram total output is usedIn distributing to first node equipment and second node equipment, i.e. first node equipment group and second node equipment group is according to a set ofIncentive program carries out distribution of income.
S20 obtains each first node equipment in the first node equipment group in the preset time periodEach second node equipment in the flow of offer and the second node equipment group provides in the preset time periodFlow.Specifically, monitoring each first node equipment and each second node since preset time starting point in the stepThe flow that equipment provides, and the stream that each first node equipment provides within a preset period of time is being obtained in preset time terminalThe flow that amount and each second node equipment provide within a preset period of time.
S30, according in the preset time period income total amount, each first node equipment is described pre-If the flowmeter that the flow provided in the period, each second node equipment provide in the preset time periodCalculate the income of each first node equipment.
In one embodiment, the flow and every 1 provided within a preset period of time according to each first node equipmentThe flow that two node devices provide within a preset period of time is that each first node equipment and each second node equipment are arrangedWeight corresponding with the flow of offer gives benefited totalizing method to each first node equipment and each second node equipment.
The flow that the flow and each second node equipment group that the present embodiment is provided according to each first node equipment provideGive income totalizing method to each first node equipment group and each second node equipment, the flow provided is more, is assigned toIncome is higher, to realize the reasonable distribution in the income of different business terminal, transfers the enthusiasm that user shares flow.
As shown in figure 3, in one embodiment, step S30 includes:
S31, according in the preset time period income total amount, each first node equipment is described pre-If the flowmeter that the flow provided in the period, each second node equipment provide in the preset time periodCalculate the income of the first node equipment group.
In one embodiment, the flowmeter provided within a preset period of time according to each first node equipment calculates theThe flow that one node device group provides, the flowmeter provided within a preset period of time according to each second node equipment calculate theThe stream that the flow that two node device groups provide, the flow provided according to first node equipment group and second node equipment group provideAmount is by income totalizing method to first node equipment group and second node equipment group.
S32, according to the income of the first node equipment group and each first node equipment described defaultThe flowmeter provided in period calculates the income of each first node equipment.
According to the flow that each first node equipment provides within a preset period of time, first node equipment group is assigned toIncome reallocate to each first node equipment.
By income totalizing method to first node equipment group and second node equipment group, then by first node equipment componentThe income being fitted on is matched in first node equipment group inner part, to realize the compatibility of different business terminal.And the flow provided is got overMore, the income being assigned to is higher, so that transferring user provides the enthusiasm of flow.
As shown in figure 4, in one embodiment, step S31 includes:
S311 calculates total flow and described second that the first node equipment group provides in the preset time periodThe total flow that node device group provides in the preset time period.
The flow that each first node equipment provides is counted, first node equipment group is calculated and mentions within a preset period of timeThe total flow of confession counts the flow that each second node equipment provides, calculates second node equipment group within a preset period of timeThe total flow of offer.
S312, according in the preset time period income total amount, the first node equipment group is in the preset timeDescribed in the mass flow meters that total flow, the second node equipment group provided in section provides in the preset time period calculateThe income of first node equipment group.
The total flow and second node equipment group provided within a preset period of time according to first node equipment group is when defaultBetween the total flow that provides in section be that weight corresponding with flow, root is arranged in first node equipment group and second node equipment groupAccording to the weight of first node equipment group and the weight of second node equipment group by income totalizing method to first node equipment group andSecond node equipment group.
In one embodiment, the income of the first node equipment group, the first formula are calculated according to the first formulaAre as follows:
Wherein, CmIndicate the income of the first node equipment group, CtIndicate the income total amount in the preset time period,F1Indicate the total flow that the first node equipment group provides in the preset time period, F2Indicate the second node equipmentThe total flow that group provides in the preset time period, e1Indicate the cost factor of first node equipment, e2Indicate second nodeThe cost factor of equipment.Wherein, the cost factor of second node equipment can be the price of entity plug-in unit, first node equipmentCost factor can depending on the quantity for the second node equipment being connect with server communication, can be 1.
In the above-described embodiments, according in preset time period income total amount, first node equipment group is in preset time periodThe mass flow meters that total flow, the second node equipment group of interior offer provide in the preset time period calculate first node and setThe income of standby group, thus make first node equipment group and second node equipment group according to traffic contributions capability distribution income, firstThe user of node device group is more, and the flow of sharing is more, and the income of first node equipment group distribution is higher, and then makes eachThe income of first node equipment distribution is higher, to transfer the enthusiasm that user shares flow.
As shown in figure 5, in one embodiment, step S32 includes:
S321, will be described according to the flow that each first node equipment provides in the preset time periodFirst node equipment group is divided into several contribution level groupings, and each contribution level grouping includes at least one first segmentPoint device, each contribution level are grouped a corresponding flow rate zone.
First node equipment group is divided into several by the flow provided within a preset period of time according to each first node equipmentContribution level grouping.For example, the quantity of the first node equipment in first node equipment group is 100, by first node equipment groupInterior all first node equipment are ranked up and number from small to large according to the number of the flow of offer, and number is 1-10'sFirst node equipment is the grouping of the first contribution level, and number is that 11-30 is the grouping of the second contribution level, and number is 31-60'sFor the grouping of third contribution level, number is that 71-100 is the grouping of the 4th contribution level.
S322 calculates the income of each contribution level grouping according to each flow rate zone.
As shown in fig. 6, step S322 includes:
S3221 sets the distribution weight of each contribution level grouping.
S3222 goes out each tribute according to the income calculation of the distribution weight and the first node equipment groupOffer the income of hierarchal grouping.
Continue in above embodiment, weight is set for the grouping of each contribution level, for example, the first contribution level is groupedDistribution weight be 2%, the second contribution level grouping distribution weight be 8%, third contribution level grouping distribution weight be20%, the distribution weight of the 4th contribution level grouping is 70%.According to the receipts of the distribution weight of each group and first node equipment groupBenefit calculates the income of each contribution level grouping.
In the above-described embodiment, different contribution level groupings is set, corresponding according to the grouping of each contribution levelFlow rate zone is the different weight of each contribution level grouping and setting, is each contribution level point according to different distribution weightsWith income, it is that each node device distributes income according to the flow that each node device is shared, improves the product that user shares flowPolarity.
S323 exists according to the income of each contribution level grouping and each first node equipmentThe flowmeter provided in the preset time period calculates the income of each first node equipment.
As shown in fig. 7, in one embodiment, step S323 includes:
Step S3231, the flowmeter provided in the preset time period according to each first node equipmentCalculate the node device score of each first node equipment.
In one embodiment, the node device point of each first node equipment is calculated according to the second formulaNumber, second formula are as follows:
M=max (actual contribution flow, flow of the guaranteeing the minimum) × isp factor × (online hours/24 hour), wherein timeContribution flow indicates that the flow that the first node equipment provides in the preset time period, M indicate that the first node is setStandby node device score, the isp factor representation Internet Service Provider factor.Wherein, actual contribution flow is preset timeBy the flow of traffic scheduling in section, the flow of guaranteeing the minimum of each first node equipment be may be the same or different, can basisHistory shares flow or while enlivening a length of different first node equipment sets different flows of guaranteeing the minimum, for example, setting history pointThe flow of guaranteeing the minimum for enjoying the high user of flow is higher.Actual contribution flow and the maximum value for flow of guaranteeing the minimum is taken to set as calculate nodeClearing flow when back-up number.The isp factor depending on the stable case of each service provider, for example, statistics movement, connection,The stability that the history of each service provider such as electric wire, Great Wall Broadband Network Service Company Limited shares flow is that each service provider sets different ispThe factor.
In the above-described embodiment, flow of guaranteeing the minimum is introduced in calculate node equipment score, when actual contribution flow is lower thanGuarantee the minimum flow when, using flow rate calculation node device score of guaranteeing the minimum.Flow of guaranteeing the minimum is set for first node equipment, is avoided because of industryFirst node equipment income caused by business scheduling is unbalanced is too low, no matter whether first node equipment has business called, all canAcquisition is guaranteed the minimum income, and user experience is promoted.The network stabilization of service provider is introduced into the calculating of node device score,Guarantee the reasonable distribution of income.
Step S3232 goes out according to the income calculation of the node device score and each contribution level groupingThe income of each first node equipment.
In one embodiment, the income of each first node equipment is calculated according to third formula, describedThree formula are as follows:
Wherein, i=1,2...n CiIndicate the income of i-th of first node equipment, MiIndicate i-th of first node equipmentNode device score, CjIndicate the income of the contribution level grouping where i-th of first node equipment.
Income is distributed according to first node equipment of the node device score into the grouping of each contribution level, guarantees incomeReasonable distribution.
In above-described embodiment, the flow and Network status provided according to each first node equipment is each first node equipmentIncome is distributed, hardware capabilities factor is excluded, maximum magnitude ensures that participating user's base power is consistent, first node equipment userPurchase hardware device is not needed, flow can be shared using network broadband using stand-by equipment, such as mobile phone, it is reasonable to obtainIncome reward, is effectively utilized slack resources.
Including memory 11 and processor 12, the computer journey that can be run on the processor 12 is stored on memory 11Sequence, the computer program realize above-mentioned method when being executed by processor 12.
As shown in figure 8, server 1 provided in an embodiment of the present invention, in the present embodiment, server 1 can be PC(PersonalComputer, PC), is also possible to smart phone, tablet computer, palm PC, portable computer, intelligenceIt can router, node device, network storage equipment terminal device.
The server 1 may include memory 11, processor 12 and bus 13.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and the readable storage medium storing program for executing includes dodgingIt deposits, hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..StorageDevice 11 can be the internal storage unit of server 1, such as the hard disk of the server 1 in some embodiments.Memory 11 existsIt is also possible to the plug-in type hard disk being equipped on the External memory equipment of server 1, such as server 1, intelligence in other embodimentsEnergy storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (FlashCard) etc..Further, memory 11 can also both include the internal storage unit of server 1 or set including external storageIt is standby.Memory 11 can be not only used for the application software and Various types of data that storage is installed on server 1, such as computer programCode etc., can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11Code or processing data, such as execute computer program etc..
Further, server 1 can also include network interface, network interface optionally may include wireline interface and/Or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in being established between the server 1 and other electronic equipmentsCommunication connection.
Optionally, the server 1 can also include user interface, user interface may include display (Display),Input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.Optionally, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display andOLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also fitWhen be known as display screen or display unit, for showing the information handled in the server 1 and for showing visual useFamily interface.
Fig. 8 illustrates only the server 1 with component 11-13, it will be appreciated by persons skilled in the art that Fig. 8 is shownStructure do not constitute the restriction to server 1, may include more certain than illustrating less perhaps more components or combinationComponent or different component layouts.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof realIt 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.Described in loading and execute on computersWhen computer program instructions, entirely or partly generate according to process or function described in the embodiment of the present invention.The computerIt can be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be withStorage in a computer-readable storage medium, or from a computer readable storage medium to another computer-readable storageMedium transmission, for example, the computer instruction can be from a web-site, computer, server or data center by havingLine (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode are to anotherA web-site, computer, server or data center are transmitted.The computer readable storage medium can be calculatingAny usable medium that machine can store either includes integrated server, the data center etc. of one or more usable mediumsData 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 equipment of foregoing descriptionSpecific work process, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
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.AndAnd the terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so thatProcess, device, article or method including a series of elements not only include those elements, but also including not arranging clearlyOther element out, or further include for this process, device, article or the intrinsic element of method.Not moreIn the case where limitation, the element that is limited by sentence "including a ...", it is not excluded that include the element process, device,There is also other identical elements in article or 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 hairEquivalent structure or equivalent flow shift made by bright specification and accompanying drawing content, it is relevant to be applied directly or indirectly in otherTechnical field is included within the scope of the present invention.