CN110868375A - Message receiving method, message sending method, device and electronic equipment - Google Patents

Message receiving method, message sending method, device and electronic equipment Download PDF

Info

Publication number
CN110868375A
CN110868375A CN201810989840.3A CN201810989840A CN110868375A CN 110868375 A CN110868375 A CN 110868375A CN 201810989840 A CN201810989840 A CN 201810989840A CN 110868375 A CN110868375 A CN 110868375A
Authority
CN
China
Prior art keywords
factor
message
sent
sending
receiving
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
Application number
CN201810989840.3A
Other languages
Chinese (zh)
Inventor
傅洁波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201810989840.3A priority Critical patent/CN110868375A/en
Publication of CN110868375A publication Critical patent/CN110868375A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity

Abstract

The embodiment of the invention provides a message receiving method, a message sending method, a device and electronic equipment, wherein the message receiving method comprises the following steps: after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor; the receiving end sends the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor; after receiving the target message, the receiving end extracts the factor in the target message to obtain a second factor; and when the receiving end judges that the second factor is consistent with the first factor, the receiving end determines that the target message is a message to be sent, and executes the operation corresponding to the message content carried in the target message. By the technical scheme provided by the embodiment of the invention, the receiving end can judge whether the target message received by the receiving end is the attack message or not, thereby improving the safety of the receiving end in the wireless communication process.

Description

