Networking method and device of distributed system, electronic equipment and storage medium
By using encrypted verification strategies and security modules sent by the server in a distributed system to verify device identification and verification codes, the security issues caused by manual input of verification codes are resolved, and a more efficient and secure networking process is achieved.
Patent Information
- Application Number
- CN202410988462.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2044-07-23
AI Technical Summary
In existing technologies, device verification through manual input of verification codes can lead to the leakage of verification codes, which reduces the security of distributed system networks.
The device identification and verification code are verified using an encryption verification strategy and security module sent by the server, replacing manual input. This includes first verification and second verification, ensuring the security of communication connections between devices.
It enhances network security by reducing the risk of verification code leakage and improving the reliability of communication connections between devices through encryption verification strategies and the use of security modules.
Smart Images

Figure CN121397530B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a networking method, apparatus, electronic device and storage medium for a distributed system. Background Technology
[0002] Distributed systems enable seamless connectivity and efficient communication between different devices. In a distributed system, each device acts as a node, capable of independently processing data and executing tasks while also collaborating with others. In contrast, traditional communication methods require network devices to forward data between devices. Compared to traditional methods, distributed systems offer advantages such as automatic device discovery, self-organizing networks, and high-efficiency data transmission. For example, the distributed soft bus in the HarmonyOS operating system can effectively improve data transmission efficiency in specific scenarios.
[0003] In practical applications, before data transmission can occur in a distributed system, devices need to be networked together to establish communication connections. This network setup process includes device authentication to ensure the security of the communication connection. In related technologies, authentication is performed by manually entering a verification code.
[0004] However, manual verification can lead to the leakage of verification codes, reducing the security of the network. Summary of the Invention
[0005] This application provides a networking method, apparatus, electronic device, and storage medium for a distributed system to improve network security.
[0006] In a first aspect, this application provides a networking method for a distributed system, comprising: receiving a networking request sent by a sending device, the networking request including a device identifier of the sending device; according to the networking request, performing a first verification process on the device identifier through a first security module corresponding to the receiving device to obtain a first verification result, the first verification result including verification passed or verification failed, the first security module including an encrypted verification strategy sent by a server; if the first verification result is verification passed, obtaining a first verification code of the receiving device from the first security module and sending the first verification code to the sending device, so that the sending device performs verification processing on the first verification code through a second security module corresponding to the sending device; receiving a second verification code sent by the sending device and performing a second verification process on the second verification code through the first security module to obtain a second verification result, the second verification result including verification passed or verification failed; if the second verification result is verification passed, establishing a communication connection of the distributed system between the sending device and the receiving device.
[0007] In one possible implementation, the device identifier is subjected to a first verification process by a first security module corresponding to the receiving device to obtain a first verification result, including: determining a first version number of the verification policy in the first security module; sending a version number request to the server to determine a second version number of the verification policy in the server; if the first version number is the same as the second version number, the device identifier is subjected to the first verification process by the first security module to obtain the first verification result.
[0008] In one possible implementation, the first verification process performed on the device identifier by the first security module to obtain the first verification result includes: querying the device identifier in the whitelist of the first security module, the whitelist including the identifiers of authorized devices; if the device identifier is included in the whitelist, the first verification result is determined to be verification passed; if the device identifier is not included in the whitelist, the first verification result is determined to be verification failed.
[0009] In one possible implementation, obtaining the first verification code from the receiving device from the first security module includes: determining verification code purpose information and authentication information, wherein the verification purpose information is used to describe the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code; sending the verification code purpose information and the authentication information to the first security module; and receiving the first verification code sent by the first security module.
[0010] In one possible implementation, the first verification code includes an expiration period; the first verification code expires after being sent from the receiving device or after the expiration period of the first verification code.
[0011] In one possible implementation, the second verification process performed on the second verification code by the first security module includes: determining the validity period of the second verification code; if the validity period of the second verification code has not expired, determining whether the database contains historical verification codes identical to the second verification code, wherein the database stores historical verification codes received by the receiving device; if not, sending the second verification code to the first security module so that the second verification process is performed on the second verification code by the first security module.
[0012] In one possible implementation, the method further includes: if the first verification result is a verification failure or the second verification result is a verification failure, then adding the device identifier to a blacklist; and sending the blacklist to the server every preset time interval to enable the server to update the verification policy.
[0013] Secondly, this application provides a networking device for a distributed system, comprising: a receiving module for receiving a networking request sent by a sending device, the networking request including a device identifier of the sending device; a first verification module for performing a first verification process on the device identifier through a first security module corresponding to the receiving device according to the networking request, to obtain a first verification result, the first verification result including verification passed or verification failed, the first security module including an encrypted verification strategy sent by a server; a sending module for obtaining a first verification code of the receiving device from the first security module and sending the first verification code to the sending device if the first verification result is verification passed, so that the sending device performs verification processing on the first verification code through a second security module corresponding to the sending device; a second verification module for receiving a second verification code sent by the sending device and performing a second verification process on the second verification code through the first security module to obtain a second verification result, the second verification result including verification passed or verification failed; and an establishment module for establishing a communication connection of the distributed system between the sending device and the receiving device if the second verification result is verification passed.
[0014] In one possible implementation, the first verification module is specifically configured to determine a first version number of the verification policy in the first security module; the first verification module is further configured to send a version number request to the server to determine a second version number of the verification policy in the server; the first verification module is further configured to perform a first verification process on the device identifier through the first security module if the first version number is the same as the second version number, and obtain the first verification result.
[0015] In one possible implementation, the first verification module is specifically configured to query the device identifier in a whitelist of the first security module, the whitelist including identifiers of authorized devices; the first verification module is further configured to determine the first verification result as verification passed if the whitelist includes the device identifier; the first verification module is further configured to determine the first verification result as verification failed if the whitelist does not include the device identifier.
[0016] In one possible implementation, the apparatus further includes: an acquisition module, configured to determine verification code purpose information and authentication information, wherein the verification purpose information is used to describe the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code; the acquisition module is further configured to send the verification code purpose information and the authentication information to the first security module; and the acquisition module is further configured to receive the first verification code sent by the first security module.
[0017] In one possible implementation, the first verification code includes an expiration period; the first verification code expires after being sent from the receiving device or after the expiration period of the first verification code.
[0018] In one possible implementation, the device further includes: a judgment module, configured to determine the validity period of the second verification code; the judgment module is further configured to, if the validity period of the second verification code has not expired, determine whether the database contains historical verification codes identical to the second verification code, the database storing historical verification codes received by the receiving device; the judgment module is further configured to, if not, send the second verification code to the first security module so that the second verification processing is performed on the second verification code by the first security module.
[0019] In one possible implementation, the device further includes: a processing module, configured to add the device identifier to a blacklist if the first verification result is a verification failure or the second verification result is a verification failure; the processing module is further configured to send the blacklist to the server at preset intervals to enable the server to update the verification policy.
[0020] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in any one of the first aspects.
[0021] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which are executed by a processor as described in any one of the first aspects.
[0022] Fifthly, this application provides a computer program product including a computer program that is executed by a processor as described in any one of the first aspects.
[0023] This application provides a network topology method, apparatus, electronic device, and storage medium for a distributed system. The method includes: receiving a network topology request sent by a sending device, the network topology request including a device identifier of the sending device; according to the network topology request, performing a first verification process on the device identifier through a first security module corresponding to the receiving device to obtain a first verification result, the first verification result including verification passed or verification failed, the first security module including an encrypted verification policy sent by a server; if the first verification result is verification passed, obtaining a first verification code from the receiving device from the first security module and sending the first verification code to the sending device, so that the sending device performs verification processing on the first verification code through a second security module corresponding to the sending device; receiving a second verification code sent by the sending device and performing a second verification process on the second verification code through the first security module to obtain a second verification result, the second verification result including verification passed or verification failed; if the second verification result is verification passed, establishing a communication connection between the sending device and the receiving device in the distributed system. This solution, by generating and verifying the verification code through a security module including a verification policy sent by a server, replaces manual verification processing, thereby improving the security of the verification process and thus enhancing the security of the network topology. Attached Figure Description
[0024] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0025] Figure 1 This is a schematic diagram illustrating an application scenario of a networking method for a distributed system provided in an embodiment of this application.
[0026] Figure 2 A flowchart illustrating a network topology method for a distributed system provided in an embodiment of this application;
[0027] Figure 3 A flowchart illustrating a network topology method for a distributed system provided in an embodiment of this application;
[0028] Figure 4 A schematic diagram illustrating the acquisition of the first verification code provided in an embodiment of this application;
[0029] Figure 5 A schematic diagram of the second verification process provided in the embodiments of this application;
[0030] Figure 6 A schematic diagram illustrating the establishment of a communication connection provided in an embodiment of this application;
[0031] Figure 7A schematic diagram of the structure of a networking device for a distributed system provided in an embodiment of this application;
[0032] Figure 8 A schematic diagram of the structure of a networking device for a distributed system provided in an embodiment of this application;
[0033] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0034] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0035] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse.
[0037] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0038] It should be noted that the networking method, apparatus, electronic equipment and storage medium of the distributed system of this application can be used in the field of communication technology, or in any field other than communication. The application field of the networking method, apparatus, electronic equipment and storage medium of the distributed system of this application is not limited.
[0039] Figure 1 This is a schematic diagram illustrating an application scenario of a network method for a distributed system provided in an embodiment of this application. Using the illustrated scenario as an example: two devices send their respective verification codes for verification processing. After successful verification, the devices network together to enable communication within the distributed system.
[0040] Among them, the transmitting device equipped with the HarmonyOS operating system supports the function of a distributed soft bus. The distributed soft bus builds a virtual communication infrastructure at the software level, enabling different devices to work together as if connected to the same "bus", achieving efficient and seamless communication and collaborative work.
[0041] In related technologies, verification is achieved by users entering and sending verification codes on terminal devices. This poses a risk of verification code leakage, resulting in low network security.
[0042] The networking method for distributed systems provided in this application aims to solve the above-mentioned technical problems in the prior art.
[0043] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0044] Figure 2 This application provides a flowchart illustrating a networking method for a distributed system, which includes the following steps:
[0045] S201. Receive a networking request sent by the transmitting device. The networking request includes the device identifier of the transmitting device.
[0046] As an example, the implementing entity of this embodiment can be a networking device of a distributed system, which can be implemented in various ways. For example, it can be program software, or a medium storing relevant computer programs, such as a USB flash drive; or, the device can also be a physical device that integrates or installs relevant computer programs, such as a chip, a smart terminal, a computer, a server, etc.
[0047] Among them, the device identifier is a unique identifier for the transmitting device, and the corresponding transmitting device can be uniquely identified through the device identifier.
[0048] With the example scenario, a network request is used to request the establishment of a communication connection (hereinafter referred to as a communication connection) between a sending device and a receiving device in a distributed system. Through this communication connection, the sending device can directly send data to the receiving device without needing to forward it through network devices such as base stations, thereby improving the efficiency of data transmission.
[0049] S202. According to the network request, the device identifier is processed by the first security module corresponding to the receiving device to obtain the first verification result.
[0050] The first verification result includes whether the verification passed or failed, and the first security module includes the encrypted verification policy sent by the server.
[0051] The first verification process is used to verify whether the sending device is a device that supports networking with the receiving device.
[0052] Optionally, the first verification process in the verification strategy is based on the application scenario of the device. If the application scenario of the sending device is the same as that of the receiving device, the first verification result is that the verification is successful; otherwise, the verification is unsuccessful.
[0053] With the example scenario, the server generates an encrypted verification policy and sends it to the security module. The security module executes the verification policy, and the user on the terminal device does not need to execute the verification policy, thereby improving the security of the verification process.
[0054] S203. If the first verification result is successful, the first verification code of the receiving device is obtained from the first security module and sent to the sending device so that the sending device can perform verification processing on the first verification code through the second security module corresponding to the sending device.
[0055] The second security module operates in the same way as the first security module.
[0056] With the example scenario, if the first verification result is successful, it means that the receiving device supports networking with the sending device. Next, a security verification is performed between the sending and receiving devices to verify the current security of the receiving and sending devices.
[0057] For example, the first verification code represents the security information of the receiving device, and the sending device uses the first verification code to determine whether the receiving device is currently operating in a secure environment.
[0058] Optionally, the verification strategy in the second security module includes a verification code corresponding to the receiving device. If the verification code is the same as the first verification code, the second security module determines that the verification is successful.
[0059] In related technologies, the first verification code is input by the user. In this application, the security of the verification code can be improved by replacing manual input with a first security module.
[0060] S204. Receive the second verification code sent by the sending device, and perform a second verification process on the second verification code through the first security module to obtain a second verification result, which includes verification passed or verification failed.
[0061] The second verification code is sent by the sending device after the first verification code has been verified. The second verification code represents the security information of the sending device.
[0062] Optionally, both the first and second verification codes are sent in encrypted form, and the security module can decrypt them.
[0063] Based on the scenario examples, verification codes include, but are not limited to, at least one of the following: Personal Identification Number (PIN), public key certificate, or hash value.
[0064] S205. If the second verification result is successful, then establish a communication connection between the sending device and the receiving device in the distributed system.
[0065] With the example of the scenario, if the second verification result is successful, it means that the sending device is trustworthy to the receiving device, and the receiving device is trustworthy to the sending device. The communication connection established on this basis has high reliability.
[0066] The networking method for a distributed system provided in this application embodiment receives a networking request sent by a sending device, the networking request including the device identifier of the sending device; according to the networking request, the device identifier is subjected to a first verification process by a first security module corresponding to the receiving device to obtain a first verification result, the first verification result including verification passed or verification failed, the first security module including an encrypted verification policy sent by a server; if the first verification result is verification passed, a first verification code of the receiving device is obtained from the first security module and sent to the sending device, so that the sending device performs verification processing on the first verification code by a second security module corresponding to the sending device; a second verification code sent by the sending device is received, and the second verification code is subjected to a second verification process by the first security module to obtain a second verification result, the second verification result including verification passed or verification failed; if the second verification result is verification passed, a communication connection of the distributed system between the sending device and the receiving device is established. The above scheme, by generating and verifying the verification code through a security module including a verification policy sent by a server, replaces manual verification processing, which can improve the security of the verification process, thereby improving the security of the network.
[0067] Based on any of the above embodiments, the following, in conjunction with Figure 3 This section provides a detailed explanation of the networking process for distributed systems.
[0068] Figure 3 This is a flowchart illustrating a network topology method for a distributed system provided in an embodiment of this application. Figure 3 As shown, the method includes:
[0069] S301. Receive a networking request sent by the transmitting device. The networking request includes the device identifier of the transmitting device.
[0070] It should be noted that the execution process of S301 is the same as that of S201, and will not be repeated here.
[0071] S302. Determine the first version number of the verification policy in the first security module.
[0072] The version number corresponds one-to-one with the version of the verification strategy.
[0073] Optionally, the verification policy is stored in the form of a file. The file information of the verification policy includes a version number. The first version number can represent the version of the verification policy stored in the first security module.
[0074] S303. Send a version number request to the server to determine the second version number of the verification policy in the server.
[0075] The second version number indicates the version of the current latest verification strategy.
[0076] With the example scenario, the server periodically updates the verification policy, sending the latest version of the verification policy to each security module at regular intervals so that the security modules can perform verification processing according to the latest version of the verification policy. Each time the server updates the verification policy, it generates a corresponding version number, and the server keeps the second version number as the latest version number. For example, if the current second version number is 1.05, it means that the current version number of the verification policy is 1.05. If the updated verification policy version number is 1.06, then the second version number will be updated to 1.06 simultaneously.
[0077] S304. If the first version number is the same as the second version number, the device identifier is processed by the first security module to obtain the first verification result.
[0078] With the example scenario, if the first version number is the same as the second version number, it means that the verification policy stored in the first security module is the latest version of the verification policy, which can be used for verification processing.
[0079] Optionally, if the first version number is less than the second version number, it means that the verification policy stored in the first security module is not the latest version of the verification policy. In this case, the latest version of the verification policy is obtained from the first security module before verification processing is performed.
[0080] Based on the above implementation methods, the version of the verification strategy can be determined by the version number, and verification processing can be performed according to the latest version of the verification strategy, thereby improving the accuracy of the verification processing.
[0081] One feasible implementation method is to perform the first verification process as follows: query the device identifier in the whitelist of the first security module. The whitelist includes the identifiers of authorized devices. If the whitelist includes the device identifier, the first verification result is determined to be successful. If the whitelist does not include the device identifier, the first verification result is determined to be unsuccessful.
[0082] With the example scenario, the identifiers in the whitelist are determined by the server based on authorized devices, and all identifiers in the whitelist are authorized identifiers.
[0083] Optionally, a query command can be generated based on the device identifier and executed in the whitelist. If a result is returned, the first verification result is considered successful; if no result is returned, the whitelist does not include the device identifier, indicating that the first verification result is considered unsuccessful.
[0084] In this feasible implementation, by querying the whitelist, it is possible to quickly determine whether the device identifier has passed verification, thereby improving the efficiency of the verification process.
[0085] S305. Determine the purpose of the verification code and the authentication information.
[0086] The purpose information is used to explain the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code.
[0087] As illustrated by the scenario examples, the verification code generated by the first security module can be used in various scenarios. In this application, the first verification code is used for network setup. The authentication information is used by the first security module to verify whether the act of obtaining the verification code is valid.
[0088] Optionally, the authentication information can be a device password or similar type. If the authentication information is correct, the first security module sends the first verification code.
[0089] S306. Send the verification code purpose information and authentication information to the first security module.
[0090] For example, the receiving device generates verification code usage information and authentication information, and the security module determines whether to send the first verification code based on the verification code usage information and authentication information.
[0091] With the example scenario, if the purpose information of the verification code is valid and the authentication information is valid, the security module will send the first verification code.
[0092] S307, Receive the first verification code sent by the first security module.
[0093] Optionally, the first verification code is stored in encrypted form, and the receiving device cannot determine the information in the first verification code after receiving it.
[0094] With the example scenario, the first verification code is used by the sending device for verification processing, and the receiving device does not need to obtain the specific content of the first verification code.
[0095] Below, in conjunction with Figure 4 Instructions for obtaining the first verification code.
[0096] Figure 4 This is a schematic diagram illustrating the process of obtaining a first verification code, as provided in an embodiment of this application. Figure 4 As shown, the receiving device performs a first verification process through the first security module based on the received device identifier, and obtains a first verification result. If the first verification result is successful, the device sends verification code purpose information and authentication information. The first security module sends a first verification code to the receiving device based on the verification code purpose information and authentication information.
[0097] Based on the above implementation methods, the security of the first verification code can be improved by encrypting and storing it.
[0098] One feasible implementation is that the first verification code includes an expiration period; the first verification code expires after being sent from the receiving device or after the expiration period of the first verification code.
[0099] The scenario example illustrates that the timer starts from the moment the receiving device receives the first verification code. If the timer expires or the receiving device sends out the first verification code, the first verification code stored in the receiving device becomes invalid. If the first verification code is needed again, it must be obtained again.
[0100] In this feasible implementation, the use of an expiration date and a one-time verification code can prevent the leakage of verification codes stored in the receiving device, thereby improving the security of the network.
[0101] S308. Determine the validity period of the second verification code.
[0102] The validity period of the second verification code is used by the receiving device to determine whether the second verification code is valid.
[0103] Optionally, the second verification code is sent simultaneously with its validity period.
[0104] With the help of scenario examples, the validity period of the second verification code includes an expiration time, and the validity of the second verification code is determined based on the expiration time.
[0105] S309. If the validity period of the second verification code has not expired, determine whether the database includes historical verification codes that are the same as the second verification code.
[0106] The database stores historical verification codes received by the receiving device.
[0107] With the example scenario, the receiving device stores the verification code in the database each time it receives a verification code.
[0108] Optionally, the second verification code includes verification code content and verification code identifier. The verification code content is encrypted information, and the verification code identifier is a plaintext identifier that corresponds one-to-one with the verification code.
[0109] With the example scenario, the database stores plaintext verification code identifiers. By querying the verification code identifier, it's determined whether the database contains historical verification codes identical to the second verification code. It can be understood that by querying the verification code identifier, there's no need to decrypt the verification code content, thus improving network security.
[0110] S310. If not, send the second verification code to the first security module so that the first security module can perform the second verification process on the second verification code.
[0111] To illustrate with a scenario example, if the database contains historical verification codes identical to the second verification code, it means that the second verification code has already been used, and therefore it is invalid; the next step will not be executed. If the database does not contain historical verification codes identical to the second verification code, it means that the receiving device has not received the second verification code, and therefore it is valid.
[0112] For example, the first security module performs a second verification process on the second verification code according to the verification policy sent by the server.
[0113] Below, in conjunction with Figure 5 The second verification process is explained.
[0114] Figure 5 This is a schematic diagram of the second verification process provided in an embodiment of this application. Figure 5As shown, after receiving the second verification code, the receiving device determines its validity period. If the second verification code has not expired, it checks its database. It then checks whether the database contains any historical verification codes identical to the second verification code. If not, it sends the second verification code to the first security module, enabling the first security module to perform a second verification process.
[0115] One feasible implementation method for the network topology of the distributed system further includes: if the first verification result is a verification failure or the second verification result is a verification failure, then the device identifier is added to the blacklist; every preset time interval, the blacklist is sent to the server so that the server updates the verification policy.
[0116] The blacklist is used to quickly filter out invalid sending devices.
[0117] With the example of a scenario, for any networking request, if the receiving device determines that the device identifier in the networking request exists in the blacklist, it will stop networking and send a rejection message to the sending device.
[0118] In this feasible implementation, a blacklist can be used to quickly filter out invalid network requests from sending devices, reducing verification operations and thus improving network efficiency.
[0119] S311. If the second verification result is successful, then establish a communication connection between the sending device and the receiving device in the distributed system.
[0120] Below, in conjunction with Figure 6 Instructions for establishing a communication connection are provided.
[0121] Figure 6 This is a schematic diagram illustrating the establishment of a communication connection as provided in an embodiment of this application. Figure 6 As shown, the transmitting device sends a network request to the receiving device. The first security module performs a first verification process based on the device identifier in the network request; if the verification passes, it generates and sends a first verification code. The receiving device sends the first verification code to the transmitting device. The second security module corresponding to the transmitting device verifies the first verification code; if the verification passes, it generates and sends a second verification code. The transmitting device sends the second verification code to the receiving device. The first security module performs a second verification process on the second verification code. If the second verification result returned by the first security module is successful, a communication connection is established between the transmitting device and the receiving device.
[0122] Based on the above implementation methods, the security of the verification process can be improved by using the first security module and the second security module for verification processing, thereby enhancing the security of the network.
[0123] Figure 7This is a schematic diagram of the structure of a networking device for a distributed system provided in an embodiment of this application. Figure 7 As shown, the networking device 70 of the distributed system may include: a receiving module 71, a first verification module 72, a sending module 73, a second verification module 74, and an establishment module 75, wherein...
[0124] The receiving module 71 is used to receive a networking request sent by the transmitting device. The networking request includes the device identifier of the transmitting device.
[0125] The first verification module 72 is used to perform a first verification process on the device identifier by receiving the first security module corresponding to the device according to the network request, and obtain a first verification result. The first verification result includes verification passed or verification failed. The first security module includes an encrypted verification strategy sent by the server.
[0126] The sending module 73 is used to obtain the first verification code of the receiving device from the first security module and send the first verification code to the sending device if the first verification result is successful, so that the sending device can perform verification processing on the first verification code through the second security module corresponding to the sending device.
[0127] The second verification module 74 is used to receive the second verification code sent by the sending device, and to perform a second verification process on the second verification code through the first security module to obtain a second verification result, which includes verification passed or verification failed.
[0128] Module 75 is established to establish a communication connection between the sending device and the receiving device in a distributed system if the second verification result is successful.
[0129] Optionally, the receiving module 71 can perform... Figure 2 S201 in the embodiment.
[0130] Optionally, the first verification module 72 can be executed. Figure 2 S202 in the embodiment.
[0131] Optionally, the sending module 73 can perform... Figure 2 S203 in the embodiment.
[0132] Optionally, the second verification module 74 can be executed. Figure 2 S204 in the embodiment.
[0133] Optionally, module 75 can be executed. Figure 2 S205 in the embodiment.
[0134] It should be noted that the networking device of the distributed system shown in the embodiments of this application can execute the technical solution shown in the above method embodiments, and its implementation principle and beneficial effects are similar, so they will not be described again here.
[0135] In one possible implementation, the first verification module 72 is specifically used for:
[0136] The first version number of the verification policy in the first security module is determined; a version number request is sent to the server to determine the second version number of the verification policy in the server; if the first version number and the second version number are the same, the device identifier is processed by the first security module to obtain the first verification result.
[0137] In one possible implementation, the first verification module 72 is specifically used for:
[0138] The device identifier is queried in the whitelist of the first security module. The whitelist includes the identifiers of authorized devices. If the device identifier is included in the whitelist, the first verification result is determined to be successful. If the device identifier is not included in the whitelist, the first verification result is determined to be unsuccessful.
[0139] Figure 8 This is a schematic diagram of the structure of a networking device for a distributed system provided in an embodiment of this application. Figure 7 Based on the illustrated embodiments, as Figure 8 As shown, the networking device 80 of the distributed system further includes: an acquisition module 76, a judgment module 77, and a processing module 78, wherein:
[0140] Module 76 is used for:
[0141] The first security module determines the purpose of the verification code and the authentication information. The purpose of the verification code is used to explain the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code. The first security module sends the purpose of the verification code and the authentication information. The first security module receives the first verification code sent by the first security module.
[0142] In one possible implementation, the first verification code includes an expiration period; the first verification code expires after being sent from the receiving device or after the expiration period of the first verification code.
[0143] Module 77 is used for:
[0144] Determine the validity period of the second verification code;
[0145] If the second verification code has not expired, determine whether the database contains historical verification codes that are the same as the second verification code. The database stores historical verification codes that the receiving device has received.
[0146] If not, a second verification code is sent to the first security module so that the first security module can perform a second verification process on the second verification code.
[0147] Processing module 78 is used for:
[0148] If the first verification result is a verification failure or the second verification result is a verification failure, the device identifier will be added to the blacklist.
[0149] Every preset time interval, a blacklist is sent to the server so that the server can update its verification policy.
[0150] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 9 As shown, the electronic device includes:
[0151] The electronic device includes a processor 291 and a memory 292; it may also include a communication interface 293 and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logical instructions stored in the memory 292 to execute the methods of the above embodiments.
[0152] Furthermore, the logic instructions in the aforementioned memory 292 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0153] The memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this application. The processor 291 executes functional applications and data processing by running the software programs, instructions, and modules stored in the memory 292, thereby implementing the methods in the above-described method embodiments.
[0154] The memory 292 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 292 may include high-speed random access memory and may also include non-volatile memory.
[0155] This application provides a non-transitory computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods described in the foregoing embodiments.
[0156] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method as described in the foregoing embodiments.
[0157] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0158] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0159] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0160] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0161] When the integrated unit / module is implemented in hardware, the hardware can be digital circuits, analog circuits, etc. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, etc. The processor can be any suitable hardware processor, such as CPU, GPU, FPGA, DSP, and ASIC. The storage unit can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc.
[0162] If the integrated unit / module is implemented as a software program module and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0163] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0164] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0165] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A networking method for a distributed system, characterized in that, include: Receive a networking request sent by a transmitting device, wherein the networking request includes the device identifier of the transmitting device; Determine the first version number of the verification policy in the first security module; Send a version number request to the server to determine the second version number of the verification policy in the server; If the first version number is the same as the second version number, the device identifier is subjected to a first verification process through the first security module to obtain a first verification result. The first verification result includes verification passed or verification failed. The first security module includes an encrypted verification strategy sent by the server. If the first verification result is successful, then the verification code purpose information and authentication information are determined. The verification code purpose information is used to explain the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code. Send the verification code usage information and the authentication information to the first security module; The system receives the first verification code sent by the first security module and sends the first verification code to the sending device, so that the sending device can verify the first verification code through the second security module corresponding to the sending device. The system receives a second verification code sent by the sending device and performs a second verification process on the second verification code through the first security module to obtain a second verification result, which includes verification passed or verification failed. If the second verification result is successful, then a communication connection for the distributed system between the sending device and the receiving device is established.
2. The method according to claim 1, characterized in that, The device identifier is subjected to a first verification process by the first security module to obtain the first verification result, including: The device identifier is queried from the whitelist of the first security module, and the whitelist includes the identifiers of authorized devices; If the device identifier is included in the whitelist, the first verification result is determined to be successful. If the device identifier is not included in the whitelist, the first verification result is determined to be verification failure.
3. The method according to claim 1, characterized in that, The first verification code includes an expiration period; the first verification code expires after being sent from the receiving device or after the expiration period of the first verification code.
4. The method according to any one of claims 1-3, characterized in that, The second verification process, performed by the first security module, includes: Determine the validity period of the second verification code; If the validity period of the second verification code has not expired, it is determined whether the database contains historical verification codes that are the same as the second verification code. The database stores historical verification codes that the receiving device has received. If not, the second verification code is sent to the first security module so that the second verification process can be performed on the second verification code by the first security module.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: If the first verification result is a verification failure or the second verification result is a verification failure, then the device identifier is added to the blacklist. The blacklist is sent to the server at preset intervals to enable the server to update the verification policy.
6. A networking device for a distributed system, characterized in that, include: A receiving module is used to receive a networking request sent by a transmitting device, wherein the networking request includes the device identifier of the transmitting device; The first verification module is used to perform a first verification process on the device identifier by receiving the first security module corresponding to the device according to the networking request, and obtain a first verification result. The first verification result includes verification passed or verification failed. The first security module includes an encrypted verification strategy sent by the server. The sending module is configured to, if the first verification result is successful, obtain the first verification code of the receiving device from the first security module and send the first verification code to the sending device, so that the sending device can perform verification processing on the first verification code through the second security module corresponding to the sending device; The second verification module is used to receive the second verification code sent by the sending device, and to perform a second verification process on the second verification code through the first security module to obtain a second verification result, the second verification result including verification passed or verification failed. A module is established to establish a communication connection between the sending device and the receiving device in a distributed system if the second verification result is a successful verification. The first verification module is specifically used to: send a version number request to the server to determine the second version number of the verification policy in the server; if the first version number is the same as the second version number, then perform a first verification process on the device identifier through the first security module to obtain the first verification result; When the sending module obtains the first verification code from the receiving device from the first security module, it is specifically used to: determine the purpose information of the verification code and the authentication information, wherein the purpose information of the verification code is used to explain the purpose of the first verification code, and the authentication information is used by the first security module to determine whether to send the first verification code; Send the verification code usage information and the authentication information to the first security module; Receive the first verification code sent by the first security module.
7. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Multi-channel security information transmission networking method
CN118174948A
Distributed unmanned aerial vehicle safe ad hoc network method based on trust transfer mechanism
CN118338295A
