CN-116633627-B - Mounting verification method, device and equipment of Ad hoc network equipment and storage medium
Abstract
The invention relates to the field of data processing, and discloses a method, a device, equipment and a storage medium for mounting verification of ad hoc network equipment. The method comprises the steps of storing a message to a system temporary area when the message sent by equipment to be mounted is received, determining whether the message type of the message is a mounting application message, determining whether the equipment to be mounted is preset equipment according to the information of the equipment to be mounted carried by the message if the message type of the message is the mounting application message, wherein the message comprises the information of the equipment to be mounted and a mounting request, generating a secret key if the equipment to be mounted is not the preset equipment, sending the secret key to the equipment to be mounted, receiving decrypted data sent by the equipment to be mounted in response to the secret key, and determining whether the equipment to be mounted is mounted according to the decrypted data in response to the mounting request when the decrypted data is received. The invention improves the safety of the equipment data in the ad hoc network.
Inventors
- SONG KUNHONG
- TANG SHENG
- LI NENG
Assignees
- 深圳市乐凡信息科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230525
Claims (8)
- 1. The method for verifying the mounting of the ad hoc network equipment is characterized by comprising the following steps of: when receiving a message sent by equipment to be mounted, storing the message into a system temporary area; Determining whether the message type of the message is a mounting application message; if the message type of the message is the mounting application message, determining whether the device to be mounted is a preset device according to the device to be mounted information carried by the message, wherein the message comprises the device to be mounted information and a mounting request; if the equipment to be mounted is not the preset equipment, generating a secret key; transmitting the key to the device to be mounted and receiving decrypted data transmitted by the device to be mounted in response to the key; When the decrypted data is received, responding to the mounting request according to the decrypted data to determine whether to mount the equipment to be mounted; wherein the step of generating the key comprises: Converting preset plaintext data into binary data to obtain a character string; Slicing the character string to obtain a first character string slice; Inserting dynamic characters into the first character string slice to obtain a second character string slice; generating the key according to the second character string slice; Wherein, after the step of determining whether the device to be mounted is a preset device according to the device to be mounted information carried by the message if the message type of the message is the mounting application message, the method further includes: and if the equipment to be mounted is the preset equipment, releasing the temporary system area so as to allow the equipment to be mounted in response to the mounting request.
- 2. The method for verifying attachment of an ad hoc network device according to claim 1, wherein the step of converting preset plaintext data into binary data to obtain a character string comprises: and performing base64 coding processing on the preset plaintext data to convert the preset plaintext data into the binary data, so as to obtain the character string.
- 3. The method for verifying the mounting of an ad hoc network device according to claim 1, wherein said step of determining whether to mount said device to be mounted according to said decrypted data in response to said mounting request when said decrypted data is received comprises: When the decrypted data is received, determining whether the decrypted data is matched with the preset plaintext data; If the decrypted data are matched with the preset plaintext data, judging that the equipment to be mounted is normal equipment, and allowing the equipment to be mounted in response to the mounting request; And if the decrypted data is not matched with the preset plaintext data, judging that the equipment to be mounted is abnormal equipment, and refusing the mounting of the equipment to be mounted in response to the mounting request.
- 4. The method for verifying attachment of an ad hoc network device according to claim 1, wherein said step of storing a message sent by a device to be attached to a system temporary area when receiving the message comprises: And when receiving a message sent by the equipment to be mounted, generating a system temporary area and storing the message into the system temporary area, wherein the system temporary area is a linked list, a queue or a database table.
- 5. The method of claim 1, wherein the step of receiving decrypted data sent by the device to be mounted in response to the key comprises: And receiving the decrypted data generated and transmitted by the equipment to be mounted according to a preset decryption module and the secret key.
- 6. The utility model provides a carry verifying attachment of ad hoc network equipment which characterized in that, carry verifying attachment of ad hoc network equipment includes: The receiving module is used for storing the message to the temporary system area when receiving the message sent by the equipment to be mounted; the judging module is used for determining whether the message type of the message is a mounting application message or not; the determining module is used for determining whether the equipment to be mounted is preset equipment according to the equipment to be mounted carried by the message if the message type of the message is the mounting application message, wherein the message comprises the equipment to be mounted information and a mounting request; the encryption module is used for generating a secret key if the equipment to be mounted is not the preset equipment; a sending module, configured to send the key to the device to be mounted and receive decrypted data sent by the device to be mounted in response to the key; the response module is used for responding to the mounting request according to the decrypted data when receiving the decrypted data so as to determine whether the equipment to be mounted is mounted; wherein, the encryption module may be further specifically configured to: Converting preset plaintext data into binary data to obtain a character string; Slicing the character string to obtain a first character string slice; Inserting dynamic characters into the first character string slice to obtain a second character string slice; generating the key according to the second character string slice; Wherein, the receiving module may be further specifically configured to: and if the equipment to be mounted is the preset equipment, releasing the temporary system area so as to allow the equipment to be mounted in response to the mounting request.
- 7. The mounting verification device of the ad hoc network device is characterized by comprising a memory and at least one processor, wherein the memory is stored with instructions, and the memory and the at least one processor are interconnected through a line; The at least one processor invokes the instructions in the memory to cause a mount verification device of the ad hoc network device to perform the mount verification method of the ad hoc network device of any one of claims 1-5.
- 8. A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the method of load verification of an ad hoc network device according to any of claims 1-5.
Description
Mounting verification method, device and equipment of Ad hoc network equipment and storage medium Technical Field The present invention relates to the field of data processing, and in particular, to a method, an apparatus, a device, and a storage medium for mounting verification of an ad hoc network device. Background In an ad hoc network, each device bears two functions of a router and a host, which means that a network can be provided to connect other devices and process and operate data, so as to form an ad hoc network group, in the coverage area of the ad hoc network, the devices in the area can be connected to/send the network to perform data transmission, but in the use of the ad hoc network, the number of the ad hoc network to be mounted is not constant, other devices possibly need to be added in the use process, but how can the security of the device data under the coverage of the network be ensured, if an external device is mixed into the ad hoc network group, whether a transmitted message is acquired is also. Disclosure of Invention The invention mainly aims to solve the technical problem of low safety of equipment data in an ad hoc network. The first aspect of the present invention provides a method for verifying the mounting of an ad hoc network device, where the method for verifying the mounting of an ad hoc network device includes: when receiving a message sent by equipment to be mounted, storing the message into a system temporary area; Determining whether the message type of the message is a mounting application message; if the message type of the message is the mounting application message, determining whether the device to be mounted is a preset device according to the device to be mounted information carried by the message, wherein the message comprises the device to be mounted information and a mounting request; if the equipment to be mounted is not the preset equipment, generating a secret key; transmitting the key to the device to be mounted and receiving decrypted data transmitted by the device to be mounted in response to the key; and when the decrypted data is received, responding to the mounting request according to the decrypted data so as to determine whether to mount the equipment to be mounted. Optionally, in a first implementation manner of the first aspect of the present invention, the step of generating a key includes: Converting preset plaintext data into binary data to obtain a character string; Slicing the character string to obtain a first character string slice; Inserting dynamic characters into the first character string slice to obtain a second character string slice; and generating the secret key according to the second character string slice. Optionally, in a second implementation manner of the first aspect of the present invention, the step of converting preset plaintext data into binary data to obtain a character string includes: and performing base64 coding processing on the preset plaintext data to convert the preset plaintext data into the binary data, so as to obtain the character string. Optionally, in a third implementation manner of the first aspect of the present invention, when the decrypted data is received, the step of determining whether to mount the device to be mounted according to the decrypted data in response to the mounting request includes: When the decrypted data is received, determining whether the decrypted data is matched with the preset plaintext data; If the decrypted data are matched with the preset plaintext data, judging that the equipment to be mounted is normal equipment, and allowing the equipment to be mounted in response to the mounting request; And if the decrypted data is not matched with the preset plaintext data, judging that the equipment to be mounted is abnormal equipment, and refusing the mounting of the equipment to be mounted in response to the mounting request. Optionally, in a fourth implementation manner of the first aspect of the present invention, the step of storing the message to the temporary area of the system when the message sent by the device to be mounted is received includes: And when receiving a message sent by the equipment to be mounted, generating a system temporary area and storing the message into the system temporary area, wherein the system temporary area is a linked list, a queue or a database table. Optionally, in a fifth implementation manner of the first aspect of the present invention, after the step of determining, according to the to-be-mounted device information carried by the message, whether the to-be-mounted device is a preset device if the message type of the message is the mounting application message, the method further includes: And if the equipment to be mounted is the preset equipment, releasing the temporary area of the system to respond to the mounting request and allow the equipment to be mounted. Optionally, in a sixth implementation manner of the first aspect of the present inve