Message receiving method, message sending method, device and electronic equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a message receiving method, a message sending method, a message receiving device, and an electronic device.
Background
The wireless communication technology is a communication technology for exchanging information by using a characteristic that an electromagnetic wave signal can propagate in a space. By adopting the wireless communication technology, the transmitting end and the receiving end in the wireless communication system can carry out wireless communication.
In the process of wireless communication between a sending end and a receiving end in a wireless communication system, the sending end can send a message to the receiving end, wherein the message can be an unencrypted message or an encrypted message; and after receiving the message, the receiving end executes the operation corresponding to the message. However, in the process of sending a message to the receiving end, once the message is intercepted by the interception device, the message may become an attack message for attacking the receiving end. Specifically, after acquiring the message, the interception device may send the message to the receiving end at any time, and after receiving the message, the receiving end may execute an operation corresponding to the message, which results in the receiving end executing a large number of misoperation.
As can be seen from the above description, in the prior art, the receiving end cannot identify whether the received message is an attack message or not, and thus, after intercepting the attack message, the intercepting device may control the receiving end by sending the attack message to the receiving end at any time, so that the receiving end performs a misoperation.
Disclosure of Invention
The embodiment of the invention aims to provide a message receiving method, a message sending device and electronic equipment, so as to improve the safety of a receiving end in the wireless communication process. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for receiving a packet, where the method includes:
after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor;
the receiving end sends the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor;
after receiving a target message, the receiving end extracts a factor in the target message to obtain a second factor;
and when judging that the second factor is consistent with the first factor, the receiving end determines that the target message is the message to be sent, and executes the operation corresponding to the message content carried in the target message.
Optionally, the step of sending, by the receiving end, the first factor to the sending end includes:
and the receiving end sends the encrypted first factor to the sending end.
Optionally, the step of extracting the factor in the target message to obtain a second factor after the receiving end receives the target message includes;
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
Optionally, the step of extracting the factor in the target message to obtain a second factor after the receiving end receives the target message includes;
and the receiving end extracts a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In a second aspect, an embodiment of the present invention provides a packet sending method, where the method includes:
after a sending end sends a message sending request to a receiving end, the sending end receives a first factor sent by the receiving end in response to the message sending request, wherein the first factor is a factor generated by the receiving end;
the sending end writes the first factor into a message to be sent to obtain a message to be sent carrying the first factor;
and the sending end sends the message to be sent carrying the first factor to the receiving end so that the receiving end extracts a second factor from a target message after receiving the target message, determines the target message as the message to be sent when judging that the second factor is consistent with the first factor, and executes the operation corresponding to the message content carried in the target message.
Optionally, the step of receiving, by the sending end, the first factor sent by the receiving end in response to the message sending request includes:
the sending end receives the encrypted first factor sent by the receiving end;
the step that the sending end writes the first factor into a message to be sent to obtain the message to be sent carrying the first factor comprises the following steps:
the sending end decrypts the received encrypted first factor to obtain a decrypted first factor;
and the sending end writes the decrypted first factor into a message to be sent to obtain the message to be sent carrying the first factor.
Optionally, the step of writing the first factor into a message to be sent by the sending end to obtain a message to be sent carrying the first factor includes:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain a message carrying the first factor, wherein the second bit operation is a preset bit operation.
Optionally, the step of writing the first factor into a message to be sent by the sending end to obtain a message to be sent carrying the first factor includes:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
In a third aspect, an embodiment of the present invention provides a packet receiving apparatus, which is applied to a receiving end in a wireless communication system, where the apparatus includes:
the system comprises a factor generation module, a factor sending module, a factor extraction module and an operation execution module;
wherein the content of the first and second substances,
the factor generation module is used for responding to a message sending request to generate a first factor after receiving the message sending request sent by a sending end;
the factor sending module is configured to send the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor;
the factor extracting module is used for extracting the factors in the target message after receiving the target message to obtain a second factor;
and the operation execution module is used for determining that the target message is the message to be sent when the second factor is judged to be consistent with the first factor, and executing the operation corresponding to the message content carried in the target message.
Optionally, the factor sending module is specifically configured to:
and the receiving end sends the encrypted first factor to the sending end.
Optionally, the factor extracting module is specifically configured to:
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
Optionally, the factor extracting module is specifically configured to:
and the receiving end extracts a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In a fourth aspect, an embodiment of the present invention provides a packet sending apparatus, which is applied to a sending end in a wireless communication system, and the apparatus includes:
the system comprises a factor receiving module, a factor writing module and a message sending module;
wherein the content of the first and second substances,
the device comprises a factor receiving module, a sending end and a receiving end, wherein the factor receiving module is used for receiving a first factor sent by the receiving end in response to a message sending request after sending the message sending request to the receiving end, and the first factor is a factor generated by the receiving end;
the factor writing module is used for writing the first factor into a message to be sent to obtain a message to be sent carrying the first factor;
and the message sending module is used for sending the message to be sent carrying the first factor to the receiving end so that the receiving end extracts a second factor from the target message after receiving the target message, determines that the target message is the message to be sent when judging that the second factor is consistent with the first factor, and executes the operation corresponding to the message content carried in the target message.
Optionally, the factor receiving module is specifically configured to:
the sending end receives the encrypted first factor sent by the receiving end;
the step that the sending end writes the first factor into a message to be sent to obtain the message to be sent carrying the first factor comprises the following steps:
the sending end decrypts the received encrypted first factor to obtain a decrypted first factor;
and the sending end writes the decrypted first factor into a message to be sent to obtain the message to be sent carrying the first factor.
Optionally, the factor writing module is specifically configured to:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain the message to be sent carrying the first factor, wherein the second bit operation is a preset bit operation.
Optionally, the factor writing module is specifically configured to:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device is a receiving end in a wireless communication system, and includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the message receiving method of the first aspect when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device is a sending end in a wireless communication system, and includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the message sending method of the second aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention further provides a wireless communication system, where the system includes: a receiving end and a transmitting end;
the sending end is used for: sending a message sending request to a receiving end;
the receiving end is used for: after receiving a message sending request sent by a sending end, responding to the message sending request to generate a first factor, and sending the first factor to the sending end;
the sending end is further configured to: receiving a first factor sent by the receiving end, and writing the first factor into a message to be sent to obtain a message to be sent carrying the first factor; sending the message to be sent carrying the first factor to the receiving end;
the receiving end is further configured to: receiving a target message, and extracting a factor in the target message after receiving the target message to obtain a second factor; and when the second factor is judged to be consistent with the first factor, determining that the target message is the message to be sent, and executing operation corresponding to the message content carried in the target message.
The receiving end is specifically configured to:
and the receiving end sends the encrypted first factor to the sending end.
The sending end is specifically configured to:
receiving the encrypted first factor sent by the receiving end; decrypting the received encrypted first factor to obtain a decrypted first factor; and writing the decrypted first factor into a message to be sent to obtain a message to be sent carrying the first factor.
The sending end is specifically configured to:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain the message to be sent carrying the first factor, wherein the second bit operation is a preset bit operation.
The receiving end is specifically configured to:
and executing a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation.
The sending end is specifically configured to:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
The receiving end is specifically configured to:
and extracting a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the message receiving method according to the first aspect is implemented.
In a ninth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the message sending method according to the second aspect.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a message receiving method applied to a receiving end according to an embodiment of the present invention;
fig. 2 is a flowchart of a message sending method applied to a sending end according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a message receiving apparatus applied to a receiving end according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a message sending apparatus applied to a sending end according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of another electronic device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a wireless communication system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the technical problem of low receiving end security in the wireless communication process in the prior art, the embodiment of the invention provides a message receiving method, a message sending device and electronic equipment.
In a first aspect, a receiving and sending method provided in an embodiment of the present invention is first described below.
It should be noted that the message receiving method is applied to a receiving end in a wireless communication system, where the receiving end may be a non-battery-powered electronic device, and generally does not have a strong requirement for low power consumption, for example, the receiving end may be a terminal, and the embodiment of the present invention does not specifically limit the receiving end.
As shown in fig. 1, a method for receiving a message according to an embodiment of the present invention may include the following steps:
s110, after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor;
when the sending end sends a message to the receiving end, a message sending request can be sent to the receiving end; after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor.
It is emphasized that the first factor is: and after receiving the message sending request, the receiving end responds to the factor generated by the message sending request. Therefore, after the receiving end receives different message sending requests, the generated first factors are different. For example, there are two different sending ends, namely sending end 1 and sending end 2, where after receiving message sending request 1 sent by sending end 1, the receiving end generates a first factor that may be 001; after receiving the message sending request 2 sent by the sending end 2, the receiving end may generate a first factor of 002.
Moreover, there are various ways for the receiving end to generate the first factor, for example, the first factor may be generated by a random factor generator; and the first factor may be in various forms, for example, the first factor may be a number, a letter, or the like. The embodiment of the present invention does not specifically limit the generation manner of the first factor and the specific form of the first factor.
And S120, the receiving end sends the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor.
After the receiving end responds to the message sending request to generate the first factor, the generated first factor can be sent to the sending end, so that when the sending end sends the message to the receiving end, the first factor can be written into the message to be sent, and the message to be sent is encrypted.
There are various ways for the sending end to write the first factor into the message to be sent.
In an embodiment, the manner for the sending end to write the first factor into the message to be sent may be: for convenience of description, the bit operation executed by the sending end on the message content of the message to be sent and the first factor may be referred to as a second bit operation. It is to be understood that the second bit operation may be a predetermined bit operation, for example, the predetermined bit operation may be an exclusive or operation. The second bit operation is not particularly limited in the embodiments of the present invention.
In another embodiment, the way for the sending end to write the first factor into the message to be sent may be: the first factor is written into a predetermined position in the message to be transmitted. It should be noted that the predetermined position may be located at a message header of the message to be sent, or may also be located in a message content of the message to be sent, that is, the predetermined position may be any position in the message to be sent, and the predetermined position is not specifically limited in the embodiment of the present invention.
In order to further improve the security of the receiving end in the wireless communication system, in an embodiment, the step of the receiving end transmitting the first factor to the transmitting end may include:
and the receiving end sends the encrypted first factor to the sending end.
In this embodiment, the interception device may intercept the first factor during the process of sending the first factor to the sending end by the receiving end. In order to prevent the interception device from directly acquiring the specific content of the first factor after intercepting the first factor. And after the receiving end generates the first factor, encrypting the first factor to obtain the encrypted first factor, and sending the encrypted first factor to the sending end. And after receiving the encrypted first factor, the sending end can decrypt the encrypted first factor to obtain a decrypted first factor, and writes the decrypted first factor into a message to be sent to obtain a message to be sent carrying the first factor. In this way, in the process of sending the encrypted first factor to the sending end by the receiving end, even if the interception device intercepts the encrypted first factor, the interception device cannot know the specific content of the encrypted first factor because the interception device does not decrypt the key of the encrypted first factor.
It should be noted that, when the receiving end encrypts the first factor, there are various encryption methods used, for example, the encryption method may be: the AES128 is a symmetric key advanced encryption standard with a 128-bit data length, and when the encryption mode of the AES128 is adopted, the receiving end and the sending end can pre-define an encryption password and a decryption password. In this way, after receiving the encrypted first factor, the sending end may decrypt the encrypted first factor by using a predetermined decryption password. It should be emphasized that, because there are various encryption methods used by the receiving end to encrypt the first factor and correspondingly, there are also various decryption methods used by the sending end to decrypt the encrypted factor, the embodiments of the present invention do not specifically limit the encryption method and the decryption method.
It can be understood that, in general, the encryption process requires the main chip to perform a large amount of operations, which requires large power consumption, and by performing the encryption operation at the receiving end, the effect of reducing the power consumption of the transmitting end can be achieved.
S130, after receiving the target message, the receiving end extracts the factor in the target message to obtain a second factor.
The target message received by the receiving end may be a message sent to the receiving end by the sending end, or may be an intercepted message sent to the receiving end by the intercepting equipment. In order to know whether the target message received by the receiving end is the message sent to the receiving end by the sending end, after the receiving end receives the target message, the receiving end can extract the factor in the target message to obtain a second factor, so that in the subsequent step, whether the target message received by the receiving end is the message sent to the receiving end by the sending end is determined by judging whether the obtained second factor is the same as the first factor.
Since there are various ways for the sending end to write the first factor into the message to be sent, there are also various ways for the receiving end to extract the second factor from the target message.
In one embodiment, when the sender writes the first factor into the message to be sent, the method includes: when executing the second bit operation on the message content of the message to be sent and the first factor, the step of extracting the factor in the target message after the receiving end receives the target message to obtain the second factor may include:
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to the second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
In this embodiment, in order to accurately extract the second factor from the target packet, after receiving the target packet, the receiving end may perform a first bit operation corresponding to the second bit operation on the target packet, that is, the first bit operation is a reverse process of the second bit operation. For example, if the second bit operation is an exclusive-or operation, the first bit operation is the inverse of the exclusive-or operation.
In another embodiment, when the sending end writes the first factor into the message to be sent, the method includes: when the first factor is written into the preset position in the message to be sent, the step of extracting the factor in the target message to obtain the second factor after the receiving end receives the target message may include:
and the receiving end extracts the second factor from the preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In this embodiment, in order to accurately extract the second factor from the target message, the receiving end may extract the second factor from a predetermined position of the target message after receiving the target message. It can be understood that the process of the receiving end extracting the second factor from the predetermined position of the target message is the inverse process of the sending end writing the first factor into the predetermined position in the message to be sent.
S140, when the receiving end judges that the second factor is consistent with the first factor, the receiving end determines that the target message is a message to be sent, and executes the operation corresponding to the message content carried in the target message.
After extracting the second factor from the target message, the receiving end can judge whether the second factor is consistent with the first factor, if the receiving end judges that the second factor is consistent with the first factor, the target message received by the receiving end is a message which needs to be sent to the receiving end by the sending end, and at the moment, the receiving end executes the operation corresponding to the message content carried in the target message; if the first factor is inconsistent with the second factor, it indicates that the target message received by the receiving end may be an attack message sent by the interception device, that is, the target message may be the target message, and at this time, the receiving end does not perform an operation corresponding to the message content carried by the target message.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
In addition, in order to make the sending end know that the receiving end successfully receives the message sent by the sending end, the receiving end judges that the second factor is consistent with the first factor, namely, after the receiving end judges that the receiving end successfully receives the message sent by the sending end, the receiving end can send response information to the sending end, wherein the response information is used for identifying that the receiving end successfully receives the message sent by the sending end.
In this embodiment, after receiving the target packet, the receiving end extracts the second factor from the target packet, and determines whether the second factor is consistent with the first factor, and if the second factor is consistent with the first factor, it indicates that the receiving end successfully receives the packet sent by the sending end, and at this time, the receiving end may generate the response information and send the response information to the sending end, so that the sending end knows that the receiving end successfully receives the packet sent by the sending end. Correspondingly, if the second factor is inconsistent with the first factor, it indicates that the receiving end fails to successfully receive the message sent by the sending end, at this time, the receiving end may not generate the response information, or may generate the response information for identifying the message sent by the sending end that the receiving end failed to receive, and send the response information identifying the message sent by the sending end that the receiving end failed to receive to the sending end, so that the sending end knows that the receiving end fails to successfully receive the message sent by the sending end.
Therefore, the technical scheme provided by the embodiment of the invention can improve the safety of the receiving end in the wireless communication process; and the response information for identifying that the receiving end successfully receives the message sent by the sending end is sent to the sending end, so that the safety of wireless communication is improved.
In a second aspect, an embodiment of the present invention further provides a message sending method, as shown in fig. 2, where the method may include:
s210, after the sending end sends the message sending request to the receiving end, the sending end receives a first factor sent by the receiving end in response to the message sending request, and the first factor is a factor generated by the receiving end.
When the sending end sends a message to the receiving end, a message sending request can be sent to the receiving end; after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor and sends the generated first factor to the sending end.
It is emphasized that the first factor is: and after receiving the message sending request, the receiving end responds to the factor generated by the message sending request. After receiving different message sending requests, the receiving end generates different first factors. For example, there are two different sending ends, namely sending end 1 and sending end 2, where after receiving message sending request 1 sent by sending end 1, the receiving end generates a first factor that may be 001; after receiving the message sending request 2 sent by the sending end 2, the receiving end may generate a first factor of 002.
Moreover, there are various ways for the receiving end to generate the first factor, for example, the first factor may be generated by a random factor generator; and the first factor may be in various forms, for example, the first factor may be a number, a letter, or the like. The embodiment of the present invention does not specifically limit the generation manner of the first factor and the specific form of the first factor.
In addition, in order to further improve the security of the receiving end in the wireless communication system, the receiving end may encrypt the first factor after generating the first factor, and transmit the encrypted first factor to the transmitting end. In an embodiment, the step of receiving, by the sending end, the first factor sent by the receiving end in response to the message sending request may include:
the sending end receives the encrypted first factor sent by the receiving end;
the step of writing the first factor into the message to be sent by the sending end to obtain the message to be sent carrying the first factor may include:
the sending end decrypts the received encrypted first factor to obtain a decrypted first factor;
and the sending end writes the decrypted first factor into a message to be sent to obtain a message to be sent carrying the first factor.
In the embodiment, in the process of sending the first factor to the sending end, the interception device may intercept the first factor, and in order to prevent the interception device from directly acquiring the specific content of the first factor after intercepting the first factor; and after the receiving end generates the first factor, encrypting the first factor to obtain the encrypted first factor, and sending the encrypted first factor to the sending end. After receiving the encrypted first factor, the sending end may decrypt the encrypted first factor to obtain a decrypted first factor. In this way, in the process of sending the encrypted first factor to the sending end by the receiving end, even if the interception device intercepts the encrypted first factor, the interception device cannot know the specific content of the encrypted first factor because the interception device does not decrypt the key of the encrypted first factor.
It should be noted that, when the receiving end encrypts the first factor, there are various encryption methods used, for example, the encryption method may be: AES128, as those skilled in the art will appreciate, AES128 is a symmetric key advanced encryption standard of 128-bit data length. When the encryption mode of AES128 is adopted, the receiving end and the transmitting end have agreed encryption passwords and decryption passwords in advance. In this way, after receiving the encrypted first factor, the sending end may decrypt the encrypted first factor by using a predetermined decryption password. It should be emphasized that there are various encryption methods used by the receiving end to encrypt the first factor, and correspondingly, there are also various decryption methods used by the sending end to decrypt the encrypted factor.
It can be understood that, in general, the encryption process requires the main chip to perform a large amount of operations, which requires large power consumption, and by performing the encryption operation at the receiving end, the effect of reducing the power consumption of the transmitting end can be achieved.
S220, the sending end writes the first factor into the message to be sent, and the message to be sent carrying the first factor is obtained.
After receiving the first factor sent by the receiving end, the sending end can write the first factor into the message to be sent, so as to obtain the message to be sent carrying the first factor. The sending end can play a role in encrypting the message to be sent by writing the first factor into the message to be sent.
In an embodiment, the step of writing the first factor into the message to be sent by the sending end to obtain the message to be sent carrying the first factor may include:
and executing second bit operation on the message content of the message to be sent and the first factor to obtain the message carrying the first factor, wherein the second bit operation is preset bit operation.
It is understood that the second bit operation is a predetermined bit operation, for example, the predetermined bit operation may be an exclusive-or bit operation, etc. The second bit operation is not particularly limited in the embodiments of the present invention.
In another embodiment, the step of writing the first factor into the message to be sent by the sending end to obtain the message to be sent carrying the first factor may include:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
It should be noted that the predetermined position may be located at a message header of the message to be sent, or may also be located in a message content of the message to be sent, that is, the predetermined position may be any position in the message to be sent, and the predetermined position is not specifically limited in the embodiment of the present invention.
And S230, the sending end sends the message to be sent carrying the first factor to the receiving end, so that the receiving end extracts the second factor from the target message after receiving the target message, determines the target message as the message to be sent when judging that the second factor is consistent with the first factor, and executes the operation corresponding to the message content carried in the target message.
The target message received by the receiving end may be a message sent to the receiving end by the sending end, or may be an intercepted message sent to the receiving end by the intercepting equipment. In order to know whether the target message received by the receiving end is the message sent to the receiving end by the sending end, after the receiving end receives the target message, the receiving end can extract the factor in the target message to obtain a second factor, so that in the subsequent step, whether the target message received by the receiving end is the message sent to the receiving end by the sending end is determined by judging whether the obtained second factor is the same as the first factor.
Since there are various ways for the sending end to write the first factor into the message to be sent, there are also various ways for the receiving end to extract the second factor from the target message.
In one embodiment, when the sender writes the first factor into the message to be sent, the method includes: when executing the second bit operation on the message content of the message to be sent and the first factor, after receiving the target message, the receiving end extracts the factor in the target message to obtain a second factor;
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to the second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
In this embodiment, in order to accurately extract the second factor from the target packet, after receiving the target packet, the receiving end may perform a first bit operation corresponding to the second bit operation on the target packet, that is, the first bit operation is a reverse process of the second bit operation. For example, if the second bit operation is an exclusive-or operation, the first bit operation is the inverse of the exclusive-or operation.
In another embodiment, when the sending end writes the first factor into the message to be sent, the method includes: when the first factor is written into a preset position in the message to be sent, the step of extracting the factor in the target message to obtain a second factor after the receiving end receives the target message can comprise;
and the receiving end extracts the second factor from the preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In this embodiment, in order to accurately extract the second factor from the target message, the receiving end may extract the second factor from a predetermined position of the target message after receiving the target message. It can be understood that the process of the receiving end extracting the second factor from the predetermined position of the target message is the inverse process of the sending end writing the first factor into the predetermined position in the message to be sent.
After extracting the second factor from the target message, the receiving end can judge whether the second factor is consistent with the first factor, if the receiving end judges that the second factor is consistent with the first factor, the target message received by the receiving end is a message which needs to be sent to the receiving end by the sending end, and at the moment, the receiving end executes the operation corresponding to the message content carried in the target message; if the first factor is inconsistent with the second factor, it indicates that the target message received by the receiving end may be an attack message sent by the interception device, that is, the target message may be the target message, and at this time, the receiving end does not perform an operation corresponding to the message content carried by the target message.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
In addition, after the receiving end successfully receives the message sent by the sending end, in order to enable the sending end to know that the sending end successfully receives the message sent by the sending end, in an embodiment, after the step of sending the message to be sent carrying the first factor to the receiving end by the sending end, the method may further include:
and receiving response information sent by the receiving end, wherein the response information is used for identifying that the receiving end successfully receives the message sent by the sending end.
In this embodiment, after receiving the target packet, the receiving end extracts the second factor from the target packet, and determines whether the second factor is consistent with the factor generated by the receiving end, and if the second factor is consistent with the first factor generated by the receiving end, it indicates that the receiving end successfully receives the packet sent by the sending end, and at this time, the receiving end may generate the response information and send the response information to the sending end, so that the sending end knows that the receiving end successfully receives the packet sent by the sending end. Correspondingly, if the second factor is not consistent with the second factor generated by the receiving end, it indicates that the receiving end fails to successfully receive the message sent by the sending end, and at this time, the receiving end may not generate the response information, or may generate the response information for identifying that the receiving end fails to successfully receive the message sent by the sending end, and send the response information identifying that the receiving end fails to successfully receive the message sent by the sending end to the sending end.
Therefore, the technical scheme provided by the embodiment of the invention can improve the safety of the receiving end in the wireless communication process; and the response information for identifying that the receiving end successfully receives the message sent by the sending end is sent to the sending end, so that the safety of wireless communication is improved.
In a third aspect, an embodiment of the present invention provides a message receiving apparatus, which is applied to a receiving end in a wireless communication system, and as shown in fig. 3, the apparatus includes:
a factor generating module 310, a factor transmitting module 320, a factor extracting module 330 and an operation executing module 340;
wherein the content of the first and second substances,
the factor generating module 310 is configured to generate a first factor in response to a message sending request sent by a sending end after receiving the message sending request;
the factor sending module 320 is configured to send the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor;
the factor extracting module 330 is configured to, after receiving a target message, extract a factor in the target message to obtain a second factor;
the operation executing module 340 is configured to determine that the target packet is the packet to be sent when it is determined that the second factor is consistent with the first factor, and execute an operation corresponding to packet content carried in the target packet.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
Optionally, the factor sending module is specifically configured to:
and the receiving end sends the encrypted first factor to the sending end.
Optionally, the factor extracting module is specifically configured to:
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
Optionally, the factor extracting module is specifically configured to:
and the receiving end extracts a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In a fourth aspect, an embodiment of the present invention provides a message sending apparatus, which is applied to a sending end in a wireless communication system, and as shown in fig. 4, the apparatus includes:
a factor receiving module 410, a factor writing module 420 and a message sending module 430;
wherein the content of the first and second substances,
a factor receiving module 410, configured to, after sending a message sending request to a receiving end, receive, by the sending end, a first factor sent by the receiving end in response to the message sending request, where the first factor is a factor generated by the receiving end;
a factor writing module 420, configured to write the first factor into a message to be sent, so as to obtain a message to be sent that carries the first factor;
a message sending module 430, configured to send the message to be sent carrying the first factor to the receiving end, so that after the receiving end receives a target message, a second factor is extracted from the target message, and when it is determined that the second factor is consistent with the first factor, it is determined that the target message is the message to be sent, and an operation corresponding to message content carried in the target message is executed.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
Optionally, the factor receiving module is specifically configured to:
the sending end receives the encrypted first factor sent by the receiving end;
the step that the sending end writes the first factor into a message to be sent to obtain the message to be sent carrying the first factor comprises the following steps:
the sending end decrypts the received encrypted first factor to obtain a decrypted first factor;
and the sending end writes the decrypted first factor into a message to be sent to obtain the message to be sent carrying the first factor.
Optionally, the factor writing module is specifically configured to:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain the message to be sent carrying the first factor, wherein the second bit operation is a preset bit operation.
Optionally, the factor writing module is specifically configured to:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, which is a receiving end in a wireless communication system, as shown in fig. 5, and includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the message receiving method according to the first aspect when executing the program stored in the memory 503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
In a sixth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device is a transmitting end in a wireless communication system, and as shown in fig. 6, the electronic device includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement the message sending method according to the second aspect when executing the program stored in the memory 603.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
In a seventh aspect, an embodiment of the present invention further provides a wireless communication system, as shown in fig. 7, where the system includes: a receiving end 710 and a transmitting end 720;
the sending end 720 is configured to: sending a message sending request to a receiving end;
the receiving end 710 is configured to: after receiving a message sending request sent by a sending end, responding to the message sending request to generate a first factor, and sending the first factor to the sending end;
the transmitting end 720 is further configured to: receiving a first factor sent by the receiving end, and writing the first factor into a message to be sent to obtain a message to be sent carrying the first factor; sending the message to be sent carrying the first factor to the receiving end;
the receiving end 710 is further configured to: receiving a target message, and extracting a factor in the target message after receiving the target message to obtain a second factor; and when the second factor is judged to be consistent with the first factor, determining that the target message is the message to be sent, and executing operation corresponding to the message content carried in the target message.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
The receiving end 710 is specifically configured to:
and the receiving end sends the encrypted first factor to the sending end.
The sending end 720 is specifically configured to:
receiving the encrypted first factor sent by the receiving end; decrypting the received encrypted first factor to obtain a decrypted first factor; and writing the decrypted first factor into a message to be sent to obtain a message to be sent carrying the first factor.
The sending end 720 is specifically configured to:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain the message to be sent carrying the first factor, wherein the second bit operation is a preset bit operation.
The receiving end 710 is specifically configured to:
and executing a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation.
The sending end 720 is specifically configured to:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
The receiving end 710 is specifically configured to:
and extracting a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the message receiving method according to the first aspect is implemented.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
In a ninth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the message sending method according to the second aspect.
According to the technical scheme provided by the embodiment of the invention, the receiving end responds to the first factor generated by the message sending request after receiving the message sending request sent by the sending end, so that the generated first factor is different after the receiving end receives different message sending requests. That is, the first factor generated by the receiving end is only valid for this communication. After receiving the target message, the receiving end can judge whether the received target message is an attack message sent by the interception device by judging whether a second factor carried in the target message is the same as the first factor. And the receiving end executes the operation corresponding to the message content carried in the target message when judging that the second factor carried in the target message is the same as the first factor, so that even if the interception equipment intercepts and sends the attack message to the receiving end, the receiving end cannot execute the operation corresponding to the message content carried in the attack message, namely the receiving end cannot execute the misoperation, so that the interception equipment cannot control the receiving end, and the safety of the receiving end in the wireless communication process is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device, the electronic apparatus, and the storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (15)

