Multi-layer communication method and system, device, and medium
通过在多层级通讯系统中让目标层通讯组件判断并处理指令数据,或者加密传输至下一层,解决了现有系统效率不足的问题,实现了更高效的资源利用和协议兼容性。
Patent Information
- Application Number
- PCT/CN2024/090802
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-06
- Filing Date
- 2024-04-30
- Publication Date
- 2024-11-14
AI Technical Summary
The existing multi-level communication system is insufficient in data transmission, resulting in excessive time and resource consumption.
In a multi-level communication system, the target layer communication component determines whether processing is needed after receiving the instruction data, and executes it if necessary, and otherwise encrypts and sends it to the next layer communication component, thereby reducing unnecessary data transmission and processing.
It improves execution efficiency, reduces communication resource consumption, and ensures the reliability and compatibility of data transmission under different communication protocols.
Smart Images

Figure CN2024090802_14112024_PF_FP_ABST
Abstract
Description
A multi-level communication method, device, system and medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 6, 2023, with application number 2023105074509, and invention name “A multi-level communication method, device, system and medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to a multi-level communication method, device, system and medium. Background Art
[0003] With the development of communication technologies such as the Internet of Things, multi-level communication is becoming more and more widely used. Various electronic devices are connected in multi-level communication systems for better coordination and control.
[0004] However, in existing multi-level communication systems, the top-level components often receive and initiate command data, the middle layer serves as the distribution, coordination and transmission channel for command data, and the bottom-level components execute the commands. This results in a large amount of time and resources being consumed in the data transmission process of the middle layer, resulting in insufficient efficiency.
[0005] Application Contents
[0006] In a first aspect, an embodiment of the present disclosure provides a multi-level communication method, which is applied to a multi-level communication system, wherein the system includes N layers of communication components, where N is greater than 1. The method includes: after receiving instruction data, a target layer communication component in the N layers of communication components determines whether the instruction data is instruction data that needs to be processed by the communication component of this layer; if so, the target layer communication component executes the instruction data; if not, the target layer communication component encrypts the instruction data and sends the encrypted instruction data to the communication component of the next layer of the target layer communication component.
[0007] In a second aspect, an embodiment of the present disclosure provides an electronic device, which includes a target layer communication component in a multi-level communication system, and the target layer communication component includes: a judgment module, which is used to judge whether the instruction data is instruction data that needs to be processed by the communication component of this layer after receiving the instruction data; an execution module, which is used to execute the instruction data if the judgment result of the judgment module is yes; and a sending module, which is used to encrypt the instruction data and send the encrypted instruction data to the communication component of the next layer if the judgment result of the judgment module is no.
[0008] In a third aspect, an embodiment of the present disclosure provides a multi-level communication system, wherein at least one layer of communication components in the system is the target layer communication component in the electronic device described in the second aspect.
[0009] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps corresponding to the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, a brief introduction will be given below to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0011] FIG1 is a schematic diagram of a flow chart of a multi-level communication method according to an embodiment of the present disclosure;
[0012] FIG2 is a schematic diagram of the structure of a multi-level communication system according to an embodiment of the present disclosure;
[0013] FIG3 is a schematic diagram of a communication example of a multi-level communication system according to an embodiment of the present disclosure;
[0014] FIG4 is a first schematic diagram showing compatibility of different communication protocols for multi-level communication according to an embodiment of the present disclosure;
[0015] FIG5 is a second schematic diagram showing compatibility of different communication protocols for multi-level communication according to an embodiment of the present disclosure;
[0016] FIG6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0017] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods. It should be understood that the embodiments of the present disclosure and the specific features in the embodiments are detailed descriptions of the technical solution of the present disclosure, rather than limitations of the technical solution of the present disclosure. In the absence of conflict, the embodiments of the present disclosure and the technical features in the embodiments can be combined with each other.
[0018] First, the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0019] In an embodiment of the present disclosure, a multi-level communication method is provided. The method is applied to a multi-level communication system. The multi-level communication system includes N layers of communication components, where N is a natural number greater than 1. As shown in FIG1 , the method includes:
[0020] Step S101: After receiving instruction data, the target layer communication component in the N-layer communication components determines whether the instruction data is instruction data that needs to be processed by the communication component of the current layer;
[0021] Step S102, if yes, the target layer communication component executes the instruction data;
[0022] Step S103: If not, the target layer communication component encrypts the instruction data and sends the encrypted instruction data to the next layer communication component of the target layer communication component.
[0023] It should be noted that, as shown in FIG2 , each layer of communication components in the multi-level communication system 200 may include one or more communication components 201, and each communication component 201 has established a communication connection in advance according to the set communication level relationship. The target layer communication component is a communication component that can process instruction data in the manner of steps S101 to S103. The target layer communication component includes at least the following functions: it can receive instruction data, it can determine whether the instruction data is processed by the communication component of this layer, it can execute the corresponding instruction data, and it can also encrypt and send the specified data to the next level. Each layer of communication components in the multi-level communication system 200 can be a target layer communication component, or some layer communication components in the multi-level communication system 200 can be target layer communication components, and there is no limitation here.
[0024] The following describes in detail the implementation steps of the multi-level communication method provided by the present disclosure with reference to FIG1 :
[0025] Regarding step S101 , after receiving the instruction data, the target layer communication component in the N-layer communication components determines whether the instruction data is instruction data that needs to be processed by the communication component of the current layer.
[0026] In an optional embodiment, the target layer communication component may be any layer communication component among the N layers of communication components. The instruction data may be sent to the target layer communication component by an external device, sent to the target layer communication component by a layer communication component above the target layer communication component, or generated by the target layer communication component under the triggering of a timer or sensor. The above are not limited here and will not be listed one by one.
[0027] In optional implementations, there are various ways to determine whether instruction data requires processing by the communication component at the current layer. For example, the instruction data may include a corresponding execution target identifier. Upon receiving the instruction data, the target communication component obtains the execution target identifier and, based on this identifier, determines whether processing by the communication component at the current layer is required. Alternatively, the target communication component may parse the execution content of the instruction data and analyze whether the execution content falls within the execution scope of the communication component at the current layer, thereby determining whether processing by the communication component at the current layer is required. This is not intended to be limiting.
[0028] In an optional embodiment, after receiving the instruction data, the target layer communication component may first parse the instruction data and then determine whether the target layer communication component needs to process the instruction data based on the parsed instruction data. The parsing step may include first decrypting the instruction data and then verifying the validity of the decrypted instruction data to ensure the accuracy of the data.
[0029] Regarding step S102 , if it is determined that the instruction data is instruction data that needs to be processed by the communication component of the current layer, the communication component of the target layer executes the instruction data.
[0030] Specifically, regardless of whether the target layer communication component is located in the middle layer or the top layer of the multi-level communication system, it can directly execute the instruction data if the judgment is yes, without sending the instruction data to the underlying components for execution, which effectively improves the execution efficiency and reduces the consumption of communication resources.
[0031] For example, consider a multi-layered communication system consisting of five layers of communication components: top, upper, middle, lower, and bottom. Each component except the bottom layer can be configured to perform data judgment, data processing, and data distribution for the target layer's communication components. If the execution level for instruction data is a lower-layer component, upon receiving the instruction data, the lower-layer component can directly execute it without sending it to the lower-layer component for processing, effectively improving efficiency.
[0032] For another example, suppose the target layer communication component in a multi-layer communication system is located in the middle layer. The target layer communication component includes the power supply component of a projector. The command data contains the content to be executed to control the projector to power off. The target layer communication component determines that the data is the command data that the communication component in the target layer needs to execute. The controller in the power supply component executes the data instruction and directly turns off the power.
[0033] In an optional embodiment, after the target layer communication component executes the instruction data, it may also return result data obtained by executing the instruction data to the initiating layer communication component that initiated the instruction data (the initiating layer communication component may refer to the communication component at the layer in the multi-level communication system that first obtains the instruction data). The initiating layer communication component may be the top layer of the multi-level communication system, or another intermediate layer of the multi-level communication system, or the initiating layer communication component may be the target layer communication component (in which case the result data is returned to the current layer), without limitation.
[0034] Regarding step S103, if it is determined that the instruction data is not instruction data that needs to be processed by the communication component of the current layer, the communication component of the target layer encrypts the instruction data and sends the encrypted instruction data to the communication component of the next layer of the target layer.
[0035] The step of encrypting the instruction data may include: packaging the parsed instruction data, and encrypting the packaged instruction data.
[0036] In an optional embodiment, after receiving the instruction data, the next-layer communication component of the target-layer communication component can judge the instruction data in the same manner as steps S101 to S103, and determine whether to directly execute the instruction data or continue to send the instruction data to the next-layer communication component based on the judgment result.
[0037] Specifically, each component in a multi-layer communication system, except for the bottom-layer component, can be configured to have the data judgment, data processing, and data delivery functions of the target-layer communication component. In other words, each component in a layer other than the bottom-layer component can judge the instruction data in the same manner as steps S101 to S103, and determine whether to directly execute the instruction data or continue to deliver the instruction data to the next lower-layer communication component based on the judgment result.
[0038] Please refer to Figure 3. Assume that a multi-level communication system includes four layers of communication components, namely, top-level components, upper-level components, lower-level components, and bottom-level components from top to bottom. The top-level component can be set to first judge the command data after receiving it. If it is the command data that needs to be processed by this layer, it will be executed directly. If not, it will be sent to the upper-level component for processing. After the upper-level component receives the command data, it can first judge the command data. If it is the command data that needs to be processed by this layer, it will be executed directly. If not, it will be sent to the lower-level component for processing. After the lower-level component receives the command data, it can first judge the command data. If it is the command data that needs to be processed by this layer, it will be executed directly. If not, it will be sent to the lower-level component for processing. In this way, each layer of communication component can directly execute the command data, and execution efficiency can be guaranteed for different control scenarios.
[0039] In an optional embodiment, in order to ensure the reliability of instruction data transmission and avoid missed execution, the target communication component can also be set to enter a timeout waiting state after sending the encrypted instruction data to the next layer communication component. In this timeout waiting state, the target layer communication component will continuously monitor whether the result data obtained by executing the instruction data is received within the preset timeout period. If received, the timeout waiting state is exited; if not, the encrypted instruction data is resent to the next layer communication component. Of course, in order to avoid multiple layers of communication components in a multi-level communication system entering a timeout waiting state based on the same instruction data, it can also be set that only the initiating layer communication component of the instruction data will enter the timeout waiting state after sending the instruction data, so as to save system resources.
[0040] During implementation, different communication protocols may be used at different layers in a multi-layer communication system, taking into account factors such as different communication component devices at different layers, different manufacturers cooperating in development, or different progress in communication protocol version updates. To ensure the reliability of data transmission and data processing in communication components at each layer and improve compatibility even with different communication protocols, communication components at the target layer can store communication protocols other than the communication protocol at the current layer. When decrypting and encrypting instruction data, different communication protocols can be selected to be compatible with the instruction data source or the recipient, thereby achieving compatibility with different communication protocols. For example, at least the following two methods can be used to achieve communication protocol compatibility.
[0041] First, the target layer communication component can be pre-stored with the communication protocol corresponding to the upper layer communication component of the target layer communication component and the communication protocol corresponding to the current layer communication component. In this way, if the received instruction data is issued by its upper layer communication component, even if the communication protocols are different, the pre-stored upper layer communication protocol can be used to accurately parse the received instruction data, ensuring data accuracy. Furthermore, each layer of communication components in the multi-level communication system can be pre-stored with the communication protocol corresponding to the upper layer communication component and the communication protocol corresponding to the current layer communication component. In this way, the pre-stored upper layer communication protocol can be used to accurately parse the instruction data issued by the upper layer communication component, and the pre-stored current layer communication protocol can be used to encrypt the parsed instruction data and then send it to the next layer, so that the lower layer communication component can use the pre-stored current layer communication protocol to accurately parse the received instruction data. This ensures that even if the communication protocols corresponding to the communication components of each layer are different, the instruction data issued by the upper layer communication component can be parsed to achieve compatibility.
[0042] For example, refer to Figure 4. Assume that a multi-layer communication system includes four layers of communication components, namely the top layer component, the upper layer component, the lower layer component, and the bottom layer component. The detailed execution steps are as follows:
[0043] After receiving the instruction data, the top-level component first judges the instruction data. If it is the instruction data that needs to be processed by this layer, it will be executed directly. If not, the top-level communication protocol corresponding to the top-level component will be used to package and encrypt the instruction data and send it to the upper-level component for processing.
[0044] After the upper-layer component receives the instruction data, it first uses the pre-stored top-level communication protocol to decrypt and check the validity of the instruction data, and then judges the instruction data. If it is the instruction data that needs to be processed by this layer, it is executed directly. If not, the upper-layer communication protocol corresponding to the upper-layer component is used to package and encrypt the instruction data, and then send it to the lower-layer component for processing.
[0045] After the lower-level component receives the instruction data, it first uses the pre-stored upper-level communication protocol to decrypt and check the validity of the instruction data, and then judges the instruction data. If it is the instruction data that needs to be processed by this layer, it is executed directly. If not, the lower-level communication protocol corresponding to the lower-level component is used to package and encrypt the instruction data, and then send it to the underlying component for processing.
[0046] After receiving the instruction data, the bottom layer component first uses the pre-stored lower layer communication protocol to decrypt and check the validity of the instruction data, and then executes the instruction data.
[0047] Secondly, the target layer communication component can also be configured to pre-store the communication protocol corresponding to the target layer communication component's lower layer communication component and the communication protocol corresponding to the current layer communication component. In this way, the pre-stored current layer communication protocol can be used to parse the command data, and the pre-stored lower layer communication protocol can be used to encrypt the parsed command data before sending it to the next layer. This allows the communication component of the next layer to accurately parse the received command data even if the communication protocols are different, ensuring data accuracy. Furthermore, each layer of the communication component in a multi-level communication system can be configured to pre-store the communication protocol corresponding to the lower layer communication component and the communication protocol corresponding to the current layer communication component. In this way, the current communication protocol can be used to parse the command data issued by the upper layer communication component, and the pre-stored lower layer communication protocol can be used to encrypt the parsed command data before sending it to the next layer, allowing the communication component of the lower layer to accurately parse the received command data. This ensures that even if the communication protocols corresponding to the communication components of each layer are different, the command data issued by the upper layer communication component can still be parsed, achieving compatibility.
[0048] For example, refer to Figure 5. Assume that a multi-layer communication system includes four layers of communication components, namely the top layer component, the upper layer component, the lower layer component, and the bottom layer component. The detailed execution steps are as follows:
[0049] After receiving the instruction data, the top-level component first judges the instruction data. If it is the instruction data that needs to be processed by this layer, it will be executed directly. If not, the upper-level communication protocol corresponding to the upper-level component will be used to package and encrypt the instruction data and send it to the upper-level component for processing.
[0050] After the upper-layer component receives the instruction data, it first uses the communication protocol of this layer to decrypt and check the validity of the instruction data, and then judges the instruction data. If it is the instruction data that needs to be processed by this layer, it is executed directly. If not, the lower-layer communication protocol corresponding to the lower-layer component is used to package and encrypt the instruction data, and then send it to the lower-layer component for processing.
[0051] After the lower-level component receives the instruction data, it first uses the communication protocol of this layer to decrypt and check the validity of the instruction data, and then judges the instruction data. If it is the instruction data that needs to be processed by this layer, it is executed directly. If not, the lower-level communication protocol corresponding to the lower-level component is used to package and encrypt the instruction data, and then send it to the lower-level component for processing.
[0052] After receiving the instruction data, the bottom layer component first uses the communication protocol of this layer to decrypt and check the validity of the instruction data, and then executes the instruction data.
[0053] Of course, the methods of achieving compatibility of communication protocols are not limited to the above two. It is also possible that multiple communication protocols are stored in the target layer communication component, and the corresponding communication protocol is selected for decryption and validity check based on the source of the received instruction data, or the corresponding communication protocol is selected for encryption based on the object that needs to be issued. There is no restriction here.
[0054] In alternative implementations, a multi-layered communication system can be flexibly constructed. For example, in a floor scrubber product with a combined vacuum cleaner component, the top-level communication component could be an IoT chip or router. The upper-level communication component would include the overall controller of the floor scrubber, the lower-level communication components would include the controllers for the vacuum component and the charging station, and the bottom-level communication components would include the controllers for the fan and battery.
[0055] Taking the example of the multi-level communication system of the above-mentioned floor scrubber as an example, assuming that the command data is to query the battery status, the specific communication steps can be as follows: the IoT chip is triggered externally to generate command data for querying the battery status and sends it to the main controller of the floor scrubber. The main controller of the floor scrubber parses the command data using the pre-stored communication protocol of the IoT chip, encrypts it, and then sends it to the controller of the vacuum component. The controller of the vacuum component parses the command data using the pre-stored communication protocol of the floor scrubber main controller, encrypts it, and then sends it to the battery controller. The battery controller parses the command data using the pre-stored communication protocol of the vacuum component controller, executes the query on the battery status, and returns the query result to the controller of the vacuum component, and then gradually returns it to the IoT chip to complete the query on the battery status.
[0056] Of course, the communication components of a multi-level communication system are not limited to being installed in a single electronic device. Multiple electronic devices can also form a multi-level communication system. For example, the top-level communication component is a router or voice robot, the upper-level communication component is a projector controller, and the bottom-level communication component is an audio device. This is not limited here and can be configured according to needs.
[0057] Based on the same concept, an embodiment of the present disclosure provides an electronic device, as shown in FIG6 . The electronic device 600 includes a target layer communication component 610 in a multi-level communication system. The target layer communication component 610 includes:
[0058] The judgment module 611 is used to judge whether the command data needs to be processed by the communication component of the current layer after receiving the command data;
[0059] an execution module 612, configured to execute the instruction data if the judgment result of the judgment module is yes;
[0060] The sending module 613 is configured to encrypt the instruction data and send the encrypted instruction data to the next layer of communication components if the judgment result of the judgment module is no.
[0061] It should be noted that the electronic device may include one or more target layer communication components 610. The electronic device may be a handheld cleaning device, a cleaning robot, a projector, or a washing machine, etc., which is not limited here.
[0062] In an optional embodiment, the target layer communication component 610 further includes: a parsing module for parsing the instruction data using a pre-stored upper layer communication protocol, where the upper layer communication protocol is a communication protocol corresponding to the upper layer communication component of the target layer communication component;
[0063] The sending module 610 is further configured to: encrypt the parsed instruction data using a pre-stored current layer communication protocol, where the current layer communication protocol is a communication protocol corresponding to the target layer communication component.
[0064] In an optional embodiment, the target layer communication component 610 further includes: a parsing module for parsing the instruction data using a pre-stored current layer communication protocol, where the current layer communication protocol is a communication protocol corresponding to the target layer communication component;
[0065] The sending module 601 is further configured to: encrypt the parsed instruction data using a pre-stored lower-layer communication protocol, where the lower-layer communication protocol is a communication protocol corresponding to a communication component in a lower layer than the target-layer communication component.
[0066] Based on the same concept, an embodiment of the present disclosure provides a multi-level communication system, as shown in FIG2 , wherein at least one layer of communication component 201 in the multi-level communication system 200 is a target layer communication component 610 in the electronic device 600 provided in an embodiment of the present disclosure.
[0067] In an optional embodiment, in the multi-level communication system 200 , each communication component except the bottom-level communication component is the target-level communication component 610 .
[0068] Based on the same concept, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements the steps corresponding to the multi-level communication method provided by the present disclosure.
[0069] Since the devices, systems, and media described in this embodiment are the devices, systems, and media used to implement the multi-level communication method in the embodiments of the present disclosure, those skilled in the art will be able to understand the specific implementation methods and various variations of the devices, systems, and media in this embodiment based on the multi-level communication method described in the embodiments of the present disclosure. Therefore, how the devices, systems, and media implement the method in the embodiments of the present disclosure will not be described in detail here. As long as those skilled in the art implement the devices, systems, and media used in the multi-level communication method in the embodiments of the present disclosure, they are within the scope of protection to be protected by this disclosure.
[0070] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0071] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0072] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0074] Although the preferred embodiments of the present disclosure have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present disclosure.
[0075] Obviously, those skilled in the art may make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is intended to include these modifications and variations.
[0076] An embodiment of the present disclosure provides a multi-level communication method, which is applied to a multi-level communication system including N layers of communication components, where N is greater than 1. The method includes:
[0077] After receiving the instruction data, the target layer communication component in the N-layer communication components determines whether the instruction data is instruction data that needs to be processed by the communication component of the current layer;
[0078] If yes, the target layer communication component executes the instruction data;
[0079] If not, the target layer communication component encrypts the instruction data and sends the encrypted instruction data to the next layer communication component of the target layer communication component.
[0080] In an optional example, before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, it also includes: using a pre-stored upper layer communication protocol to parse the instruction data, the upper layer communication protocol is the communication protocol corresponding to the upper layer communication component of the target layer communication component; encrypting the instruction data includes: using a pre-stored current layer communication protocol to encrypt the parsed instruction data, the current layer communication protocol is the communication protocol corresponding to the target layer communication component.
[0081] In an optional example, before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, it also includes: using a pre-stored current layer communication protocol to parse the instruction data, and the current layer communication protocol is the communication protocol corresponding to the target layer communication component; encrypting the instruction data includes: using a pre-stored lower layer communication protocol to encrypt the parsed instruction data, and the lower layer communication protocol is the communication protocol corresponding to the next layer communication component of the target layer communication component.
[0082] In an optional example, parsing the instruction data includes: decrypting the instruction data and verifying the validity of the decrypted instruction data; encrypting the instruction data includes: packaging the parsed instruction data and encrypting the packaged instruction data.
[0083] In an optional example, after the target layer communication component executes the instruction data, the method further includes: returning result data obtained by executing the instruction data to the initiating layer communication component that initiated the instruction data.
[0084] In an optional example, after sending the encrypted instruction data to the next layer communication component of the target communication component, it also includes: entering a timeout waiting state, in which the target layer communication component monitors whether the result data obtained by executing the instruction data is received within a preset timeout period; if yes, exiting the timeout waiting state; if not, resending the encrypted instruction data to the next layer communication component of the target layer communication component.
[0085] Another embodiment of the present disclosure provides an electronic device, wherein the electronic device includes a target layer communication component in a multi-level communication system, wherein the target layer communication component includes:
[0086] A judgment module, configured to, after receiving instruction data, judge whether the instruction data is instruction data that needs to be processed by the communication component of the current layer;
[0087] an execution module, configured to execute the instruction data if the judgment result of the judgment module is yes;
[0088] The sending module is used to encrypt the instruction data and send the encrypted instruction data to the next layer communication component if the judgment result of the judgment module is no.
[0089] In an optional example, the target layer communication component also includes: a parsing module, used to parse the instruction data using a pre-stored upper layer communication protocol, and the upper layer communication protocol is the communication protocol corresponding to the upper layer communication component of the target layer communication component; the sending module is also used to: encrypt the parsed instruction data using a pre-stored current layer communication protocol, and the current layer communication protocol is the communication protocol corresponding to the target layer communication component.
[0090] In an optional example, the target layer communication component also includes: a parsing module, used to parse the instruction data using a pre-stored current layer communication protocol, and the current layer communication protocol is the communication protocol corresponding to the target layer communication component; the sending module is also used to: encrypt the parsed instruction data using a pre-stored lower layer communication protocol, and the lower layer communication protocol is the communication protocol corresponding to the next layer communication component of the target layer communication component.
[0091] Yet another embodiment of the present disclosure provides a multi-level communication system, wherein at least one layer of communication components in the system is the target layer communication component in the above-mentioned electronic device.
[0092] In an optional example, in the multi-layer communication system, each layer of communication component except the bottom layer communication component is the target layer communication component.
[0093] Yet another embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps corresponding to the above-mentioned multi-level communication method.
Claims
1. A multi-level communication method, wherein: The method is applied to a multi-layer communication system, the system comprising N layers of communication components, N being a natural number greater than 1, and the method comprising: After receiving the instruction data, the target layer communication component in the N-layer communication components determines whether the instruction data is instruction data that needs to be processed by the communication component in the current layer; If yes, the target layer communication component executes the instruction data; If not, the target layer communication component encrypts the instruction data and sends the encrypted instruction data to the next layer communication component of the target layer communication component.
2. The method of claim 1, wherein: Before determining whether the instruction data is instruction data that needs to be processed by the communication component of the current layer, the method further includes: parsing the instruction data using a pre-stored upper layer communication protocol, wherein the upper layer communication protocol is a communication protocol corresponding to the communication component of the upper layer of the target layer communication component; The encrypting the instruction data includes: using a pre-stored current layer communication protocol to encrypt the parsed instruction data, wherein the current layer communication protocol is a communication protocol corresponding to the target layer communication component.
3. The method of claim 1, wherein: Before determining whether the instruction data is instruction data that needs to be processed by the communication component of the current layer, the method further includes: parsing the instruction data using a pre-stored communication protocol of the current layer, wherein the communication protocol of the current layer is a communication protocol corresponding to the communication component of the target layer; The encrypting of the instruction data includes: using a pre-stored lower layer communication protocol to encrypt the parsed instruction data, wherein the lower layer communication protocol is a communication protocol corresponding to a communication component of a lower layer of the target layer communication component.
4. The method according to any one of claims 2 to 3, wherein: The parsing of the instruction data includes: decrypting the instruction data and verifying the validity of the decrypted instruction data; The encrypting the instruction data includes: packaging the parsed instruction data, and encrypting the packaged instruction data.
5. The method of claim 1, wherein: After the target layer communication component executes the instruction data, the method further includes: Return result data obtained by executing the instruction data to the initiating layer communication component that initiated the instruction data.
6. The method of claim 1, wherein: Also includes: After sending the encrypted instruction data to the next layer communication component of the target communication component, the method further includes: Entering a timeout waiting state, in which the target layer communication component monitors whether result data obtained by executing the instruction data is received within a preset timeout period; If yes, exit the timeout waiting state; If not, resend the encrypted instruction data to the next layer communication component of the target layer communication component.
7. An electronic device, wherein: The electronic device includes a target layer communication component in a multi-level communication system, and the target layer communication component includes: A judgment module, configured to judge whether the instruction data is instruction data that needs to be processed by the communication component of this layer after receiving the instruction data; an execution module, configured to execute the instruction data if the judgment result of the judgment module is yes; The sending module is used to encrypt the instruction data if the judgment result of the judgment module is no, and send the encrypted instruction data to the next layer of communication components.
8. The electronic device of claim 7, wherein: The target layer communication component further includes: a parsing module, which is used to parse the instruction data using a pre-stored upper layer communication protocol, wherein the upper layer communication protocol is a communication protocol corresponding to the upper layer communication component of the target layer communication component; The sending module is also used to: encrypt the parsed instruction data using a pre-stored current layer communication protocol, where the current layer communication protocol is a communication protocol corresponding to the target layer communication component.
9. The electronic device of claim 7, wherein: The target layer communication component further includes: a parsing module, which is used to parse the instruction data using a pre-stored current layer communication protocol, wherein the current layer communication protocol is a communication protocol corresponding to the target layer communication component; The sending module is also used to: encrypt the parsed instruction data using a pre-stored lower-layer communication protocol, where the lower-layer communication protocol is a communication protocol corresponding to a communication component at a lower layer than the target-layer communication component.
10. A multi-level communication system, wherein: At least one layer of communication components in the system is the target layer communication component in the electronic device according to any one of claims 7 to 9.
11. The multi-level communication system of claim 10, wherein: In the multi-level communication system, each communication component except the bottom communication component is the target communication component.
12. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the steps corresponding to the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Cascade-extendable chain control system, chain control module and realizing method
CN102662383A
Secure communication method facing wireless communication network of power transmission lines
CN104902469A
Chip-series circuit, compute device and communication method
CN109101451A
Communication method of multi-stage cascade expander
CN111209236A
Multi-level communication method, device, system and medium
CN116506528A
