Equipment self-organization control method and device, equipment and storage medium

Through the device self-organizing control method, the serial cascaded master-slave integrated devices automatically configure the master-slave relationship, solving the problem of poor device networking flexibility and achieving flexibility in device organization and networking.

CN120639609APending Publication Date: 2025-09-12GUANGZHOU ZHOULIGONG SCM DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510700859.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the prior art, when devices are networked, the device organization method of the network architecture is less flexible, users are restricted in adding or deleting devices during configuration, and the master-slave relationship configuration is not flexible enough.

Method used

The device self-organizing control method is adopted, and the master-slave integrated devices connected in serial cascade mode automatically configure the device properties and master-slave relationship according to the enumeration signal and address setting instruction to realize device self-organization.

Benefits of technology

The flexibility of device composition and networking in the network architecture has been improved. Devices can autonomously configure master-slave relationships, reducing user configuration restrictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120639609A_ABST
    Figure CN120639609A_ABST
Patent Text Reader

Abstract

The invention provides an equipment self-organization control method and device, equipment and a storage medium, relates to the technical field of dynamic networking, and solves the problem of poor flexibility of an equipment organization mode of a network architecture in related technologies. The scheme can be combined with master-slave integrated equipment for networking, and by configuring the equipment attributes of the master-slave integrated equipment, the equipment self-organization control efficiency is improved. The configuration of the master-slave relationship of the devices in the multi-device network is realized, so that the device composition of the network architecture is expanded, the flexibility of the device organization mode is improved, the configuration of the master-slave relationship is completed through the self-organization of the devices, and the networking flexibility is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of dynamic networking technology, and in particular to a method, apparatus, device and storage medium for device self-organization control. Background Art

[0002] In the device control scenario, serial communication is usually adopted, and networking needs to be completed between the devices, that is, one of the devices is used as the host and the other devices are used as slaves. For the networking of devices, a one-master-multiple-slave network architecture is usually configured in multiple devices through a host computer or manual operation. In the related art, when selecting devices in the network architecture, it is necessary to configure a device with host attributes and at least one device with slave attributes, such as configuring a host device and several slave devices, which leads to restrictions on the devices added or deleted when the user configures the network architecture. The device composition of the network architecture in the related art is fixed, and its device organization method is less flexible. Summary of the Invention

[0003] The present application provides a device self-organizing control method, apparatus, equipment and storage medium, which solves the problem of poor flexibility of the device organization method of the network architecture in related technologies. This solution can expand the device composition of the network architecture, improve the flexibility of the device organization method, and complete the configuration of the master-slave relationship through device self-organization, thereby improving the flexibility of the network.

[0004] In a first aspect, the present application provides a device self-organizing control method, which is applied to a first device in a multi-device network, where the first device is a master-slave integrated device with changeable device attributes. The multi-device network includes at least one first device, wherein all devices in the multi-device network are connected based on a serial cascade mode and each serves as a node device in the multi-device network, and all node devices are configured to feedback device information including device attributes to the initiator of the enumeration signal after receiving an enumeration signal, and feedback confirmation information to the initiator of the address setting instruction after receiving an address setting instruction, and transparently transmit the enumeration signal to the next node. The device self-organizing control method includes: When a power-on instruction is received, an enumeration signal is sent to the next node device through the first port, and a second port used to connect to the previous node device is monitored; In response to receiving the device information fed back by the next node device, sending an address setting instruction to the next node device, so that the next node device configures the device address and feeds back confirmation information; In response to a monitoring feedback signal from the second port, determining a target attribute to be changed based on a signal received through the second port; When receiving confirmation information fed back by the next node device, the device attributes are changed according to the target attributes, and the address list for storing the device addresses is updated; According to the target attribute, the receiver of the address list is determined and the address list is sent to the receiver to determine the master-slave relationship of all devices in the multi-device network.

[0005] In a second aspect, the present application further provides a device self-organizing device, which is applied to a first device in a multi-device network, wherein the first device is a master-slave integrated device with changeable device attributes, and the multi-device network includes at least one first device, wherein all devices in the multi-device network are connected based on a serial cascade manner and respectively serve as a node device in the multi-device network, and all node devices are used to feedback device information including device attributes to the initiator of the enumeration signal after receiving an enumeration signal, and feedback confirmation information to the initiator of the address setting instruction after receiving an address setting instruction and transparently transmit the enumeration signal to the next node. The device self-organizing control device includes: The port control module is configured to, upon receiving a power-on instruction, send an enumeration signal to a next node device through the first port and monitor a second port used to connect to the previous node device; an instruction sending module configured to send an address setting instruction to the next node device in response to receiving device information fed back by the next node device, so that the next node device can configure the device address and feed back confirmation information; an attribute determination module configured to determine a target attribute to be changed based on a signal received through the second port in response to a monitoring feedback signal of the second port; The attribute changing module is configured to change the device attribute according to the target attribute and update the address list for storing the device address when receiving the confirmation information fed back by the next node device; The address configuration module is configured to determine a recipient of the address list according to target attributes and send the address list to the recipient to determine the master-slave relationship of all devices in the multi-device network.

