Data interaction method and device of parallel operation system, parallel operation system and storage medium
By uniformly collecting and aggregating slave device information through host equipment, and using Boolean value identification and device identification management, the problems of cost and operation and maintenance complexity caused by additional hardware in photovoltaic power plants and energy storage systems are solved, and rapid and complete device information enumeration and efficient data interaction are achieved.
Patent Information
- Application Number
- CN202511205182.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-26
- Publication Date
- 2025-12-12
AI Technical Summary
Existing technologies require additional data acquisition devices or central processor hardware for parallel operation of photovoltaic power plants and energy storage systems, which increases system costs and operation and maintenance complexity, as well as the number of communication calls and network load.
By uniformly collecting and aggregating slave device information through the host device, the number of communications and network load are reduced. Boolean value identifiers and device identifiers are used for device management, avoiding additional dedicated data aggregation hardware and enabling fast and complete enumeration of device information.
It reduced system deployment costs, decreased the number of communications and network load, shortened response time, improved data interaction efficiency, and enabled real-time updates and accurate synchronization of device information.
Smart Images

Figure CN121125383A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data communication for multi-machine systems, and particularly relates to a data interaction method, apparatus, parallel system, and storage medium for parallel systems. Background Technology
[0002] With the widespread adoption of photovoltaic (PV) and energy storage technologies, the scale of PV power plants and energy storage systems is continuously expanding. Single devices often struggle to meet capacity demands, making parallel operation of multiple PV and energy storage devices the mainstream solution. To achieve efficient power generation, optimize energy storage charging and discharging strategies, and ensure system reliability to support grid ancillary services, terminals or cloud servers need to perceive and monitor the status of PV and energy storage devices in real time, comprehensively, and accurately. Related technologies typically deploy data acquisition units or processors locally to poll or receive device information from the parallel system, which is then aggregated, processed, and uploaded to the terminal or cloud server. This method requires additional data acquisition units or central processor hardware, increasing system costs and operational complexity. Summary of the Invention
[0003] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a data interaction method, apparatus, parallel system, and storage medium for a parallel system, which does not rely on additional dedicated data aggregation hardware, thereby reducing the number of communication attempts and network load, shortening the overall device response time, and thus achieving fast and complete device information enumeration.
[0004] In a first aspect, this application provides a data interaction method for a parallel system, the parallel system comprising multiple optical storage devices, wherein the host device is any one of the multiple optical storage devices; the method includes:
[0005] Receive first information sent by each slave device, the first information including a first device identifier and a Boolean value identifier of each slave device, wherein the slave device is a device other than the master device among the plurality of optical storage devices;
[0006] Receive request messages sent by the target terminal;
[0007] In response to the request message, second information is sent to the target terminal, the second information including the first information of each of the slave devices and the second device identifier of the master device;
[0008] The second information is used for the target terminal to obtain the device information corresponding to the target slave device from the target slave device through the gateway device based on the first device identifier, and the target slave device is determined based on the Boolean value identifier; the gateway device is any one of the plurality of optical storage devices.
[0009] According to the data interaction method of the parallel system of this application, during the process of the host device uniformly collecting and summarizing the relevant information of the slave devices and responding centrally, the amount of data transmitted is small, the storage performance requirements are low, and there is no need to rely on additional data aggregation hardware, which reduces the deployment cost of the system. The terminal does not need to establish communication connections with multiple devices in the system separately, which reduces the number of round-trip interactions between the terminal and each device, reduces the number of communication times and network load in data interaction, shortens the overall response time, and thus improves the efficiency of data interaction.
[0010] According to one embodiment of this application, receiving the request message sent by the target terminal includes:
[0011] When the host device is the gateway device, the request message sent by the target terminal is received;
[0012] When the host device is not a gateway device, the request message forwarded by the gateway device is received, and the request message is a request message sent by the target terminal to the gateway device.
[0013] According to one embodiment of this application, the first information further includes a slave device list identifier, and the method further includes:
[0014] If a change in the information of the slave device is detected, the slave device list identifier is updated based on the changed slave device;
[0015] An updated slave device list identifier is sent to the target terminal, and the updated slave device list identifier is used to trigger the target terminal to send a new request message.
[0016] Secondly, this application provides a data interaction method for a parallel system, applied to a target terminal, wherein the parallel system includes multiple optical storage devices; the method includes:
[0017] A request message is sent to the target gateway; the request message is used to instruct the host device to send second information, the second information including first information of each slave device and second device identifier of the host device; the host device is any one of the plurality of optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, the slave device being a device other than the host device among the plurality of optical storage devices;
[0018] Based on the Boolean value identifier in the received second information, the target slave device is determined from each of the slave devices;
[0019] Based on the first device identifier corresponding to the target slave device, a device information request is sent to the target slave device through the gateway device;
[0020] The gateway device receives device information sent by each of the target slave devices.
[0021] According to one embodiment of this application, determining the target slave device from among the slave devices based on the Boolean value identifier in the received second information includes:
[0022] If it is determined based on the Boolean value identifier that the slave device manages a sub-device, the slave device is identified as the target slave device.
[0023] According to the data interaction method of the parallel system of this application, the terminal determines whether to send a directed request message to the slave device based on the slave device information carried in the host device response message. In this way, the terminal does not need to establish communication connections with multiple devices in the system separately, which improves the data interaction efficiency between the terminal and each device, thereby realizing fast and complete device information enumeration.
[0024] Thirdly, this application provides a data interaction method for a parallel system, applied to a gateway device, wherein the parallel system includes multiple optical storage devices, and the gateway device is any one of the multiple optical storage devices; the method includes:
[0025] Obtain second information, which includes first information of each slave device and second device identifier of the master device; the master device is any one of the plurality of optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, and the slave device is a device other than the master device among the plurality of optical storage devices;
[0026] Send the second message to the target terminal;
[0027] Receive the device information request sent by the target terminal;
[0028] In response to the device information request, the device information request is forwarded to the target slave device; the target slave device is determined by the target terminal based on the Boolean value identifier.
[0029] Receive device information sent by the target slave device;
[0030] The device information is forwarded to the target terminal.
[0031] Fourthly, this application provides a data interaction method for a parallel system, applied to slave devices, wherein the parallel system includes multiple optical storage devices, and the slave devices are devices other than the master device among the multiple optical storage devices; the method includes:
[0032] Send first information to the host device, the first information including a first device identifier and a Boolean value identifier of the slave device; the Boolean value identifier is used to characterize whether the slave device manages sub-devices;
[0033] When the slave device manages the sub-device, it receives a device information request forwarded by the gateway device; the device information request is sent by the target terminal based on second information, the second information including the first information of the slave device and the second device identifier of the host device, the second information being sent by the host device to the target terminal in response to a request message sent by the target terminal;
[0034] The gateway device sends device information to the target terminal.
[0035] According to the data interaction method of the parallel system in this application, the slave device passively waits for the terminal to query, which reduces the communication competition response and other problems that may be caused by multiple devices actively responding, and reduces the number of invalid communication interactions between the terminal and the device, thereby achieving fast and complete device information enumeration.
[0036] Fifthly, this application provides a data interaction device for a parallel system, applied to a host device; the device includes:
[0037] The first processing module is configured to receive first information sent by each slave device, the first information including a first device identifier and a Boolean value identifier of each slave device, wherein the slave device is a device other than the master device among the plurality of optical storage devices;
[0038] The second processing module is used to receive request messages sent by the target terminal;
[0039] The third processing module is used to respond to the request message and send second information to the target terminal. The second information includes the first information of each of the slave devices and the second device identifier of the master device.
[0040] According to the data interaction method of the parallel system in this application, during the process of the host device uniformly collecting and summarizing relevant information from the slave devices and responding centrally, the amount of data transmitted is relatively small, the requirements for storage performance are low, and there is no need to rely on additional data aggregation hardware, thus reducing the system deployment cost. The terminal does not need to establish communication connections with multiple devices within the system separately, reducing multiple round trips between the terminal and each device, lowering the number of communication interactions and network load in data interaction, shortening the overall response time, and thereby improving data interaction efficiency.
[0041] Sixthly, this application provides a data interaction device for a parallel system, applied to a target terminal, wherein the parallel system includes multiple optical storage devices; the device includes:
[0042] The fourth processing module is used to send a request message to the target gateway; the request message is used to instruct the host device to send second information, the second information including the first information of each slave device and the second device identifier of the host device; the host device is any one of the plurality of optical storage devices; the first information includes the first device identifier and Boolean value identifier of each slave device, the slave device being a device other than the host device among the plurality of optical storage devices;
[0043] The fifth processing module is used to determine the target slave device from among the slave devices based on the Boolean value identifier in the received second information;
[0044] The sixth processing module is used to send a device information request to the target slave device through the gateway device based on the first device identifier corresponding to the target slave device;
[0045] The seventh processing module is used to receive device information sent by each of the target slave devices through the gateway device.
[0046] Seventhly, this application provides a data interaction device for a parallel system, applied to a gateway device, wherein the parallel system includes multiple optical storage devices, and the gateway device is any one of the multiple optical storage devices; the device includes:
[0047] The eighth processing module is used to acquire second information, which includes first information of each slave device and second device identifier of the master device; the master device is any one of the plurality of optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, and the slave device is a device other than the master device among the plurality of optical storage devices;
[0048] The ninth processing module is used to send the second information to the target terminal;
[0049] The tenth processing module is used to receive the device information request sent by the target terminal;
[0050] The eleventh processing module is used to forward the device information request to the target slave device in response to the device information request; the target slave device is determined by the target terminal based on the Boolean value identifier;
[0051] The twelfth processing module is used to receive device information sent by the target slave device;
[0052] The thirteenth processing module is used to forward the device information to the target terminal.
[0053] Eighthly, this application provides a data interaction device for a parallel system, applied to a slave device, wherein the parallel system includes multiple optical storage devices, and the slave device is any device other than the master device among the multiple optical storage devices; the device includes:
[0054] The fourteenth processing module is used to send first information to the host device, the first information including a first device identifier and a Boolean value identifier of the slave device; the Boolean value identifier is used to characterize whether the slave device manages a sub-device;
[0055] The fifteenth processing module is used to receive a device information request forwarded by the gateway device when the slave device manages the sub-device; the device information request is sent by the target terminal based on second information, the second information including the first information of the slave device and the second device identifier of the host device, the second information being sent by the host device to the target terminal in response to a request message sent by the target terminal;
[0056] The sixteenth processing module is used to send device information to the target terminal through the gateway device.
[0057] Ninthly, this application provides a parallel system including multiple optical storage devices, wherein a master device among the multiple optical storage devices is electrically connected to each slave device, and a gateway device is electrically connected to a target terminal, wherein the gateway device is any one of the multiple optical storage devices; the parallel system performs data interaction based on the data interaction method of the parallel system as described in the first, second, third, or fourth aspects above.
[0058] In a tenth aspect, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the data interaction method of the parallel system as described in the first, second, third, or fourth aspects above.
[0059] In one aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the data interaction method of the parallel system as described in the first, second, third, or fourth aspects above.
[0060] The above-described one or more technical solutions in the embodiments of this application have at least one of the following technical effects:
[0061] By responding to terminal requests through the host device, there is no need to rely on additional dedicated data aggregation hardware, thereby reducing the number of communications and network load, and shortening the overall response time; the slave device passively waits for the terminal to perform targeted queries, avoiding communication conflicts caused by multiple devices actively responding; the terminal initiates targeted queries to the slave device as needed based on the slave device information in the host device response, thereby achieving fast and complete device information enumeration.
[0062] Furthermore, in the process of the host device uniformly collecting and aggregating relevant information from the slave devices and responding centrally, the amount of data transmitted is relatively small, the requirements for storage performance are low, and there is no need to rely on additional data aggregation hardware, thus reducing the deployment cost of the system. The terminal does not need to establish communication connections with multiple devices in the system separately, reducing the number of round trips between the terminal and each device, reducing the number of communication times and network load in data interaction, shortening the overall response time, and thus improving the efficiency of data interaction.
[0063] Furthermore, by promptly updating the unique identifier of the device list and reporting it to the terminal or cloud when the sub-device list of the optical storage device changes, the device list can be updated and accurately synchronized in real time, ensuring that the device information that the terminal or cloud can obtain is complete and accurate, thereby improving the reliability of data interaction and management efficiency.
[0064] Furthermore, by passively waiting for the terminal to query, the problem of communication contention that may result from multiple devices actively responding is reduced, and the number of invalid communication interactions between the terminal and the device is reduced, thereby enabling fast and complete enumeration of device information.
[0065] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0066] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0067] Figure 1 This is one of the flowcharts illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0068] Figure 2 This is a second schematic flowchart of the data interaction method of the parallel system provided in the embodiments of this application;
[0069] Figure 3 This is the third flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0070] Figure 4 This is the fourth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0071] Figure 5 This is the fifth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0072] Figure 6 This is the sixth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0073] Figure 7 This is the seventh flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0074] Figure 8 This is the eighth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0075] Figure 9 This is the ninth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0076] Figure 10 This is the tenth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0077] Figure 11 This is eleventh of the flowcharts illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0078] Figure 12 This is the twelfth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0079] Figure 13 This is the thirteenth flowchart illustrating the data interaction method of the parallel system provided in the embodiments of this application;
[0080] Figure 14 This is one of the structural schematic diagrams of the data interaction method device for a parallel system provided in the embodiments of this application;
[0081] Figure 15 This is a second schematic diagram of the data interaction method device for a parallel system provided in the embodiments of this application;
[0082] Figure 16 This is the third schematic diagram of the data interaction method device for the parallel system provided in the embodiments of this application;
[0083] Figure 17 This is the fourth schematic diagram of the data interaction method device for the parallel system provided in the embodiments of this application;
[0084] Figure 18 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0085] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0086] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0087] The data interaction method, apparatus, parallel system, and storage medium of the parallel system provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0088] The data interaction method of the parallel system can be applied to the terminal, and can be executed by the hardware or software in the terminal.
[0089] The following embodiments describe a terminal including a display and a touch-sensitive surface. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and joystick.
[0090] The data interaction method for parallel systems provided in this application is applied to multi-machine parallel scenarios. In a photovoltaic-storage power generation scenario, there are multiple photovoltaic and storage devices. The target terminal needs to obtain information such as the working parameters of each photovoltaic and storage device in real time. Among these multiple photovoltaic and storage devices, there is one master device and multiple slave devices. Each photovoltaic and storage device may or may not have managed sub-devices. Among the multiple photovoltaic and storage devices, there is also a gateway used to forward information between the target terminal and each photovoltaic and storage device. This gateway can be a master device or a slave device.
[0091] In actual execution, the host device, slave device, gateway, and target terminal act as different execution entities, executing the data interaction method of the parallel system.
[0092] The implementation of the data interaction method of the parallel system in this application will be explained below using different implementing entities as examples.
[0093] This application provides a data interaction method for a parallel system, applied to a host device.
[0094] like Figure 1 As shown, the data interaction method of the parallel system is applied to the host device. The parallel system includes multiple optical storage devices, and the host device is any one of the multiple optical storage devices. The data interaction method of the parallel system includes steps 110, 120 and 130.
[0095] Step 110: Receive the first information sent by each slave device;
[0096] In this step, the first information includes the first device identifier and Boolean value identifier of each slave device. The slave device is a device other than the master device among multiple optical storage devices. The master device can be selected according to a specific strategy or randomly, or it can be based on user-defined settings. This application does not limit this.
[0097] The first device identifier can be a unique identifier for the slave device, such as a MAC address or serial number, used to represent the unique identity of a device in the parallel system, ensuring that the device can be accurately targeted for message information during communication, management, and other processes. A Boolean identifier is used to indicate whether the slave or master device manages a sub-device. Multiple optical storage devices in the parallel system are connected via a communication bus, including but not limited to network cables, RS-485, and CAN cables.
[0098] Both the host device and the slave device can manage multiple sub-devices, which may include electricity meters, energy storage batteries, charging piles, grid connection point shut-off boxes, etc.
[0099] refer to Figure 2 In some embodiments, neither the master device nor the slave device manages any sub-devices, and the master device and slave devices are connected via a CAN bus. The master device obtains the Boolean identifier of the sub-devices not managed by the slave device and the device unique identifier of the slave device from each slave device.
[0100] refer to Figure 3 In some embodiments, the master device manages one or more sub-devices, including: energy storage battery 1 and meter 1; the slave devices do not manage sub-devices; the master device and the slave devices are connected via a 485 bus. The master device obtains the unique device identifier of each slave device and the Boolean identifier of any sub-devices not managed by the slave device from each slave device.
[0101] refer to Figure 4In some embodiments, the master device manages one or more sub-devices, including energy storage battery 1 and electricity meter 2; slave device 1 manages one or more sub-devices, including electricity meter 1, charging pile 1, and grid connection point shutdown box 1; slave device 2 manages energy storage battery 2 and charging pile 2; and slave device 3 manages energy storage battery 3 and grid connection point shutdown box 2. The master device and slave devices are connected via FE network cables. The master device obtains the Boolean value identifier of the sub-device managed by each slave device, as well as the device unique identifier of the slave device.
[0102] Continue to refer to Figure 12 In this embodiment, the slave device sends its own unique identifier and a Boolean value identifier of the managed sub-device to the master device.
[0103] In some embodiments, the first device identifier may include at least one of the following: a unique device identifier for the slave device, a Boolean value indicating whether the slave device has managed sub-devices, and a unique device list identifier for the slave device. The unique device list identifier for the slave device may be a hash value calculated based on the device list and an algorithm such as MD5 or SHA-256, a device list update timestamp, or a device list update serial number, etc., which are not limited herein.
[0104] In some embodiments, the first device identifier can also be used by the gateway device to determine whether the gateway device is a host device based on the request message. In this application, the host device does not obtain specific data such as the working parameters of the slave device, but only an identifier, such as a Boolean value, used to characterize whether the slave device manages the sub-device. The data transmission volume is small, and the storage space requirement of the host device is low.
[0105] According to the data interaction method of the parallel system provided in the embodiments of this application, multiple optical storage devices in the parallel system are connected through a communication bus. The host device aggregates the device identifiers sent by each slave device. The data transmission volume is small, and there is no need to install additional data acquisition devices or central processor hardware, which reduces system cost and maintenance complexity.
[0106] Step 120: Receive the request message sent by the target terminal;
[0107] In this step, the target terminal may include a local application running on the terminal or a cloud server.
[0108] The target terminal should communicate with the optical storage device through a gateway. The gateway can be either a host device or a slave device; these two types of devices will be explained below.
[0109] In some embodiments, receiving a request message sent by the target terminal includes:
[0110] When the host device is a gateway device, it receives request messages sent by the target terminal;
[0111] When the host device is not a gateway device, it receives request messages forwarded by the gateway device. The request message is a request message sent by the target terminal to the gateway device.
[0112] In this embodiment, the request message is a request message from the target terminal to the target device in the optical storage system to request the establishment of a connection.
[0113] When the host device is a gateway device, refer to Figure 8 , Figure 9 , Figure 12 and Figure 13 The host device communicates directly with the terminal or the cloud, and forwards the device information request messages sent by the terminal to the optical storage device to other optical storage devices in the optical storage system via the bus.
[0114] When the host device is not a gateway device, refer to Figure 10 , Figure 11 After receiving a request message from a terminal or cloud, the gateway device forwards the request message to the host device. Upon receiving the message, the host device forwards the device information request message sent by the terminal to the optical storage device to other optical storage devices in the optical storage system via the bus.
[0115] In some embodiments, prior to step 120, the method may further include:
[0116] The target terminal establishes a TCP connection with the gateway device via wireless or wired communication and sends a host device information request message to the gateway device.
[0117] refer to Figure 2 and Figure 8 The target terminal establishes a TCP connection with the gateway device (the host device in this embodiment) via wireless communication and sends a host device information request message to the gateway device.
[0118] refer to Figure 3 and Figure 10 The terminal establishes a TCP connection with the gateway device (slave device 1 in this embodiment) via wired communication, sends a host device information request message to the gateway device, and after the gateway device forwards the communication bus, the host device receives the request message and matches and processes it according to the target address information in it.
[0119] refer to Figure 4 and Figure 12The cloud establishes a TCP connection with the gateway device (the host device in this embodiment) via wireless communication and sends a host device information request message to the gateway device. The gateway device determines that the message is its own based on the target address in the device information request message and does not need to forward it.
[0120] Based on the above steps, the host device collects the device information of each slave device. The amount of data transmitted is relatively small, the storage performance requirements are low, and there is no need to rely on additional dedicated data aggregation hardware to collect the information of each device. This reduces the time spent on transmitting information between devices, lowers the system installation cost, and reduces the complexity of installation and maintenance.
[0121] Step 130: In response to the request message, send second information to the target terminal. The second information includes the first information of each slave device and the second device identifier of the master device.
[0122] In this step, the request message may include: the unique address identifier of the target optical storage device, the target address, and other information;
[0123] The second information is the response message sent by the host device in response to the request message, including the first information of each slave device and the second device identifier of the host device; wherein, the first information may include: the device unique identifier of the slave device and a Boolean value indicating whether each slave device manages any sub-devices, etc.; the second device identifier may include the host device's own device unique identifier, the device unique identifiers of each sub-device managed by the host device, and the device list unique identifier of the host device, etc.
[0124] refer to Figure 8 When the host device is a gateway device, the host device responds after receiving the terminal message. The response message carries its own unique device identifier, as well as the unique device identifiers of each slave device obtained from the slave devices, and a Boolean value indicating whether each slave device has managed a sub-device.
[0125] refer to Figure 10 When the host device is not a gateway device, the host device responds after receiving the terminal message. The response message carries its own unique identifier and the unique identifiers of each sub-device it manages, as well as the unique identifiers of each sub-device obtained from the slave device and the Boolean identifiers of each sub-device that the slave device does not manage.
[0126] refer to Figure 12When the host device is a gateway device, the host device responds after receiving a message from the cloud. The response message carries its own unique identifier and the unique identifiers of each sub-device it manages, as well as the unique identifiers of each sub-device obtained from the slave devices and the Boolean identifiers of the sub-devices that the slave devices do not manage.
[0127] In some embodiments, the second information further includes an address identifier; after receiving the first information sent by each slave device, the method further includes:
[0128] Address identifiers are assigned to the master device and each slave device. These address identifiers are used by the gateway device to determine whether the gateway device is a master device based on the request message.
[0129] In this embodiment, reference Figure 8 and Figure 12 The host device is identified as the gateway device based on its address identifier, and the host device, acting as the gateway device, directly sends the host device's response message to the terminal.
[0130] In some embodiments, reference Figure 10 Based on the address identifier, the slave device is identified as the gateway device. The slave device, acting as the gateway device, forwards the request message sent by the terminal to the host device. In response to the request message, the host device forwards the response message to the gateway device. The gateway device then sends the response message to the terminal.
[0131] In other embodiments, the host device is identified as the gateway device based on the first device identifier, and the host device, as the gateway device, directly sends the host device's response message to the terminal.
[0132] In other embodiments, the slave device is determined as the gateway device based on the first device identifier, and the slave device, as the gateway device, forwards the request message sent by the terminal to the host device; the host device responds to the request message and forwards the response message to the gateway device; the gateway device sends the response message to the terminal.
[0133] In some embodiments, the first information further includes a slave device list identifier, and the method may further include:
[0134] If a change in the information of a slave device is detected, the slave device list identifier is updated based on the changed slave device.
[0135] The updated slave device list identifier is sent to the target terminal. The updated slave device list identifier is used to trigger the target terminal to send a new request message.
[0136] In this embodiment, the slave device list identifier may include: device list serial number, device list update timestamp, and device list hash value, etc., to indicate whether the information of the slave device has changed.
[0137] Information about slave devices may include: the number of devices and device version information; changes in slave device information may include: a slave device malfunctioning, a new slave device being added, a slave device being deleted, etc.
[0138] When the list of sub-devices managed by the slave device changes, it updates its own unique device list identifier and sends a device list change message to the master device via the bus. The device list change message includes its own unique device list identifier. After receiving the device list change message from the slave device, the master device updates its own unique device list identifier and sends a device list change message to the terminal or cloud.
[0139] In some embodiments, reference Figure 13 When the list of sub-devices managed by the slave device changes due to deletion, the slave device updates its own device list hash value and sends a device list change message to the host device, which carries the device list hash value.
[0140] In some embodiments, the first information may further include a host device list identifier, and the method may further include:
[0141] If a change in the host device information is detected, the host device list identifier is updated based on the changed host device.
[0142] The updated host device list identifier is sent to the target terminal. The updated host device list identifier is used to trigger the target terminal to send a new request message.
[0143] In this embodiment, the host device list identifier may include: device list serial number, device list update timestamp, and device list hash value, etc., to indicate whether the information of the host device has changed.
[0144] Information about the host device can include: the number of devices and device version information, etc.; changes in the host device information can include: a sub-device failure, the addition of a sub-device, the deletion of a sub-device, etc.
[0145] In some embodiments, reference Figure 9 When the list of sub-devices managed by the host device changes, the host device increments its own device list serial number according to the updated device list and sends a device list change message to the terminal, which carries the device list serial number.
[0146] In some embodiments, reference Figure 11 When a slave device acts as a gateway device, and the list of sub-devices managed by the master device is deleted or changed, the master device updates its own device list update timestamp and sends a device list change message to the gateway device, which carries the device list update timestamp.
[0147] According to the data interaction method of the parallel system provided in the embodiments of this application, when the sub-device list changes, the unique identifier of the device list is updated in a timely manner and reported to the terminal or cloud. The amount of data transmitted is small and the storage performance requirements are low, thereby realizing the real-time updating and accurate synchronization of the device list, ensuring that the device information that the terminal or cloud can obtain is complete and accurate, and improving the reliability and management efficiency of data interaction.
[0148] During the research and development process, the inventors discovered that many related technologies employ the local installation and deployment of dedicated data acquisition devices or central processors, which connect to various optical storage devices through physical or network interfaces. These devices poll or receive the device information reported by the devices, aggregate and process it, and then upload it to the terminal or cloud server through a unified channel. In this case, communication requests between devices and terminals are more frequent, the amount of data exchange increases accordingly, the network channel occupancy time is extended, and the overall communication process may be under high load.
[0149] In this application, the host device aggregates and processes the device information sent by each slave device to respond to terminal requests. The amount of data transmitted is small, and the storage performance requirements are low. Therefore, there is no need to rely on additional dedicated data aggregation hardware, which is low in hardware cost and easy to implement. The host device responds to terminal requests, which reduces the number of communications and network load, and shortens the overall response time.
[0150] According to the data interaction method of the parallel system provided in the embodiments of this application, during the process of the host device uniformly collecting and summarizing the relevant information of the slave devices and responding centrally, the amount of data transmitted is small, the storage performance requirements are low, and there is no need to rely on additional data aggregation hardware, which reduces the deployment cost of the system. The terminal does not need to establish communication connections with multiple devices in the system separately, which reduces the number of round-trip interactions between the terminal and each device, reduces the number of communications and network load in data interaction, shortens the overall response time, and thus improves the efficiency of data interaction.
[0151] This application also provides a data interaction method for a parallel system, applied to a target terminal.
[0152] like Figure 5 As shown, the parallel system includes multiple optical storage devices, and the data interaction method of the parallel system includes steps 510, 520, 530 and 540.
[0153] Step 510: Send a request message to the target gateway;
[0154] In this step, the request message is used to instruct the host device to send a second message.
[0155] In some embodiments, the second information may include: first information of each slave device and a second device identifier of the master device; the master device is any one of a plurality of optical storage devices.
[0156] In some embodiments, the first information may include: a first device identifier and a Boolean value identifier for each slave device, wherein the slave device is a device other than the master device among a plurality of optical storage devices;
[0157] In some embodiments, the target gateway may be determined as a host device or a slave device according to a specific policy or randomly, and this application does not limit it.
[0158] In some embodiments, prior to step 510, reference is made to Figure 2 , Figure 3 and Figure 4 Terminals, such as near-end apps running on terminals or cloud servers, can establish TCP connections with gateway devices within the parallel system via wireless or wired communication.
[0159] Step 520: Based on the Boolean value identifier in the received second information, determine the target slave device from among the slave devices;
[0160] In this step, the target slave device is an optical storage device that manages slave devices.
[0161] The Boolean value in the second information is used to determine whether the slave device manages the sub-device;
[0162] In some embodiments, after receiving a device information response message from a host device, the terminal or cloud determines whether it needs to send a device information request message to the slave device based on at least one of the following information in the response message: slave device information, Boolean value identifier of the sub-device managed by the slave device; wherein...
[0163] If a slave device manages at least one or more sub-devices, the Boolean value indicates that the slave device has managed sub-devices. The terminal determines whether to send a device information request message to the target slave device based on this Boolean value.
[0164] If the slave device has no managed sub-devices, the Boolean value indicates that the slave device does not manage sub-devices. Based on this Boolean value, the terminal determines that it does not need to send a device information request message to the slave device.
[0165] In some embodiments, step 520 may further include:
[0166] If the slave device is identified as having sub-devices based on the Boolean value identifier, the slave device will be identified as the target slave device.
[0167] In this embodiment, the target terminal determines whether the slave device corresponding to each piece of first information manages a sub-device based on the Boolean value identifiers in the received first information. For example, if the slave device manages a sub-device, the Boolean value identifier is a; if the slave device does not have a sub-device, the Boolean value identifier is b.
[0168] The number of target slave devices can be one or more, or it can be zero.
[0169] Step 530: Based on the first device identifier corresponding to the target slave device, send a device information request to the target slave device through the gateway device;
[0170] In this step, the first device identifier, such as MAC address, SN number, etc., is used to characterize the unique identity of a device in the parallel system, ensuring that the device can be accurately directed to send message information during communication, management and other processes.
[0171] The following explains how the terminal or cloud determines whether it needs to send a device information request message to the slave device.
[0172] In this embodiment, reference Figure 2 and Figure 8 Neither the master device nor the slave device manages any devices themselves. After receiving a device information response message from the master device, the terminal obtains the unique identifiers of the master device and the slave device from the response message. Based on the Boolean value identifier of the sub-device not managed by the slave device in the response message, it determines that it is not necessary to send a device information request message to the slave device. In this embodiment, the terminal can complete the enumeration of device information within the parallel system through only one message interaction with the master device.
[0173] In this embodiment, reference Figure 3 and Figure 10 In this system, the master device manages one or more sub-devices, while the slave devices do not manage any sub-devices. After receiving a device information response message from the master device, the terminal obtains the unique identifiers of both the master and slave devices from the response message. Furthermore, based on the Boolean values of the sub-devices not managed by the slave device in the response message, the terminal determines that it does not need to send a device information request message to the slave device. In this embodiment, the terminal can complete the enumeration of device information within the parallel system through only one message interaction with the master device.
[0174] In this embodiment, reference Figure 4 and Figure 12Each host device manages one or more sub-devices, and each slave device manages one or more sub-devices. Upon receiving a device information response message from the host device, the cloud obtains the unique identifiers of both the host and slave devices from the response message. Based on the Boolean value indicating the managed sub-devices in the response message, the cloud determines whether to send a device information request message to the slave device. In this embodiment, the cloud completes the enumeration of device information within the parallel system through one message interaction with the host device and one interaction with each slave device containing sub-devices.
[0175] According to the data interaction method of the parallel system provided in the embodiments of this application, the terminal determines whether to send a directed request message to the slave device based on the slave device information carried in the host device response message. In this way, the terminal does not need to establish communication connections with multiple devices in the system separately, which improves the data interaction efficiency between the terminal and each device, thereby realizing fast and complete device information enumeration.
[0176] Step 540: Receive device information sent by each target slave device through the gateway device.
[0177] In this step, the equipment information may include the operating parameters of each optical storage device.
[0178] In some embodiments, the method may further include:
[0179] Receive the updated slave device list identifier; the updated slave device list identifier is generated by the master device based on the changed slave device information when it detects changes in the slave device information;
[0180] If a change in slave device information is detected based on the updated slave device list identifier, a new request message is sent to the target gateway.
[0181] In this embodiment, when the sub-device information managed by the host device or slave device changes, a device information change message is sent to the target terminal. The target terminal receives the newly received device list message and, based on historically received device list information, determines whether at least one of the following device list information has changed: device list serial number, device list update timestamp, and device list hash value.
[0182] If a change is confirmed, the target terminal sends a host device information request message to obtain the changed device information; if no change has occurred, no request message needs to be sent.
[0183] The following section explains the situation where the target terminal sends a host device information request message when the device list information changes.
[0184] refer to Figure 9The host device sends a device list change message to the terminal through the gateway device; the device list change message carries a device list serial number; after receiving the host's device list change message, the terminal determines that the device list serial number sent by the host device has changed, and repeats the message. Figure 8 The process shown completes the enumeration of optical storage device information within the parallel system in the event of changes in the host sub-devices.
[0185] refer to Figure 11 The host device sends a device list change message to the terminal through the gateway device; the device list change message carries a device list update timestamp; after receiving the host's device list change message, the terminal determines that the device list update timestamp sent by the host device has changed, and repeats the message. Figure 10 The process shown completes the enumeration of optical storage device information within the parallel system in the event of changes in the host sub-devices.
[0186] refer to Figure 13 The host device sends a device list change message to the cloud through the gateway device; this message carries a device list hash value. Upon receiving the device list change message from the host device, the terminal determines that the device list hash value sent by the host device has changed and then repeats the message. Figure 12 The process shown completes the enumeration of information on optical storage devices within the parallel system in the event of changes in slave devices.
[0187] According to the data interaction method of the parallel system provided in the embodiments of this application, when the sub-device list of the optical storage device changes, the unique identifier of the device list is updated in a timely manner and reported to the terminal or cloud, thereby realizing the real-time updating and accurate synchronization of the device list, ensuring that the device information that the terminal or cloud can obtain is complete and accurate, and improving the reliability and management efficiency of data interaction.
[0188] This application also provides a data interaction method for a parallel system, applied to a gateway device.
[0189] like Figure 6 As shown, the parallel system includes multiple optical storage devices, and the data interaction method of the parallel system includes steps 610, 620, 630, 640 and 650.
[0190] Step 610: Obtain the second information;
[0191] In this step, the second information includes the first information of each slave device and the second device identifier of the master device; the master device is any one of the multiple optical storage devices; the first information includes the first device identifier and Boolean value identifier of each slave device, and the slave device is any device other than the master device among the multiple optical storage devices.
[0192] In some embodiments, the first information may include: a unique device identifier for the slave device and a Boolean value indicating whether each slave device has a managed sub-device, etc.
[0193] The second device identifier may include the host device's own unique device identifier, the unique device identifiers of each sub-device managed by the host device, and the unique device list identifier of the host device, etc.
[0194] In some embodiments, step 610 may include:
[0195] Receive request messages sent by the target terminal;
[0196] If the device identifier carried in the request message does not match its own device identifier, the request message is forwarded to the host device.
[0197] Receive the second information sent by the host device in response to the request message;
[0198] If the device identifier carried in the request message matches its own device identifier, the second information is retrieved from the local database.
[0199] In this embodiment, the second information may include the host's own unique device identifier, the unique device identifiers of each sub-device managed by the host, the unique device list identifier of the host, the unique device identifiers of each slave device, and a Boolean value indicating whether each slave device manages a sub-device.
[0200] It should be noted that the gateway device in a parallel system can be either a master device or a slave device. During actual communication, the target terminal sends a request message to the gateway device. Upon receiving the request message, the gateway device first determines whether it is a master device based on the message. If the device identifier carried in the request message does not match its own device identifier, it determines that it is not a master device; otherwise, if the device identifier in the request message matches its own device identifier, it determines that it is a master device.
[0201] In some embodiments, reference Figure 8 and Figure 12 The host device acts as a gateway device. After receiving a request message from the target terminal, the gateway device can directly send the second information stored locally to the target terminal.
[0202] In some embodiments, reference Figure 10The slave device acts as a gateway device. After receiving the request message sent by the target terminal, the gateway device needs to forward the request message to the host device. After receiving the request message, the host device forwards the second information stored locally to the gateway device, and the gateway device sends the second information to the target terminal.
[0203] Step 620: Send the second information to the target terminal;
[0204] In this step, the gateway device sends the second information to the target terminal via wireless or wired communication.
[0205] In some embodiments, reference Figure 8 and Figure 12 The host device acts as a gateway device, sending the second piece of information to the target terminal.
[0206] In some embodiments, reference Figure 10 The slave device acts as a gateway device, sending the second information to the target terminal.
[0207] Step 630: In response to the device information request, forward the device information request to the target slave device;
[0208] In this step, the target slave device is the slave device that the target terminal identifies based on a Boolean value and that needs to send a device request; the device information request sent by the target terminal is received.
[0209] Step 640: Receive device information sent by the target slave device;
[0210] In this step, the device information sent by the target slave device may include: the target slave device's unique device identifier, the Boolean identifier of the managed sub-devices, and the unique identifier of the device list, etc.
[0211] Step 650: Forward device information to the target terminal.
[0212] In this step, the device information may include the device information of the host device and the slave devices, namely the unique identifier of the host device, the unique identifier of each sub-device managed by the host device, the unique identifier of the host device's device list, and the unique identifier of each slave device, the Boolean value identifier of each sub-device managed by the slave device, and the unique identifier of the device list, etc.
[0213] In some embodiments, reference Figure 8 Neither the host device nor the slave device manages any devices themselves. The host device, acting as a gateway device, directly responds to device information requests and sends response messages to the target terminal, without forwarding device information requests to the target slave device. The host device, acting as a gateway device, sends response messages to the target terminal.
[0214] In some embodiments, reference Figure 10 The host device manages one or more sub-devices, while the slave device does not manage any sub-devices. The slave device acts as a gateway device, receiving request messages from the target terminal and forwarding them to the host device. Since only the host device manages the sub-devices, the host device directly responds to the device information request and does not forward the device information request to the target slave device. The slave device acts as a gateway device, receiving the response message from the host device and sending it to the target terminal.
[0215] In some embodiments, reference Figure 12 The host device manages one or more sub-devices, and the slave device manages one or more sub-devices. The host device, acting as a gateway device, directly responds to the device information request. Since the slave device manages one or more sub-devices, the host device needs to forward the slave device information request message to the slave device. The target slave device responds to the slave device information request message and forwards the slave device response message to the host device. The host device, acting as a gateway device, receives the slave device response message and sends it to the target terminal.
[0216] According to the data interaction method of the parallel system provided in the embodiments of this application, the host device or the slave device can be flexibly selected as the gateway node for information forwarding to realize data routing and forwarding within the system without relying on additional independent gateway hardware, thereby reducing the deployment cost and operation and maintenance complexity of the system.
[0217] This application also provides a data interaction method for a parallel system.
[0218] The data interaction method of this parallel system is applied to slave devices.
[0219] like Figure 7 As shown, the parallel system includes multiple optical storage devices, and the slave devices are the devices other than the master device among the multiple optical storage devices; the data interaction method of the parallel system includes: step 710, step 720, and step 730.
[0220] Step 710: Send the first message to the host device;
[0221] In this step, the first information includes the slave device's first device identifier and a Boolean value identifier; the Boolean value identifier is used to characterize whether the slave device manages sub-devices.
[0222] In some embodiments, the slave device sends first information to the master device through a communication bus, which may include an Ethernet cable, a 485 cable, a CAN cable, etc.
[0223] Step 720: When the slave device manages sub-devices, receive the device information request forwarded by the gateway device;
[0224] In this step, the device information request is sent by the target terminal based on the second information, which includes the first information of the slave device and the second device identifier of the master device. The second information is sent by the master device to the target terminal in response to the request message sent by the target terminal.
[0225] Step 730: Send device information to the target terminal through the gateway device.
[0226] In this step, the device information may include: the unique device identifier of each slave device, the Boolean identifier of the managed sub-devices, and the unique identifier of the device list, etc.
[0227] During the research and development process, the inventors also discovered that in related technologies, parallel systems typically use a method where multiple devices actively respond to terminal requests for data interaction. The terminal needs to establish and maintain communication links with multiple devices in the system, which can easily lead to competition and conflict for communication channel resources. In the process of completing data interaction and information enumeration, problems such as delay and packet loss may occur.
[0228] In this application, the terminal determines whether the slave device manages the sub-device based on the device information carried in the response message sent by the host device, and then sends a request message to the target slave device. During this process, the slave device that does not manage the sub-device does not need to respond to the terminal and establish a connection, which reduces the occupancy rate of the communication link and the consumption of system resources, and improves the efficiency of data interaction.
[0229] According to the data interaction method of the parallel system provided in the embodiments of this application, the slave device passively waits for the terminal to query, which reduces the communication competition response and other problems that may be caused by multiple devices actively responding, and reduces the number of invalid communication interactions between the terminal and the device, thereby achieving fast and complete device information enumeration.
[0230] The data interaction method for a parallel system provided in this application can be executed by a data interaction device of the parallel system. This application uses the execution of the data interaction method by the data interaction device of the parallel system as an example to illustrate the data interaction device for the parallel system provided in this application.
[0231] This application also provides a data interaction device for a parallel system.
[0232] like Figure 14 As shown, the data interaction device of the parallel system is applied to the host device. The parallel system includes multiple optical storage devices, and the host device is any one of the multiple optical storage devices. The device includes: a first processing module 1410, a second processing module 1420 and a third processing module 1430.
[0233] The first processing module 1410 is used to receive first information sent by each slave device; the first information includes a first device identifier and a Boolean value identifier of each slave device, and the slave devices are devices other than the master device among multiple optical storage devices;
[0234] The second processing module 1420 is used to receive request messages sent by the target terminal;
[0235] The third processing module 1430 is used to respond to the request message and send second information to the target terminal. The second information includes the first information of each slave device and the second device identifier of the master device. The second information is used for the target terminal to obtain the device information corresponding to the target slave device from the target slave device through the gateway device based on the first device identifier. The target slave device is determined based on a Boolean value identifier. The gateway device is any one of the multiple optical storage devices.
[0236] According to the data interaction device of the parallel system provided in the embodiments of this application, the amount of data transmitted is small and the storage performance requirements are low during the process of the host device uniformly collecting and summarizing the relevant information of the slave devices and making a centralized response. It does not need to rely on additional data aggregation hardware, thus reducing the deployment cost of the system. The terminal does not need to establish communication connections with multiple devices in the system separately, which reduces the number of round-trip interactions between the terminal and each device, reduces the number of communication times and network load in data interaction, shortens the overall response time, and thus improves the efficiency of data interaction.
[0237] In some embodiments, the second processing module 1420 may also be used for:
[0238] When the host device is a gateway device, it receives request messages sent by the target terminal;
[0239] When the host device is not a gateway device, it receives request messages forwarded by the gateway device. The request message is a request message sent by the target terminal to the gateway device.
[0240] In some embodiments, the second information further includes an address identifier; after receiving the first information sent by each slave device, the apparatus may further include: a seventeenth processing module, configured to:
[0241] After receiving the first information sent by each slave device, an address identifier is assigned to the master device and each slave device respectively. The address identifier is used by the gateway device to determine whether the gateway device is a master device based on the request message.
[0242] In some embodiments, the first information further includes a slave device list identifier, and the device may further include: an eighteenth processing module, configured to:
[0243] If a change in the information of a slave device is detected, the slave device list identifier is updated based on the changed slave device.
[0244] The updated slave device list identifier is sent to the target terminal. The updated slave device list identifier is used to trigger the target terminal to send a new request message.
[0245] This application also provides a data interaction device for a parallel system.
[0246] like Figure 15 As shown, the data interaction device of the parallel system is applied to the target terminal. The parallel system includes multiple optical storage devices. The device includes: a fourth processing module 1510, a fifth processing module 1520, a sixth processing module 1530, and a seventh processing module 1540.
[0247] The fourth processing module 1510 is used to send a request message to the target gateway. The request message is used to instruct the host device to send second information. The second information includes the first information of each slave device and the second device identifier of the host device. The host device is any one of the multiple optical storage devices. The first information includes the first device identifier and Boolean value identifier of each slave device. The slave devices are devices other than the host device among the multiple optical storage devices.
[0248] The fifth processing module 1520 is used to determine the target slave device from among the slave devices based on the Boolean value identifier in the received second information;
[0249] The sixth processing module 1530 is used to send a device information request to the target slave device through the gateway device based on the first device identifier corresponding to the target slave device;
[0250] The seventh processing module 1540 is used to receive device information sent by each target slave device through the gateway device.
[0251] In some embodiments, the fifth processing module 1520 can also be used for:
[0252] If the slave device is identified as having sub-devices based on the Boolean value identifier, the slave device will be identified as the target slave device.
[0253] In some embodiments, the apparatus may further include: a nineteenth processing module, configured to:
[0254] Receive the updated slave device list identifier; the updated slave device list identifier is generated by the master device based on the changed slave device information when it detects changes in the slave device information;
[0255] If a change in slave device information is detected based on the updated slave device list identifier, a new request message is sent to the target gateway.
[0256] According to the data interaction device of the parallel system provided in the embodiments of this application, the terminal determines whether to send a directed request message to the slave device based on the slave device information carried in the host device response message. In this way, the terminal does not need to establish communication connections with multiple devices in the system separately, which improves the data interaction efficiency between the terminal and each device, thereby realizing fast and complete device information enumeration.
[0257] This application also provides a data interaction device for a parallel system.
[0258] like Figure 16 As shown, the data interaction device of the parallel system is applied to the gateway device. The parallel system includes multiple optical storage devices, and the gateway device is any one of the multiple optical storage devices. The device includes: an eighth processing module 1610, a ninth processing module 1620, a tenth processing module 1630, an eleventh processing module 1640, a twelfth processing module 1650, and a thirteenth processing module 1640.
[0259] The eighth processing module 1610 is used to acquire second information, which includes first information of each slave device and second device identifier of the master device; the master device is any one of the multiple optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, and the slave device is a device other than the master device among the multiple optical storage devices.
[0260] The ninth processing module 1620 is used to send the second information to the target terminal;
[0261] The tenth processing module 1630 is used to receive device information requests sent by the target terminal;
[0262] The eleventh processing module 1640 is used to forward the device information request to the target slave device in response to the device information request; the target slave device is determined by the target terminal based on a Boolean value identifier.
[0263] The twelfth processing module 1650 is used to receive device information sent by the target slave device;
[0264] The thirteenth processing module 1640 is used to forward device information to the target terminal.
[0265] In some embodiments, the eighth processing module 1610 can also be used for:
[0266] Receive request messages sent by the target terminal;
[0267] If the device identifier carried in the request message does not match its own device identifier, the request message is forwarded to the host device.
[0268] Receive the second information sent by the host device in response to the request message;
[0269] If the device identifier carried in the request message matches its own device identifier, the second information is retrieved from the local database.
[0270] According to the data interaction device of the parallel system provided in the embodiments of this application, the host device or the slave device can be flexibly selected as the gateway node for information forwarding to realize data routing and forwarding within the system without relying on additional independent gateway hardware, thereby reducing the deployment cost and operation and maintenance complexity of the system.
[0271] This application also provides a data interaction device for a parallel system.
[0272] like Figure 17 As shown, the data interaction device of the parallel system is applied to the slave devices. The parallel system includes multiple optical storage devices, and the slave devices are the devices other than the master devices among the multiple optical storage devices. The device includes: a fourteenth processing module 1710, a fifteenth processing module 1720, and a sixteenth processing module 1730.
[0273] The fourteenth processing module 1710 is used to send first information to the host device. The first information includes a first device identifier and a Boolean value identifier of the slave device. The Boolean value identifier is used to indicate whether the slave device manages a sub-device.
[0274] The fifteenth processing module 1720 is used to receive a device information request forwarded by the gateway device when the slave device manages a sub-device; the device information request is sent by the target terminal based on second information, the second information includes the first information of the slave device and the second device identifier of the host device, the second information is sent by the host device to the target terminal in response to the request message sent by the target terminal;
[0275] The sixteenth processing module 1730 is used to send device information to the target terminal through the gateway device.
[0276] According to the data interaction device of the parallel system provided in the embodiments of this application, the slave device passively waits for the terminal to query, which reduces the communication competition response and other problems that may be caused by multiple devices actively responding, and reduces the number of invalid communication interactions between the terminal and the device, thereby realizing fast and complete device information enumeration.
[0277] The data interaction device of the parallel system in this application embodiment can be the parallel system itself, an electronic device, or a component of an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a communication device, a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0278] The data interaction device of the parallel system in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.
[0279] The data interaction device for the parallel system provided in this application embodiment can achieve... Figures 1 to 13 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0280] This application also provides a parallel system.
[0281] The parallel system includes multiple optical storage devices. The master device in each optical storage device is electrically connected to each slave device, and the gateway device is electrically connected to the target terminal. The gateway device can be any one of the multiple optical storage devices.
[0282] The parallel system can perform data interaction based on the data interaction method of the parallel system in any of the above embodiments.
[0283] In some embodiments, the electrical connection between the gateway device and the target terminal may include wired communication and wireless connection.
[0284] In this embodiment, reference Figure 2The target terminal is the optical storage system terminal, and the gateway device is the host device in the parallel system. The optical storage system terminal and the host device are connected via WIFI in the wireless connection.
[0285] In this embodiment, reference Figure 3 The target terminal is the optical storage system terminal, and the gateway device is slave device 1 in the parallel system. The optical storage system terminal and slave device 1 are connected via wired communication.
[0286] The parallel system provided in this application is applied to a multi-device parallel scenario. In a photovoltaic-storage power generation scenario, there are multiple photovoltaic and storage devices. The target terminal needs to obtain information such as the operating parameters of each photovoltaic and storage device in real time. Among these multiple photovoltaic and storage devices, there is one master device and multiple slave devices. Each photovoltaic and storage device may or may not manage sub-devices. Among the multiple photovoltaic and storage devices, there is also a gateway used to forward information between the target terminal and each photovoltaic and storage device. This gateway can be either a master device or a slave device. The master device is electrically connected to each slave device, and the gateway device is electrically connected to the target terminal.
[0287] According to the parallel system provided in the embodiments of this application, the host device responds to terminal requests without relying on additional dedicated data aggregation hardware, thereby reducing the number of communications and network load, and shortening the overall response time; the slave device passively waits for the terminal to perform a targeted query, avoiding communication conflicts caused by multiple devices actively responding; the terminal initiates a targeted query to the slave device as needed based on the slave device information in the host device response, thereby achieving fast and complete device information enumeration.
[0288] In some embodiments, such as Figure 18 As shown, this application embodiment also provides an electronic device 1800, including a processor 1801, a memory 1802, and a computer program stored in the memory 1802 and executable on the processor 1801. When the program is executed by the processor 1801, it implements the various processes of the data interaction method embodiment of the above-mentioned parallel system and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0289] This application also provides a non-transitory computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the data interaction method embodiment of the above-described parallel system and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0290] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0291] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the data interaction method of the above-described parallel system.
[0292] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0293] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the data interaction method embodiment of the above parallel system, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0294] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0295] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0296] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0297] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0298] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0299] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A data interaction method for a parallel system, characterized in that, The method is applied to a host device, wherein the parallel system includes multiple optical storage devices, and the host device is any one of the multiple optical storage devices; the method includes: Receive first information sent by each slave device, the first information including a first device identifier and a Boolean value identifier of each slave device, wherein the slave device is a device other than the master device among the plurality of optical storage devices; Receive request messages sent by the target terminal; In response to the request message, second information is sent to the target terminal, the second information including the first information of each of the slave devices and the second device identifier of the master device; The second information is used for the target terminal to obtain the device information corresponding to the target slave device from the target slave device through the gateway device based on the first device identifier, and the target slave device is determined based on the Boolean value identifier; the gateway device is any one of the plurality of optical storage devices.
2. The data interaction method for a parallel system according to claim 1, characterized in that, The request message sent by the target terminal includes: When the host device is the gateway device, the request message sent by the target terminal is received; When the host device is not a gateway device, the request message forwarded by the gateway device is received, and the request message is a request message sent by the target terminal to the gateway device.
3. The data interaction method for a parallel system according to claim 1, characterized in that, The second information also includes an address identifier; after receiving the first information sent by each slave device, the method further includes: The address identifier is assigned to the host device and each of the slave devices respectively. The address identifier is used by the gateway device to determine whether the gateway device is the host device based on the request message.
4. The data interaction method for a parallel system according to any one of claims 1 to 3, characterized in that, The first information also includes a slave device list identifier, and the method further includes: If a change in the information of the slave device is detected, the slave device list identifier is updated based on the changed slave device; An updated slave device list identifier is sent to the target terminal, and the updated slave device list identifier is used to trigger the target terminal to send a new request message.
5. A data interaction method for a parallel system, characterized in that, Applied to a target terminal, the parallel system includes multiple optical storage devices; the method includes: A request message is sent to the target gateway; the request message is used to instruct the host device to send second information, the second information including first information of each slave device and second device identifier of the host device; the host device is any one of the plurality of optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, the slave device being a device other than the host device among the plurality of optical storage devices; Based on the Boolean value identifier in the received second information, the target slave device is determined from each of the slave devices; Based on the first device identifier corresponding to the target slave device, a device information request is sent to the target slave device through the gateway device; The gateway device receives device information sent by each of the target slave devices.
6. The data interaction method for a parallel system according to claim 5, characterized in that, The step of determining the target slave device from among the slave devices based on the Boolean value identifier in the received second information includes: If it is determined based on the Boolean value identifier that the slave device manages a sub-device, the slave device is identified as the target slave device.
7. The data interaction method for a parallel system according to claim 5 or 6, characterized in that, Also includes: Receive the updated slave device list identifier; The updated slave device list identifier is generated by the host device based on the changed slave device information when the host device detects a change in the slave device information; If a change in slave device information is detected based on the updated slave device list identifier, a new request message is sent to the target gateway.
8. A data interaction method for a parallel system, characterized in that, The method is applied to a gateway device, wherein the parallel system includes multiple optical storage devices, and the gateway device is any one of the multiple optical storage devices; the method includes: Obtain second information, which includes first information of each slave device and second device identifier of the master device; the master device is any one of the plurality of optical storage devices; the first information includes first device identifier and Boolean value identifier of each slave device, and the slave device is a device other than the master device among the plurality of optical storage devices; Send the second message to the target terminal; Receive the device information request sent by the target terminal; In response to the device information request, the device information request is forwarded to the target slave device; the target slave device is determined by the target terminal based on the Boolean value identifier. Receive device information sent by the target slave device; The device information is forwarded to the target terminal.
9. The data interaction method for a parallel system according to claim 8, characterized in that, The acquisition of the second information includes: Receive the request message sent by the target terminal; If it is determined that the device identifier carried in the request message does not match its own device identifier, the request message is forwarded to the host device. Receive the second information sent by the host device in response to the request message; If the device identifier carried in the request message matches the device identifier of the device itself, the second information is retrieved from the local database.
10. A data interaction method for a parallel system, characterized in that, The method is applied to slave devices, wherein the parallel system includes multiple optical storage devices, and the slave devices are devices other than the master device among the multiple optical storage devices; the method includes: Send first information to the host device, the first information including a first device identifier and a Boolean value identifier of the slave device; the Boolean value identifier is used to characterize whether the slave device manages sub-devices; When the slave device manages the sub-device, it receives a device information request forwarded by the gateway device; the device information request is sent by the target terminal based on second information, the second information including the first information of the slave device and the second device identifier of the host device, the second information being sent by the host device to the target terminal in response to a request message sent by the target terminal; The gateway device sends device information to the target terminal.
11. A parallel system, characterized in that, include: Multiple optical storage devices, wherein the host device of the multiple optical storage devices is electrically connected to each slave device, and the gateway device is electrically connected to the target terminal, wherein the gateway device is any one of the multiple optical storage devices; The parallel system performs data interaction based on the data interaction method of the parallel system as described in any one of claims 1 to 10.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the data interaction method of the parallel system as described in any one of claims 1 to 10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the data interaction method of the parallel system as described in any one of claims 1 to 10.