A multi-level communication method, device, system and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-06
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,现有的多层级通讯系统,往往由顶层组件来接收和发起指令数据,由中间层来作为指令数据的分配、协调和传输通道,由底层组件来进行指令的执行,导致大量的时间和资源消耗在中间层的数据传输过程中,存在效率不足的问题
Smart Images

Figure CN116506528B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a multi-level communication method, device, system, and medium. Background Technology
[0002] With the development of communication technologies such as the Internet of Things (IoT), multi-level communication is becoming increasingly widespread. Various electronic devices are connected to multi-level communication systems for better coordination and control.
[0003] However, existing multi-level communication systems often have the top-level component receiving and initiating command data, the middle layer acting as the channel for command data allocation, coordination and transmission, and the bottom-level component executing the commands. This results in a significant amount of time and resources being consumed in the data transmission process of the middle layer, leading to inefficiency. Summary of the Invention
[0004] In a first aspect, embodiments of this disclosure provide a multi-level communication method. The method is applied to a multi-level communication system, which 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 determines whether the instruction data is instruction data that needs to be processed by the current layer communication component; 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 next layer communication component.
[0005] Secondly, embodiments of this disclosure provide an electronic device, the electronic device including a target layer communication component in a multi-level communication system, the target layer communication component including: a judgment module, configured to, after receiving instruction data, determine whether the instruction data is instruction data that needs to be processed by the current layer communication component; an execution module, configured to, if the judgment result of the judgment module is yes, execute the instruction data; and a sending module, configured to, if the judgment result of the judgment module is no, encrypt the instruction data and send the encrypted instruction data to the next layer communication component.
[0006] Thirdly, embodiments of this disclosure provide a multi-level communication system, wherein at least one communication component in the system is the target layer communication component in the electronic device described in the second aspect.
[0007] Fourthly, embodiments of this disclosure provide 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. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart illustrating the multi-level communication method in the embodiments of this disclosure;
[0010] Figure 2 This is a schematic diagram of the structure of a multi-level communication system in an embodiment of this disclosure;
[0011] Figure 3 This is a schematic diagram illustrating a communication example of a multi-level communication system in this disclosure.
[0012] Figure 4 This is a schematic diagram illustrating the compatibility of different communication protocols for multi-level communication in the embodiments of this disclosure. Figure 1 ;
[0013] Figure 5 This is a schematic diagram illustrating the compatibility of different communication protocols for multi-level communication in the embodiments of this disclosure. Figure 2 ;
[0014] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0015] To better understand the above technical solutions, the following detailed description will be provided in conjunction with the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features described herein are detailed explanations of the technical solutions, not limitations thereof. Where there is no conflict, the embodiments and technical features described herein can be combined with each other.
[0016] First, it should be clarified that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0017] This disclosure provides a multi-level communication method applied to a multi-level communication system, which includes N layers of communication components, where N is a natural number greater than 1, such as... Figure 1 As shown, the method includes:
[0018] Step S101: After receiving the instruction data, the target layer communication component in the N-layer communication component determines whether the instruction data is instruction data that needs to be processed by the current layer communication component.
[0019] Step S102: If yes, the target layer communication component executes the instruction data;
[0020] 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.
[0021] It should be noted that, as Figure 2 As shown, each communication component 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 hierarchy. The target layer communication component is the communication component that can process instruction data according to steps S101 to S103. The target layer communication component includes at least the following functions: receiving instruction data, determining whether the instruction data is to be processed by the communication component at this layer, executing the corresponding instruction data, and encrypting and sending specified data to the next level. Each communication component in the multi-level communication system 200 can be a target layer communication component, or some of the communication components in the multi-level communication system 200 can be target layer communication components; this is not limited here.
[0022] The following is combined Figure 1 Detailed explanation of the implementation steps of the multi-level communication method provided in this disclosure:
[0023] Regarding step S101, after the target layer communication component in the N-layer communication component receives the instruction data, it determines whether the instruction data is instruction data that needs to be processed by this layer communication component.
[0024] In an optional implementation, the target layer communication component can be any of the N layers of communication components. The instruction data can be sent from an external device to the target layer communication component, or it can be sent from the communication component above the target layer communication component to the target layer communication component, or it can be generated by the target layer communication component under the trigger of a timer or sensor. There are no restrictions here, nor will they be listed one by one.
[0025] In optional implementations, there can be multiple ways to determine whether instruction data requires processing by the local communication component. For example, the instruction data may carry a corresponding execution object identifier. After receiving the instruction data, the target communication component obtains the execution object identifier and determines whether processing by the local communication component is required based on the identifier. 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 local communication component to determine whether processing by the local communication component is required. No limitation is imposed here.
[0026] In an optional implementation, upon receiving instruction data, the target layer communication component can first parse the instruction data, and then determine whether the local layer communication component needs to process it based on the parsed instruction data. The step of parsing the instruction data may include: first decrypting the instruction data, and then verifying the validity of the decrypted instruction data to ensure data accuracy.
[0027] Regarding step S102, if it is determined that the instruction data is instruction data that needs to be processed by the communication component of this layer, then the target layer communication component executes the instruction data.
[0028] Specifically, regardless of whether the target layer communication component is located in the middle or top layer of a multi-level communication system, it can directly execute instruction data when the judgment is correct, without having to send the instruction data down to the lower-level components for execution, which effectively improves execution efficiency and reduces communication resource consumption.
[0029] For example, suppose a multi-layered communication system comprises five communication components, from top to bottom: top-level component, upper-level component, middle-level component, lower-level component, and bottom-level component. Each component except the bottom-level component can be configured to perform data judgment, data processing, and data transmission functions for the target layer's communication component. If the execution level corresponding to the instruction data is the lower-level component, then upon receiving the instruction data, the lower-level component can directly execute the instruction data without needing to transmit it to the bottom-level component for processing, effectively improving efficiency.
[0030] For example, suppose the target layer communication component in a multi-level communication system is located in the middle layer. The target layer communication component includes the power supply component of a projector, and the instruction data carries the execution requirement of controlling the projector to turn off the power. The target layer communication component determines that it is the instruction data that the communication component in this layer needs to execute. Then, the controller in the power supply component executes the data instruction and directly turns off the power.
[0031] In an optional implementation, after the target layer communication component executes the instruction data, it can also return the result data obtained from executing the instruction data to the initiating layer communication component that initiated the instruction data (the initiating layer communication component can refer to the communication component of the first layer in the multi-level communication system to obtain the instruction data). The initiating layer communication component can be the top layer of the multi-level communication system, another intermediate layer of the multi-level communication system, or the initiating layer communication component can be the same as the target layer communication component (in which case the result data is returned to this layer), without any limitation.
[0032] Regarding step S103, if it is determined that the instruction data is not instruction data that needs to be processed by the current layer communication component, 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.
[0033] The step of encrypting instruction data may include: packaging the parsed instruction data and encrypting the packaged instruction data.
[0034] In an optional implementation, after receiving the instruction data, the next layer communication component of the target layer communication component can judge the instruction data in the same way 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.
[0035] Specifically, in a multi-level communication system, each component except the bottom-level component can be configured to have the data judgment, data processing, and data transmission functions of the target-level communication component. In other words, each component except the bottom-level component can judge the instruction data in the same way as steps S101 to S103, and determine whether to directly execute the instruction data or continue to transmit the instruction data to the next lower-level communication component based on the judgment result.
[0036] Please refer to Figure 3 Assume a multi-layered communication system comprises four communication layers, from top to bottom: top-level component, upper-level component, lower-level component, and bottom-level component. The top-level component, upon receiving instruction data, first evaluates the data. If it's an instruction that its layer needs to process, it executes it directly; otherwise, it forwards it to the upper-level component for processing. Similarly, the upper-level component, upon receiving instruction data, evaluates it. If it's an instruction that its layer needs to process, it executes it directly; otherwise, it forwards it to the lower-level component for processing. The lower-level component, upon receiving instruction data, evaluates it. If it's an instruction that its layer needs to process, it executes it directly; otherwise, it forwards it to the bottom-level component for processing. This way, each communication layer can directly execute the instruction data, ensuring execution efficiency across different control scenarios.
[0037] In an optional implementation, to ensure the reliability of instruction data transmission and avoid missed executions, the target communication component can be configured to enter a timeout waiting state after sending the encrypted instruction data to the next-layer communication component. During this timeout waiting state, the target layer communication component continuously monitors whether it receives the result data obtained from executing the instruction data within a preset timeout period. If received, it exits the timeout waiting state; otherwise, it resends the encrypted instruction data to the next-layer communication component. Of course, to prevent multiple communication components in a multi-level communication system from entering a timeout waiting state based on the same instruction data, it can also be configured that only the initiating layer communication component of the instruction data enters the timeout waiting state after sending the instruction data, thus conserving system resources.
[0038] In practical implementation, considering factors such as differences in communication component equipment at different layers, collaborative development by different manufacturers, or varying progress in communication protocol version updates, different layers in a multi-level communication system may employ different communication protocols. To ensure the reliability of data transmission and processing across communication components at each layer and improve compatibility even with different communication protocols, other communication protocols besides the current layer's protocol can be stored in the target layer's communication component. When decrypting and encrypting command data, different communication protocols can be selected to ensure compatibility with the command data source or the receiving end, thus achieving compatibility with different communication protocols. For example, at least the following two methods can be used to achieve communication protocol compatibility.
[0039] The first approach involves pre-storing the communication protocols of the target layer's communication components, both the upper-layer and the current layer's. This ensures that if the received instruction data originates from an upper-layer component, the pre-stored upper-layer protocol can accurately parse the received instruction data, guaranteeing data accuracy, even if the communication protocols differ. Furthermore, in a multi-layered communication system, each layer's communication component can pre-store the communication protocols of its upper-layer and current layers. This allows for accurate parsing of instruction data from upper-layer components using the pre-stored upper-layer protocol, and also enables encryption of the parsed instruction data using the pre-stored current-layer protocol before forwarding it to the next layer. This allows lower-layer components to accurately parse the received instruction data using their pre-stored current-layer protocol, ensuring compatibility even if the communication protocols of different layers differ.
[0040] For example, please refer to Figure 4 Assuming a multi-layered communication system comprises four communication components, from top to bottom: top-level component, upper-level component, lower-level component, and bottom-level component, the detailed execution steps are as follows:
[0041] After receiving the instruction data, the top-level component first judges the instruction data. If it is instruction data that needs to be processed by this layer, it executes it directly. Otherwise, it uses the top-level communication protocol corresponding to the top-level component to package and encrypt the instruction data and sends it down to the upper-level component for processing.
[0042] After receiving the instruction data, the upper-layer component 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 instruction data that needs to be processed by this layer, it is executed directly. If not, the upper-layer component uses the corresponding upper-layer communication protocol to package and encrypt the instruction data, and then sends it down to the lower-layer component for processing.
[0043] After receiving the instruction data, the lower-level component 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 instruction data that this layer needs to process, it will be executed directly. If not, the lower-level component will use the corresponding lower-level communication protocol to package and encrypt the instruction data, and then send it down to the lower-level component for processing.
[0044] After receiving the instruction data, the underlying component first uses the pre-stored lower-level communication protocol to decrypt and check the validity of the instruction data before executing it.
[0045] The second approach is to configure the target layer communication component to pre-store the communication protocols corresponding to the lower-level communication components and the current layer communication component. This allows the pre-stored current-level communication protocol to parse the instruction data, and the pre-stored lower-level communication protocol to encrypt the parsed instruction data before sending it to the next layer. This ensures that even if the communication protocols of the lower-level communication components are different, they can accurately parse the received instruction data, guaranteeing data accuracy. Furthermore, in a multi-level communication system, each layer communication component can pre-store the communication protocols corresponding to the lower-level communication components and the current layer communication component. This allows the current communication protocol to parse the instruction data sent by the upper-level communication component, and the pre-stored lower-level communication protocol to encrypt the parsed instruction data before sending it to the next layer, ensuring that the lower-level communication components can accurately parse the received instruction data. This ensures compatibility even if the communication protocols of each layer communication component are different, allowing them to parse the instruction data sent by the upper-level communication component.
[0046] For example, please refer to Figure 5 Assuming a multi-layered communication system comprises four communication components, from top to bottom: top-level component, upper-level component, lower-level component, and bottom-level component, the detailed execution steps are as follows:
[0047] After receiving the instruction data, the top-level component first judges the instruction data. If it is instruction data that needs to be processed by this layer, it executes it directly. Otherwise, it uses the upper-level communication protocol corresponding to the upper-level component to package and encrypt the instruction data and sends it down to the upper-level component for processing.
[0048] After receiving the instruction data, the upper-layer component first decrypts and checks the validity of the instruction data using the communication protocol of this layer, and then judges the instruction data. If it is instruction data that this layer needs to process, it is executed directly; otherwise, the lower-layer component uses the corresponding lower-layer communication protocol to package and encrypt the instruction data, and sends it to the lower-layer component for processing.
[0049] After receiving the instruction data, the lower-level component first decrypts and checks the validity of the instruction data using the communication protocol of this layer, and then judges the instruction data. If it is instruction data that this layer needs to process, it is executed directly; otherwise, the lower-level component uses the corresponding lower-level communication protocol to package and encrypt the instruction data, and then sends it down to the lower-level component for processing.
[0050] After receiving the instruction data, the underlying component first decrypts and checks the validity of the instruction data using the communication protocol of this layer, and then executes the instruction data.
[0051] Of course, the methods to achieve communication protocol compatibility are not limited to the two mentioned above. Alternatively, the target layer communication component can store multiple communication protocols and select the corresponding communication protocol for decryption and validity checking based on the source of the received instruction data. Or, the corresponding communication protocol can be selected for encryption based on the target object to be sent. No restrictions are imposed here.
[0052] In optional implementations, the multi-level communication system can be flexibly constructed. For example, taking a floor scrubber product with a composite vacuum cleaner component as an example, the top-level communication component can be set as an IoT chip or router, etc. The upper-level communication component includes the main controller of the floor scrubber, the lower-level communication component includes the controller of the vacuuming component on the floor scrubber and the controller of the charging pile of the floor scrubber, and the bottom-level communication component includes the controller of the fan on the floor scrubber and the controller of the battery on the floor scrubber.
[0053] Based on the example of the multi-level communication system of the floor scrubber described above, assuming the command data is a battery status query, the specific communication steps are as follows: The IoT chip, triggered externally, generates command data to query the battery status and sends it to the main controller of the floor scrubber. The main controller parses the command data using the pre-stored communication protocol of the IoT chip, encrypts it, and then sends it to the vacuum component controller. The vacuum component controller parses the command data using the pre-stored communication protocol of the main controller and then encrypts it before sending it to the battery controller. The battery controller parses the command data using the pre-stored communication protocol of the vacuum component controller, performs the battery status query, returns the query result to the vacuum component controller, and then gradually returns it to the IoT chip, completing the battery status query.
[0054] Of course, the communication components of a multi-level communication system are not limited to being housed in a single electronic device; multiple electronic devices can be used to construct a multi-level communication system. For example, the top-level communication component could be a router or a voice robot, the upper-level communication component could be a projector controller, and the bottom-level communication component could be an audio device. There are no restrictions here, and the configuration can be tailored to specific needs.
[0055] Based on the same concept, embodiments of this disclosure provide an electronic device, such as... Figure 6 As shown, the electronic device 600 includes a target layer communication component 610 in a multi-level communication system. The target layer communication component 610 includes:
[0056] The judgment module 611 is used to determine whether the instruction data is instruction data that needs to be processed by the communication component at this layer after receiving the instruction data;
[0057] The execution module 612 is used to execute the instruction data if the judgment result of the judgment module is yes;
[0058] The sending module 613 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 negative.
[0059] It should be noted that the electronic device may include one or more target layer communication components 610, which may be a handheld cleaning device, a cleaning robot, a projector, or a washing machine, etc., without limitation.
[0060] In an optional implementation, the target layer communication component 610 further includes: a parsing module, used to parse the instruction data using a pre-stored upper-layer communication protocol, wherein the upper-layer communication protocol is the communication protocol corresponding to the communication component above the target layer communication component;
[0061] The sending module 610 is also used to: encrypt the parsed instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component.
[0062] In an optional implementation, the target layer communication component 610 further includes: a parsing module, used to parse the instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component;
[0063] The sending module 601 is also used to: encrypt the parsed instruction data using a pre-stored lower-level communication protocol, wherein the lower-level communication protocol is the communication protocol corresponding to the next-level communication component of the target layer communication component.
[0064] Based on the same concept, embodiments of this disclosure provide a multi-level communication system, such as... Figure 2 As shown, at least one communication component 201 in the multi-level communication system 200 is the target layer communication component 610 in the electronic device 600 provided in this embodiment of the present disclosure.
[0065] In an optional implementation, in the multi-level communication system 200, each communication component except the bottommost communication component is the target layer communication component 610.
[0066] Based on the same concept, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps corresponding to the multi-level communication method provided in this disclosure.
[0067] Since the devices, systems, and media described in this embodiment are those used to implement the multi-level communication method in the embodiments of this disclosure, those skilled in the art can 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 this disclosure. Therefore, how the devices, systems, and media implement the methods in the embodiments of this disclosure will not be described in detail here. Any devices, systems, and media used by those skilled in the art to implement the multi-level communication method in the embodiments of this disclosure fall within the scope of protection intended by this disclosure.
[0068] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0069] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0070] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0072] Although preferred embodiments of this disclosure have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this disclosure.
[0073] Obviously, those skilled in the art can make various modifications and variations to this disclosure without departing from its spirit and scope. Therefore, if such modifications and variations fall within the scope of the claims of this disclosure and their equivalents, this disclosure is also intended to include such modifications and variations.
[0074] One embodiment of this disclosure provides a multi-level communication method, which is applied to a multi-level communication system. The system includes N layers of communication components, where N is greater than 1. The method includes:
[0075] After receiving the instruction data, the target layer communication component in the N-layer communication component determines whether the instruction data is instruction data that needs to be processed by this layer communication component.
[0076] If so, the target layer communication component executes the instruction data;
[0077] 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.
[0078] In an optional example, before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, the method further includes: parsing the instruction data using a pre-stored upper-layer communication protocol, wherein the upper-layer communication protocol is the communication protocol corresponding to the communication component above the target layer communication component; encrypting the instruction data includes: encrypting the parsed instruction data using a pre-stored current-layer communication protocol, wherein the current-layer communication protocol is the communication protocol corresponding to the target layer communication component.
[0079] In an optional example, before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, the method further includes: parsing the instruction data using a pre-stored current layer communication protocol, wherein the current layer communication protocol is the communication protocol corresponding to the target layer communication component; encrypting the instruction data includes: encrypting the parsed instruction data using a pre-stored lower layer communication protocol, wherein the lower layer communication protocol is the communication protocol corresponding to the next layer communication component of the target layer communication component.
[0080] In one 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.
[0081] In an optional example, after the target layer communication component executes the instruction data, the method further includes: returning the result data obtained from executing the instruction data to the initiating layer communication component that initiated the instruction data.
[0082] In an optional example, 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 it receives the result data obtained from executing the instruction data within a preset timeout period; if yes, it exits the timeout waiting state; if no, it resends the encrypted instruction data to the next-layer communication component of the target layer communication component.
[0083] Another embodiment of this disclosure provides an electronic device, the electronic device including a target layer communication component in a multi-level communication system, the target layer communication component including:
[0084] The judgment module is used to determine whether the received instruction data is instruction data that needs to be processed by the communication component at this layer.
[0085] An execution module is configured to execute the instruction data if the judgment result of the judgment module is yes;
[0086] 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 negative.
[0087] In an optional example, the target layer communication component further includes: a parsing module, configured to parse the instruction data using a pre-stored upper-layer communication protocol, wherein the upper-layer communication protocol is the communication protocol corresponding to the communication component above the target layer communication component; the sending module is further configured to: encrypt the parsed instruction data using a pre-stored local-layer communication protocol, wherein the local-layer communication protocol is the communication protocol corresponding to the target layer communication component.
[0088] In an optional example, the target layer communication component further includes: a parsing module, configured to parse the instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component; the sending module is further configured to: encrypt the parsed instruction data using a pre-stored lower layer communication protocol, wherein the lower layer communication protocol is the communication protocol corresponding to the next layer communication component of the target layer communication component.
[0089] Another embodiment of this disclosure provides a multi-level communication system, wherein at least one layer of the communication component is the target layer communication component in the above-mentioned electronic device.
[0090] In one alternative example, in the multi-level communication system, each communication component except the lowest-level communication component is the target-level communication component.
[0091] Another embodiment of this disclosure provides a computer-readable storage medium storing a computer program thereon, characterized in that the program, when executed by a processor, implements the steps corresponding to the above-described multi-level communication method.
Claims
1. A multi-level communication method, characterized in that, The method is applied to a multi-level communication system, the system comprising N layers of communication components, where N is greater than 1, and the multiple layers of the multi-level communication system are arranged from top to bottom. The method includes: 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 this layer communication component; the instruction data is first obtained by the initiating layer communication component, which is any layer communication component in the N-layer communication components, and the layer of the initiating layer communication component is less than or equal to the layer of the target layer communication component. 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 next layer communication component of the target layer communication component.
2. The method as described in claim 1, characterized in that: Before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, the method further includes: parsing the instruction data using a pre-stored upper-layer communication protocol, wherein the upper-layer communication protocol is the communication protocol corresponding to the communication component above the target layer communication component; The encryption of the instruction data includes: encrypting the parsed instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component.
3. The method as described in claim 1, characterized in that: Before determining whether the instruction data is instruction data that needs to be processed by the current layer communication component, the method further includes: parsing the instruction data using a pre-stored current layer communication protocol, wherein the current layer communication protocol is the communication protocol corresponding to the target layer communication component; The encryption of the instruction data includes: encrypting the parsed instruction data using a pre-stored lower-layer communication protocol, wherein the lower-layer communication protocol is the communication protocol corresponding to the next-layer communication component of the target layer communication component.
4. The method according to any one of claims 2 to 3, characterized in that: The step of parsing the instruction data includes: decrypting the instruction data and verifying the validity of the decrypted instruction data; The encryption of the instruction data includes: packaging the parsed instruction data and encrypting the packaged instruction data.
5. The method as described in claim 1, characterized in that, After the target layer communication component executes the instruction data, the following is also included: Return the result data obtained from executing the instruction data to the initiating layer communication component that initiated the instruction data.
6. The method as described in claim 1, characterized in that, Also includes: After sending the encrypted instruction data to the next layer communication component of the target layer communication component, the method further includes: Entering a timeout waiting state, in which the target layer communication component monitors whether it receives the result data obtained from executing the instruction data within a preset timeout period; If so, exit the timeout waiting state; If not, the encrypted instruction data is resent to the next layer communication component of the target layer communication component.
7. An electronic device, characterized in that, The electronic device includes a target layer communication component in a multi-level communication system, wherein the multiple levels of the multi-level communication system are arranged from top to bottom, and the target layer communication component includes: The judgment module is used to determine whether the instruction data is instruction data that needs to be processed by the communication component at this layer after receiving the instruction data; the instruction data is first obtained by the initiating layer communication component, the initiating layer communication component is any one of the N layers of communication components, and the level of the initiating layer communication component is less than or equal to the level of the target layer communication component. An execution module is 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 and send the encrypted instruction data to the next layer communication component if the judgment result of the judgment module is negative.
8. The electronic device as claimed in claim 7, characterized in that: The target layer communication component further includes: a parsing module, used to parse the instruction data using a pre-stored upper-layer communication protocol, wherein the upper-layer communication protocol is the communication protocol corresponding to the communication component above the target layer communication component; The sending module is further configured to: encrypt the parsed instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component.
9. The electronic device as claimed in claim 7, characterized in that: The target layer communication component further includes: a parsing module, used to parse the instruction data using a pre-stored local layer communication protocol, wherein the local layer communication protocol is the communication protocol corresponding to the target layer communication component; The sending module is further configured to: encrypt the parsed instruction data using a pre-stored lower-level communication protocol, wherein the lower-level communication protocol is the communication protocol corresponding to the next-level communication component of the target layer communication component.
10. A multi-level communication system, characterized in that, The multiple levels of the multi-level communication system are arranged from top to bottom, and at least one communication component in the system is the target layer communication component in any of the electronic devices described in claims 7 to 9.
11. The multi-level communication system as described in claim 10, characterized in that: In the multi-level communication system, each communication component except for the lowest-level communication component is the target-level communication component.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps corresponding to the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Cascade-extendable chain control system, chain control module and realizing method
CN102662383A
Data transmission method and device, electronic equipment and medium
CN115412509A