1. A method for receiving a message, the method comprising:
after receiving a message sending request sent by a sending end, a receiving end responds to the message sending request to generate a first factor;
the receiving end sends the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor;
after receiving a target message, the receiving end extracts a factor in the target message to obtain a second factor;
and when judging that the second factor is consistent with the first factor, the receiving end determines that the target message is the message to be sent, and executes the operation corresponding to the message content carried in the target message.
2. The method of claim 1, wherein the step of the receiving end sending the first factor to the transmitting end comprises:
and the receiving end sends the encrypted first factor to the sending end.
3. The method according to claim 1, wherein the step of extracting the factor in the target packet to obtain the second factor after the receiving end receives the target packet comprises:
and the receiving end executes a first bit operation on the target message to obtain a second factor, wherein the first bit operation is a bit operation corresponding to a second bit operation, and the second bit operation is a bit operation executed on the first factor and the message content of the message to be sent when the sending end writes the first factor into the message to be sent.
4. The method according to claim 1, wherein the step of extracting the factor in the target packet to obtain the second factor after the receiving end receives the target packet comprises:
and the receiving end extracts a second factor from a preset position of the target message, wherein the preset position is the position of the first factor in the message to be sent when the sending end writes the first factor into the message to be sent.
5. A method for sending a message, the method comprising:
after a sending end sends a message sending request to a receiving end, the sending end receives a first factor sent by the receiving end in response to the message sending request, wherein the first factor is a factor generated by the receiving end;
the sending end writes the first factor into a message to be sent to obtain a message to be sent carrying the first factor;
and the sending end sends the message to be sent carrying the first factor to the receiving end so that the receiving end extracts a second factor from a target message after receiving the target message, determines the target message as the message to be sent when judging that the second factor is consistent with the first factor, and executes the operation corresponding to the message content carried in the target message.
6. The method according to claim 5, wherein the step of the sending end receiving the first factor sent by the receiving end in response to the message sending request comprises:
the sending end receives the encrypted first factor sent by the receiving end;
the step that the sending end writes the first factor into a message to be sent to obtain the message to be sent carrying the first factor comprises the following steps:
the sending end decrypts the received encrypted first factor to obtain a decrypted first factor;
and the sending end writes the decrypted first factor into a message to be sent to obtain the message to be sent carrying the first factor.
7. The method according to claim 5, wherein the step of writing the first factor into the message to be sent by the sending end to obtain the message to be sent carrying the first factor comprises:
and executing a second bit operation on the message content of the message to be sent and the first factor to obtain the message to be sent carrying the first factor, wherein the second bit operation is a preset bit operation.
8. The method according to claim 5, wherein the step of writing the first factor into the message to be sent by the sending end to obtain the message to be sent carrying the first factor comprises:
and writing the first factor into a preset position in the message to be sent to obtain the message to be sent carrying the first factor.
9. A message receiving apparatus, applied to a receiving end in a wireless communication system, the apparatus comprising:
the system comprises a factor generation module, a factor sending module, a factor extraction module and an operation execution module;
the factor generation module is used for responding to a message sending request to generate a first factor after receiving the message sending request sent by a sending end;
the factor sending module is configured to send the first factor to the sending end, so that the sending end writes the first factor into a message to be sent after receiving the first factor;
the factor extracting module is used for extracting the factors in the target message after receiving the target message to obtain a second factor;
and the operation execution module is used for determining that the target message is the message to be sent when the second factor is judged to be consistent with the first factor, and executing the operation corresponding to the message content carried in the target message.
10. A message transmitting apparatus, applied to a transmitting end in a wireless communication system, the apparatus comprising:
the system comprises a factor receiving module, a factor writing module and a message sending module;
the device comprises a factor receiving module, a sending end and a receiving end, wherein the factor receiving module is used for receiving a first factor sent by the receiving end in response to a message sending request after sending the message sending request to the receiving end, and the first factor is a factor generated by the receiving end;
the factor writing module is used for writing the first factor into a message to be sent to obtain a message to be sent carrying the first factor;
and the message sending module is used for sending the message to be sent carrying the first factor to the receiving end so that the receiving end extracts a second factor from the target message after receiving the target message, determines that the target message is the message to be sent when judging that the second factor is consistent with the first factor, and executes the operation corresponding to the message content carried in the target message.
11. An electronic device is a receiving end in a wireless communication system and is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
12. An electronic device is a sending end in a wireless communication system and is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 5 to 8 when executing a program stored in the memory.
13. A wireless communication system, the system comprising: a receiving end and a transmitting end;
the sending end is used for: sending a message sending request to a receiving end;
the receiving end is used for: after receiving a message sending request sent by a sending end, responding to the message sending request to generate a first factor, and sending the first factor to the sending end;
the sending end is further configured to: receiving a first factor sent by the receiving end, and writing the first factor into a message to be sent to obtain a message to be sent carrying the first factor; sending the message to be sent carrying the first factor to the receiving end;
the receiving end is further configured to: receiving a target message, and extracting a factor in the target message after receiving the target message to obtain a second factor; and when the second factor is judged to be consistent with the first factor, determining that the target message is the message to be sent, and executing operation corresponding to the message content carried in the target message.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
15. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 5-8.
CN201810989840.3A 2018-08-28 2018-08-28 Message receiving method, message sending method, device and electronic equipment Pending CN110868375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810989840.3A CN110868375A (en) 2018-08-28 2018-08-28 Message receiving method, message sending method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810989840.3A CN110868375A (en) 2018-08-28 2018-08-28 Message receiving method, message sending method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN110868375A true CN110868375A (en) 2020-03-06