[0006] In a third aspect, the present application further provides an electronic device, comprising: one or more processors; A storage device is used to store one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the device self-organizing control method of the present application.

[0007] In a fourth aspect, the present application also provides a storage medium storing computer-executable instructions, which, when executed by a processor, are used to execute the device self-organizing control method of the present application.

[0008] The present application solution combines master-slave integrated devices for networking. By configuring the device properties of the master-slave integrated devices, the master-slave relationship of devices in a multi-device network is configured, thereby expanding the device composition of the network architecture. The flexibility of the device organization method is improved, and the configuration of the master-slave relationship is completed through device self-organization, which also improves the flexibility of networking. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A flowchart of the steps of a device self-organizing control method provided in one embodiment of the present application.

[0010] Figure 2 A schematic diagram of the structure of a multi-device network provided in one embodiment of the present application.

[0011] Figure 3 A schematic diagram of the steps for updating an address list provided in one embodiment of the present application.

[0012] Figure 4 A schematic structural diagram of a device self-organizing control apparatus provided in one embodiment of the present application.

[0013] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0014] The embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and examples. It will be understood that the specific embodiments described herein are merely used to explain the embodiments of the present application, rather than to limit the embodiments of the present application. It should also be noted that, for ease of description, only portions related to the embodiments of the present application, rather than all structures, are shown in the accompanying drawings. After reading this specification, those skilled in the art should be able to understand that, as long as the technical features do not contradict each other, any combination of the technical features may constitute an optional embodiment.

[0015] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the description of this application, "multiple" means two or more, and "several" means one or more.

[0016] In the related art, when configuring a one-master-multiple-slave network architecture, the device serving as the host must be located at the end of the link and the device serving as the slave must be installed in a single direction. Furthermore, manual operation must be performed by a host computer or device host to edit the assembly positions, communication addresses, and device types of multiple different node devices. However, the configuration of the master-slave relationship cannot be automatically organized after power-on. In addition, when selecting devices in the network architecture, it is necessary to configure a device with host attributes and at least one device with slave attributes, such as configuring a host device and several slave devices. This results in restrictions on the devices that users can add or delete when configuring the network architecture. The device composition of the network architecture in the related art is fixed, and its device organization method is less flexible.

[0017] In this regard, the present application provides a device self-organizing control method, which is applied to the first device in a multi-device network, where the first device is a master-slave integrated device with changeable device attributes, wherein the device attributes can be host attributes or slave attributes. The first device is a device with changeable device attributes, that is, the first device can change the device attributes to host attributes or to slave attributes. In a multi-device network, the network includes at least one first device. For example, in some embodiments, the multi-device network includes a first device and several second devices, and the device attributes of the second devices are slave attributes. For another example, in some embodiments, the multi-device network includes multiple first devices. Moreover, in the multi-device network, all devices are connected based on a serial cascade method, and each device serves as a node device in the multi-device network.

[0018] Furthermore, each node device in a multi-device network is configured to, upon receiving an enumeration signal, feedback device information including device attributes to the initiator of the enumeration signal, and upon receiving an address setting instruction, feedback confirmation information to the initiator of the address setting instruction and transparently transmit the enumeration signal to the next node. Optionally, the node device's response to the enumeration information, transparent transmission operation, and response to the address setting instruction are configured as functions executed by the node device, for example, by configuring the node device as the initiator and the node device as the receiver to perform the aforementioned operations.

[0019] Figure 1The flowchart of the steps of the device self-organizing control method provided for one embodiment of the present application is shown in the figure. In one embodiment, there are multiple devices in a multi-device network, including at least one first device. When all devices in the multi-device network are connected in a serial cascade manner, the first device is connected to the next node device through the first port thereon, and the first device is connected to the previous node device through the second port thereon, wherein the previous node device and the next node device are relative to the current device, and both are respectively for other node devices connected to the current device in a serial cascade connection manner. Exemplarily, there are devices A, B, and C connected in a serial cascade manner. For device B, its previous node device is device A, and the next node device is device C. Based on this, data interaction is performed between the first device and the node device to which it is connected to realize the configuration of the master-slave relationship of all devices in the multi-device network. The specific steps are as follows: Step S110: When a power-on instruction is received, an enumeration signal is sent to the next node device through the first port, and the second port used to connect to the previous node device is monitored.

