CN108965205A - Request video flowing address, to the method and apparatus of video flowing Address requests authentication - Google Patents
Request video flowing address, to the method and apparatus of video flowing Address requests authentication Download PDFInfo
- Publication number
- CN108965205A CN108965205A CN201710353128.XA CN201710353128A CN108965205A CN 108965205 A CN108965205 A CN 108965205A CN 201710353128 A CN201710353128 A CN 201710353128A CN 108965205 A CN108965205 A CN 108965205A
- Authority
- CN
- China
- Prior art keywords
- key value
- client
- information
- original key
- video flowing
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0876—Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/61—Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
Abstract
The embodiment of the invention provides a kind of request video flowing address, to the method and apparatus of video flowing Address requests authentication.The method of the request video flowing address includes: that the original Key value for being in encrypted state is obtained from the memory space of the client;The original Key value in encrypted state is decrypted;The first information and the direct broadcast server at least to the original Key value, the expression target live streaming are that the second information of the client distribution encrypts in advance, obtain authentication Key value;Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information, so that the direct broadcast server obtains the pre-stored original Key value and second information, it is encrypted based on the original Key value, the first information and second information with reference to Key value, when the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of request video flowing address, to video flowing Address requests
The method and apparatus of authentication.
Background technique
Client is broadcast live according to the target that user needs to watch, the video flowing being broadcast live to direct broadcast server request target
Location, the video flowing that target live streaming is then pulled from video flowing address are watched for user.In the prior art, client is to live streaming
Server sends video flowing Address requests, and the crucial Key value for authentication is carried in the request.In server comparison request
Whether Key value is consistent with preset Key value.If the Key value in request is consistent with preset Key, server authentication is logical
Client is crossed, and returns to video flowing address to client.
However, criminal is truncated to Key value from client often through debugging breakpoints, and live streaming is deceived by Key value
Server provides video flowing address, then live video stream address is supplied to other people, thus around direct broadcast server to other people
It is illegal that live streaming is provided.
So how the prior art improves client Key value safety if existing, and how to improve the authentication of video flowing request
The technical issues of reliability.
Summary of the invention
The embodiment of the invention provides a kind of request video flowing address, to the method and dress of video flowing Address requests authentication
It sets, for improving client Key value safety, and the authentication reliability of raising video flowing request.
In a first aspect, the present invention provides a kind of methods for requesting video flowing address, comprising:
When the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the storage of the client
The original Key value for being in encrypted state is obtained in space;The original Key value is sent to described in advance by the direct broadcast server
Client;
The original Key value in encrypted state is decrypted, the original Key value is obtained;
It is at least preparatory to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for client distribution is encrypted, and authentication Key value is obtained;
Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information,
So that the direct broadcast server obtains the pre-stored original Key value for being sent to the client and pre-stored
For the second information of client distribution, encrypted based on the original Key value, the first information and second information
With reference to Key value, judge whether the authentication Key value is consistent with the reference Key value, when the authentication Key value and the reference
When Key value is consistent, video flowing address is sent to the client.
Optionally, it is decrypted to the original Key value in encrypted state, after obtaining the original Key value,
The method also includes:
The original Key value is stored according to the storage organization for being different from Coutinuous store structure.
Optionally, described before obtaining the original Key value in encrypted state in the memory space from the client
Method further include:
Receive the original Key value that the direct broadcast server is sent;
The original Key value is encrypted, the original Key value for being in encrypted state is obtained;
The original Key value in encrypted state is stored into the memory space.
Second aspect, the present invention provides the methods of a kind of pair of video flowing Address requests authentication, comprising:
Direct broadcast server receives the video flowing Address requests that client is sent, and the request includes authentication Key value and described
The first information of the requested target live streaming of video flowing Address requests;
Obtain the pre-stored original Key value for being sent to the client and pre-stored for the client point
The second information matched;
At least encrypted based on the original Key value, the first information and second information with reference to Key value;
Judge whether the authentication Key value is consistent with the reference Key value;
When the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Optionally, the method also includes:
When the authentication Key value and the inconsistent reference Key value, sends to the client and be broadcast live with the target
Other not corresponding video flowing addresses.
The third aspect, the present invention provides a kind of clients, comprising:
Obtain module, for when client need to direct broadcast server request target be broadcast live video flowing address when, from institute
State the original Key value for obtaining in the memory space of client and being in encrypted state;The original Key value is by the direct broadcast server
It is sent to the client in advance;
Deciphering module obtains the original Key value for the original Key value in encrypted state to be decrypted;
Authentication ciphering module, at least to the original Key value, indicate the first information and the institute of target live streaming
Stating direct broadcast server in advance is that the second information that the client is distributed is encrypted, and obtains authentication Key value;
Sending module includes the view for authenticating Key value and the first information for sending to the direct broadcast server
Frequency stream Address requests, so that the direct broadcast server obtains the pre-stored original Key value for being sent to the client
And pre-stored the second information for client distribution, based on the original Key value, the first information and described
Second information is encrypted with reference to Key value, judges whether the authentication Key value is consistent with the reference Key value, when the authentication
When Key value is consistent with the reference Key value, video flowing address is sent to the client.
Optionally, the client further include:
First memory module obtains described original for being decrypted to the original Key value in encrypted state
After Key value, the original Key value is stored according to the storage organization for being different from Coutinuous store structure.
Optionally, the client further include:
Receiving module, in the memory space from the client obtain in encrypted state original Key value it
Before, receive the original Key value that the direct broadcast server is sent;
Encrypting module obtains the original Key value for being in encrypted state for encrypting to the original Key value;
Second memory module, the original Key value for that will be in encrypted state are stored into the memory space.
Fourth aspect, the present invention provides a kind of direct broadcast servers, comprising:
Receiving module, for receiving the video flowing Address requests of client transmission, the request includes authentication Key value and institute
State the first information of the requested target live streaming of video flowing Address requests;
Module is obtained, for obtaining the pre-stored original Key value for being sent to the client and pre-stored
For the second information of client distribution;
Authentication ciphering module, at least based on the original Key value, the first information and second information encryption
Key value is referred to out;
Judgment module, for judging whether the authentication Key value is consistent with the reference Key value;
First sending module, for being sent out to the client when the authentication Key value is consistent with the reference Key value
Send video flowing address.
Optionally, the direct broadcast server further include:
Second transmission unit is used for when the authentication Key value and the inconsistent reference Key value, to the client
It sends and other not corresponding video flowing addresses is broadcast live with the target.
5th aspect, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, should
It is performed the steps of when program is executed by processor
When the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the storage of the client
The original Key value for being in encrypted state is obtained in space;The original Key value is sent to described in advance by the direct broadcast server
Client;
The original Key value in encrypted state is decrypted, the original Key value is obtained;
It is at least preparatory to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for client distribution is encrypted, and authentication Key value is obtained;
Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information,
So that the direct broadcast server obtains the pre-stored original Key value for being sent to the client and pre-stored
For the second information of client distribution, encrypted based on the original Key value, the first information and second information
With reference to Key value, judge whether the authentication Key value is consistent with the reference Key value, when the authentication Key value and the reference
When Key value is consistent, video flowing address is sent to the client.
Optionally, it is also performed the steps of when which is executed by processor
It is decrypted to the original Key value in encrypted state, after obtaining the original Key value, according to not
The storage organization for being same as Coutinuous store structure stores the original Key value.
Optionally, it is also performed the steps of when which is executed by processor
Before obtaining the original Key value in encrypted state in the memory space from the client, receive described straight
Broadcast the original Key value of server transmission;
The original Key value is encrypted, the original Key value for being in encrypted state is obtained;
The original Key value in encrypted state is stored into the memory space.
6th aspect, the present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, should
It is performed the steps of when program is executed by processor
Direct broadcast server receives the video flowing Address requests that client is sent, and the request includes authentication Key value and described
The first information of the requested target live streaming of video flowing Address requests;
Obtain the pre-stored original Key value for being sent to the client and pre-stored for the client point
The second information matched;
At least encrypted based on the original Key value, the first information and second information with reference to Key value;
Judge whether the authentication Key value is consistent with the reference Key value;
When the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Optionally, it is performed the steps of when which is executed by processor
When the authentication Key value and the inconsistent reference Key value, sends to the client and be broadcast live with the target
Other not corresponding video flowing addresses.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects
Fruit:
In the technical solution of the embodiment of the present invention, when the video that client needs to be broadcast live to direct broadcast server request target
When flowing address, the original Key value for being in encrypted state is obtained first from the memory space of the client;Then in plus
The original Key value of close state is decrypted, and obtains the original Key value;The original Key value is by the direct broadcast server
It is sent to the client in advance;Then, at least to the original Key value, indicate target live streaming the first information and
The direct broadcast server is that the second information of the client distribution is encrypted in advance, obtains authentication Key value;Then, to institute
Stating direct broadcast server and sending includes the video flowing Address requests for authenticating Key value and the first information, so that the live streaming
Server obtains the pre-stored original Key value for being sent to the client and pre-stored for the client
Second information of distribution, is encrypted with reference to Key value based on the original Key value, the first information and second information, is sentenced
Whether the authentication Key value of breaking is consistent with the reference Key value, when the authentication Key value is consistent with the reference Key value,
Video flowing address is sent to the client.So in a first aspect, the client by the original Key value encryption storage,
The original Key value is just decrypted when needing to request the video flowing address, so the original Key value will not expose always,
So increasing the difficulty for intercepting original Key value;Second aspect, the authentication Key value are not the original Key value itself,
So being truncated to the authentication Key value to be also not easy to crack the original Key value;The third aspect, since the authentication Key value is into one
Step contains the first information and second information, therefore the direct broadcast server is related to face more to the authentication of the request
Extensively, it authenticates more reliable.So the embodiment of the present invention improves client Key value safety through the above scheme, while improving view
The authentication reliability of frequency stream request.
Detailed description of the invention
Fig. 1 is the method flow diagram that video flowing address is requested in the embodiment of the present invention;
Fig. 2 is in the embodiment of the present invention to the method flow diagram of video flowing Address requests authentication;
Fig. 3 is the structural schematic diagram of client in the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of direct broadcast server in the embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of request video flowing address, to the method and dress of video flowing Address requests authentication
It sets, for improving client Key value safety, and the authentication reliability of raising video flowing request.
In order to solve the above technical problem, the present invention provides technical solution general thought it is as follows:
In the technical solution of the embodiment of the present invention, when the video that client needs to be broadcast live to direct broadcast server request target
When flowing address, the original Key value for being in encrypted state is obtained first from the memory space of the client;Then in plus
The original Key value of close state is decrypted, and obtains the original Key value;The original Key value is by the direct broadcast server
It is sent to the client in advance;Then, at least to the original Key value, indicate target live streaming the first information and
The direct broadcast server is that the second information of the client distribution is encrypted in advance, obtains authentication Key value;Then, to institute
Stating direct broadcast server and sending includes the video flowing Address requests for authenticating Key value and the first information, so that the live streaming
Server obtains the pre-stored original Key value for being sent to the client and pre-stored for the client
Second information of distribution, is encrypted with reference to Key value based on the original Key value, the first information and second information, is sentenced
Whether the authentication Key value of breaking is consistent with the reference Key value, when the authentication Key value is consistent with the reference Key value,
Video flowing address is sent to the client.So in a first aspect, the client by the original Key value encryption storage,
The original Key value is just decrypted when needing to request the video flowing address, so the original Key value will not expose always,
So increasing the difficulty for intercepting original Key value;Second aspect, the authentication Key value are not the original Key value itself,
So being truncated to the authentication Key value to be also not easy to crack the original Key value;The third aspect, since the authentication Key value is into one
Step contains the first information and second information, therefore the direct broadcast server is related to face more to the authentication of the request
Extensively, it authenticates more reliable.So the embodiment of the present invention improves client Key value safety through the above scheme, while improving view
The authentication reliability of frequency stream request.
Technical solution of the present invention is described in detail below by attached drawing and specific embodiment, it should be understood that the application
Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques
The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present application and embodiment can be combined with each other.
The terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates that there may be three kinds of passes
System, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.In addition, herein
Middle character "/" typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Method of the present invention first to the request video flowing address of client-side, referring to FIG. 1, in the embodiment of the present invention
Request the method flow diagram of video flowing address.This method comprises:
S101: when the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the client
Memory space in obtain be in encrypted state original Key value;The original Key value is sent in advance by the direct broadcast server
To the client;
S102: being decrypted the original Key value in encrypted state, obtains the original Key value;
S103: at least to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for client distribution is encrypted in advance, obtains authentication Key value;
S104: sending to the direct broadcast server includes the video flowing address for authenticating Key value and the first information
Request so that the direct broadcast server obtain the pre-stored original Key value for being sent to the client and in advance
Storage is the second information of the client distribution, is based on the original Key value, the first information and second information
It encrypts with reference to Key value, judges whether the authentication Key value is consistent with the reference Key value, when the authentication Key value and institute
When stating consistent with reference to Key value, video flowing address is sent to the client.
Optionally, before S101, further includes:
Receive the original Key value that the direct broadcast server is sent;
The original Key value is encrypted, the original Key value for being in encrypted state is obtained;
The original Key value in encrypted state is stored into the memory space.
Specifically, the direct broadcast server in the embodiment of the present invention can install live streaming application program, registration in client
User name sends client for original Key value when client logs in for the first time.Direct broadcast server is to each client
Transmitted original Key value can be the same or different.Different clients is recognized according to user name or client id etc..
Hereinafter introduced so that direct broadcast server recognizes client by client id as an example.Further, direct broadcast server also needs basis
Client id is stored to original Key value transmitted by each client, to use the correct of each client when subsequent authentication
Original Key value.
In order to improve original Key value in the safety of client, client will encrypt Key value.It was implementing
Cheng Zhong can choose any one cipher mode and encrypt to original Key value, and the present invention is not particularly limited.For example,
Original Key is encrypted according to TEA (Tiny Encryption Algorithm, Tiny Encryption Algorithm).Specifically, can pass through
Following code is realized:
EncrptSecretKEY=TEA.Encrypt (SecretKEY, KEY);
Wherein, SecretKEY indicates original Key value, and KEY indicates key used in ciphering process, TEA.Encrypt ()
Indicate TEA encryption function, the output result EncrptSecretKEY of TEA.Encrypt () is just in the original of encrypted state
Key value.
Then, the original Key value in encrypted state is stored into the memory space of client.It is needing to request video
Encrypted original Key value is read out again when flowing address.
At other moment, for example, do not need request video flowing address at the time of or when not needing using original Key value,
It not can read the original Key value in encrypted state, and original Key value will not be decrypted, thus reduce the exposure of original Key
Time, and then improve the difficulty that original Key is intercepted from client.
In the following, clients request video stream address is introduced.
Multiple live streamings are presented to user by way of multiple live streaming rooms in the live streaming application program of client installation.Its
In, live streaming room is the unit for distinguishing each live streaming.User browses live streaming room on the client, and that watches if necessary is straight
It broadcasts, then executes selection operation for corresponding room.Selection operation is, for example, the operation for clicking room or the behaviour for inputting room number
Make etc., the present invention is not particularly limited.Client receives the selection operation that user executes, and determines targeted straight of selection operation
Broadcast room.In embodiments of the present invention, the corresponding live streaming in live streaming room selection operation being directed to is known as " target live streaming ".
If client receives selection operation, and is capable of determining that target is broadcast live according to selection operation, then indicating
User needs to watch at this time target live streaming.Therefore, client just needs to send video flowing Address requests to direct broadcast server, to ask
It asks direct broadcast server to provide the video flowing address of target live streaming, and then target live streaming is obtained based on video flowing address.
In order to request direct broadcast server to authenticate and provide video flowing address, in S101, client is read from memory space
Take out the original Key value for being in encrypted state.Then, in S102, the original Key value in encrypted state is reversely solved
It is close, and then obtain original Key value.
Specifically, in encrypted state the mode that is decrypted of original Key value with hereinbefore to original Key value into
The mode of row encryption is corresponding.For example, if encrypted according to TEA to original Key value, also according to TEA when decrypting
Original Key value in encrypted state is decrypted;If according to DEA (data encryption algorithm, Data Encryption
Algorithm) original Key value is encrypted, then also being decrypted according to DEA to the original Key value in encrypted state when decryption.
In the prior art, original Key value is stored according to Coutinuous store structure, and in other words, the content of original Key is stored in
Address is continuously in multiple storage units.Therefore, if being once truncated to one of storage unit, with the ground of the storage unit
Location is starting point, by other storage units of continuous address searching, it is possible to obtain the full content of original Key value.
Therefore, the embodiment of the present invention is in order to improve the safety of the original Key value decrypted, and improves and intercept from client
The difficulty of original Key, after S102, further includes:
The original Key value is stored according to the storage organization for being different from Coutinuous store structure.
Specifically, the embodiment of the present invention is after decrypting original Key value, according to its for being different from Coutinuous store structure
He stores original Key value by storage organization.Other storage organizations, including but not limited to tree-like storage structure and netted storage organization
Deng.
So, since the original Key value decrypted is stored in discontinuous storage unit, even if from client
One or more data are truncated to, due to not knowing true storage organization, so can not also be inferred to the storage of original Key value
Unit improves the difficulty for cracking original Key value so being not easy to obtain the full content of original Key value.
Optionally, in order to further improve the safety of original Key value, at least two storage containers can also be used embedding
The mode of set stores original Key value.Such as tree-shaped container nested tree-shaped container or tree-shaped container nesting mesh container etc., this hair
Bright those of ordinary skill in the art can be according to being actually configured, and the present invention is not particularly limited.
Illustrated with a specific example, is used STL (Standard Template Library, Standard Template Library)
Container stores the Key value decrypted.Wherein, STL container further comprises map container, list container and multimap container
Deng.Illustrate by taking map container nesting map container as an example below.
Specifically, it when needing to decrypt the original Key value in encrypted state, defines a map container nesting map and holds
The container of device.It can specifically be realized by following code:
map<int jian1,map<int jian1,data>>MapMapData;
Wherein, MapMapData is the title of final nested container out.Jian1 is the key assignments of outer layer map container, is directed toward
The data of outer layer map container, i.e. internal layer map container map<int jian1, data>.Jian2 is the key assignments of internal layer map container,
It is directed toward the data data of internal layer map container.The data that data data will be assigned in original Key value.
Continue to use the example that original Key value is above encrypted according to TEA mode, in encrypted state original Key value into
When row decryption, the original Key value in encrypted state is decrypted according to TEA decipherment algorithm, to decrypt original Key
Value.It is realized especially by following code:
TEA.Decrypt(EncrptSecretKEY,KEY,MapMapData);
Wherein, TEA.Decrypt () indicates TEA decryption function.First parameter of TEA.Decrypt () is in adding
The original Key value EncrptSecretKEY of close state, second parameter are key KEY, and third parameter is output valve (decryption
Original Key value out) the Container Name MapMapData to be stored.
Since map container is tree-shaped container it can be seen from foregoing description, what root node and branch node stored is all key
Value, original Key value is only stored in child node, so the complete of original Key value can be obtained by only searching out all child nodes
Portion's content.Therefore, tree-shaped due to not knowing even if being illegally truncated to the data of wherein one or more nodes storage from client
Structure, so be also difficult to release the full content of original Key value, so improve the safety of client Key value.
Next, the first information and direct broadcast server in S103, at least to original Key value, expression target live streaming
The second information for client distribution is encrypted in advance, obtains authentication Key value.
Specifically, the first information indicates target live streaming, and the including but not limited to room number of target live streaming, target is broadcast live
Main broadcaster's pet name or the title etc. of target live streaming.Second information is the information that server is client distribution in advance, is specifically existed
After this access direct broadcast server of client, what S103 was sent before obtaining authentication Key value by direct broadcast server.Also, it is straight
Server is broadcast according further to client id, lower the second information sent to each client is recorded and stored, so that subsequent authentication makes
With.Second information includes but is not limited to the label Token value that direct broadcast server returns and random number etc..Authenticating Key value is client
End can finally be provided to direct broadcast server and authenticate the Key value used to client.
How various selections can be had by generating the encrypted parameter of authentication Key value.In one embodiment, client is to original
Beginning Key value, the first information and the second information are encrypted, and authentication Key value is obtained.In another embodiment, client
The third information for indicating client identity is also further obtained, then to original Key value, the first information, the second information and third
Information is encrypted, and authentication Key value is obtained.Wherein, third information includes but is not limited to user name, client id and IP (internet
Agreement, Internet Protocol) address etc..In conjunction with former embodiment, in another embodiment, client is also
The 4th information for indicating client running environment is further obtained, then to original Key value, the first information, the second information, third
Information and the 4th information are encrypted, and authentication Key value is obtained.Wherein, the 4th information includes but is not limited to the behaviour of client operation
Make system and system time etc..During specific implementation, further includes other embodiments, will not enumerate herein.
Generating the Encryption Algorithm that authentication Key value uses is preset Encryption Algorithm.The code of preset Encryption Algorithm can be with
It is arranged in the installation kit of live streaming application program, can also be sent out again by direct broadcast server after client installs live streaming application program
It is sent to client, the present invention is not particularly limited.Preset Encryption Algorithm be, for example, MD5 (message digest algorithm the 5th edition,
Message Digest Algorithm), TEA or DEA etc., the present invention is not particularly limited.
Preset Encryption Algorithm used by client is specific and the parameter of encryption should be consistent with direct broadcast server, rear
It has and is discussed in detail in text.
The realization process for illustrating S103 with a specific example, please refers to following code:
Video_Key=MD5.CreateMd5 (Token+ room number+device id+random number+Time+IP,
MapMapData);
Wherein, MD5.CreateMd5 () indicates that MD5 function, " Token " indicate direct broadcast server to client feedback
Token value, " room number " indicate that corresponding room number is broadcast live in target, and " device id " refers to client id, and " random number " refers to
It is the random number that direct broadcast server is sent to client, " Time " refers to the system time of client, and " IP " refers to client
The IP address at end, the original Key value that storage is decrypted above in " MapMapData ".Video_Key indicates authentication Key value.
Above-mentioned code indicates, MD5 function is executed, to Token value, room number, client id, random number, system time, IP
Address and original Key value execute md5 encryption, obtain authentication Key value.
Then, in S104, the first information and authentication Key value are carried in video flowing Address requests, then video
Stream Address requests are sent to direct broadcast server, and request direct broadcast server authenticates video flowing Address requests.
In the following, the method authenticated to direct broadcast server side to video flowing Address requests is introduced.Referring to FIG. 2, for this
To the method flow diagram of video flowing Address requests authentication in inventive embodiments.This method comprises:
S201: direct broadcast server receive client send video flowing Address requests, it is described request include authentication Key value and
The first information of the requested target live streaming of video flowing Address requests;
S202: obtaining the pre-stored original Key value for being sent to the client and pre-stored for the visitor
Second information of family end distribution;
S203: it is at least encrypted based on the original Key value, the first information and second information with reference to Key value;
S204: judge whether the authentication Key value is consistent with the reference Key value;
S205: when the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Specifically, in S201, direct broadcast server receives the video flowing Address requests that client is sent.Then, to view
Frequency stream Address requests are parsed, and the authentication Key value for including in video flowing Address requests and the first information are obtained.
It will be appreciated by those skilled in the art that although the first information is already present on authentication in an encrypted form, Key is suffered,
It is in request is to notify the requested target live streaming of direct broadcast server client with the first information existing for plaintext version.
Next, direct broadcast server is according to the client id for sending video flowing Address requests, from direct broadcast service in S202
Original Key value corresponding with the client id and the second information are read out in the memory space of device.
Then, in S203, direct broadcast server is also according to preset Encryption Algorithm, at least to original Key value, the first information
It is encrypted with the second information, the result embodiment of the present invention encrypted is known as " referring to Key value ".
Specifically, the preset Encryption Algorithm of client must be with preset Encryption Algorithm phase used by direct broadcast server
Together, to guarantee that authentication can be passed through under security situation.For example, if direct broadcast server is referred to using md5 encryption algorithm
Key value, then client must also obtain authentication Key value with md5 encryption algorithm.
Also, client generates the encrypted parameter of authentication Key value and should also be as generating with direct broadcast server with reference to Key value institute
The parameter of use is consistent.
For example, being referred to if direct broadcast server encrypts original Key value, the first information and the second information
Key value, then client is corresponding using in the first above-mentioned embodiment, i.e., client is to original Key value, the first information and the
Two information are encrypted, and authentication Key value is obtained.
If direct broadcast server encrypts original Key value, the first information, the second information and third information, joined
Key value is examined, then client is corresponding using in another embodiment above, i.e., client is to original Key value, the first letter
Breath, the second information and third information are encrypted, and authentication Key value is obtained.Further, in conjunction in this kind of embodiment, video flowing
It also needs to carry third information with plaintext version in Address requests.
If direct broadcast server adds original Key value, the first information, the second information, third information and the 4th information
It is close, it obtains and refers to Key value, then client is corresponding using in another embodiment above, i.e., client is to original Key
Value, the first information, the second information, third information and the 4th information are encrypted, and authentication Key value is obtained.Further, in conjunction with this kind
It also needs to carry third information and the 4th information with plaintext version in embodiment, in video flowing Address requests.
During specific implementation, those skilled in the art can be according to actually selecting, this
Invention is not particularly limited.
Then, in S204, judge whether authentication Key value is consistent with reference Key value.
If it is consistent with reference to Key value to authenticate Key value, indicates original Key value possessed by client and the second information is
It is completely the same with the true original Key value of direct broadcast server storage and the second information, and then indicate the client secure.Institute
With in S205, when authentication Key value is consistent with reference to Key value, video flowing Address requests that the authentication is passed are sent to client
The video flowing address of target live streaming.
, whereas if authentication Key value and with reference to Key value it is inconsistent, expression client possessed by original Key value and/or
Second information is inconsistent in the original Key value and the second information stored with direct broadcast server, then indicating that the client may
It is dangerous.So authentication does not pass through video flowing Address requests when authenticating Key value and reference Key value is inconsistent.
Optionally, it can further include:
When the authentication Key value and the inconsistent reference Key value, sends to the client and be broadcast live with the target
Other not corresponding video flowing addresses.
Specifically, obstructed out-of-date when authenticating, in one embodiment, other live streamings can be sent to the client
Video flowing address forms interference.Other video flowing addresses such as the video flowing address of network security education live streaming or strike network
The video flowing address etc. of crime live streaming, the present invention is not particularly limited.
Alternatively, in another embodiment, the video flowing Address requests of client can also be refused, it is straight not provide target
The video flowing address broadcast.
Based on inventive concept same as the method for video flowing address is requested in previous embodiment, the present invention also provides one kind
Client, as shown in Figure 3, comprising:
Obtain module 101, for when client need to direct broadcast server request target be broadcast live video flowing address when, from
The original Key value for being in encrypted state is obtained in the memory space of the client;The original Key value is by the direct broadcast service
Device is sent to the client in advance;
Deciphering module 102 obtains the original Key for the original Key value in encrypted state to be decrypted
Value;
Authentication ciphering module 103, at least to the original Key value, indicate the first information of target live streaming with
And the direct broadcast server is that the second information that the client is distributed is encrypted in advance, obtains authentication Key value;
Sending module 104 includes the authentication Key value and the first information for sending to the direct broadcast server
Video flowing Address requests, so that the direct broadcast server obtains the pre-stored original Key for being sent to the client
Value and pre-stored the second information for client distribution, are based on the original Key value, the first information and institute
It states the second information to encrypt with reference to Key value, judges whether the authentication Key value is consistent with the reference Key value, when the authentication
When Key value is consistent with the reference Key value, video flowing address is sent to the client.
Optionally, the client further include:
First memory module obtains described original for being decrypted to the original Key value in encrypted state
After Key value, the original Key value is stored according to the storage organization for being different from Coutinuous store structure.
Optionally, the client further include:
Receiving module, in the memory space from the client obtain in encrypted state original Key value it
Before, receive the original Key value that the direct broadcast server is sent;
Encrypting module obtains the original Key value for being in encrypted state for encrypting to the original Key value;
Second memory module, the original Key value for that will be in encrypted state are stored into the memory space.
The various change mode and specific example of the method for request video flowing address in 1 embodiment of earlier figures are equally applicable
In the client of the present embodiment, by the detailed description of the aforementioned method to request video flowing address, those skilled in the art can
To be apparent from the implementation method of client in the present embodiment, so this will not be detailed here in order to illustrate the succinct of book.
Based on the same inventive concept of method in previous embodiment to video flowing Address requests authentication, the present invention also mentions
For a kind of direct broadcast server, as shown in Figure 4, comprising:
Receiving module 201, for receiving the video flowing Address requests of client transmission, the request includes authentication Key value
With the first information of the requested target live streaming of the video flowing Address requests;
Module 202 is obtained, for obtaining the pre-stored original Key value for being sent to the client and being stored in advance
It is the second information of the client distribution;
Authentication ciphering module 203, for being at least based on the original Key value, the first information and second information
It encrypts with reference to Key value;
Judgment module 204, for judging whether the authentication Key value is consistent with the reference Key value;
First sending module 205 is used for when the authentication Key value is consistent with the reference Key value, to the client
Send video flowing address.
Optionally, the direct broadcast server further include:
Second transmission unit is used for when the authentication Key value and the inconsistent reference Key value, to the client
It sends and other not corresponding video flowing addresses is broadcast live with the target.
The various change mode and specific example of the method to video flowing Address requests authentication in 2 embodiment of earlier figures are same
Sample is suitable for the direct broadcast server of the present embodiment, by the detailed description of the aforementioned method to video flowing Address requests authentication, originally
Field technical staff is clear that the implementation method of direct broadcast server in the present embodiment, so in order to illustrate the letter of book
Clean, this will not be detailed here.
Based on inventive concept same as the method for video flowing address is requested in previous embodiment, the present invention also provides one kind
Computer readable storage medium is stored thereon with computer program, which performs the steps of when being executed by processor
When the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the storage of the client
The original Key value for being in encrypted state is obtained in space;The original Key value is sent to described in advance by the direct broadcast server
Client;
The original Key value in encrypted state is decrypted, the original Key value is obtained;
It is at least preparatory to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for client distribution is encrypted, and authentication Key value is obtained;
Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information,
So that the direct broadcast server obtains the pre-stored original Key value for being sent to the client and pre-stored
For the second information of client distribution, encrypted based on the original Key value, the first information and second information
With reference to Key value, judge whether the authentication Key value is consistent with the reference Key value, when the authentication Key value and the reference
When Key value is consistent, video flowing address is sent to the client.
Optionally, it is also performed the steps of when which is executed by processor
It is decrypted to the original Key value in encrypted state, after obtaining the original Key value, according to not
The storage organization for being same as Coutinuous store structure stores the original Key value.
Optionally, it is also performed the steps of when which is executed by processor
Before obtaining the original Key value in encrypted state in the memory space from the client, receive described straight
Broadcast the original Key value of server transmission;
The original Key value is encrypted, the original Key value for being in encrypted state is obtained;
The original Key value in encrypted state is stored into the memory space.
Based on the same inventive concept of method in previous embodiment to video flowing Address requests authentication, the present invention also mentions
For a kind of computer readable storage medium, it is stored thereon with computer program, following step is realized when which is executed by processor
It is rapid:
Direct broadcast server receives the video flowing Address requests that client is sent, and the request includes authentication Key value and described
The first information of the requested target live streaming of video flowing Address requests;
Obtain the pre-stored original Key value for being sent to the client and pre-stored for the client point
The second information matched;
At least encrypted based on the original Key value, the first information and second information with reference to Key value;
Judge whether the authentication Key value is consistent with the reference Key value;
When the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Optionally, it is performed the steps of when which is executed by processor
When the authentication Key value and the inconsistent reference Key value, sends to the client and be broadcast live with the target
Other not corresponding video flowing addresses.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects
Fruit:
In the technical solution of the embodiment of the present invention, when the video that client needs to be broadcast live to direct broadcast server request target
When flowing address, the original Key value for being in encrypted state is obtained first from the memory space of the client;Then in plus
The original Key value of close state is decrypted, and obtains the original Key value;The original Key value is by the direct broadcast server
It is sent to the client in advance;Then, at least to the original Key value, indicate target live streaming the first information and
The direct broadcast server is that the second information of the client distribution is encrypted in advance, obtains authentication Key value;Then, to institute
Stating direct broadcast server and sending includes the video flowing Address requests for authenticating Key value and the first information, so that the live streaming
Server obtains the pre-stored original Key value for being sent to the client and pre-stored for the client
Second information of distribution, is encrypted with reference to Key value based on the original Key value, the first information and second information, is sentenced
Whether the authentication Key value of breaking is consistent with the reference Key value, when the authentication Key value is consistent with the reference Key value,
Video flowing address is sent to the client.So in a first aspect, the client by the original Key value encryption storage,
The original Key value is just decrypted when needing to request the video flowing address, so the original Key value will not expose always,
So increasing the difficulty for intercepting original Key value;Second aspect, the authentication Key value are not the original Key value itself,
So being truncated to the authentication Key value to be also not easy to crack the original Key value;The third aspect, since the authentication Key value is into one
Step contains the first information and second information, therefore the direct broadcast server is related to face more to the authentication of the request
Extensively, it authenticates more reliable.So the embodiment of the present invention improves client Key value safety through the above scheme, while improving view
The authentication reliability of frequency stream request.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art
Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to include these modifications and variations.
Claims (9)
1. a kind of method for requesting video flowing address characterized by comprising
When the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the memory space of the client
It is middle to obtain the original Key value for being in encrypted state;The original Key value is sent to the client by the direct broadcast server in advance
End;
The original Key value in encrypted state is decrypted, the original Key value is obtained;
It is in advance at least institute to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for stating client distribution is encrypted, and authentication Key value is obtained;
Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information, so that
The direct broadcast server obtains the pre-stored original Key value for being sent to the client and pre-stored for institute
The second information for stating client distribution, encrypts reference based on the original Key value, the first information and second information
Key value judges whether the authentication Key value is consistent with the reference Key value, when the authentication Key value refers to Key value with described
When consistent, video flowing address is sent to the client.
2. the method as described in claim 1, which is characterized in that solved to the original Key value in encrypted state
It is close, after obtaining the original Key value, the method also includes:
The original Key value is stored according to the storage organization for being different from Coutinuous store structure.
3. method according to claim 2, which is characterized in that obtain in the memory space from the client in encryption
Before the original Key value of state, the method also includes:
Receive the original Key value that the direct broadcast server is sent;
The original Key value is encrypted, the original Key value for being in encrypted state is obtained;
The original Key value in encrypted state is stored into the memory space.
4. the method for a kind of pair of video flowing Address requests authentication characterized by comprising
Direct broadcast server receives the video flowing Address requests that client is sent, and the request includes authentication Key value and the video
Flow the first information of the requested target live streaming of Address requests;
Obtain the pre-stored original Key value for being sent to the client and it is pre-stored for the client distribution
Second information;
At least encrypted based on the original Key value, the first information and second information with reference to Key value;
Judge whether the authentication Key value is consistent with the reference Key value;
When the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
5. method as claimed in claim 4, which is characterized in that the method also includes:
When the authentication Key value and the inconsistent reference Key value, is sent to the client and target live streaming is not right
Other video flowing addresses answered.
6. a kind of client characterized by comprising
Obtain module, for when client need to direct broadcast server request target be broadcast live video flowing address when, from the visitor
The original Key value for being in encrypted state is obtained in the memory space at family end;The original Key value is preparatory by the direct broadcast server
It is sent to the client;
Deciphering module obtains the original Key value for the original Key value in encrypted state to be decrypted;
Authentication ciphering module, at least to the original Key value, indicate the first information of target live streaming and described straight
Broadcasting server in advance is that the second information that the client is distributed is encrypted, and obtains authentication Key value;
Sending module includes the video flowing for authenticating Key value and the first information for sending to the direct broadcast server
Address requests so that the direct broadcast server obtain the pre-stored original Key value for being sent to the client and
Pre-stored the second information for client distribution, is based on the original Key value, the first information and described second
Information is encrypted with reference to Key value, judges whether the authentication Key value is consistent with the reference Key value, when the authentication Key value
When consistent with the reference Key value, video flowing address is sent to the client.
7. a kind of direct broadcast server characterized by comprising
Receiving module, for receiving the video flowing Address requests of client transmission, the request includes authentication Key value and the view
The first information of the requested target live streaming of frequency stream Address requests;
Module is obtained, for obtaining the pre-stored original Key value for being sent to the client and pre-stored for institute
State the second information of client distribution;
Authentication ciphering module encrypts ginseng for being at least based on the original Key value, the first information and second information
Examine Key value;
Judgment module, for judging whether the authentication Key value is consistent with the reference Key value;
First sending module, for sending and regarding to the client when the authentication Key value is consistent with the reference Key value
Frequency stream address.
8. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
It is performed the steps of when row
When the video flowing address that client needs to be broadcast live to direct broadcast server request target, from the memory space of the client
It is middle to obtain the original Key value for being in encrypted state;The original Key value is sent to the client by the direct broadcast server in advance
End;
The original Key value in encrypted state is decrypted, the original Key value is obtained;
It is in advance at least institute to the first information and the direct broadcast server of the original Key value, the expression target live streaming
The second information for stating client distribution is encrypted, and authentication Key value is obtained;
Sending to the direct broadcast server includes the video flowing Address requests for authenticating Key value and the first information, so that
The direct broadcast server obtains the pre-stored original Key value for being sent to the client and pre-stored for institute
The second information for stating client distribution, encrypts reference based on the original Key value, the first information and second information
Key value judges whether the authentication Key value is consistent with the reference Key value, when the authentication Key value refers to Key value with described
When consistent, video flowing address is sent to the client.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor
It is performed the steps of when row
Direct broadcast server receives the video flowing Address requests that client is sent, and the request includes authentication Key value and the video
Flow the first information of the requested target live streaming of Address requests;
Obtain the pre-stored original Key value for being sent to the client and it is pre-stored for the client distribution
Second information;
At least encrypted based on the original Key value, the first information and second information with reference to Key value;
Judge whether the authentication Key value is consistent with the reference Key value;
When the authentication Key value is consistent with the reference Key value, video flowing address is sent to the client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710353128.XA CN108965205A (en) | 2017-05-18 | 2017-05-18 | Request video flowing address, to the method and apparatus of video flowing Address requests authentication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710353128.XA CN108965205A (en) | 2017-05-18 | 2017-05-18 | Request video flowing address, to the method and apparatus of video flowing Address requests authentication |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108965205A true CN108965205A (en) | 2018-12-07 |
Family
ID=64462858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710353128.XA Pending CN108965205A (en) | 2017-05-18 | 2017-05-18 | Request video flowing address, to the method and apparatus of video flowing Address requests authentication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108965205A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102630042A (en) * | 2012-03-29 | 2012-08-08 | 安徽大惠新道文化传媒有限公司 | Delivery and monitoring system for outdoor electronic information broadcast network |
CN105721411A (en) * | 2015-05-15 | 2016-06-29 | 乐视云计算有限公司 | Method for preventing hotlinking, server and client terminalfor preventing hotlinking |
CN106028064A (en) * | 2016-06-24 | 2016-10-12 | 武汉斗鱼网络科技有限公司 | Live broadcasting video streaming playing address authorization verification method and system |
US20160309205A1 (en) * | 2015-04-15 | 2016-10-20 | Bryan John Cowger | System and method for transmitting digital audio streams to attendees and recording video at public events |
-
2017
- 2017-05-18 CN CN201710353128.XA patent/CN108965205A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102630042A (en) * | 2012-03-29 | 2012-08-08 | 安徽大惠新道文化传媒有限公司 | Delivery and monitoring system for outdoor electronic information broadcast network |
US20160309205A1 (en) * | 2015-04-15 | 2016-10-20 | Bryan John Cowger | System and method for transmitting digital audio streams to attendees and recording video at public events |
CN105721411A (en) * | 2015-05-15 | 2016-06-29 | 乐视云计算有限公司 | Method for preventing hotlinking, server and client terminalfor preventing hotlinking |
CN106028064A (en) * | 2016-06-24 | 2016-10-12 | 武汉斗鱼网络科技有限公司 | Live broadcasting video streaming playing address authorization verification method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10659220B2 (en) | Method and system for encrypting and decrypting two-dimensional code mask | |
CN101977190B (en) | Digital content encryption transmission method and server side | |
US20140351593A1 (en) | Process for encrypted login to a secure computer network, for the creation of a session of encrypted communications between computers and a device including a mobile phone logged into a network, for the persistence of encrypted communications between communication devices, and for the termination of communications | |
CN114900338B (en) | Encryption and decryption method, device, equipment and medium | |
CN104378379B (en) | A kind of digital content encrypted transmission method, equipment and system | |
CN104980477A (en) | Data access control method and system in cloud storage environment | |
CN106911684B (en) | Authentication method and system | |
CN109040079A (en) | The establishment of live streaming chained address and verification method and related device | |
CN106302606B (en) | Across the application access method and device of one kind | |
CN105491073B (en) | Data downloading method, device and system | |
CN106992859B (en) | Bastion machine private key management method and device | |
CN107545188B (en) | Application management method, device and system | |
CN109547198A (en) | The method and system of network transmission video file | |
CN114338247B (en) | Data transmission method and apparatus, electronic device, storage medium, and program product | |
CN106533677B (en) | A kind of user login method, user terminal and server | |
CN107181589B (en) | Bastion machine private key management method and device | |
CN108235067B (en) | Authentication method and device for video stream address | |
CN110807210B (en) | Information processing method, platform, system and computer storage medium | |
WO2018176816A1 (en) | Video requesting and playing method and device | |
KR20210058313A (en) | Data access control method and system using attribute-based password for secure and efficient data sharing in cloud environment | |
CN116204903A (en) | Financial data security management method and device, electronic equipment and storage medium | |
CN113904830B (en) | SPA authentication method, SPA authentication device, electronic equipment and readable storage medium | |
CN115225286A (en) | Application access authentication method and device | |
CN108965205A (en) | Request video flowing address, to the method and apparatus of video flowing Address requests authentication | |
US20140108804A1 (en) | System and method for verifying the authenticity of an electronic 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181207 |