Embodiment one
An embodiment of the present invention provides a kind of code check resource allocation methods.
Fig. 1 is the flow chart of code check resource allocation methods according to embodiments of the present invention.As shown in Figure 1, the code check resource
It is as follows that distribution method includes step:
Step S102, receives the code check resource state information that terminal is sent, which is used to indicate end
Code check resource needed for end;
Wherein, code check resource allocation methods provided in an embodiment of the present invention are suitable for the background devices of network side, the backstage
Equipment can be:Server or the server cluster being made of multiple servers.In addition, the terminal in step S102, Ke Yiwei
Intelligent electronic device, the intelligent electronic device can be:Television set intelligently box, smart television, smart mobile phone, tablet computer, pen
Remember this computer, desktop computer, palm PC, MP3 player (Moving Picture Experts Group Audio Layer
III, dynamic image expert's compression standard audio level 3), MP4 players (Moving Picture Experts Group
Audio Layer IV, dynamic image expert's compression standard audio level 4), electronic reader.
Specifically, during step S102 is realized, it can be with the code check resource status of server receiving terminal transmission
It is illustrated exemplified by information, for example, above-mentioned terminal is illustrated by taking smart television, smart mobile phone, tablet computer as an example:
Server receive from smart television, smart mobile phone, tablet computer code check resource state information.Wherein, service
The code check resource state information that the above-mentioned terminal that device receives is sent is the data acquisition module by being internally embedded in above-mentioned terminal
Block acquisition.The data acquisition module can also be embedded in gateway device, the type that server is forwarded by receiving gateway device
Code check resource state information, the terminal equipment type being connected according to the acquisition of code check resource state information with gateway device.
Data acquisition module provided in an embodiment of the present invention is only to realize code check resource allocation provided in an embodiment of the present invention
Subject to method, the position being located to the data acquisition module does not limit.
Step S104, the code check resource state information sent according to terminal are parsed, and obtain the code needed for counterpart terminal
The analysis result of rate resource;
Specifically, server is parsed according to the code check resource state information received in step S102, terminal is obtained
Type, the type of required code check resource, size, code check resource quality, code check resource request time and the terminal institute possession
Domain, and the information got according to the one or more in above-mentioned generates analysis result.Wherein, the code check resource request time is eventually
End sends the time of code check resource state information.
Wherein, which can be:Server is obtained by parsing code check resource state information belonging to the terminal
In region, in the code check resource request time of the terminal, the code check resource of required counterpart terminal type, and get the corresponding end
Hold type, size and the code check resource quality of the code check resource of type.Analysis result citing specific as follows:
It is assumed that terminal type is smart mobile phone, the affiliated region of terminal is X areas, and the code check resource request time is 21:30,
The type of code check resource is wma, and code check resource size is S Mb, and code check resource quality is compression ordinary quality, as a result, server
By parsing code check resource state information, obtained analysis result is:21 in X areas:30 there are smart mobile phones to ask
Code check resource type is wma, and size S Mb, code check resource quality is the code check resource of compression ordinary quality.
Step S106 carries out resource deployment according to analysis result for code check resource.
Specifically, the analysis result generated in server foundation step S104, resource deployment is carried out to code check resource, so as to
Data are provided for resource deployment decision-making to support, and then are the corresponding code check resource of terminal distribution.
The code check resource allocation methods that the above embodiments of the present application provide, the code check resource status sent by receiving terminal
Information, the code check resource state information are used to indicate the code check resource needed for terminal;The code check resource status sent according to terminal
Information is parsed, and obtains the analysis result of the code check resource needed for counterpart terminal;It is corresponded to according to analysis result for terminal distribution
Code check resource.It solves since server configuration code check resource mode is single, caused multimedia distortion or influence multimedia
The problem of bandwagon effect, so as to improve the efficiency of server configuration code check resource.
Preferably, code check resource state information includes at least one of:Code check resource, code check resource needed for multimedia
Regional information belonging to request time, terminal, the code check resource needed for multimedia include at least one of:Code check is resources-type
Type, code check resource size, code check source resource.
Specifically, the code check resource in the content that code check resource state information includes needed for multimedia includes:
Code check resource type includes at least:The corresponding code check resource type of audio, the corresponding code check resource type of video, figure
As corresponding code check resource type, the corresponding code check resource type of word;For example, using the corresponding code check resource type of image as
Example, the corresponding code check resource type of image can be:The picture of bmg or jpg forms;
Code check resource size is in addition to the corresponding file size of above-mentioned code check resource type, the terminal also with asking code check resource
Device type is associated, according to the terminal-pair of type should there are the code check resource size of form, such as audio resource just have wma and
Mp3 forms, the size of corresponding two kinds of forms is also different, for when terminal is smart mobile phone, audio resource is mainly based on mp3
Based on form;
Code check source resource can be the form of affiliated database or any storage code check resource of affiliated Dropbox, of the invention
Implementation, which is subject to, realizes code check resource allocation methods, is not especially limited.
Above-mentioned multimedia includes at least one of:Audio, video, image, word.
The time that code check resource state information includes can be time when terminal sends the code check resource state information, should
Time is obtained according to the code check resource state information of long-term receipt in a certain amount of time for the code of a certain type convenient for server
Rate resource has the record of the request of data of concentration so that server can be allocated according to the record corresponding code check resource or
Being allocated as code check resource transmission provides the performance serviced good server.Herein, the good server of performance refers to allotment one
Or multiple servers or server cluster or allotment idle server, to ensure that code rate data transmits.
The regional information that code check resource state information includes can send the institute during code check resource state information for terminal
Possession domain, for example, server by the affiliated region in code check resource state information to the code check resource state information that receives
Classify, the good server of the area allotment performance high to same region code check resource requirement.
Based on the code check resource state information mentioned in above-described embodiment, in step S104, the code according to terminal transmission
Rate resource state information is parsed, and the step of obtaining the analysis result of code check resource needed for counterpart terminal includes following arbitrary
A kind of realization method:
Mode one is parsed according to the code check resource request time in code check resource state information, obtained within the time
Code check resource needed for multimedia needed for terminal;
Specifically, parsed according to the code check resource request time in the code check resource state information, including:
Time in the code check resource data request record stored in the code check resource request time and server is carried out
Comparison;
If the time when code check resource request time is network resource transmission peak period passes according to current network data
Movement Capabilities configure corresponding code check resource or, allocate the good server of performance provides service for code rate data transmission.
Specifically, server is by the code check resource request time in code check resource state information, with pre-stored code check
The relation table of resource request time and code check resource data number of requests is compared.Code check resource request is stored in server
Time and the relation table of code check resource data number of requests, if the code check resource data number of requests of some periods has been more than pre-
If threshold value, then the period be considered to belong to network resource transmission peak period.For ease of judging the code check resource status received
Whether the code check resource request time in information belongs to peak period, and terminal-request code as shown in Table 1 is also stored on server
M- the first code check resource data request record for whether belonging to peak period during rate resource data-code check resource request.
When the code check resource request time in above-mentioned code check resource state information belonging to the peak period period, server
It is that the code rate data passes to configure corresponding code check resource according to current network data transmission capabilities or allocate the good server of performance
Defeated offer service.
Table 1
By taking table 1 as an example, if the code check resource data request of server storage is recorded as the content described in table 1, wherein false
If the predetermined threshold value for the code check resource data amount asked in unit interval section is G, if in the time 20:00~22:In 00, per small
When the code check resource data amount asked be more than G, it is determined that the time 20:00~22:It is peak period in 00, it is assumed that terminal 4 is 21:00
Code check resource state information is sent to server, shown in server foundation table 1, the request time for getting terminal 4 is 21:00,
The time is in peak period 20:00~22:In 00, server will be that terminal 4 configures corresponding code check resource as a result, and on peak
The one or more servers of allotment or allotment idle server undertake the data transmission of code check resource in phase.
It is provided for example, still receiving the code check from smart television, smart mobile phone, tablet computer with server in step S102
Exemplified by the status information of source, server receives the code check resource state information that above-mentioned terminal is sent, if being currently 8:30pm corresponds to
The timetable of the network resource transmission peak period of server storage belongs to the time in rush hour section, and server will be corresponding above-mentioned
The code check resource of the corresponding form of type distribution of terminal allocates the good server of performance to ensure code rate data for above-mentioned terminal
Transmission.
Wherein, the code check resource of the corresponding form of type distribution of the above-mentioned terminal of correspondence is ensured that terminal is using by server
Reliability during code check resource rather than basis simply receive the distribution of code check resource state information and present data transmission feelings
The code check resource that condition is not inconsistent, the further time according in code check resource state information is to terminal request code check resource record
Comparison, obtains the correspondence code check resource needed for the terminal, so as to avoid code check resource transmission in the process since code check resource is excessive
Caused by transmission when time-consuming situation, while the transmission time of code rate data is reduced, it is ensured that terminal obtain code check
The quality of resource.
Mode two is parsed according to the regional information belonging to the terminal in code check resource state information, obtained in region
Code check resource needed for multimedia in territorial scope indicated by information needed for terminal;
Specifically, parsed according to the regional information in code check resource state information, including:
Region in the code check resource data stored in regional information and server belonging to the terminal request record is believed
Breath is compared;
If the high area of the frequency of occurrences in code check resource data request record is in region in the regional information, allotment property
Server that can be good provides service for code rate data transmission.
Specifically, the historical record of its corresponding code check resource data request number of times in each region is stored in server
Table, when the request number of times of some region is more than the first given threshold, it is believed that the region is the high ground of the request number of times frequency of occurrences
Area, if request number of times is less than the second given threshold, it is believed that the region is the low area of the request number of times frequency of occurrences, wherein,
First given threshold is more than the second given threshold.Assuming that the first given threshold is G, the second given threshold is K, and G>K works as service
The request code check resource data amount M in certain city that device receives within the period 1>G, then server determine that the city goes out for request number of times
The high area of existing frequency.
For ease of judging which kind of request time the affiliated regional information of terminal in the code check resource state information received belongs to
The area of the frequency of occurrences is counted, terminal as shown in Table 2-request code check resource data-request region is also stored on server
Second code check resource data request record.
Table 2
By taking table 2 as an example, if the code check resource data of server storage is recorded as the content described in table 2, S cities are request time
The high area of the number frequency of occurrences, D cities, F cities are the general area of the request number of times frequency of occurrences, and H cities are the request number of times frequency of occurrences
Low area.When the affiliated regional information of terminal 1 in the code check resource state information that terminal 1 is sent is:During S cities, in server
After the code check resource state information for receiving the transmission of terminal 1, terminal 1 is obtained by the code check resource state information for parsing terminal 1
Affiliated region is S cities, and server determines region belonging to the terminal 1 as the high area of the request number of times frequency of occurrences as a result, for eventually
The corresponding code check resource of 1 configuration of end, and allocate one or more servers or server cluster or the idle clothes of allotment for terminal 1
Business device undertakes the data transmission of code check resource.
Mode three, according to the code check resource request time in code check resource state information and the regional information belonging to terminal into
Row parsing, obtains within the code check resource request time, the multimedia institute in the territorial scope indicated by regional information needed for terminal
The code check resource needed.
Specifically, according to the code check resource request time in code check resource state information and the regional information belonging to terminal into
Row parsing, including:
Combination one and mode two, the code check resource request time in the code check resource state information mentioned in mode three
With the regional information belonging to terminal, server is by the region belonging to the terminal in the code check resource request time, to the ground
Terminal in the range of domain provides corresponding code check resource, wherein, when providing corresponding code check resource, the good clothes of performance can be allocated
Business device provides service for code rate data transmission, to ensure the quality of code rate data transmission.
For example, it is assumed that terminal type is smart mobile phone, affiliated region is X areas, and the code check resource request time is 21:
30, the type of code check resource is wma, and code check resource size is S Mb, and code check resource quality is compression ordinary quality, is taken as a result,
Being engaged in, device is regional for X by the region belonging to smart mobile phone, and code check request time is 21:30 with pre-stored each region and its phase
The history table for the code check resource data request number of times answered and code check resource request time and code check resource data number of requests
Relation table compared, obtain, 21:30 X areas, the code check resource type needed for smart mobile phone are wma, size S
Mb, code check resource quality are the code check resource of compression ordinary quality.
For both considering the code check resource request time in code check resource state information it is further contemplated that the region belonging to terminal is believed
The situation of breath can be that the regional information being in the code check resource request time belonging to peak period and terminal is code check resource data
Request amount is more than the region of the first given threshold, allocates one or more servers or server cluster or allotment leisure service
Device undertakes the data transmission of code check resource;Can also be that the region belonging to peak period or terminal is in the code check resource request time
Information is more than the region of the first given threshold for code check resource data request amount, allocates one or more servers or server set
Group or allotment idle server undertake the data transmission of code check resource.It is specific how to provide can according to practical business demand into
Row setting, the application do not limit this.
Aforesaid way one is into mode three, in order to be more than the first setting in peak period and/or code check resource data request amount
Service is provided for code rate data transmission during the region of threshold value, server can be preferentially big to peak period or code check resource data request amount
Data are provided in the excellent server of the data transmission allocation data processing capacity of the region of the first given threshold or server cluster
The server of transmission service or allotment free time are to be more than the first given threshold in peak period or code check resource data request amount
Region provides data transport service, is more than particularly by historical record to being in peak period and/or code check resource data request amount
The number of servers that the ground of first given threshold is overseas is cut down, preferentially to peak period and/or code check resource data request amount
Region more than the first given threshold provides the server of data transport service.
Preferably, in step s 106, the step of carrying out resource deployment according to analysis result for code check resource includes as follows
Any one realization method:
Mode one, according to the code check resource needed for the time inner multimedia in code check resource request, corresponding is terminal
With the code check resource needed for corresponding multimedia;
Specifically, server is convenient for the code check resource of current network data transmission according to current time for terminal coupling,
In, server can also distribute corresponding code check resource according to the terminal of each type, to ensure to use code check resource in terminal
When, ensure the result of broadcast of multimedia file.
Mode two, according to needed for the multimedia in the territorial scope indicated by the regional information belonging to terminal needed for terminal
Code check resource, corresponding for the corresponding accelerated passage of terminal coupling, the accelerated passage is for ensureing code check resource transmission quality;
Specifically, territorial scope of the server according to indicated by regional information, allocates for the terminal in the territorial scope and uses
In the accelerated passage (Content Delivery Network, abbreviation CDN) of transmission code rate resource.
Mode three according to the code check resource needed for the multimedia needed for terminal, matches corresponding server.
Specifically, server is by the server of the Data Rate Distribution of type to type, according to the multimedia institute needed for terminal
The code check resource needed, matches corresponding server.
Preferably, in aforesaid way three, according to the code check resource needed for the multimedia needed for terminal, corresponding clothes are matched
It is engaged in including the step of device:
According to the code check resource type and/or the multimedia of code check resource size in code check status information, configuration is corresponding
Server or server cluster.
Specifically, in the manner described above described in three, according to each in the code check resource needed for the multimedia needed for terminal
Code check resource type and/or code check resource size, match corresponding server or server cluster, by matching corresponding service
Device or server cluster ensure the transmission quality of code check resource.
Code check resource allocation methods provided in an embodiment of the present invention are only illustrated by taking a terminal device as an example, except this it
Outside, for the embodiment of the present invention when realizing code check resource allocation methods, server may also receive from the code of multiple terminal devices
Rate resource state information, and pass through and parse the code check resource state information, distribute corresponding code check for above-mentioned multiple terminal devices
Resource, the embodiment of the present invention, which is subject to, realizes code check resource allocation methods, does not limit specifically.
Embodiment two
The embodiment of the present invention additionally provides a kind of code check resource allocation device.The device can pass through code check resource allocation side
Method realizes its function.It should be noted that the code check resource allocation device of the embodiment of the present invention can be used for performing the present invention in fact
The code check resource allocation methods that example is provided are applied, the code check resource allocation methods of the embodiment of the present invention can also be by of the invention real
The code check resource allocation device that example provided is applied to perform.
Fig. 2 is the schematic diagram of code check resource allocation device according to embodiments of the present invention.As shown in Fig. 2, the code check resource
Distributor includes:Receiving module 22, parsing module 24, distribution module 26,
Receiving module 22, for receiving the code check resource state information of terminal transmission, code check resource state information is used to refer to
Show the code check resource needed for terminal;
Parsing module 24 is electrically connected with the foundation of receiving module 22, what the terminal for being received according to receiving module 22 was sent
Code check resource state information is parsed, and obtains the analysis result of the code check resource needed for counterpart terminal;
Distribution module 26, is electrically connected with the foundation of parsing module 24, and the analysis result for being obtained according to parsing module 24 is
Code check resource carries out resource deployment.
Preferably, code check resource state information includes at least one of:Code check resource, code check resource needed for multimedia
Regional information belonging to request time, terminal, the code check resource needed for the multimedia include at least one of:Code check is resources-type
Type, code check resource size, code check source resource.
Preferably, Fig. 3 is the schematic diagram of code check resource allocation device according to the preferred embodiment of the invention, as shown in figure 3,
Parsing module 24 includes:
First resolution unit 241, for being parsed according to the code check resource request time in code check resource state information,
Obtain the code check resource needed for the multimedia within the time needed for terminal;
Second resolution unit 242, for being solved according to the regional information belonging to the terminal in code check resource state information
Analysis, obtains the code check resource needed for the multimedia in the territorial scope indicated by regional information needed for terminal;
3rd resolution unit 243 for being parsed according to the time in code check resource state information and regional information, obtains
To within the time, the code check resource needed for the multimedia in the territorial scope indicated by the regional information needed for terminal.
Preferably, Fig. 4 is the schematic diagram of code check resource allocation device according to the preferred embodiment of the invention, as shown in figure 4,
Distribution module 26 includes:
First allocation unit 261, for according in the code check resource needed for code check resource request time inner multimedia, correspondence
It is the code check resource needed for the corresponding multimedia of terminal coupling;
Second allocation unit 262, for according to the terminal institute in the territorial scope indicated by the regional information belonging to terminal
The code check resource needed for multimedia needed, corresponding is the corresponding accelerated passage of terminal coupling, which is used to ensure code
Rate resource transmission quality;
3rd allocation unit 263 for the code check resource needed for the multimedia needed for foundation terminal, matches corresponding service
Device.
Preferably, Fig. 5 is the schematic diagram of code check resource allocation device according to the preferred embodiment of the invention, as shown in figure 5,
Based on the 3rd allocation unit 263 mentioned in above-described embodiment, including:
3rd distribution subelement 2631, for according to each code check resource type and/or code check in code check status information
The multimedia of resource size configures corresponding server or server cluster.
Embodiment three
An embodiment of the present invention provides a kind of code check resource allocation systems.
Fig. 6 is the structure chart of code check resource allocation system according to embodiments of the present invention.As shown in fig. 6, the code check resource
Distribution system includes as follows:At least one terminal 62 and server 64, wherein, at least one terminal 62 is established logical with server 64
Letter connection,
At least one terminal 62 sends code check resource state information to server 64, and at least one terminal 62 is by built-in
Data collecting module collected code check resource state information;
Server 64 receives code check resource state information, and parses code check resource state information and obtain analysis result, foundation
Analysis result carries out resource deployment for code check resource.
Server 64 can also be the code check resource allocation device shown in Fig. 2 to Fig. 5 is any.
As shown in fig. 6, the server 64 can also be the server cluster being made of at least two-server.
It should be noted that for foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention and from the limitation of described sequence of movement because
According to the present invention, some steps may be employed other orders or be carried out at the same time.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention
It is necessary.
In the above-described embodiments, all emphasize particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only one kind
Division of logic function, can there is an other dividing mode in actual implementation, such as multiple units or component can combine or can
To be integrated into another system or some features can be ignored or does not perform.Another, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING or communication connection of device or unit,
Can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical location, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
That unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be employed in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is independent production marketing or use
When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part to contribute in other words to the prior art or all or part of the technical solution can be in the form of software products
It embodies, which is stored in a storage medium, is used including some instructions so that a computer
Equipment (can be personal computer, mobile terminal, server or network equipment etc.) performs side described in each embodiment of the present invention
The all or part of step of method.And foregoing storage medium includes:USB flash disk, read-only memory (ROM, Read-Only Memory),
Random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various to be stored
The medium of program code.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.