A data read-write method and system, and a control method
By utilizing the idle resources of a second electronic device in a home network environment, splitting data and transmitting it through multiple transmission channels, the data read/write speed problem of NAS devices is solved, achieving more efficient data transmission and backup storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-04-14
AI Technical Summary
In a home environment, network-attached storage (NAS) devices are limited by network bandwidth and power consumption, resulting in slower data read and write speeds and impacting user experience.
After the first electronic device and the second electronic device establish a communication connection, the target data is split into two parts. The first part of the data is transmitted through the data transmission channel between the first storage component and the second electronic device, and the second part of the data is transmitted through the communication connection between the first electronic device and the third electronic device. After the data read and write task is completed, the system is restored to its original state.
It improves data transmission efficiency, makes full use of the idle data processing and transmission capabilities of the second electronic device, and ensures the integrity and read/write speed of data backup storage.
Smart Images

Figure CN116257188B_ABST
Abstract
Description
Technical Field
[0001] This application mainly relates to the field of computers, and more specifically to a data reading and writing method and system, and a control method. Background Technology
[0002] With the advent of the big data era, NAS (Network Attached Storage, also known as network storage, is a type of dedicated data storage server) devices have become indispensable processing devices in home environments. They can directly connect to storage components via a network to achieve data storage and management.
[0003] However, due to the limited network bandwidth in a home environment, and the constraints of factors such as power consumption, the access speed of NAS devices is often affected, thereby reducing the data read and write speed of storage components and impacting the user experience. Summary of the Invention
[0004] To address the above problems, this application provides the following technical solution:
[0005] This application proposes a data read / write method, the method comprising:
[0006] After the first electronic device establishes a first communication connection with the second electronic device, in response to receiving a target data read / write task from the third electronic device, the first storage component of the first electronic device is controlled to switch to a first usage mode. In the first usage mode, the first storage component has a data transmission channel only with the second electronic device, so as to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a part of the target data required by the target data read / write task.
[0007] Using a second communication connection between the first electronic device and the third electronic device, a second portion of target data is transmitted between the second storage component of the first electronic device and the third electronic device. This second portion of target data is the remaining portion of the target data after removing the first portion of target data.
[0008] After completing the target data read / write task, the first storage component is controlled to switch back to the second usage mode. In the second usage mode, the first storage component only has a data transmission channel with the first electronic device.
[0009] Optionally, after completing the target data writing task, the method further includes:
[0010] Based on the data configuration information carried by the target data write task, data mirroring is performed between the first storage component and the second storage component so that the target data is written into both the first storage component and the second storage component.
[0011] Optionally, the first electronic device establishes a first communication connection with the second electronic device, including at least one of the following:
[0012] The first electronic device and the second electronic device establish the first communication connection through a first type of interface and a data cable;
[0013] After both the first electronic device and the second electronic device are connected to the target network device, the establishment of the first communication connection is determined.
[0014] After the first and second electronic devices receive networking instructions from the third electronic device, they determine to establish the first communication connection.
[0015] Optionally, the method further includes at least one of the following:
[0016] After receiving the target data write task from the third electronic device, first data configuration information for the target data to be written is generated, and the first data configuration information is fed back to the third electronic device so that the third electronic device divides the target data to be written into a first part of target data and a second part of target data.
[0017] After receiving the target data read task from the third electronic device, a second data configuration information for the target data to be read is generated, and the second data configuration information is directly shared with the second electronic device so that the first part of the target data read by the second electronic device from the first storage component is transferred to the third electronic device.
[0018] After receiving the target data read task from the third electronic device, a second data configuration information for the target data to be read is generated. The second data configuration information is shared with the third electronic device so that the first part of the target data read by the second electronic device from the first storage component is transferred to the third electronic device.
[0019] Optionally, when a target data write task is obtained from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected and the data transmission channel between the first storage component and the second electronic device is connected, so that the second electronic device writes a first part of the target data to the first storage component and writes a second part of the target data to the second storage component through the second communication connection;
[0020] When a target data read task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected and the data transmission channel between the first storage component and the second electronic device is connected. This allows the second electronic device to read a first portion of target data from the first storage component and transmit it to the third electronic device, and the second portion of target data read from the second storage component is transmitted to the third electronic device via the second communication connection.
[0021] This application also proposes a control method applied to a third electronic device, the method comprising:
[0022] After obtaining the operation to establish a first communication connection between the first electronic device and the second electronic device, the obtained target data read / write task is sent to the first electronic device and the second electronic device, so that the first storage component of the first electronic device switches to a first usage mode. In the first usage mode, the first storage component has a data transmission channel only with the second electronic device, so as to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a part of the target data required by the target data read / write task.
[0023] Using a second communication connection with the first electronic device, a second portion of target data is read or written to a second storage component of the first electronic device. The second portion of target data is the remaining portion of the target data after removing the first portion of target data.
[0024] Optionally, the method further includes at least one of the following:
[0025] Receive information from the first electronic device indicating the completion of the target data read / write task;
[0026] The feedback information of the second electronic device completing the corresponding target data read / write task is forwarded to the first electronic device, so that the first electronic device controls the first storage component to switch back to the second usage mode. In the second usage mode, the first storage component only has a data transmission channel with the first electronic device.
[0027] After reading the first part of the target data from the first storage component and the second part of the target data from the second storage component, the first part of the target data and the second part of the target data are reconstructed to obtain the target data.
[0028] Optionally, the method further includes:
[0029] After obtaining the target data write task, first data configuration information for the target data to be written is generated. Based on the first data configuration information, the target data to be written is divided into a first part of target data and a second part of target data.
[0030] After sending the target data read task to the first electronic device, the system receives the second data configuration information generated and fed back by the first electronic device for the target data to be read, shares the second data configuration information with the second electronic device, receives the first part of the target data read by the second electronic device from the first storage component and the second part of the target data read by the first electronic device from the second storage component, and reconstructs the first part of the target data and the second part of the target data according to the second data configuration information to obtain the target data to be read.
[0031] This application also proposes a data read / write system, the system comprising:
[0032] The first electronic device includes a first storage component and a second storage component;
[0033] The second electronic device has a first communication connection with the first electronic device and is capable of establishing a data transmission channel with the first storage component;
[0034] In the case of obtaining a target data read / write task from a third electronic device, the first storage component has a data transmission channel only with the second electronic device to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a portion of the target data required by the target data read / write task.
[0035] The first electronic device is capable of establishing a second communication connection with the third electronic device to transmit a second portion of target data between the second storage component and the third electronic device. The second portion of target data is the remaining portion of the target data after removing the first portion of target data.
[0036] After completing the target data read / write task, the first electronic device can control the first storage component to have a data transmission channel only with the first electronic device.
[0037] Optionally, the system further includes:
[0038] A switching switch is provided between the first electronic device, the first storage component, and the second electronic device. The switching switch can connect or disconnect the data transmission channels between the first electronic device and the first storage component, and between the first storage component and the second electronic device.
[0039] The first communication interface, located on the first electronic device, is used to establish a second communication connection with the third electronic device.
[0040] The second communication interface, located on the second electronic device, is used to establish a first communication connection with the third electronic device.
[0041] This application also proposes a computer-readable storage medium having stored thereon a plurality of computer instructions which are loaded and executed by a processor to implement a data read / write method or control method on the corresponding side.
[0042] Therefore, this application provides a data read / write method and system, and a control method. After a first electronic device establishes a first communication connection with a second electronic device, the first electronic device, in response to receiving a target data read / write task from a third electronic device, controls the first storage component of the first electronic device to switch to a first usage mode, so that the first storage component only has a data transmission channel with the second electronic device, so as to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device; using the second communication connection between the first electronic device and the third electronic device, a second part of the target data is transmitted between the second storage component of the first electronic device and the third electronic device; after completing the target data read / write task, the first storage component is controlled to switch back to a second usage mode, so that the first storage component only has a data transmission channel with the first electronic device. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0044] Figure 1 A schematic diagram illustrating an application scenario for a data read / write method;
[0045] Figure 2 This is a schematic diagram of an optional embodiment of the data read / write system proposed in this application;
[0046] Figure 3 This is a schematic diagram of an optional embodiment two of the data read / write system proposed in this application;
[0047] Figure 4 This is a schematic diagram of the structure of an optional embodiment three of the data read / write system proposed in this application.
[0048] Figure 5This is a schematic diagram of the structure of an optional embodiment four of the data read / write system proposed in this application.
[0049] Figure 6 This is a schematic diagram of the structure of an optional embodiment five of the data read / write system proposed in this application.
[0050] Figure 7 This is a flowchart illustrating an optional embodiment of the data reading and writing method proposed in this application;
[0051] Figure 8 This is a schematic diagram of the signaling flow for an optional embodiment two of the data read / write method proposed in this application;
[0052] Figure 9 This is a schematic diagram of the signaling flow for an optional embodiment three of the data read / write method proposed in this application;
[0053] Figure 10 This is a flowchart illustrating an optional embodiment of the control method proposed in this application;
[0054] Figure 11 This is a flowchart illustrating an optional embodiment two of the control method proposed in this application;
[0055] Figure 12 This is a schematic diagram of an optional embodiment of the data read / write device proposed in this application;
[0056] Figure 13 This is a schematic diagram of an optional embodiment of the control device proposed in this application. Detailed Implementation
[0057] Regarding the content described in the background technology section, such as Figure 1 The scenario diagram shown illustrates that a NAS (Network Attached Storage, also known as network storage, is a dedicated data storage server) device (which can be referred to as the first electronic device for convenience) is typically responsible for the user's network file storage. It has a file transfer processing system that uses a data transmission channel to write received network files and other data to the first storage component and the second storage component (which can be hard drives, such as a disk storage array) for backup storage.
[0058] However, insufficient network bandwidth for NAS devices can impact data read / write speeds. Furthermore, the network environment in which a NAS device resides typically contains other electronic devices with data processing and transmission capabilities (referred to as "secondary electronic devices" for convenience), such as computers with x86 operating systems. These secondary electronic devices are usually independent of the primary electronic device and do not typically participate in network file transfers, thus failing to utilize other data transmission channels within the network environment to improve data read / write speeds.
[0059] To address the aforementioned issues, this application aims to fully utilize the idle data processing capabilities of a second electronic device with data processing and transmission capabilities within the network environment where the first electronic device resides. These capabilities include idle data transmission channels and computing power, thereby improving the read / write speed of the first electronic device and avoiding resource waste. Specifically, this application splits the data to be transmitted (such as target data to be read or written) into two parts, transmitting them to different storage components through different data transmission channels. The first storage component can be controlled to form a data transmission channel only with the second electronic device, thus transmitting a portion of the target data received by the second electronic device to the first storage component. This fully utilizes the idle computing and data transmission capabilities of the second electronic device. During this process, the first electronic device transmits the remaining target data to the second storage component. This split transmission method improves data transmission efficiency.
[0060] Subsequently, the first electronic device can control the first storage component to form a data transmission channel only with the first electronic device, so that the first electronic device can reconstruct another part of the target data based on the part of target data stored by the first storage component and the second storage component respectively, so that both storage components store the complete target data, achieving the effect of target data backup storage.
[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0062] Reference Figure 2 This is a schematic diagram of an optional embodiment of the data read / write system proposed in this application. The system may include: a first electronic device 210 and a second electronic device 220, wherein:
[0063] The first electronic device 210 may have a first storage component 211 and a second storage component 212. Both the first storage component 211 and the second storage component 212 can be used to store data from the third electronic device 230. In practical applications of this application, the first storage component 211 and the second storage component 212 may be storage components with the same structure, such as a hard disk or magnetic disk of the same type or other types of memory. Of course, these two storage components may also be memory of different structures or different types. This application does not limit the device type and composition structure of the first storage component 211 and the second storage component 212, and it can be determined according to the circumstances.
[0064] In an optional embodiment, this application may use a Redundant Arrays of Independent Disks (RAID) approach to deploy multiple storage components in the first electronic device. That is, the first storage component 211 and the second storage component 212 may be disks. In practical applications, data redundancy can be achieved through disk data mirroring, so that the data stored on the first storage component 211 and the second storage component 212 can serve as backup data for each other.
[0065] In this embodiment, the first electronic device 210 may be a NAS device, and the first storage component 211 and the second storage component 212 constitute its storage system. Through a configured file transfer processing system, data from the third electronic device 230 can be transferred to the storage system for storage. It is evident that the first electronic device 210 typically also includes a processing component, such as an ARM processor or a general-purpose processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, to execute the data read / write method proposed in this application and complete data read / write operations on any storage component in the storage system. The implementation process can be referred to the description in the corresponding section of the method embodiment below.
[0066] The second electronic device 220 may include, but is not limited to, terminal devices such as laptops, desktop computers, industrial computers, smart medical or transportation equipment, etc. It may have an independent file transfer processing system, which is different from the file transfer processing system of the first electronic device 210. This application does not limit the type of these two systems, which can be determined according to the configuration of the two electronic devices.
[0067] In practical applications, the first electronic device 210 and the second electronic device 220 can be independent devices or deployed in the same housing. For example, the NAS device (i.e., the first electronic device 210) is integrated into a computer (i.e., the second electronic device 220). In this case, the first electronic device 210 and the second electronic device 220 can be two system parts of the same electronic device, such as a NAS device running an ARM system and a computer running an X86 system. This application does not restrict the deployment relationship of the first electronic device 210 and the second electronic device 220 and can be determined as appropriate.
[0068] In this application embodiment, the second electronic device 220 can establish a first communication connection with the first electronic device 210. The specific communication method is not limited in this application. In some application scenarios, the second electronic device 220 can establish a data transmission channel with the first storage component 211. Thus, in the data write task where the third electronic device 230 needs to write target data into the first storage component 211 and the second storage component 212, in order to improve the data transmission speed, this application proposes to split the target data into a first part of target data and a second part of target data. This can be determined based on the respective data transmission capabilities of the first electronic device 210 and the second electronic device 220. The implementation process can be referred to the description of the corresponding part of the method embodiment below.
[0069] When performing the aforementioned target data writing task, the first electronic device 210 can control the first storage component 211 to have a data transmission channel only with the second electronic device 220. The second electronic device 220 receives the first part of the target data from the third electronic device 230 and then transmits it to the first storage component 211 for storage. It can be seen that in this scenario, the second electronic device 220 can transmit the first part of the target data between the first storage component 211 and the third electronic device 230, making full use of the idle resources of the second electronic device 220 and constructing a data transmission channel different from the original data transmission channel of the first electronic device 210, thereby realizing the transmission of a part of the target data to be written.
[0070] Simultaneously, the first electronic device 210 can establish a second communication connection with the third electronic device 230 to transmit the second part of the target data between the second storage component 212 and the third electronic device 230. This utilizes the data transmission capability of the first electronic device 210 itself to achieve the transmission of the second part of the target data. By utilizing the second electronic device 220, which has idle data transmission capability within the network environment where the first electronic device 210 is located, to form a new data transmission channel with the first storage component 211 for the target data, different parts of the target data can be transmitted through multiple data transmission channels. Compared to using only one data transmission channel of the first electronic device to transmit the target data to its own storage system, this method fully utilizes the space resources of other electronic devices in the network environment where the first electronic device is located, greatly improving the efficiency of target data transmission.
[0071] After the target data writing task is completed, the first electronic device 210 can control the first storage component 211 to have a data transmission channel only with the first electronic device 210. In this way, the first electronic device 210 can reassemble the target data stored in the first storage component 211 and the second storage component 212 respectively, so that the two storage components can store the complete target data and realize data backup storage. The implementation process can be referred to the description of the corresponding part of the method embodiment below.
[0072] Similarly, in scenarios where target data needs to be read from the first storage component 211 and / or the second storage component 212, i.e., when performing a target data read task, since both the first storage component 211 and the second storage component 212 store complete target data, different parts of the target data can be read from these two storage components according to certain rules to form complete target data. In this way, according to the method described above, the first electronic device 210 and the second electronic device 220 can read different parts of the target data respectively and upload them to the third electronic device 230 (here referring to the reading device that needs to read the target data) through their respective data transmission channels. The third electronic device 230 reassembles the received parts of the target data to obtain the target data to be read. Compared with the data reading method that only reads the target data through the first electronic device 210, the data read and write method proposed in this application greatly improves the reading efficiency.
[0073] As analyzed above, it should be understood that, by default, both the first storage component 211 and the second storage component 212 can have a data transmission channel with the first electronic device 210. When performing a target data read / write task, the first storage component 211 can be controlled to disconnect the data transmission channel with the first electronic device 210, so that it only has a data transmission channel with the second electronic device 220, according to the method described above. This application does not limit the implementation of this control method and it can be determined as appropriate.
[0074] Furthermore, in the data read / write system proposed in this application, the aforementioned second electronic device 220 can be one or more, determined according to the actual situation of the target data read / write task. For example, if the amount of target data to be read / written is relatively large, and / or the idle resources of other electronic devices in the network environment where the first electronic device 210 is located (such as a home LAN or other specific LAN environments), a second electronic device 220 can be selected to perform the data read / write task according to the method described above. Alternatively, multiple second electronic devices 220 (which can be the same or different types of terminal devices) can be selected. Figure 3 As shown, these multiple second electronic devices 220 and multiple first storage components 211 correspond one-to-one to form multiple data transmission channels, thereby satisfying the read / write tasks of target data with a large amount of data and ensuring task execution efficiency. The implementation process can be referred to the description of the corresponding part of the method embodiment below.
[0075] Based on the above analysis, in order to enable the first storage component 211 to form a data transmission channel with the first electronic device 210 or the second electronic device 220 in different scenarios, such as Figure 4 As shown, the data read / write system proposed in this application may further include: a switching switch 240 disposed between the first electronic device 210, the first storage component 211, and the second electronic device 220. By controlling the switching switch 240 to turn on or off, the first data transmission channel between the first electronic device 210 and the first storage component 211, and the second data transmission channel between the first storage component 211 and the second electronic device 220 are turned on or off. That is, the switching switch 240 enables one of the two data transmission channels to be turned on while the other data transmission channel is turned off.
[0076] Specifically, such as Figure 4 As shown, the fixed connection terminal of the switch 240 can be connected to the corresponding first storage component 211, one selection connection terminal of the switch 240 can be connected to the first electronic device 210, and the other selection connection terminal of the switch 240 can be connected to the second electronic device 220. The selection component of the switch 240 is in different states (e.g., Figure 4(The solid line and dashed line represent different states of the switch 240, respectively.) The fixed connection terminal can be connected to any of the selectable connection terminals, thus forming a corresponding data transmission channel between the first storage component 211 and the first electronic device 210 or the second electronic device 220. The state control of the selectable component of the switch 240 can be implemented by the first electronic device 210 or other devices; this application does not limit the control entity of the switch 240.
[0077] It needs to be explained that, Figure 4 This explanation uses a single-pole double-throw switch, type 240, as an example, but is not limited to this type. Figure 4 The circuit structure of the switch 240 shown can also be selected as a relay switch or other types of multi-channel selection circuits as needed. The control methods for data reading and writing are similar, and will not be described in detail in this application.
[0078] To enable data transmission between different electronic devices in the system, the aforementioned data read / write system may further include: a first communication interface 213 disposed on the first electronic device 210 for establishing a second communication connection with the third electronic device 230 to enable data transmission between the first electronic device 210 and the third electronic device 230; and a second communication interface 221 disposed on the second electronic device 220 for establishing a first communication connection with the third electronic device 230 to enable data transmission between the second electronic device 220 and the third electronic device 230. The implementation process can be referred to the description in the corresponding part of the method embodiment below, which will not be detailed here.
[0079] The interface types of the first communication interface 213 and the second communication interface 221 can be determined according to the communication methods supported by the corresponding electronic device, such as data interfaces of wireless communication modules like WIFI modules, 5G / 6G (fifth-generation mobile communication network / sixth-generation mobile communication network) modules, GPRS modules, radio frequency communication modules, and near-field communication modules. Of course, the first communication interface 213 and / or the second communication interface 221 can also be wired communication interfaces that support wired communication. In practical applications, the interface types of the first communication interface 213 and the second communication interface 221 can be the same or different. This application does not restrict the interface types of the first communication interface 213 and the second communication interface 221; it can be determined as appropriate.
[0080] It should be understood that, in cases such as Figure 3 In the application scenario of the data read / write system shown, the switching control of the data transmission channels between each first storage component 211 and the first electronic device 210 and different second electronic devices 220 can be achieved by using... Figure 4 The switch 240 shown is used to implement this, and the resulting system structure can be referred to. Figure 4 The connection between the switch 240 shown and the first electronic device 210 and the second electronic device 220 is not described in detail here.
[0081] In some other embodiments proposed in this application, in order to establish a first communication connection between the first electronic device 210 and the second electronic device 220, the first electronic device 210 and the second electronic device 220 can establish the first communication connection through a first type interface and a data cable. The first type interface may include, but is not limited to, a PCIE (Peripheral Component Interconnect express, high-speed serial computer expansion bus standard) interface, an eSATA (External Serial ATA interface for external drives) interface, or pins, etc., which can be determined according to the communication requirements of the first electronic device 210 and the second electronic device 220.
[0082] Optionally, based on the above analysis, in a scenario where the first electronic device 210 and the second electronic device 220 are two independent devices (i.e., deployed in different chassis), each electronic device has its own operating system. For example, the first electronic device 210 can be a NAS system, and the second electronic device 220 can be configured with an x86 system or other types of operating system, with each device's processor supporting system operation and executing corresponding data read / write methods. Figure 5 As shown, the storage component communication bus interface between the first electronic device 210 and the second electronic device 220, i.e., the aforementioned first type interface, can be an eSATA interface, but is not limited to this type of interface. In conjunction with the description of the corresponding part in the context, when a data transmission channel is required between the second electronic device 220 and the first storage component 211, the switch 240 is in the position as follows: Figure 5 In the state shown, the x86 system of the second electronic device 220 can be connected to the external eSATA interface, which is connected to the eSATA interface of the first electronic device 210. The eSATA interface can be connected to the switch 240 to form a data transmission channel for transmitting the first part of the target data.
[0083] It should be noted that in scenarios where the first electronic device 210 and the second electronic device 220 are two independent devices, such as Figure 5As shown, the switch 240 can be deployed in the first electronic device 210, and the processor of the first electronic device 210 (such as a NAS RAM processor) controls the switch 240 to switch between different states. Optionally, the switch 240 can also be deployed in the second electronic device 220, or as a stand-alone device. This application does not limit the deployment relationship between the switch 240 and the first electronic device 210 and the second electronic device 220, and it can be determined as appropriate.
[0084] In other embodiments, the first electronic device 210 and the second electronic device 220 can also be deployed in the same chassis. In this scenario, the electronic device can deploy at least two systems, such as a NAS system and an x86 system. Of course, other types of systems can also be deployed. Figure 6 As shown, the first type of interface for establishing the first communication connection between the two can be a PCIe interface, but it is not limited to a PCIe interface. Pins or pins can also be deployed to replace the first type of interface and data cable. Correspondingly, the hard drive communication bus between the two systems can be a PCIe bus. Optionally, in this scenario, the switching control between different states of the switch 240 can be controlled by the system of the first electronic device 210 (such as a NAS system), but it is not limited to this. The data read and write process in this scenario can be referred to the description in the corresponding part of the method embodiment below, which will not be described in detail here.
[0085] It should be understood that in the case where there are multiple second electronic devices 220 and multiple first storage components 211 in the data read / write system, the following can also be referred to: Figure 5 and Figure 6 The deployment relationships shown are used to deploy multiple second electronic devices 220 and first electronic devices 210. At this time, the multiple second electronic devices 220 can deploy the same or different types of systems, such as x86 system, Windows system, iOS system or Android system, etc. The specific deployment structure is not detailed in this application.
[0086] It should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other, and will not be detailed here.
[0087] Based on the composition and structure of the data read / write system described in the above embodiments, the data read / write method and control method proposed in this application will be described in detail below with examples, but are not limited to the embodiments described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the preceding or subsequent operations are not necessarily executed precisely in sequence; on the contrary, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes; these are not described in detail in this application.
[0088] Based on this, refer to Figure 7 This is a flowchart illustrating an optional embodiment of the data read / write method proposed in this application. This method can be applied to the first electronic device in the aforementioned system, such as a NAS device. Figure 7 As shown, the method may include:
[0089] Step S71: After the first electronic device establishes a first communication connection with the second electronic device, in response to receiving a target data read / write task from the third electronic device, the first storage component of the first electronic device is controlled to switch to a first usage mode.
[0090] Based on the above description of the technical solution of this application, in situations where it is necessary to perform read / write tasks on target data from a third electronic device (such as a smartphone, laptop, desktop computer, or server, which can be determined according to the data transmission scenario), in order to improve task execution efficiency, this application proposes to split the target data into multiple parts of target data and utilize the idle resources of at least one second electronic device that has established a communication connection with the first electronic device to form multiple data transmission channels for the target data. In this way, each part of the target data is transmitted to the corresponding storage component in the first electronic device through one data transmission channel. By transmitting multiple parts of the target data simultaneously, the time spent on target data transmission is shortened, and the data read / write speed is improved.
[0091] Based on this, combined with the above Figure 2 According to the description of the system embodiment shown, after the first electronic device receives the target data read / write task sent by the third electronic device, in order to improve the target data transmission speed and make full use of the idle resources of the second electronic device (such as idle data transmission resources), it triggers the first electronic device to establish a first communication connection with at least one second electronic device, including but not limited to the above description. Figure 5 and Figure 6 The implementation process of the first communication connection establishment method shown can be referred to the description in the corresponding part of the context, and will not be described in detail here.
[0092] The number of second electronic devices that establish a first communication connection with the first electronic device can be determined based on the data processing capabilities of both the first and second electronic devices, and even the network quality of the network they are in. This can be determined after the first electronic device receives the target data read / write task. Optionally, this application can also pre-configure the number of second electronic devices that establish a first communication connection with the first electronic device, and even pre-configure the device identifier for each second electronic device. In this way, after the first electronic device receives the target data read / write task, it can trigger the corresponding second electronic device to establish a first communication connection with the first electronic device through broadcasting or other network devices (such as a user using a mobile phone to connect the NAS device to a computer acting as a second electronic device). This application does not limit the method for establishing the first communication connection or the type of connection; it can be determined as needed.
[0093] Subsequently, in response to the obtained target data read / write task, the first electronic device can control its first storage component to switch to a first usage mode, as shown in the attached figures of the above system embodiment, where the switching switch is in a certain state. Based on the above analysis, in this first usage mode, the first storage component disconnects the data transmission channel with the first electronic device, so that the first storage component only has a data transmission channel with the second electronic device, so that the second electronic device can transmit the first part of the target data between the first storage component and the third electronic device. This first part of the target data is a part of the target data required by the target data read / write task. This application does not limit the method of splitting the target data.
[0094] Therefore, taking the target data writing task as an example, when the first storage component switches to the first usage mode, the second electronic device can connect to the third electronic device through the second communication interface, receive the first part of the target data sent by the third electronic device, and then transfer the first part of the target data to the first storage component for storage through the data transmission channel formed between the second and the first storage component. This data transmission process can be implemented according to the communication protocol followed by the communication interface used to construct the data transmission channel. This application does not describe in detail how the second electronic device controls the transmission of the first part of the target data to the first storage component.
[0095] Step S72: Using the second communication connection between the first electronic device and the third electronic device, the second part of the target data is transmitted between the second storage component of the first electronic device and the third electronic device;
[0096] This embodiment illustrates the process of splitting target data from a third device into two parts. Therefore, the second part of the target data can be the remaining portion of the target data after removing the first part. It should be understood that when it is necessary to split a large amount of target data into more parts, these multiple parts can be sequentially referred to as the first part, the second part, the third part, etc. These multiple parts combine to form the complete target data. This embodiment does not elaborate on this scenario of transmitting more data.
[0097] Following the above analysis, let's take the target data writing task scenario as an example. During the process of the third electronic device transmitting the first part of the target data to the first storage component through the second electronic device, the third electronic device can also send the second part of the target data to the first electronic device through the second communication connection (such as a NAS network connection) with the first electronic device. The first electronic device then transmits the second part of the target data to the second storage component. This allows the different parts of the target data to be written to be transmitted through different data transmission channels to the corresponding different storage components. This process can be executed synchronously or interleaved according to specific rules. Compared with the transmission method of transmitting the complete target data through a single data transmission channel, this greatly shortens the time spent on data transmission.
[0098] Similarly, in the target data reading task scenario, the second electronic device reads the first part of the target data from the first storage component through the data transmission channel formed with the first storage component, and then transmits it to the third electronic device. In this process, the first electronic device can also read the second part of the target data from the second storage component and transmit it to the third electronic device, so that the third electronic device can obtain each part of the target data to be read simultaneously or within a small interval through different data transmission channels, which greatly improves the target data reading efficiency.
[0099] Optionally, to improve the security of data transmission, each part of the target data can be processed using an encryption algorithm before being output through the corresponding data transmission channel. In the target data writing task, privacy computing technology can also be used to fragment the target data to be written, resulting in multiple target fragments, i.e., multiple parts of target data. In the subsequent reading task of the target data, the corresponding privacy computing algorithm can be used to decrypt and reassemble the multiple target fragments to obtain the complete target data. However, this method of data encryption transmission is not limited to this approach.
[0100] Therefore, when a target data write task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device can be disconnected, while the data transmission channel between the first storage component and the second electronic device can be connected. This allows the second electronic device to write a first portion of target data to the first storage component, and then write a second portion of target data to the second storage component via the second communication connection. Conversely, when a target data read task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device can be disconnected, while the data transmission channel between the first storage component and the second electronic device can be connected. This allows the second electronic device to read the first portion of target data from the first storage component and transmit it to the third electronic device, and then transmit the second portion of target data read from the second storage component to the third electronic device via the second communication connection.
[0101] The switching control between different usage modes of the first storage component in the first electronic device can be implemented using the circuit structure described in the system embodiment above. For example, if the switching switch in the system is in the state shown by the solid line in the attached figure, the first storage component will be triggered to enter the first usage mode; conversely, if the switching switch is controlled to be in the state shown by the dashed line in the attached figure, the first storage component will be triggered to enter the second usage mode. The switching control between different states of the switching switch can be implemented by the first electronic device generating corresponding switching commands, or it can be controlled by other devices. This application does not limit the switching control method for different usage modes of the first storage component.
[0102] Step S73: After completing the target data read / write task, control the first storage component to switch back to the second usage mode. In the second usage mode, the first storage component only has a data transmission channel with the first electronic device.
[0103] Following the method described above, different parts of the target data are transmitted to the corresponding devices (such as the third device corresponding to the target data read task, or each storage component corresponding to the target data write task) through multiple data transmission channels. After confirming the completion of the corresponding target data read / write task, the first storage component can be controlled to switch back to the second usage mode. In the second usage mode, the first storage component disconnects the data transmission channel with the second electronic device, so that it only has a data transmission channel with the first electronic device. At this time, both the first storage component and the second storage component can be connected to the first electronic device.
[0104] In the scenario of writing target data, after writing different parts of the target data to different storage components according to the above method, in order to achieve target data backup storage, data mirroring can be performed between the first and second storage components, such as... Figure 4 , Figure 5 or Figure 6The method shown allows the first electronic device to write a first portion of target data stored in the first storage component into the second storage component, and to write a second portion of target data stored in the second storage component into the first storage component, so that both the first and second storage components contain complete target data.
[0105] In the target data reading task scenario, different parts of target data are read from different storage components according to the above method. After being transmitted to the third electronic device through multiple corresponding data transmission channels, the third electronic device can reassemble these multiple parts of target data to obtain complete target data. This process can be implemented based on the data attribute information carried by each part of the target data, or the data configuration information determined by the first electronic device before reading the target data for reading multiple parts of target data. The implementation process is not detailed in this application.
[0106] In summary, during the execution of the target data read / write task from the third electronic device, the first storage component of the first electronic device can be controlled to enter a first usage mode, so that the first storage component only has a data transmission channel with the second electronic device. Through the second electronic device, a new data transmission channel is formed between the third electronic device and the first storage component. Since the second storage component of the first electronic device also has a data transmission channel with the third electronic device at this time, the system can simultaneously realize the independent transmission of the first part of the target data and the second part of the target data through these two data transmission channels, shortening the total target data transmission time and improving the target data read / write efficiency.
[0107] It should be noted that in scenarios where the first electronic device establishes different first communication connections with multiple second electronic devices, multiple first storage components of the first electronic device can be controlled to enter the first usage mode, so that the third electronic device can form multiple data transmission channels with the corresponding first storage components through different second electronic devices, which can realize the transmission of target data more quickly and further improve the target data read and write efficiency. The implementation process is similar to the data read and write method described above, and this application will not provide detailed examples.
[0108] Reference Figure 8 This is a flowchart illustrating an optional embodiment two of the data read / write method proposed in this application. This embodiment can describe a target data write task scenario from a third electronic device, such as... Figure 8 As shown, the method may include:
[0109] Step S81: The first electronic device receives the target data write task from the third electronic device and generates first data configuration information for the target data to be written.
[0110] Based on the above description of the technical solution of this application, in order to quickly write target data from the third electronic device into the first storage component and the second storage component, when constructing the target data transmission system, this application can predefine at the application level how many data transmission channels the system will use to achieve the transmission of target data, that is, how many communication interfaces can be configured to connect to the third electronic device to achieve target data transmission with the third electronic device.
[0111] To address this, this application allows the user to access a data transmission configuration interface via a first electronic device, prompting them to configure multiple communication interfaces for transmitting target data, such as the first and second communication interfaces in the aforementioned system embodiment, or multiple data transmission interfaces for the first storage component. The user can input the number of communication interfaces for transmitting target data based on the second electronic device and its network and hardware configuration information present in the data transmission scenario, and can even select the type of each communication interface. Optionally, the first electronic device can also automatically obtain the number of communication interfaces, i.e., the number of segments of the target data to be transmitted, based on its own and the second electronic device's network and hardware configuration information, and other data that characterizes the network transmission and data read / write capabilities of the electronic devices. The implementation process is not detailed in this application.
[0112] Based on the above analysis, the aforementioned first data configuration information can be used to instruct the splitting of target data into multiple parts and the relationship between these multiple parts of target data, so that devices subsequently receiving multiple parts of target data can reconstruct these multiple parts of target data according to the first data configuration information to obtain complete target data. Therefore, the first data configuration information can include data splitting rules and corresponding data reconstruction rules, etc. As analyzed above, the first data configuration information can be generated based on the network configuration information and hardware configuration information of the first electronic device and the second electronic device, etc. This application does not limit its content or representation method, and it can be determined as appropriate.
[0113] In step S82, the first electronic device feeds back the first data configuration information to the third electronic device, so that the third electronic device divides the target data to be written into a first part of target data and a second part of target data.
[0114] In this embodiment, the splitting of the target data to be written can be performed by a third electronic device. Therefore, the first electronic device can send the generated first data configuration information to the third electronic device, which then divides the target data to be written into a first part of target data and a second part of target data based on the first data configuration information. It should be understood that if the first data configuration information indicates splitting the target data to be written into more parts, the target data to be written can be split into a corresponding number of multiple parts of target data accordingly. The implementation process is similar and will not be described in detail in this application.
[0115] In some other embodiments proposed in this application, the third electronic device sends the target data to be written to the first electronic device, and the first electronic device generates the first data configuration information accordingly. It can also directly split the target data to be written into multiple parts of target data, and then feed back the first part of the target data to the third electronic device, so that the third electronic device can send the first part of the target data to the second electronic device. This application does not limit the subject that performs the splitting operation of the target data to be written, and it can be determined as appropriate.
[0116] Step S83: After the first electronic device and the second electronic device establish a first communication connection through a first type interface and a data cable, the first electronic device responds to the target data write task by controlling the first storage component to switch to a first usage mode.
[0117] Among them, combined Figure 5 and Figure 6 The schematic diagram shows a scenario where the first type of interface may include, but is not limited to, one or more combinations of eSATA interfaces, PCIe interfaces, and pin connectors, and can be determined based on actual communication requirements. It should be noted that the methods for establishing a first communication connection between the first electronic device and the second electronic device include, but are not limited to, the implementation described in step S83.
[0118] Before transmitting the target data to be written, the first electronic device, in response to the target data write task, can disconnect the data transmission channel between the first storage component and the first electronic device and connect the data transmission channel with the second electronic device, so that the first storage component enters the first usage mode. This application does not limit the circuit control implementation of the first usage mode, and the control method of different states of the switching switch described above can be used, but is not limited to.
[0119] In step S84, the third electronic device sends the first part of the target data to the second electronic device and sends the second part of the target data to the first electronic device;
[0120] Step S85: The second electronic device writes the received first portion of the target data to the first storage component;
[0121] Referring to the system structure diagram shown in the attached figure, when the first storage component is in the first usage mode, the third electronic device forms a data transmission channel with the first storage component through the second electronic device, and transmits the first part of the target data to the first storage component for storage.
[0122] In step S86, the first electronic device writes the received second part of the target data to the second storage component through the second communication connection with the third electronic device;
[0123] During the transmission of the first part of the target data, in order to improve the transmission efficiency of the target data to be written, the second part of the target data can be transmitted to the second storage component simultaneously through the data transmission channel between the third electronic device and the first electronic device. It should be noted that this application does not limit the first part of the target data and the second part of the target data to be transmitted synchronously through different data transmission channels; they can also be sent at short intervals, without waiting for one part of the target data to be transmitted before transmitting the other part, thus shortening the transmission time of the target data to be written and improving the data writing efficiency.
[0124] For example, for target data containing multiple blocks (the smallest read / write unit in a file system), such as target data to be read or written containing blocks1,2,3, and4, according to the pre-configured first data configuration information, blocks1 and3 are split into the first part of the target data, and blocks2 and4 are split into the second part of the target data. According to the method described above, in the target data write task scenario, the data of blocks1 and3 can be written to the first storage component through the second electronic device, while the data of blocks2 and4 can be written to the second storage component through the first electronic device. Both data transmission paths can have their own dedicated data transmission channel, and the two parts of the target data are transmitted simultaneously. This multi-system collaborative transmission method makes full use of the computing power of multiple systems and improves the data transmission speed.
[0125] In step S87, the first electronic device determines that the target data writing task has been completed and controls the first storage component to switch back to the second usage mode;
[0126] In step S88, the first electronic device performs data mirroring between the first storage component and the second storage component based on the first data configuration information, so as to write the target data into both the first storage component and the second storage component.
[0127] In order not to affect the data read and write method proposed in this application and to subsequently implement read and write operations on other target data, after determining that the target data write task is completed, such as the first electronic device completing the second part of the target data write task, and receiving feedback information forwarded by the third electronic device that the second electronic device has completed the first part of the target data write task, it is determined that the multi-channel data transmission channel has written multiple parts of target data to the corresponding storage components. The first storage component is then controlled to return to the second usage mode, and the data transmission channel between the first storage component and the second electronic device is disconnected and the data transmission channel between the first storage component and the first electronic device is connected.
[0128] In this scenario, after determining that the target data write task is complete, to achieve backup storage of the target data, the first electronic device can perform data mirroring between the first storage component and the second storage component based on the first data configuration information carried by the target data write task. This ensures that the target data is written to both the first and second storage components. For example, taking the scenario of writing multiple blocks of target data described above as an example, the first electronic device determines, based on the first data configuration information, that the first storage component stores block 1 and block 3 data, and the second storage component stores block 2 and block 4 data. Thus, block 1 and block 3 data can be read from the first storage component and written to the second storage component; similarly, block 2 and block 4 data can be read from the second storage component and written to the first storage component. This process does not affect the original stored data in either storage component, allowing both storage components to store block 1, block 2, block 3, and block 4 data for subsequent access.
[0129] Optionally, the first storage component and the second storage component can be configured into a RAID array. The delayed RAID reconstruction implementation method proposed in this application ensures successful and timely data backup without affecting the data transmission speed. This application does not limit the implementation method of target data reconstruction.
[0130] Reference Figure 9 This is a flowchart illustrating an optional embodiment three of the data read / write method proposed in this application. This embodiment can describe a target data read task scenario from a third electronic device, such as... Figure 9 As shown, the method may include:
[0131] In step S91, the first electronic device receives the target data read task from the third electronic device and generates second data configuration information for the target data to be read.
[0132] In step S92, the first electronic device feeds back the second data configuration information to the third electronic device;
[0133] The process of generating the second data configuration information is similar to the process of generating the first data configuration information described above, and will not be repeated here in the embodiments of this application.
[0134] Step S93: After the first electronic device and the second electronic device establish a first communication connection, the second data configuration information is directly shared with the second electronic device.
[0135] The process of establishing a first communication connection between the first electronic device and the second electronic device can be referred to the implementation described in the corresponding section of the above embodiments. Optionally, a target network device, such as a base station or network access device, can be used. In this way, both the first electronic device and the second electronic device can connect to the target network device to establish the aforementioned first communication connection.
[0136] In some other embodiments, this application may also use a third electronic device to output a networking command to trigger the establishment of a first communication connection between the first electronic device and the second electronic device. Therefore, the third electronic device can send the networking command to the first electronic device and the second electronic device to establish a first communication connection between them. For example, a user can log in to the mobile phone's operating interface to associate the NAS device with computer A (i.e., the second electronic device) or computer B (i.e., the third electronic device) to form a multi-system architecture, such as a NAS+X89 dual-system architecture, or to associate with more systems.
[0137] In such Figure 5 The data read / write scenario shown is illustrated in the diagram. The first electronic device and the second electronic device are independent devices deployed in the same chassis. After the first electronic device generates the first data configuration information, it can be shared with the second electronic device through the third electronic device to realize the communication connection between the first electronic device and the second electronic device. This allows the corresponding second electronic device to read the first part of the target data from the first storage component, and the first electronic device to read the second part of the target data from the second storage component. The implementation process is not described in detail in this application.
[0138] In step S94, in response to the target data read task, the first electronic device controls the first storage component of the first electronic device to switch to the first usage mode;
[0139] In step S95, the second electronic device reads the first part of the target data from the first storage component according to the second data configuration information;
[0140] In step S96, the second electronic device transmits the first part of the target data to the third electronic device;
[0141] In step S97, when the first electronic device responds to the target data read task, it reads the second part of the target data from the second storage component according to the second data configuration information;
[0142] In step S98, the first electronic device transmits the second part of the target data to the third electronic device;
[0143] In step S99, the third electronic device receives information from the first electronic device that the target data reading task has been completed, and reconstructs the first part of the target data and the second part of the target data according to the second data configuration information to obtain the target data to be read.
[0144] The implementation process of steps S94-S99 can be referred to the description of the corresponding parts of the above embodiments, and will not be described in detail in this embodiment.
[0145] In some other embodiments proposed in this application, reference is made to Figure 6 The schematic diagram illustrates a scenario where the first electronic device and the second electronic device are deployed in the same chassis. After receiving a target data read task from the third electronic device, the first electronic device generates second data configuration information for the target data to be read. This second data configuration information can be generated by referring to the process described above for generating the first data configuration information. Subsequently, the second data configuration information can be directly shared with the second electronic device. That is, the second data configuration information can be sent to the second electronic device or shared with the second electronic device using the communication method between the first and second electronic devices within the same electronic device, so that the second electronic device can read the second data configuration information. In this way, the second electronic device can transfer the first part of the target data read from the first storage component to the third electronic device. The implementation process can be referred to the description in the corresponding part of the context, which will not be detailed in this embodiment.
[0146] Reference Figure 10 This is a flowchart illustrating an optional embodiment of the control method proposed in this application. This method can be applied to a third electronic device in the aforementioned data read / write system, such as a mobile phone, computer, or server. Figure 10 As shown, the control method may include:
[0147] Step S101: After obtaining the operation of establishing a first communication connection between the first electronic device and the second electronic device, the obtained target data read / write task is sent to the first electronic device and the second electronic device so that the first storage component of the first electronic device switches to the first usage mode.
[0148] In the first usage mode, the first storage component has a data transmission channel only with the second electronic device to transmit a first portion of target data between the first storage component and the third electronic device. This first portion of target data is a part of the target data required for the target data read / write task. The circuit connection relationships in the first usage mode can be referred to the description in the corresponding section of the above embodiments.
[0149] In this embodiment of the application, when the third electronic device obtains the target data read / write task, in order to improve the task execution efficiency, it can trigger the establishment of a first communication connection between the first electronic device and the second electronic device according to the description of the corresponding part of the context. At this time, the third electronic device can connect to the first electronic device and the second electronic device respectively, so as to send the first part of the target data and the second part of the target data, which are split into the target data, to the first electronic device and the second electronic device respectively. The implementation process is not described in detail in this application.
[0150] Step S102: Using the second communication connection with the first electronic device, read or write a second part of target data into the second storage component of the first electronic device. The second part of target data is the remaining part of the target data after removing the first part of target data.
[0151] When the data read / write system forms multiple data transmission channels, the third electronic device can transmit multiple parts of target data to the corresponding storage components in the first electronic device through different data transmission channels. The implementation process can be referred to the description of the corresponding part of the above embodiment.
[0152] Reference Figure 11 This is a flowchart illustrating an optional embodiment two of the control method proposed in this application. This method can still be applied to the third electronic device in the aforementioned data read / write system, such as... Figure 11 As shown, the control method may include:
[0153] Step S111: The third electronic device obtains the target data read / write task;
[0154] In step S112, the third electronic device obtains the operation of establishing a first communication connection between the first electronic device and the second electronic device, and sends the target data read / write task to the first electronic device and the second electronic device.
[0155] Optionally, the third electronic device splits the target data into multiple parts to obtain corresponding target data read / write tasks, such as a first part target data read / write task and a second part target data read / write task. The first part target data read / write task can be sent to the second electronic device, and the second part target data read / write task can be sent to the first electronic device, so that the electronic device can perform read or write operations on the corresponding part of the target data. The implementation process is not described in detail in this embodiment.
[0156] In step S113, the first electronic device responds to the target data read / write task and controls the first storage component to switch to the first usage mode;
[0157] In step S114, the third electronic device uses the second communication connection with the first electronic device to read or write the second part of the target data in the second storage component of the first electronic device;
[0158] In step S115, the third electronic device uses the third communication connection with the second electronic device to read or write the first part of the target data in the first storage component of the first electronic device;
[0159] Following, but not limited to, the method described above, the target data is split into multiple parts by the first electronic device or the third electronic device, such as a first part of target data and a second part of target data. After the first storage component is controlled to enter the first usage mode, the third electronic device can realize the transmission of the first part of target data and the second part of target data through the respective data transmission channels of the first electronic device and the second electronic device. For example, under the target data write task, the first part of target data is transmitted to the first storage component, and the second part of target data is transmitted to the second storage component; under the target data read task, the first part of target data is read from the first storage component by the second electronic device, and the second part of target data is read from the second storage component by the first electronic device, but it is not limited to this target data read and write operation process.
[0160] Step S116: The second electronic device completes the first part of the target data read / write task and sends the corresponding feedback information to the third electronic device;
[0161] In step S117, the third electronic device forwards the feedback information from the second electronic device that it has completed the corresponding target data read / write task to the first electronic device;
[0162] In step S118, the first electronic device determines that the second part of the target data read / write task has been completed, and controls the first storage component to switch back to the second usage mode.
[0163] In this embodiment of the application, referring to the transmission process of different data transmission channels for multiple target data described above, after the second electronic device writes all the first part of the target data to be written into the first storage component, it can generate feedback information indicating the completion of the first part of the target data writing task, and send the feedback information to the third electronic device, which then forwards it to the first electronic device to inform the first electronic device that the first part of the target data writing operation has been completed.
[0164] In this way, after the first electronic device writes the second part of the target data to be written into the second storage component, that is, after determining that the different parts of the target data to be written have been written into the corresponding first and second storage components, that is, after determining that the first part of the target data writing task and the second part of the target data writing task have been completed, the first storage component can be controlled to switch back to the second usage mode so that the first storage component has a data transmission channel only with the first electronic device.
[0165] For example, in a scenario where the first electronic device and the second electronic device are independent devices deployed in different chassis, such as... Figure 5 As shown, assuming the first electronic device is a NAS device and the second electronic device is computer A, after computer A completes the first part of the target data transmission, it cannot directly inform the NAS device that the task has been completed. It can forward the feedback information representing the content through a third electronic device (such as computer B), or through a network device connected to both computer A and the NAS device, such as a mobile phone, to achieve the forwarding of the above feedback information. Regarding the implementation method of forwarding feedback information, it can be determined by referring to the implementation method of establishing the first communication connection between the first electronic device and the second electronic device above. This application will not provide detailed examples of each method.
[0166] In some further embodiments of this application, in scenarios where the first electronic device and the second electronic device are deployed in the same chassis, such as... Figure 6 As shown, a first electronic device (such as a NAS device) can determine the completion of the target data read / write task and send the generated information representing the content to a third electronic device. The third electronic device can then perform subsequent tasks. Alternatively, after reading a first portion of the target data from a first storage component and a second portion of the target data from a second storage component, it can reconstruct the first and second portions of the target data to obtain the target data. Of course, the reconstruction process of multiple portions of the target data can also be performed by the first electronic device, such as a NAS system reconstructing multiple portions of the target data to obtain the complete target data before sending it to the third electronic device.
[0167] It should be noted that there are no restrictions on the content and output format of the information and feedback information that can represent the completion of the target data read / write task, and they can be configured according to the actual situation.
[0168] Based on the description of the target data splitting method in the above embodiments, for a target data write task, a third electronic device can generate first data configuration information to achieve the target data splitting process. For example, after obtaining the target data write task, first data configuration information for the target data to be written is generated. According to the first data configuration information, the target data to be written is divided into a first part of target data and a second part of target data. The implementation process can be referred to the description of the corresponding part in the above embodiments, and will not be described in detail here.
[0169] Optionally, for the target data read task, a first electronic device, such as a NAS device, can generate first data configuration information to achieve split reading of the target data. In this way, after the target data read task is sent to the first electronic device, the third electronic device can receive the second data configuration information generated and fed back by the first electronic device for the target data to be read, share the second data configuration information with the second electronic device, and have the first electronic device read the second part of the target data from the second storage component, and the second electronic device read the first part of the target data from the first storage component. In this way, after the third electronic device receives the first part of the target data read by the second electronic device from the first storage component and the second part of the target data read by the first electronic device from the second storage component, it can reconstruct the first part of the target data and the second part of the target data according to the second data configuration information to obtain the target data to be read.
[0170] It should be noted that the target data can be split into two, three, or even more parts for reading or writing operations. The control method executed by the third electronic device mentioned above is mainly described in terms of the implementation process of splitting the target data into two parts for reading or writing operations. The process of reading or writing target data split into other numbers of parts is similar, and this application will not provide detailed examples for each one.
[0171] Reference Figure 12 This is a schematic diagram of an optional embodiment of the data read / write device proposed in this application. This device can be applied to a first electronic device, such as... Figure 12 As shown, the device may include:
[0172] The first usage mode control module 121 is used to control the first storage component of the first electronic device to switch to the first usage mode after the first electronic device establishes a first communication connection with the second electronic device and in response to obtaining a target data read / write task from the third electronic device;
[0173] In the first usage mode, the first storage component has a data transmission channel only with the second electronic device to transmit a first portion of target data between the first storage component and the third electronic device via the second electronic device. The first portion of target data is a part of the target data required for the target data read / write task.
[0174] Data transmission module 122 is configured to transmit a second portion of target data between a second storage component of the first electronic device and the third electronic device using a second communication connection between the first electronic device and the third electronic device, wherein the second portion of target data is the remaining portion of the target data after removing the first portion of target data; and,
[0175] The second usage mode control module 123 is used to control the first storage component to switch back to the second usage mode after the target data read / write task is completed. In the second usage mode, the first storage component only has a data transmission channel with the first electronic device.
[0176] In some embodiments, the above-described apparatus may further include:
[0177] The data mirroring processing module is used to perform data mirroring between the first storage component and the second storage component based on the data configuration information carried by the target data write task after the target data write task is completed, so as to write the target data into both the first storage component and the second storage component.
[0178] In yet other embodiments, the above-described apparatus includes:
[0179] The first communication connection establishment module is used to establish a first communication connection between the first electronic device and the second electronic device;
[0180] Optionally, the first communication connection establishment module may include at least one of the following establishment units:
[0181] The first establishment unit is used to establish the first communication connection between the first electronic device and the second electronic device through a first type interface and a data cable;
[0182] The second establishment unit is used to determine the establishment of the first communication connection after both the first electronic device and the second electronic device are connected to the target network device;
[0183] The third establishing unit is used to determine to establish the first communication connection after the first electronic device and the second electronic device receive the networking instruction from the third electronic device.
[0184] Based on the above analysis, the above-mentioned device may further include:
[0185] The first generation module is used to generate first data configuration information for the target data to be written after obtaining the target data write task from the third electronic device.
[0186] The first data configuration information feedback module is used to feed back the first data configuration information to the third electronic device, so that the third electronic device divides the target data to be written into a first part of target data and a second part of target data.
[0187] The second generation module is used to generate second data configuration information for the target data to be read after obtaining the target data reading task from the third electronic device;
[0188] The first sharing module is used to directly share the second data configuration information with the second electronic device, so that the first part of the target data read by the second electronic device from the first storage component can be transmitted to the third electronic device;
[0189] The third production module is used to generate second data configuration information for the target data to be read after receiving the target data read task from the third electronic device.
[0190] The second sharing module is used to share the second data configuration information with the third electronic device through the third electronic device, so that the first part of the target data read by the second electronic device from the first storage component is transmitted to the third electronic device.
[0191] In the implementation of the data read / write device described in the above embodiments, when a target data write task is obtained from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected and the data transmission channel between the first storage component and the second electronic device is connected, so that the second electronic device writes a first part of target data to the first storage component and writes a second part of target data to the second storage component through the second communication connection.
[0192] When a target data read task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected, while the data transmission channel between the first storage component and the second electronic device is connected. This allows the second electronic device to read a first portion of target data from the first storage component and transmit it to the third electronic device, and the second portion of target data read from the second storage component is transmitted to the third electronic device via the second communication connection. The specific implementation processes for these two scenarios can be found in the descriptions of the corresponding sections of the above embodiments, and will not be detailed in this embodiment.
[0193] Reference Figure 13This is a schematic diagram of an optional embodiment of the control device proposed in this application. This device can be applied to a third electronic device, such as... Figure 13 As shown, the device may include:
[0194] The target data read / write task sending module 131 is used to send the obtained target data read / write task to the first electronic device and the second electronic device after obtaining the operation of establishing a first communication connection between the first electronic device and the second electronic device, so that the first storage component of the first electronic device switches to a first usage mode;
[0195] In the first usage mode, the first storage component has a data transmission channel only with the second electronic device to transmit a first portion of target data between the first storage component and the third electronic device via the second electronic device. The first portion of target data is a part of the target data required for the target data read / write task.
[0196] The data read or write module 132 is used to read or write a second portion of target data in a second storage component of the first electronic device using a second communication connection with the first electronic device. The second portion of target data is the remaining part of the target data after removing the first portion of target data.
[0197] In some other embodiments, the above-described apparatus may further include at least one of the following functional modules:
[0198] The information receiving module is used to receive information from the first electronic device indicating that the target data read / write task has been completed.
[0199] The feedback information forwarding module is used to forward the feedback information of the second electronic device completing the corresponding target data read / write task to the first electronic device, so that the first electronic device controls the first storage component to switch back to the second usage mode, wherein, in the second usage mode, the first storage component only has a data transmission channel with the first electronic device;
[0200] The data reconstruction module is used to reconstruct the first part of the target data and the second part of the target data after reading the first part of the target data from the first storage component and the second part of the target data from the second storage component, so as to obtain the target data.
[0201] Optionally, the above-mentioned device may further include:
[0202] The first data configuration information generation module is used to generate first data configuration information for the target data to be written after obtaining the target data write task;
[0203] The data splitting module is used to divide the target data to be written into a first part of target data and a second part of target data according to the first data configuration information;
[0204] The second data configuration information receiving module is used to receive the second data configuration information generated and fed back by the first electronic device for the target data to be read after the target data reading task is sent to the first electronic device;
[0205] The second data configuration information sharing module is used to share the second data configuration information to the second electronic device;
[0206] The target data receiving module is used to receive a first part of target data read by the second electronic device from the first storage component, and to receive a second part of target data read by the first electronic device from the second storage component, so as to trigger the data reconstruction module to reconstruct the first part of target data and the second part of target data according to the second data configuration information to obtain the target data to be read.
[0207] It should be noted that the various modules and units in the above-mentioned device embodiments can all be stored in the memory as program modules. The processor executes the above-mentioned program modules stored in the memory to realize the corresponding functions. The functions realized by each program module and its combination, as well as the technical effects achieved, can be referred to the description of the corresponding part of the above-mentioned method embodiments. This embodiment will not repeat them here.
[0208] This application also provides a storage medium on which a computer program can be stored. The computer program can be called and loaded by the processor of a first electronic device or a third electronic device to implement the various steps of the data reading and writing method or control method described in the corresponding electronic device side embodiment above. The implementation process will not be described in detail in this embodiment.
[0209] Finally, it should be noted that, regarding the above embodiments, unless the context explicitly indicates an exception, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, and these steps and elements do not constitute an exclusive list; the method or apparatus may also include other steps or elements. An element defined by the phrase "comprising an..." does not exclude the presence of other identical elements in the process, method, product, or apparatus that includes the element.
[0210] In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more.
[0211] The terms used in this application, such as "first" and "second," are for descriptive purposes only, used to distinguish one operation, unit, or module from another, and do not necessarily require or imply any such actual relationship or order between these units, operations, or modules. Furthermore, they should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature.
[0212] The various embodiments in this specification are described in a progressive or parallel manner. Each embodiment focuses on its differences from other embodiments, and the same or similar parts between the embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to in the method section.
[0213] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data read / write method, the method comprising: After the first electronic device establishes a first communication connection with the second electronic device, in response to receiving a target data read / write task from the third electronic device, the first storage component of the first electronic device is controlled to switch to a first usage mode. In the first usage mode, the first storage component has a data transmission channel only with the second electronic device, so as to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a part of the target data required by the target data read / write task. Using the second communication connection between the first electronic device and the third electronic device, a second portion of target data is transmitted between the second storage component of the first electronic device and the third electronic device. The second portion of target data is the remaining part of the target data after removing the first portion of target data. as well as, After completing the target data read / write task, the first storage component is controlled to switch back to the second usage mode. In the second usage mode, the first storage component only has a data transmission channel with the first electronic device.
2. The method according to claim 1, further comprising, after completing the target data writing task: Based on the data configuration information carried by the target data write task, data mirroring is performed between the first storage component and the second storage component so that the target data is written into both the first storage component and the second storage component.
3. The method according to claim 1, wherein the first electronic device and the second electronic device establish a first communication connection, comprising at least one of the following: The first electronic device and the second electronic device establish the first communication connection through a first type of interface and a data cable; After both the first electronic device and the second electronic device are connected to the target network device, the establishment of the first communication connection is determined. After the first and second electronic devices receive networking instructions from the third electronic device, they determine to establish the first communication connection.
4. The method according to claim 1, further comprising at least one of the following: After receiving the target data write task from the third electronic device, first data configuration information for the target data to be written is generated, and the first data configuration information is fed back to the third electronic device so that the third electronic device divides the target data to be written into a first part of target data and a second part of target data. After receiving the target data read task from the third electronic device, a second data configuration information for the target data to be read is generated, and the second data configuration information is directly shared with the second electronic device so that the first part of the target data read by the second electronic device from the first storage component is transferred to the third electronic device. After receiving the target data read task from the third electronic device, a second data configuration information for the target data to be read is generated. The second data configuration information is shared with the third electronic device so that the first part of the target data read by the second electronic device from the first storage component is transferred to the third electronic device.
5. The method according to claim 1, wherein: When a target data write task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected and the data transmission channel between the first storage component and the second electronic device is connected, so that the second electronic device writes a first part of the target data to the first storage component and writes a second part of the target data to the second storage component through the second communication connection. When a target data read task is received from a third electronic device, the data transmission channel between the first storage component and the first electronic device is disconnected and the data transmission channel between the first storage component and the second electronic device is connected. This allows the second electronic device to read a first portion of target data from the first storage component and transmit it to the third electronic device, and the second portion of target data read from the second storage component is transmitted to the third electronic device via the second communication connection.
6. A control method applied to a third electronic device, the method comprising: After obtaining the operation to establish a first communication connection between the first electronic device and the second electronic device, the obtained target data read / write task is sent to the first electronic device and the second electronic device, so that the first storage component of the first electronic device switches to a first usage mode. In the first usage mode, the first storage component has a data transmission channel only with the second electronic device, so as to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a part of the target data required by the target data read / write task. Using a second communication connection with the first electronic device, a second portion of target data is read or written to a second storage component of the first electronic device. The second portion of target data is the remaining portion of the target data after removing the first portion of target data.
7. The method of claim 6, further comprising at least one of the following: Receive information from the first electronic device indicating the completion of the target data read / write task; The feedback information from the second electronic device upon completing the corresponding target data read / write task is forwarded to the first electronic device, so that the first electronic device controls the first storage component to switch back to the second usage mode. In the second usage mode, the first storage component has a data transmission channel only with the first electronic device; After reading the first part of the target data from the first storage component and the second part of the target data from the second storage component, the first part of the target data and the second part of the target data are reconstructed to obtain the target data.
8. The method according to claim 6 or 7, further comprising: After obtaining the target data write task, first data configuration information for the target data to be written is generated. Based on the first data configuration information, the target data to be written is divided into a first part of target data and a second part of target data. After sending the target data read task to the first electronic device, the system receives the second data configuration information generated and fed back by the first electronic device for the target data to be read, shares the second data configuration information with the second electronic device, receives the first part of the target data read by the second electronic device from the first storage component and the second part of the target data read by the first electronic device from the second storage component, and reconstructs the first part of the target data and the second part of the target data according to the second data configuration information to obtain the target data to be read.
9. A data read / write system, the system comprising: The first electronic device includes a first storage component and a second storage component; The second electronic device has a first communication connection with the first electronic device and is capable of establishing a data transmission channel with the first storage component; In the case of obtaining a target data read / write task from a third electronic device, the first storage component has a data transmission channel only with the second electronic device to transmit a first part of the target data between the first storage component and the third electronic device through the second electronic device. The first part of the target data is a portion of the target data required by the target data read / write task. The first electronic device is capable of establishing a second communication connection with the third electronic device to transmit a second portion of target data between the second storage component and the third electronic device. The second portion of target data is the remaining portion of the target data after removing the first portion of target data. After completing the target data read / write task, the first electronic device can control the first storage component to have a data transmission channel only with the first electronic device.
10. The system according to claim 9, further comprising: A switching switch is provided between the first electronic device, the first storage component, and the second electronic device. The switching switch can connect or disconnect the data transmission channels between the first electronic device and the first storage component, and between the first storage component and the second electronic device. The first communication interface, located on the first electronic device, is used to establish a second communication connection with the third electronic device. The second communication interface, located on the second electronic device, is used to establish a first communication connection with the third electronic device.
Citation Information
Patent Citations
Unified storage system and method, and electronic equipment
CN110879760A
Data acquisition method and device and service equipment
CN112527192A