[0020] The power-on command triggers the first device to send an enumeration signal to the next node device. The first port is used to connect to the next node device, and the second port is used to connect to the previous node device. Therefore, upon receiving the power-on command, all first devices in the multi-device network send an enumeration signal to the next node device via their first port. This enumeration signal triggers the device to go online and provide feedback on device information. Therefore, when the first port of a first device is connected to another node device (such as a second device or another first device), the enumeration signal sent by the first device triggers the node device connected to the first port to provide feedback on its own device information, including device attributes.

[0021] Optionally, when the first device is located at the end of a multi-device network, that is, the first device is the last device connected among multiple devices connected in a serial cascade manner, and there is no next node device to be connected. In this regard, if the first device has not received feedback device information after waiting for a preset time, the first device determines that it is the end device of the multi-device network.

[0022] In addition, the first device also monitors the second port thereon, which is used to connect to the previous node device. That is, the first device monitors the second port to determine whether it has received the enumeration signal sent by the previous node device, thereby triggering the first device to perform corresponding operations, such as feedback of device information, change of device properties, etc.

[0023] Step S120: In response to receiving the device information fed back by the next node device, an address setting instruction is sent to the next node device, so that the next node device configures the device address and feeds back confirmation information.

[0024] In a multi-device network, each node device feeds back device information after receiving an enumeration signal. Therefore, after a first device sends an enumeration signal to a next node device via its first port, the next node device sends device information including device attributes to the first device. For example, if the next node device is the second device, the second device sends its own device information to the first device, including its own device attributes. Upon receiving this device information, the first device can determine that the connected device is a slave. After receiving this device information, the first device sends an address setting instruction to the next device node, allowing the next node device to configure its device address and then feeds back a confirmation message. Optionally, the address setting instruction carries assigned address parameters. When a node device receives the address setting instruction, it parses the instruction and obtains the address parameters, configuring them as its own device address in the multi-device network. After completing the device address configuration, the node device also sends a confirmation message to the initiator of the address setting instruction to confirm that the address configuration has been completed. In addition, the next node device will also transparently transmit enumeration information, that is, send an enumeration signal to another node device to which it is connected to determine the master-slave relationship of other devices in the multi-device network.

[0025] Step S130 : In response to the monitoring feedback signal of the second port, determine the target attribute to be changed based on the signal received through the second port.

[0026] The first device monitors the information sent by the previous node device through the second port. The first device can determine the monitoring result of the second port by monitoring the feedback signal. Optionally, the monitoring feedback signal is used to indicate whether the enumeration signal is received, such as by the level state of the monitoring feedback signal. When the monitoring feedback signal is high, it is determined that the enumeration signal is received, and when the monitoring feedback signal is low, it is determined that the enumeration signal is not received.

[0027] In one embodiment, the device attributes of the first device are changed according to whether an enumeration signal is received, such as being changed to a host attribute or a slave attribute, wherein when the first device is changed to a host attribute, it is equivalent to a host device in a multi-device network; when the first device is changed to a slave attribute, it is equivalent to a slave device in a multi-device network.

[0028] If an enumeration signal is received from a previous node device via the second port, the target attribute is determined to be a slave attribute, i.e., the slave attribute is used as the device attribute to be changed for the first device. Optionally, in one application scenario, the previous node device of the first device is a second device. If the first device receives an enumeration signal from the second device via the second port, it indicates that the second device has transparently transmitted the enumeration signal to the first device. For the first device, there is another first device on the side connected to the second device. In this case, the target attribute of the first device is a slave attribute, and it uses the other first device as the master.

[0029] If the enumeration signal sent by the previous node device is not received within the preset time, the target attribute is determined to be the host attribute, that is, the first device's monitoring of the second port is pre-set with a time threshold (corresponding to the preset time), and no enumeration signal is received within the preset time, that is, the enumeration signal is not received due to timeout. Accordingly, the first device determines the host attribute as the device attribute to be changed by the first device.

[0030] Step S140: When receiving confirmation information fed back by the next node device, the device attributes are changed according to the target attributes, and the address list for storing the device addresses is updated.

[0031] After powering on, the first device sends an enumeration signal to the next node device, prompting the node device to provide feedback on device information. The first device then sends an address setting command to the node device and waits for confirmation from the node device. Upon receiving confirmation from the next node device, the first device changes the device attributes according to the determined target attributes.