Family

ID=69651530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810989840.3A Pending CN110868375A (en) 2018-08-28 2018-08-28 Message receiving method, message sending method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN110868375A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787032A (en) * 2020-08-05 2020-10-16 北京北斗弘鹏科技有限公司 Data transmitting and receiving method and device for resisting network communication monitoring
CN114501442A (en) * 2021-12-07 2022-05-13 珠海格力电器股份有限公司 Message tampering detection method, auxiliary method, device, medium and terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684792A (en) * 2013-12-23 2014-03-26 加弘科技咨询(上海)有限公司 Safety authentication method for OAM (Operation, Administration and Maintenance) and OAM message sending/receiving device
CN107332833A (en) * 2017-06-22 2017-11-07 宇龙计算机通信科技(深圳)有限公司 Method of calibration and device
CN107547572A (en) * 2017-10-13 2018-01-05 北京洋浦伟业科技发展有限公司 A kind of CAN communication means based on pseudo random number

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684792A (en) * 2013-12-23 2014-03-26 加弘科技咨询(上海)有限公司 Safety authentication method for OAM (Operation, Administration and Maintenance) and OAM message sending/receiving device
CN107332833A (en) * 2017-06-22 2017-11-07 宇龙计算机通信科技(深圳)有限公司 Method of calibration and device
CN107547572A (en) * 2017-10-13 2018-01-05 北京洋浦伟业科技发展有限公司 A kind of CAN communication means based on pseudo random number

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111787032A (en) * 2020-08-05 2020-10-16 北京北斗弘鹏科技有限公司 Data transmitting and receiving method and device for resisting network communication monitoring
CN114501442A (en) * 2021-12-07 2022-05-13 珠海格力电器股份有限公司 Message tampering detection method, auxiliary method, device, medium and terminal
CN114501442B (en) * 2021-12-07 2023-11-03 珠海格力电器股份有限公司 Message tamper detection method, auxiliary method, device, medium and terminal

