Specific embodiment
In the following description, for purposes of illustration, it in order to provide the comprehensive understanding to one or more embodiments, explains
Many details are stated.It may be evident, however, that these embodiments can also be realized without these specific details.
In other examples, one or more embodiments for ease of description, well known structure and equipment are shown in block form an.
In existing network flow processing scheme, for a user, if of that month terminal set meal flow cannots be used up
The end of month will be cleared when remaining, without accumulating into the set meal flow of next month, when the set meal flow of next month is not enough
When, it is desirable to continue online will extraneous expense expenses of surfing Internet, user always can not maximumlly using terminal set meal flow.For
The above problem, the present invention provide a kind of terminal flow sharing method, so that the terminal set meal flow in user has remaining situation
Under, remaining flow can be shared with others, avoid being run quotient's clearing;It, can be by seeking when customer flow is not enough
Look for the people for wanting to share self residual flow to using remaining flow in this person's set meal.
Hereinafter, specific embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 shows the process of terminal flow sharing method according to an embodiment of the present invention.
As shown in Figure 1, terminal flow sharing method provided in an embodiment of the present invention, comprising:
Step S110: first terminal is sent to flow shared server shares traffic requests.
First terminal includes but is not limited to terminal, laptop, PDA of user etc..Shared with user's A using terminal and is flowed
For amount, when user's A terminal flow has residue to want to be shared with other users, user A passes through terminal to flow shared server
It sends and shares traffic requests, after flow shared server receives the request, behaviour relevant to user A sharing flow can be executed
Make.
Step S120: flow shared server generates hotspot name and hot spot password according to traffic requests are shared, and sends
To first terminal.
User A shares flow could use after logging in the shared hot spot firstly the need of shared hot spot, other users are created
The flow of shared hot spot founder.The sharing traffic requests that user A is sent to flow shared server include that user A wants creation
The information of shared hot spot obtains user A and wants to create shared hot spot after flow shared server receives and shares traffic requests
Information, generate hotspot name and hot spot password at random immediately and be sent in the terminal of user A, create shared hot spot for user A.
In addition, other users obtain shared hot spot founder flow it is practical be flow using founder.
Step S130: first terminal creates shared hot spot according to hotspot name and hot spot password.
It after user A creates shared hot spot by terminal, steps on if there is other users into this and shares hot spot, then user A is just
The terminal flow of oneself can be shared with and step on the user for sharing hot spot into this, creation can be used by stepping on into the user for sharing hot spot
The terminal flow online of the user A of shared hot spot.
Step S140: second terminal obtains the hotspot name of shared hot spot, and is uploaded to flow shared server.
Second terminal is the equipment that terminal, laptop, the PDA etc. of other users are able to use flow online, other
For user by taking user B as an example, user B wants the flow using user A, firstly, user B is created by the terminal of terminal searches user A
Then the shared hot spot built obtains the hotspot name of the shared hot spot, is uploaded to flow shared server.
Step S150: flow shared server sends hot spot password corresponding with hotspot name to second terminal.
After the hotspot name that the terminal that flow shared server receives user B uploads, it can inquire and the hotspot name pair
The hot spot password answered, hot spot password is sent in the terminal of user B.
Step S160: shared hot spot is logged in by second terminal according to hot spot password, obtains flow.
After the terminal of user B receives the hot spot password of flow shared server transmission, shared hot spot is logged in, it will be able to
It is surfed the Internet using the flow of user A.
It should be noted that the user for wanting to share flow serves as flow participator, it is desirable to be served as using the user of flow
Flow user, a user, which can both serve as flow participator, can also act as flow user.Loiter network phenomenon in order to prevent
Generation, in a specific embodiment of the invention, using by establish account system be managed collectively flow participator and
Flow user, when user wants to share flow or use flow, first login account system is not logged on account system in this way
User can not just obtain the flow that others shares out.Meanwhile for the sake of justice, user must be first by the flow of oneself point
It enjoys to other people flow could be used after other people.
Data interaction during shared flow, between first terminal, second terminal and flow shared server
Journey is as shown in Figure 2:
S201: first terminal is sent to flow shared server shares traffic requests.
S202: flow shared server generates hotspot name and hot spot password according to traffic requests are shared.
S203: the hotspot name of generation and hot spot password are sent to first terminal by flow shared server.
S204: first terminal creates shared hot spot according to hotspot name and hot spot password.
S205: second terminal obtains the hotspot name of the shared hot spot of first terminal creation.
S206: the hotspot name that second terminal will acquire is uploaded to flow shared server.
S207: flow shared server sends hot spot password corresponding with hotspot name to second terminal.
In addition, second terminal according to hot spot password login share hot spot, using first terminal flow when, second terminal
The byte number of the flow of the first terminal used is reported to flow shared server, first terminal will be shared with second terminal
The byte number of flow can be reported to flow shared server, and flow shared server will record first terminal and second terminal reports
Flow byte number.
In order to which terminal flow sharing method provided by the invention is described in more detail, Fig. 3 is shown to be implemented according to the present invention
The detailed process of the terminal flow sharing method of example.As shown in figure 3, terminal flow sharing method packet provided in an embodiment of the present invention
It includes:
Step S310: user's login account system.
Account system can manage the user in the system by the way of account management, be not logged in the user of the system
Want to log in the system must first register account number, which is logged in by the account of registration, the user for having account can basis
Registered account logs in the system, and account system can also manage the user in the system using other way.
After user's login account system, two functions can be presented in account system to user, and a function is " sharing flow ",
Another function is " using flow ".For the user of first time login account system, it is necessary to " sharing flow " function is first used,
The function " using flow " could be used after being shared with other customer flows.Therefore, user's first time login account system can only
First traffic engineering capability is shared in selection,, can be according to certainly after login account system for the user of non-first time login account system
Own actual demand selection shares traffic engineering capability or uses traffic engineering capability, and it is shared to flow that user selects sharing traffic engineering capability to be equal to
Server, which is sent, shares traffic requests, and user's selection, which is equal to send to flow shared server using traffic engineering capability, uses flow
Request, flow shared server carry out corresponding operation according to the type of request.
Step S320: judge that user selects to share traffic engineering capability or uses traffic engineering capability, if user selects to share flow
Function executes step S330;If user's selection uses traffic engineering capability, S360 is thened follow the steps.
Share traffic engineering capability and using traffic engineering capability for the user of non-first time login account system be two simultaneously
The function of column.
Step S330: Wi-Fi Hotspot is established.
The user that account system is not added in order to prevent connects the Wi-Fi Hotspot and using the user of creation Wi-Fi Hotspot
Flow, Wi-Fi Hotspot title and password must be obtained from flow shared server.Specifically, by flow shared server
16 alphanumeric random combines are generated, using preceding 8 characters of Wi-Fi-Share+16 random combines as hotspot name,
And rear 8 characters of 16 random combines are as hot spot password.For example, hotspot name is Wi-Fi-Share23sd3231, hot spot
Password is da2383re, but the present invention is not limited to generate the random combine of 16 characters.
Wherein, Wi-Fi-Share is the beginning of hotspot name, finds convenient for other users, can also change it into
The beginning of its hotspot name.
In addition, flow shared server can also generate the character combination of other digits at random, using a part of character as
The hotspot name of shared hot spot, hot spot password of another part character as shared hot spot.
Step S340: another user accesses the Wi-Fi Hotspot established.
Specifically, by taking user B as an example, the process for the Wi-Fi Hotspot that user B access is established are as follows: in user's B login account system
After system, the hot spot of scanning surrounding Wi-Fi-Share beginning finds and 8 characters after hotspot name are uploaded to flow after hot spot is total to
Server is enjoyed, judges whether user B is the user for sharing inflow-rate of water turbine by flow shared server, if it is, the shared clothes of flow
The password that business device inquires Wi-Fi Hotspot issues the user B, after user B obtains password, logs in Wi-Fi Hotspot and can surf the Internet;
If it is not, then the password that flow shared server does not give user B to send Wi-Fi Hotspot, and user B is prompted first to share flow.
In addition, user, when sharing flow, the size of the flow of user's sharing, example can be set in flow shared server
Such as, party A-subscriber has the residual flow of 50M, he can be shared with party B-subscriber's 20M flow, and remaining 30M flow oneself uses, this is avoided
The flow that party B-subscriber obtains from party A-subscriber is more than party A-subscriber remaining flow itself.But if A is accessed without other users
The Wi-Fi Hotspot that user establishes, then the party A-subscriber can not share flow.
Step S350: the flow letter that the flow information and another user that flow shared server record user shares use
Breath.
Flow shared server can count the flow letter that each user is shared with other users by establishing tables of data
Breath and each user use the flow information of other users, and tables of data is as follows:
In order to guarantee the fairness between user, user cannot be greater than user itself using the byte number of the flow of other users
The byte number for the flow shared away, such as user share away 50M flow, and user's most multipotency is flowed using the 50M of other users
Amount, but the flow shared away and the flow used can be accumulated, and the summation of the flow used is less than or is equal to and shares
The summation for the flow gone out.
The purpose of flow shared server record flow information is that control user uses the flow amount of other users, with
For party A-subscriber and party B-subscriber, if party B-subscriber shared 50M flow, party B-subscriber can use 50M flow from party A-subscriber, if with
When the process that family B is used from party A-subscriber reaches 50M, flow shared server notifies the terminal of user A to disconnect the end with user B
The connection at end limits the flow that party B-subscriber uses with this, and the flow amount for preventing party B-subscriber from obtaining is more than that its own is shared away
Flow amount.But C user also accesses the Wi-Fi Hotspot of party A-subscriber's creation, then the flow accumulation that C user uses to party A-subscriber is shared
Discharge record in (flow that the flow+C that uses of flow=B that A shares is used), and so on, the flow that party A-subscriber shares is got over
More flows that it can be used are more.
In addition, in a mobile network, flow is divided into three types, respectively 4G, 3G and 2G according to speed, it is equivalent to three
Speed class, i.e. 4G network speed > 3G network speed > 2G network speed, flow shared server record each user and are shared with other users'
The speed class of the flow for the other users that the speed class of flow and each user use, user is by other users to be used
Flow speed class be less than or be shared with equal to user other users flow speed class, i.e., user sharing high speed
Low speed flow can be used after flow, but high speed flow cannot be used after user sharing low speed flow.Specifically, if user point
Enjoying to other users is 4G flow, then 4G, 3G or 2G flow of other users can be used in the user;If user is shared with
Other users are 3G flows, then the 2G or 3G flow of other users can be used in the user;If user is shared with other use
Family is 2G flow, then the user can only use the 2G flow of other users.
The flow that user uses other users is limited in such a way that flow shared server records the speed class of flow,
It can be realized by two ways:
1, before after user logs in shared hot spot by terminal, using the flow of other users, flow shared server is sentenced
Break shared hot spot that the user is logged in by terminal speed class whether be less than or equal to flow shared server record should
User is by terminals share to the speed class of the flow of other users;If it is, the user can be used altogether by terminal
Enjoy the flow of hot spot;If it is not, then the terminal of the user is disconnected and creates the end for sharing hot spot by flow shared server notice
The connection at end.
2, before user logs in shared hot spot by terminal, flow shared server judges user by terminals share to it
Whether the speed class of the flow of his user is less than or equal to the speed class of the shared hot spot;If it is, the shared clothes of flow
Device be engaged in the terminal of user transmission hot spot password corresponding with hotspot name, which passes through terminal according to hot spot password and log in
The flow of other users is used after shared hot spot;If it is not, then flow shared server is not sent and heat to the terminal of the user
The corresponding hot spot password of point title.
It should be noted that the speed class of shared hot spot is the speed class for creating the flow of terminal of shared hot spot.
In addition, user is every will to be reported to flow shared server using 1M flow, and flow is shared during user uses flow
Flow value workable for user is subtracted 1 by server, and when retrievable flow value is 0, flow shared server disconnects net automatically
Network, user can not continue to use shared flow.
Step S360: judging whether user shares inflow-rate of water turbine, if so, executing step S370;If not, executing step
S390。
The user is further judged if user shares inflow-rate of water turbine, and whether there are also workable flows, if user does not divide
Inflow-rate of water turbine is enjoyed, then is not available the flow of other users, the prompt of flow can be first shared to user one.
Step S370: judging whether user has workable flow, if so, thening follow the steps S380;If it is not,
Execute step S390.
When user's selection is using traffic engineering capability, flow shared server judges the user, and whether there are also workable streams
Amount, if so, the step of then continuing the subsequent flow using other users;If not provided, it is workable to illustrate that user has not had
Flow or the user do not share inflow-rate of water turbine.
Wherein, the used flow of flow-for workable flow=shared.
Step S380: finding the Wi-Fi Hotspot that surrounding user is established, and accesses the Wi-Fi Hotspot and obtain flow.
The process that user accesses Wi-Fi Hotspot refers to step S340.
After user accesses the Wi-Fi Hotspot, the flow for the other users that flow shared server record user uses, when
Circuit network in when flow value workable for user is 0, that is to say, that flow shared server is by flow value workable for the user
As critical value, network is disconnected automatically when the flow that user uses reaches critical value.For example, for example user once shares 50M
Flow, flow workable for user has used 30M using 50M flow as critical value for 50M from other users now at this time
Flow, the flow that may be used subtracts 30M, there remains 20M, if continuing to use flow, can only at most use 20M, that is,
When the flow that user uses reaches critical value 50M automatically in circuit network.
In addition, the user is not available other users if user does not find the shared hot spot of other users foundation
Flow.
Step S390: the flow of other users is not available it.
Since user does not have workable flow, then process terminates.
Terminal flow sharing method provided in an embodiment of the present invention is described in detail in above-mentioned steps S310~S390, in user
Flow has in remaining situation, after registration terminal flow share system, the hotspot name that is generated by flow shared server and
Hot spot password creates shared hot spot, and remaining flow is shared with other users, when customer flow deficiency needs to obtain flow,
After registration terminal flow share system, the flow that people from periphery shares out is reused, more reasonably using terminal is allowed users to
Set meal flow.
Corresponding with above-mentioned terminal flow sharing method, the present invention provides a kind of terminal flow shared system.
Fig. 4 shows the first logical construction of terminal flow shared system according to an embodiment of the present invention.
As shown in figure 4, terminal flow shared system 400 provided in an embodiment of the present invention, including sharing request transmission unit
410, it shares hot spot creating unit 420, hotspot name acquiring unit 430, shared hot spot and logs in unit 440.
Wherein, sharing request transmission unit 410, which is used to send by first terminal to flow shared server, shares flow
Request.
The hotspot name and hot spot password that shared hot spot creating unit 420 is used to be sent according to flow shared server pass through
First terminal creates shared hot spot.
Hotspot name acquiring unit 430 is used to obtain the hotspot name of shared hot spot by second terminal, and is uploaded to stream
Measure shared server.
It is close that shared hot spot logs in the hot spot corresponding with hotspot name that unit 440 is used to send according to flow shared server
Code logs in shared hot spot by second terminal.
Fig. 5 shows the second logical construction of terminal flow shared system according to an embodiment of the present invention.
As shown in figure 5, it includes speed class judgment module 441 that shared hot spot, which logs in unit 440, for according to shared heat
Point logs in during unit 440 logs in shared hot spot, judge the speed class for the flow that second terminal is shared whether be less than or
Equal to the speed class of shared hot spot;If so, flow shared server sends heat corresponding with hotspot name to second terminal
Point password.
Terminal flow shared system 400 further includes byte number recording unit 450, for logging in unit according to shared hot spot
After 440 log in shared hot spot, the byte number of the flow reported by the second terminal used is recorded;If use reported by the second terminal
The byte number of flow be greater than or equal to the byte number that second terminal is shared with the flow of other terminals, flow shared server is logical
Know that first terminal disconnects the connection with second terminal.
Corresponding with terminal flow sharing method, the present invention also provides a kind of flow shared server, data processing streams
Journey is as shown in fig. 6, by taking user A and user B as an example, the data processing method packet of flow shared server 600 provided by the invention
It includes:
Step S601: generating hotspot name and hot spot password by the sharing traffic requests that terminal is sent according to user A, and
The hotspot name of generation and hot spot password are sent to the terminal of user A.
Step S602: the hotspot name uploaded according to user B by terminal sends the heat with upload to the terminal of user B
The corresponding hot spot password of point title.
Wherein, flow shared server 600 is generating hot spot name by the sharing traffic requests that terminal is sent according to user A
During claiming with hot spot password, flow shared server 600 generates the random combine of 16 characters, wherein preceding 8 characters are made
For hotspot name, rear 8 characters are as hot spot password.
In a specific embodiment of the data processing method of shared server 600, logged in user B by terminal
Shared hot spot, during the flow using user A, the byte number of the flow used is reported to flow by terminal by user B
Shared server 600, flow shared server 600 record the byte number for the flow that user B is reported by terminal, that is, record
User A is by terminals share to the byte number of the flow of user B;If user B is big by the byte number for the flow that terminal reports
Pass through terminals share to the byte number of the flow of other users in or equal to user B, flow shared server notifies the end of user A
End disconnects the connection with the terminal of user B.
In the another embodiment of the data processing method of shared server 600, stepped in user B by terminal
During recording shared hot spot, flow shared server 600 judges speed of the user B by terminals share to the flow of other users
Whether degree grade is less than or equal to the speed class of the shared hot spot;If so, end of the flow shared server 600 to user B
End sends hot spot password corresponding with hotspot name.In another specific implementation of the data processing method of shared server 600
In mode, is logged in user B by terminal and share hot spot, during the flow using user A, flow shared server 600
Limit size of the user A by terminals share to the flow of user B.
In three specific embodiments of the data processing method of above-mentioned shared server 600, implementation sequence is in no particular order.
The present invention correspondingly provides a kind of device end, and referring to Fig. 7, which includes the shared system of terminal flow
System 400 and flow shared server 600;Wherein,
Terminal flow shared system 400 has structure described in Fig. 5, and flow shared server 600 in Fig. 6 by retouching
The flow shared server stated, referring specifically to previously mentioned, details are not described herein again.
Terminal flow sharing method and system provided by the invention is described in detail above, user is surplus in terminal set meal flow
Yu Shi, Xiang Liuliang shared server, which are sent, shares traffic requests, the hotspot name generated by flow shared server and hot spot
Password creates shared hot spot, and flow remaining in set meal is shared with other users, avoids the waste of user terminal set meal flow,
User finds the shared hot spot of other users creation in terminal set meal underfed, and obtains heat from flow shared server
Point password, after user shares hot spot by hot spot password login, the flow provided using other users is avoided outside user's amount paid
Online expense, allow users to more reasonably, maximumlly using terminal set meal flow.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.