[0032] Moreover, each node device in a multi-device network is configured with an address list for storing device addresses, and the first device further updates the address list for storing device addresses, such as adding the address parameters configured for the next node device in the sent address setting instruction to the address list or updating the device address recorded in the address list.

[0033] Step S150: Determine the recipient of the address list according to the target attribute and send the address list to the recipient to determine the master-slave relationship of all devices in the multi-device network.

[0034] The address list is used to record device addresses. Each node device in a multi-device network needs to upload it to a device in the multi-device network with a master attribute, such as by transparently transmitting it through several node devices to a device with a master attribute. When the first device changes to a master attribute, it acts as a master device in the multi-device network; when the first device changes to a slave attribute, it acts as a slave device in the multi-device network. To this end, the first device also needs to determine the recipient of the address list based on the target attribute to be changed, and then send the address list to the recipient.

[0035] In one embodiment, when the target attribute is determined to be a slave attribute, the first device determines the previous node device as the receiver and sends an address list to the previous node device. The first device determines that the device attribute of the device has changed to a slave attribute by receiving an enumeration signal at the second port, that is, there is a device with a master attribute among the devices connected to the second port. Then, the first device uses the previous node device as the receiver and sends the address list to it, so that the previous node device can update the address and transfer the address list. When the target attribute is determined to be a host attribute, the first device is determined to be the receiver and the address list is stored. When the first device is determined to be the host in a multi-device network, it stores the address list without sending the address list to other devices.

[0036] It can be seen from the above scheme that this scheme can be combined with master-slave integrated devices for networking. By configuring the device properties of the master-slave integrated devices, the master-slave relationship of devices in the multi-device network can be configured, thereby expanding the device composition of the network architecture. The flexibility of the device organization method is improved, and the configuration of the master-slave relationship is completed through device self-organization, which also improves the flexibility of networking.

[0037] For example, Figure 2 A schematic diagram of the structure of a multi-device network provided in one embodiment of the present application is shown. As shown in the figure, devices A, B, C, and D are connected in series in a cascaded manner. Devices A, B, and C are all master-slave devices whose device attributes can be changed, and device D is a slave device. Upon receiving a power-on command, devices A, B, and C each send an enumeration signal to the next node device. This means that in this multi-device network, devices B, C, and D can all receive the enumeration signal. Based on this, devices B and C can both determine that the target attribute is a slave attribute.

[0038] Device C receives device information from the next-node device (i.e., device D) and then sends an address setting instruction to device D, allowing it to configure its device address according to the address parameters in the address setting instruction. Furthermore, after receiving a confirmation signal from device D, device C can determine that a device with host attributes is connected to its second port because it received both the enumeration signal and the confirmation signal. Device C then updates its address list, updating the device addresses included in the address list (e.g., the device addresses of device C and device D), such as by incrementing all addresses by 1. For example, device C's original address 0.0.0.0 is updated to 0.0.0.1, and device D's original address 0.0.0.1 is updated to 0.0.0.2. After completing the address list update, device C updates its device attributes to slave attributes and feeds back the device attributes and address list to device B. Optionally, device C can add the device attributes and address list to its device information and feed back the device information to device B.

[0039] For device B, it receives the enumeration signal sent by device A and the device information sent by device C. Device B can determine that a device with host attributes is connected to the second port side, and then device B updates the address list, that is, updates the device addresses included in the address list (such as the device address of device B, the device address of device C, and the device address of device D), such as increasing all addresses by 1, for example, device B is updated from the original device address 0.0.0.0 to 0.0.0.1, device C is updated from the original device address 0.0.0.1 to 0.0.0.2, and device D is updated from the original device address 0.0.0.2 to 0.0.0.3. It should be noted that the device addresses with specific values ​​mentioned above are exemplary descriptions made to facilitate the explanation of this embodiment and do not represent the device addresses used in actual scenarios.

[0040] After completing the address list update, device B updates the device attributes to slave attributes and feeds back the device attributes and address list to device A. Optionally, device B can add the device attributes and address list to the device information and feed back the device information to device A.

[0041] For device A, if it fails to receive the enumeration signal within the preset time, device A determines that the target attribute of this device is the host attribute and changes the device attribute to the host attribute, thereby becoming the host device in the multi-device network. After receiving the device information sent by device B, device A sends an address setting instruction to device B for device B to configure the device address. It is conceivable that in some embodiments, if the configured device address does not need to be changed, the device that receives the address setting instruction can directly feedback confirmation information without updating the device address, and then transparently transmit the enumeration signal to the next node device. It is understandable that the enumeration signal received by the node device again is an enumeration signal transmitted via transparent transmission, which is used to connect the node device to the currently determined host device in the multi-device network, such as device A in this example, and then use this device as the host to determine the master-slave relationship of each device in the multi-device network. In response, device C receives the enumeration signal again and performs the same steps as device B to connect to the network with device A as the host device. Similarly, device D also performs the same steps to connect to the network with device A as the host device.

