The content of the invention
Whether the invention provides a kind of information transferring method and device, it is tampered to accurate detection information.
A kind of message receiving method is provided in the embodiment of the present invention, including:
The table for carrying information parameter is received, described information parameter is used to generate mark;
Identified according to table generation first;
The request of lower photos and sending messages is sent to server, first mark is carried in the request;
Message code and the first check code that the reception server sends, first check code is server end root
Determine according to message code and the first mark;
Second check code is generated according to the first mark and the message code for receiving;
When it is determined that the first check code is identical with the second check code, the information that the reception server is issued.
It is preferred that described information parameter includes one of following parameter or its combination and system standard time:Letter
Breath label, information play position, IP address.
It is preferred that described is to be marked according to table generation first according to set time according to the mark of table generation first
Know.
It is preferred that further including:
If the first check code is differed with the second check code, the information is abandoned.
A kind of method for sending information is provided in the embodiment of the present invention, including:
Send the table for carrying information parameter;
The request of photos and sending messages under reception client, carries the first mark, first mark in the request
It is table generation of the client according to the carrying information parameter;
First check code is generated according to the described first mark and message code;
Send message code and the first check code;
Transmission information.
It is preferred that after the request of photos and sending messages under receiving client, according to the described first mark and information generation
Before code the first check code of generation, further include:
Determine that the first mark carried in the request is unique.
If it is preferred that the quantity of the first mark carried in the request is more than 1, the first verification is not generated
Code.
It is preferred that before generating the first check code according to the described first mark and message code, further including:
It is determined that the second mark generated according to the table for carrying information parameter is marked with first of carrying in the request
Whether identical know.
A kind of information receiver is provided in the embodiment of the present invention, including:
First receiver module, the table of information parameter is carried for receiving, and described information parameter is used to generate mark;
First generation module, for being identified according to table generation first;
First sending module, the request for sending lower photos and sending messages to server, carries in the request
State the first mark;
Second receiver module, for message code and the first check code that the reception server sends, described first
Check code is that server end determines according to message code and the first mark;
Second generation module, for generating the second check code according to the first mark and the message code for receiving;
3rd receiver module, for when it is determined that the first check code is identical with the second check code, the reception server
The information for issuing.
It is preferred that the first receiver module is further used for receiving carrying includes one of following parameter or its combination
With the table of the information parameter of system standard time:Key, information play position, IP address.
It is preferred that the first generation module is further used for being identified according to table generation first according to set time.
It is preferred that the 3rd receiver module is further used for it is determined that the first check code is differed with the second check code
When, abandon the information.
A kind of information transmitting apparatus are provided in the embodiment of the present invention, including:
Second sending module, the table of information parameter is carried for sending;
4th receiver module, the request for receiving photos and sending messages under client, first is carried in the request
Mark, first mark is table generation of the client according to the carrying information parameter;
3rd generation module, for generating the first check code according to the described first mark and message code;
3rd sending module, for sending message code and the first check code;
4th sending module, for sending information.
It is preferred that the 3rd generation module is further used for after the request of photos and sending messages under receiving client, root
Before generating the first check code according to the described first mark and message code, the first mark carried in the request is determined
Knowledge is unique.
It is preferred that the 3rd generation module is further used for it is determined that the number of the first mark carried in the request
When amount is more than 1, the first check code is not generated.
It is preferred that the 3rd generation module is further used for according to the described first mark and message code generation the
Before one check code, it is determined that the second mark generated according to the table for carrying information parameter and carrying in the request
First identify whether it is identical.
The present invention has the beneficial effect that:
In technical scheme provided in an embodiment of the present invention, in a scheme, in information receiving end, according to from
The carrying information parameter table that server end is obtained generates the first mark, and is identified to server end by first
The lower photos and sending messages of request.
In another scheme, in information transmitting terminal, identified by message code and according to message code and first
First check code of generation is sent to client.
Then, information receiving end will can be received message code and first mark the second check code of generation,
And compared with the first check code, check code is identical, and information is not tampered with.Therefore, using this programme energy
Whether enough accurate detection informations are tampered.
In embodiment, will be main using client as information receiving end, come as information transmitting terminal using server
Illustrate, following specific embodiment is illustrated by taking the sending and receiving of advertisement as an example.
Fig. 1 is message receiving method implementation process diagram, as illustrated, may include steps of:
Step 101, the table for receiving carrying information parameter, described information parameter are used to generate mark;
Step 102, according to the table generation first identify;
Step 103, the request that lower photos and sending messages are sent to server, carry first mark in the request
Know;
Message code and the first check code that step 104, the reception server send, first check code is
Server end determines according to message code and the first mark;
Step 105, the message code for identifying and receiving according to first generate the second check code;
Step 106, when it is determined that the first check code is identical with the second check code, the letter that the reception server is issued
Breath.
In implementation, described information parameter includes one of following parameter or its combination and system standard time:Letter
Breath label, information play position, IP address.
Specifically, advertisement parameters can include system standard time, advertisement ID, advertisement position ID, client
IP address etc..
In implementation, described is to be marked according to table generation first according to set time according to the mark of table generation first
Know.
Specifically, with key values as identifying, key values can be generated by advertisement parameters.Client and service
Device end all generates the mark of synchronous change at regular intervals, further increases and cracks difficulty, improves network and passes
Defeated security.Regularly, the method for synchronization can be single using advertisement position ID, advertisement ID, client ip etc.
Or combination is to current system standard time the number of minutes remainder, i.e. the mode such as key=IP%min, to ensure
Identical key is obtained in same minute.
In implementation, if the first check code is differed with the second check code, the information is abandoned.
Advertisement Server is received according to key and the check code c (the first check code) of ad code generation is delivered;
After client receives first check code and ad code of Advertisement Server transmission, according to key and ad code
Generation c'(second check codes), judge whether c and c' is identical:
(1) if c is identical with c', then it is assumed that be legal advertisement, advertisement is presented on a web browser;
(2) if c is different from c', then it is assumed that be illegal advertisement, shielded.
Fig. 2 is method for sending information implementation process diagram, as illustrated, may include steps of:
Step 201, the table for sending carrying information parameter;
Step 202, the request for receiving photos and sending messages under client, carry the first mark, institute in the request
It is table generation of the client according to the carrying information parameter to state the first mark;
Step 203, according to described first mark and message code generate the first check code;
Step 204, transmission message code and the first check code;
Step 205, transmission information.
In implementation, after the request of photos and sending messages under receiving client, according to the described first mark and information generation
Before code the first check code of generation, further include:
Determine that the first mark carried in the request is unique.
In implementation, if the quantity of the first mark carried in the request is more than 1, the first verification is not generated
Code.
Specifically, after Advertisement Server receives client request, inquiry request queue first, if request queue
Only unique key, then be for further processing;If there is identical key in request queue, then it is assumed that be
Frequently click on, stopping treatment can effectively resisting DoS attack.
In implementation, before generating the first check code according to the described first mark and message code, further include:
It is determined that the second mark generated according to the table for carrying information parameter is marked with first of carrying in the request
Whether identical know.
Advertisement Server judges the legitimacy of key according to the table for generation mark, if Advertisement Server is received
The key for arriving is identical with the key that itself is generated, then key is legal, that is, descend the request of sending advertisement legal, can be with
It is for further processing, that is, generates check code;Conversely, then stopping treatment.
It is to understand technical scheme provided in an embodiment of the present invention from overall, information receiving end and information is given below
Implementing procedure between transmitting terminal, still using client as information receiving end, is sent out using server as information
Sending end is illustrated, and specific embodiment is illustrated by taking the sending and receiving of advertisement as an example.
Fig. 3 is advertisement putting flow chart, as illustrated, may include steps of:
Step 301, beginning;
Step 302, client obtain Advertisement Server end is used to generate the table of mark;
Step 303, client generate key values according to the table, send to Advertisement Server;
Step 304, Advertisement Server receive key;
Step 305, inquiry request queue, determine whether identical key, if so, step 313 is transferred to, if
It is no, it is transferred to step 306;
Step 306, Advertisement Server judge whether key is legal according to for generating the table of mark, if so,
Step 307 is transferred to, if it is not, being transferred to step 313;
Step 307, Advertisement Server receive request, and verification is generated according to the ad code and key to be delivered
Code c;
Step 308, Advertisement Server respond request, ad code and c are sent to client;
Step 309, client are according to itself key value and ad code, generation check code c';
Step 310, judge whether c and c' is identical, if so, step 311 is transferred to, if it is not, being transferred to step
312;
Step 311, advertisement is normally delivered, be transferred to step 313;
Step 312, shielding advertisement;
Step 313, end.
As seen from the above-described embodiment, using the technical scheme provided in embodiment, can realize that improving network passes
Defeated security, resists DoS attack, prevents from distorting legal advertisement and prevents the functions such as ad click cheating.
Specifically:
(1) dynamic strategy:Client and server end dynamic synchronization changes the generating mode of mark, to increase
Plus difficulty is cracked, improve the security of network transmission;
(2) attack protection strategy:Advertisement Server receive client request after, inquiry request queue first
With the presence or absence of the request of like-identified, if it has, then abandoning the bag, can effectively be resisted using the method
DoS attack;
(3) anti-tamper strategy:Client generates check code according to self identification and ad code, with advertisement
It is right that the check code that server end sends is compared, to verify the legitimacy of advertisement;
(4) anti-cheating strategy:Request of the Advertisement Server end to like-identified in the same period only responds one
It is secondary, with specification ad click recording mode, ensure the legitimate rights and interests of advertiser.
A kind of information receiver and information hair are additionally provided based on same inventive concept, in the embodiment of the present invention
Send, because the principle of these equipment solve problems is similar to a kind of message receiving method and method for sending information,
Therefore the implementation of these equipment may refer to the implementation of method, repeats part and repeats no more.
Fig. 4 is information receiver structural representation, as illustrated, can include in device:
First receiver module 401, the table of information parameter is carried for receiving, and described information parameter is used to generate
Mark;
First generation module 402, for being identified according to table generation first;
First sending module 403, the request for sending lower photos and sending messages to server, carries in the request
There is first mark;
Second receiver module 404, it is described for message code and the first check code that the reception server sends
First check code is that server end determines according to message code and the first mark;
Second generation module 405, for being verified according to the first mark and the message code generation second for receiving
Code;
3rd receiver module 406, for when it is determined that the first check code is identical with the second check code, receiving clothes
The information that business device is issued.
In implementation, the first receiver module can also be further used for receive carry include one of following parameter or
Its combination of person and the table of the information parameter of system standard time:Key, information play position, IP address.
In implementation, the first generation module can also be further used for according to set time according to table generation the
One mark.
In implementation, the 3rd receiver module can also be further used for it is determined that the first check code and the second verification
When code is differed, the information is abandoned.
Fig. 5 is information transmitting apparatus structural representation, as illustrated, can include in device:
Second sending module 501, the table of information parameter is carried for sending;
4th receiver module 502, the request for receiving photos and sending messages under client, carries in the request
First mark, first mark is table generation of the client according to the carrying information parameter;
3rd generation module 503, for generating the first check code according to the described first mark and message code;
3rd sending module 504, for sending message code and the first check code;
4th sending module 505, for sending information.
In implementation, what the 3rd generation module can also be further used in the case where client is received photos and sending messages please
After asking, before generating the first check code according to the described first mark and message code, determine to be carried in the request
First mark be unique.
In implementation, the 3rd generation module can also be further used for it is determined that first carried in the request
When the quantity of mark is more than 1, the first check code is not generated.
In implementation, the 3rd generation module can also be further used for according to the described first mark and information generation
Before code the first check code of generation, it is determined that the second mark generated according to the table for carrying information parameter and the request
The first of middle carrying identifies whether identical.
In sum, accurately detection information whether this shortcoming can not be tampered in prior art,
In technical scheme provided in an embodiment of the present invention, in a scheme, in information receiving end, according to from service
The carrying information parameter table that device end obtains generates the first mark, and is identified to server end request by first
Lower photos and sending messages.In another scheme, in information transmitting terminal, by message code and according to message code and
First check code of one mark generation is sent to client.The message code that information receiving end will can be received
The second check code is generated with the first mark, and is compared with the first check code, check code is identical, and information does not have
It is tampered.Therefore, accurately detection information whether can be tampered using this programme.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or meter
Calculation machine program product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or knot
Close the form of the embodiment in terms of software and hardware.And, the present invention can be used and wherein wrapped at one or more
Containing computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage and
Optical memory etc.) on implement computer program product form.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer program
The flow chart and/or block diagram of product is described.It should be understood that can by computer program instructions realize flow chart and
/ or block diagram in each flow and/or the flow in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions to all-purpose computer, special-purpose computer, insertion can be provided
The processor of formula processor or other programmable data processing devices is producing a machine so that by calculating
The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one
The device of the function of being specified in individual flow or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or the treatment of other programmable datas to set
In the standby computer-readable memory for working in a specific way so that storage is in the computer-readable memory
Instruction produce include the manufacture of command device, the command device realization in one flow of flow chart or multiple
The function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made
Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place
Reason, so as to the instruction performed on computer or other programmable devices is provided for realizing in flow chart one
The step of function of being specified in flow or multiple one square frame of flow and/or block diagram or multiple square frames.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this hair to the present invention
Bright spirit and scope.So, if it is of the invention these modification and modification belong to the claims in the present invention and
Within the scope of its equivalent technologies, then the present invention is also intended to comprising these changes and modification.