Similar Documents

Publication Publication Date Title
US20170208049A1 (en) Key agreement method and device for verification information
US9769654B2 (en) Method of implementing a right over a content
EP3299990A1 (en) Electronic device server and method for communicating with server
US8356345B2 (en) Constructing a secure internet transaction
CN114244522B (en) Information protection method, device, electronic equipment and computer readable storage medium
CN111741268B (en) Video transmission method, device, server, equipment and medium
CN110971616B (en) Connection establishing method based on secure transport layer protocol, client and server
CN110868375A (en) Message receiving method, message sending method, device and electronic equipment
EP4037250A1 (en) Message transmitting system with hardware security module
CN115276978A (en) Data processing method and related device
CN114793184A (en) Security chip communication method and device based on third-party key management node
CN113726743B (en) Method, device, equipment and medium for detecting network replay attack
US20240106633A1 (en) Account opening methods, systems, and apparatuses
CN111756698B (en) Message transmission method, device, equipment and computer readable storage medium
CN112487380A (en) Data interaction method, device, equipment and medium
CN112437046A (en) Communication method, system, electronic device and storage medium for preventing replay attack
CN110968878B (en) Information transmission method, system, electronic equipment and readable medium
JP4921614B2 (en) Method and system for preventing man-in-the-middle computer hacking techniques
CN108154037B (en) Inter-process data transmission method and device
CN115567200A (en) http interface anti-brush method, system and related device
CN105426704B (en) A kind of method that protecting computer software is realized based on network service
CN116566642B (en) Privacy protection system and method based on cloud server crypto machine
CN113411347B (en) Transaction message processing method and processing device
CN109862015B (en) Information transmission method and device
CN114491593B (en) Data protection method of NFC (near field communication) tag

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

Application publication date: 20200306

RJ01 Rejection of invention patent application after publication