[0042] Figure 3 A schematic diagram of the steps for updating an address list provided in one embodiment of the present application is shown in the figure. In one embodiment, after the first device determines the target attribute to be changed, it updates the device attribute and the address list accordingly after receiving the confirmation information. The specific steps are as follows: Step S210: When the target attribute is a slave attribute, the device attribute is updated to a slave attribute, and the device address in the address list is synchronously increased by a preset address value to generate a new device address.

[0043] Step S220: Generate a new address setting instruction according to the new device address so that all devices recorded in the address list are updated according to the new address setting instruction.

[0044] Step S230: When the confirmation information is received, the address list is updated according to the new device address.

[0045] In this case, after receiving the enumeration signal, the first device sets the target attribute to be changed to the slave attribute. Accordingly, after receiving the confirmation information fed back by the next node device, the first device starts switching the device attribute, i.e., changing the device attribute to the target attribute. The address list is also updated, such as by synchronously increasing the device address in the address list by a preset address value to generate a new device address. It is understandable that the first device receives the enumeration signal via the second port, i.e., among the devices connected to the second port of the first device, there is a device with a master attribute. Therefore, the device address previously configured by the first device and the next node device through the exchange of address setting instructions and confirmation information needs to be reconfigured. Furthermore, the first device stores the device address corresponding to the device connected to the first port of the first device in its own stored address list. When reconfiguring the device address, the first device uniformly updates all device addresses in the address list according to the preset address value, so that each device address is synchronously increased by the preset address value, thereby forming a new device address.

[0046] For example, a multi-device network contains devices A, B, and C, which are connected in sequence. Devices A and B are both master-slave devices, and device C is a slave device. After powering on, devices A and B each send an enumeration signal to their corresponding next-node device, which both devices B and C receive. Device A does not receive the enumeration signal, and its device attributes are changed to host attributes, making it the master device in the multi-device network. It is also assigned a corresponding device address, I (e.g., 0.0.0.0).

[0047] After device C and device B share device information, device B sends an address setting command to device C, configuring device address III (e.g., 0.0.0.1). Device B's address list contains both device C's address (i.e., device address III) and device B's address II (e.g., 0.0.0.0). This means there are duplicate device addresses. Since device B receives an enumeration signal, the target attribute to be changed is a slave attribute, requiring it to update its address list. Device B receives the address setting command from device A, from which it determines the address parameters for the new device address (e.g., 0.0.0.1). By comparing the previously recorded device address in device B with the received new device address, device B determines the preset address value. This value is then incremented by 1 for all device addresses in the address list. The updated device address III is 0.0.0.2, and the updated device address II is 0.0.0.1. There are no duplicate device addresses.

[0048] The first device then generates a new address setting instruction based on the new device address, such as by adding address parameters corresponding to the new device address to the new address setting instruction, so that all devices in the address list are updated according to the corresponding address parameters. Upon receiving confirmation from the node device that the device address configuration update has been completed, the first device updates the address list according to the new device address, so that the address list records the latest device addresses of other node devices. Referring to the above example, device B changes its device attributes to switch to slave attributes. After completing the address list update, it uploads the updated address list to device A.

[0049] Therefore, by updating the device address, the master-slave device can adjust the device address before reporting the address list to adapt to other devices, thereby helping to ensure that each device in the multi-device network accurately self-organizes and completes the configuration of the device address.

[0050] In one embodiment, when a first device receives device information fed back by a next-node device and an enumeration signal sent by a previous node, while the first device is still busy networking with the next-node device, the first device feeds back a status signal indicating a busy state to the previous node device, thereby suspending communication with the previous node device, such as temporarily stopping feeding back device information to the previous node device. The first device then completes networking with the next-node device, i.e., the first device completes address configuration for the next-node device, i.e., updates the address list. For example, referring to the above embodiment, all device addresses in the address list are updated to reconfigure the corresponding device addresses. In response, the first device stops feeding back status signals to resume device communication with the previous node device, such as by re-feeding back the address list to the previous node device.

[0051] As shown in the above example, device A and device B are both master-slave devices, with device C being the slave. After powering on, both devices B and C receive enumeration signals, but device A does not. Furthermore, device B receives device information from device C, in response to which it sends status information to device A, indicating that it is currently busy. Device B and device C configure the device address, allowing device B to update the device address in its address list according to the solution provided in the above embodiment. After completing the address list update, device B stops sending status signals and resumes device communication with device A, then feeds the address list back to device A.

[0052] By configuring the feedback mechanism of the status signal, the first device in a multi-device network can complete the networking with the next node device during the process of switching device properties, thereby effectively avoiding the occurrence of address configuration errors and the inability to complete the networking of all devices within the entire multi-device network, which helps to improve the flexibility of device self-organization.

[0053] For the case where the device attribute of the first device is a host attribute, in one embodiment, when the device attribute is changed to a host attribute, the second port is determined as the target port, and an enumeration signal is sent through the target port to configure the master-slave relationship between the present device and the previous node device. Among them, when the device attribute of the first device is a host attribute, it acts as a host device in a multi-device network. In addition to sending an enumeration signal to the next node device through the first port to add the device connected to the first port side to the network, the first device also needs to send an enumeration signal to the previous node device through the second port to add the device connected to the second port side to the network. For example, in one scenario, device A acts as a master-slave integrated device, with device D and device E connected to its two sides respectively, wherein device D and device E are both slave devices, and device D acts as the previous node device of device A, and device E acts as the next node device of device A. After the devices are powered on, device A sends an enumeration signal to device E through its first port to establish a network with device E. If device A does not receive the enumeration signal within a preset time, device A will send an enumeration signal to device D through its second port to establish a network with device D.

[0054] Therefore, this solution configures a busy signal for the master-slave device that needs to upload information to the upper node device to suspend data interaction between the master-slave device and the upper node device, so that the master-slave device and the subsequently connected devices can initially complete the networking, which is conducive to the stable self-organizing networking of the devices.

[0055] In one embodiment, a multi-device network can add new devices, such as adding a slave device to the end of the multi-device network. For example, device C with slave attributes is at the end of the multi-device network. When device D with slave attributes accesses device C and serves as the next node device of device C, device D becomes the device at the end of the multi-device network. Device C transparently transmits an enumeration signal to device D to configure the address of device D to complete the networking. In addition, a multi-device network can also add a host device. The device attribute of the host device is the host attribute. For example, the host device is added to the starting end or the end of the multi-device network, that is, as the first device or the last device in the multi-device network. Optionally, when a new device is connected to the multi-device network, the multi-device network is powered on again. To this end, the first device can determine that a new device is currently connected based on the newly received power-on instruction.

[0056] For the first device, when a host device is connected to a multi-device network, the first device determines whether the device attribute of the device is a host attribute. If the device attribute corresponding to the device is a host attribute, all ports are monitored, and when an enumeration signal is received, the target attribute to be changed is re-determined to be a slave attribute. It is understandable that when a host device is connected to a multi-device network, the first device whose device attribute is originally a host attribute needs to change the device attribute to a slave attribute. To this end, the first device monitors all ports (such as the first port and the second port mentioned above) so that the first device can receive the enumeration signal through the corresponding port when the host device is connected to the starting end of the multi-device network or when the host device is connected to the end of the multi-device network. When an enumeration signal is received at any port, the first device re-determines the target attribute to be changed as a slave attribute.

[0057] In this regard, when a new device is connected to a multi-device network, the master-slave device redefines the target attributes to match the new device connected. By flexibly configuring the slave relationship, the master-slave relationship of one master and multiple slaves in the multi-device network is maintained, which helps to improve the flexibility of the network.

[0058] Figure 4 This is a structural diagram of a device self-organizing control device provided in an embodiment of the present application, which is used to execute the device self-organizing control method of the above embodiment, and has a functional module and beneficial effects for executing the above method. Moreover, the device self-organizing control device is applied to the first device in a multi-device network, and the first device is a master-slave integrated device that can change the device attributes. The multi-device network includes at least one first device, wherein all devices in the multi-device network are connected based on a serial cascade method and serve as a node device in the multi-device network respectively, and all node devices are used to feedback device information including device attributes to the initiator of the enumeration signal after receiving the enumeration signal, and feedback confirmation information to the initiator of the address setting instruction after receiving the address setting instruction, and transparently transmit the enumeration signal to the next node. As shown in the figure, the device includes a port control module 301, an instruction sending module 302, an attribute determination module 303, an attribute change module 304 and an address configuration module 305.

[0059] The port control module 301 is configured to send an enumeration signal to the next node device through the first port when receiving a power-on instruction, and monitor the second port used to connect to the previous node device; The instruction sending module 302 is configured to send an address setting instruction to the next node device in response to receiving the device information fed back by the next node device, so that the next node device can configure the device address and feed back confirmation information; The attribute determination module 303 is configured to respond to the monitoring feedback signal of the second port and determine the target attribute to be changed based on the signal received through the second port; The attribute changing module 304 is configured to change the device attributes according to the target attributes and update the address list for storing the device addresses when receiving the confirmation information fed back by the next node device; The address configuration module 305 is configured to determine a recipient of the address list according to the target attribute and send the address list to the recipient, so as to determine the master-slave relationship of all devices in the multi-device network.

[0060] Based on the above embodiment, the attribute determination module 303 is specifically configured as follows: If an enumeration signal sent by the previous node device is received through the second port, the target attribute is determined to be a slave attribute; If the enumeration signal sent by the previous node device is not received within the preset time, the target attribute is determined to be a host attribute.

[0061] Based on the above embodiment, the address configuration module 305 is specifically configured as follows: When the target attribute is determined to be a slave attribute, the previous node device is determined as a receiver, and an address list is sent to the previous node device; When the destination attribute is determined to be a host attribute, the device is determined as a recipient and an address list is stored.

[0062] Based on the above embodiment, the attribute changing module 304 is specifically configured as follows: When the target attribute is a slave attribute, the device attribute is updated to the slave attribute, and the device address in the address list is synchronously increased by a preset address value to generate a new device address; Generate a new address setting instruction according to the new device address so that all devices recorded in the address list are updated according to the new address setting instruction; When the confirmation message is received, the address list is updated according to the new device address.

[0063] Based on the above embodiment, the attribute changing module 304 is further configured to: When it is determined that the enumeration signal and the device information are received, feeding back a status signal indicating a busy state to the upper node device to suspend communication with the upper node device; In response to completing the update of the address list, the feedback status signal is stopped to resume device communication with the previous node device.

[0064] Based on the above embodiment, the device self-organizing control apparatus includes an instruction resending module, and the instruction resending module is configured as follows: When the device attribute is changed to the host attribute, the second port is determined as the target port, and an enumeration signal is sent through the target port to configure the master-slave relationship between the current device and the previous node device.

[0065] On the basis of the above embodiment, in the case where a multi-device network is connected to a host device, the device attribute of the host device is the host attribute. The device self-organizing control apparatus includes an attribute reconfiguration module, and the attribute reconfiguration module is configured as follows: Determine whether the device attribute of this device is a host attribute; If the device attribute corresponding to the current device is a master attribute, all ports are monitored, and upon receiving an enumeration signal, the target attribute to be changed is re-determined to be a slave attribute.

[0066] It is worth noting that in the embodiment of the above-mentioned device, the modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the embodiments of this application.

[0067] Figure 5 This is a structural diagram of an electronic device provided in one embodiment of the present application, which is used to execute the device self-organizing control method provided in the above embodiment, and has functional modules and beneficial effects corresponding to the execution method. As shown in the figure, the device includes a processor 401, a memory 402, an input device 403 and an output device 404. The number of processors 401 can be one or more, and one processor 401 is taken as an example in the figure; the processor 401, the memory 402, the input device 403 and the output device 404 can be connected via a bus or other means, and the figure takes the connection via a bus as an example. The memory 402, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the device self-organizing control method in the embodiment of the present application. The processor 401 executes the corresponding various functional applications and data processing by running the software programs, instructions and modules stored in the memory 402, that is, realizes the above-mentioned device self-organizing control method.

[0068] The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data recorded or created during use, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 402 may further include a memory remotely located relative to the processor 401, and these remotely located memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0069] The input device 403 can be used to input corresponding digital or character information to the processor 401, and generate key signal input related to the user settings and function control of the device; the output device 404 can be used to send or display key signal output related to the user settings and function control of the device.

[0070] An embodiment of the present application also provides a storage medium storing computer-executable instructions, which, when executed by a processor, are used to perform relevant operations in the device self-organizing control method provided in any embodiment of the present application.

[0071] Computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0072] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0073] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of the present application. The scope of the present application is determined by the scope of the appended claims.

Claims

1. A device self-organizing control method, characterized in that: A first device is applied to a multi-device network, the first device being a master-slave integrated device capable of changing device attributes, the multi-device network including at least one of the first devices, wherein all devices in the multi-device network are connected based on a serial cascade manner and each serves as a node device in the multi-device network, and all node devices are configured to feedback device information including device attributes to an initiator of the enumeration signal after receiving an enumeration signal, and feedback confirmation information to the initiator of the address setting instruction after receiving an address setting instruction, and transparently transmit the enumeration signal to the next node, the device self-organizing control method comprising: When a power-on instruction is received, an enumeration signal is sent to the next node device through the first port, and a second port used to connect to the previous node device is monitored; In response to receiving device information fed back by the next node device, sending an address setting instruction to the next node device, so that the next node device configures a device address and feeds back confirmation information; In response to a monitoring feedback signal of the second port, determining a target attribute to be changed based on a signal received through the second port; When receiving confirmation information fed back by the next node device, changing the device attribute according to the target attribute, and updating the address list for storing device addresses; A receiver of the address list is determined according to the target attribute and the address list is sent to the receiver, so as to determine a master-slave relationship among all devices in the multi-device network.

2. The device self-organizing control method according to claim 1, characterized in that: The determining, based on the signal received through the second port, the target attribute to be changed, includes: If an enumeration signal sent by the previous node device is received through the second port, determining that the target attribute is a slave attribute; If the enumeration signal sent by the previous node device is not received within the preset time, the target attribute is determined to be a host attribute.

3. The device self-organizing control method according to claim 1, characterized in that: The determining a recipient of the address list according to the target attribute and sending the address list to the recipient to determine a master-slave relationship of all devices in the multi-device network includes: In a case where it is determined that the target attribute is a slave attribute, determining the previous node device as the receiver, and sending the address list to the previous node device; When it is determined that the target attribute is a host attribute, the current device is determined as the receiver and the address list is stored.

4. The device self-organizing control method according to claim 1, characterized in that: The step of changing the device attributes according to the target attributes and updating the address list for storing device addresses includes: In the case where the target attribute is a slave attribute, updating the device attribute to a slave attribute, and synchronously increasing the device address in the address list by a preset address value to generate a new device address; Generate a new address setting instruction according to the new device address so that all devices recorded in the address list are updated according to the new address setting instruction; When the confirmation information is received, the address list is updated according to the new device address.

5. The device self-organizing control method according to claim 4, characterized in that: The step of changing the device attributes according to the target attributes and updating the address list for storing device addresses further includes: When it is determined that the enumeration signal and the device information are received, feeding back a status signal indicating a busy state to the upper node device to suspend communication with the upper node device; In response to completing the update of the address list, the feedback of the status signal is stopped to resume device communication with the previous node device.

6. The device self-organizing control method according to claim 1, characterized in that: After receiving the confirmation information fed back by the next node device, changing the device attribute according to the target attribute and updating the address list for storing device addresses, the method further includes: When the device attribute is changed to the host attribute, the second port is determined as the target port, and an enumeration signal is sent through the target port to configure the master-slave relationship between the current device and the previous node device.

7. The device self-organizing control method according to any one of claims 1 to 6, characterized in that: In a case where the multi-device network is connected to a host device, the device attribute of the host device is a host attribute, and the method further includes: Determine whether the device attribute of this device is a host attribute; If the device attribute corresponding to the current device is a master attribute, all ports are monitored, and upon receiving an enumeration signal, the target attribute to be changed is re-determined to be a slave attribute.

8. A device for self-organizing control of equipment, characterized in that: A first device applied to a multi-device network, the first device being a master-slave integrated device capable of changing device attributes, the multi-device network including at least one first device, wherein all devices in the multi-device network are connected based on a serial cascade manner and each serves as a node device in the multi-device network, and all node devices are configured to feedback device information including device attributes to an initiator of the enumeration signal after receiving an enumeration signal, and feedback confirmation information to the initiator of the address setting instruction after receiving an address setting instruction, and transparently transmit the enumeration signal to the next node, the device self-organizing control device comprising: The port control module is configured to, upon receiving a power-on instruction, send an enumeration signal to a next node device through the first port and monitor a second port used to connect to the previous node device; an instruction sending module configured to, in response to receiving device information fed back by the next node device, send an address setting instruction to the next node device, so that the next node device configures a device address and feeds back confirmation information; an attribute determination module configured to determine a target attribute to be changed based on a signal received through the second port in response to a monitoring feedback signal of the second port; an attribute changing module configured to, upon receiving confirmation information fed back by the next node device, change the device attribute according to the target attribute and update an address list for storing device addresses; The address configuration module is configured to determine a recipient of the address list according to the target attribute and send the address list to the recipient, so as to determine the master-slave relationship of all devices in the multi-device network.

9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the device self-organizing control method as described in any one of claims 1-7.

10. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a processor, the computer executable instructions are used to perform the device self-organizing control method according to any one of claims 1 to 7.