Device connection method, device, equipment and medium of a non-volatile memory
By identifying equipment characteristics and secondary confirmation during the device connection process, and using the upper-level service communication module for two-way connection, the error in device identification and one-way communication problems caused by traditional device identification methods are solved, and the accuracy and two-way communication of device connection are achieved.
Patent Information
- Application Number
- CN202211191039.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-09-28
AI Technical Summary
During the process of device connection and device identification, traditional device identification methods can easily lead to problems such as incorrect device identification or the device cannot communicate in two-way.
By further identifying the characteristics of the device based on the matching port connection information, and secondary confirmation of the target device is performed using the initiator device connection information. At the same time, the upper-level service communication module is used for two-way connections to improve the accuracy of device connections.
Ensure the accuracy of device connection, avoid the problem of errors in device identification and one-way communication, and ensure the bidirectional connection relationship between the initiator device and the target device.
Smart Images

Figure CN115589429B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of device communication, and particularly to a method, apparatus, device and medium for connecting a non-volatile memory device. Background Art
[0002] With the generation and application of large-scale data, the demand for read and write services of storage array systems is increasing day by day. The applications of large-scale data centers are also gradually increasing to cope with the processing and application of big data. Usually, there are various types of computing devices, switching networks and storage devices in large-scale data centers. And devices communicate through the switching network. Different devices have some characteristics. The initiating device needs to identify different target devices to determine the characteristics of the target device in order to achieve targeted configuration management.
[0003] In the traditional device identification method, by setting a device identifier for the target device and then querying the device identifier through a standard protocol command to determine the target device, there may be problems of incorrect device identification, and sometimes there may be a problem that only one-way device identification is completed after the device is connected, resulting in the inability of the device to communicate bidirectionally.
[0004] As can be seen from the above, in the process of device connection and device identification, how to avoid the situation of incorrect device identification or inability of the device to communicate bidirectionally that may occur due to the use of the traditional device identification method is a problem to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method, apparatus, device and medium for connecting a non-volatile memory device, which can further identify the characteristics of the device on the basis of matching port connection information to perform secondary confirmation on the target device using the connection information of the initiating device, and use the upper-layer service communication module to improve the accuracy of device connection in a bidirectional connection manner. The specific solutions are as follows:
[0006] In a first aspect, the present application discloses a method for connecting a non-volatile memory device, which is applied to an initiating device pre-connected to a target device, and includes:
[0007] Receiving first port connection information locally saved by the target device and between the current initiating device sent by the target device;
[0008] Determining whether the first port connection information successfully matches the second port connection information locally;
[0009] If the first port connection information and the second port connection information are successfully matched, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are used as the first initiator connection information and sent to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiator connection information and combines the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
[0010] Optionally, before receiving the first port connection information saved locally by the target device and related to the current initiator device, it further includes:
[0011] Receiving characteristic attribute information composed of a random number and a serial number field through a preset first information receiving interface;
[0012] Saving the characteristic attribute information to a specific location preset locally.
[0013] Optionally, determining whether the first port connection information and the second port connection information locally are successfully matched includes:
[0014] Searching for the second port connection information locally;
[0015] Judging whether the target device connection interface in the first port connection information is consistent with the initiator device connection interface in the second port connection information.
[0016] Optionally, using the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiator connection information and sending it to the upper-layer service communication module includes:
[0017] Obtaining the device identification information of the target device through a preset standard protocol command;
[0018] Receiving a first custom command through a preset second information receiving interface and obtaining the node identification information of the target device through the first custom command;
[0019] Receiving a second custom command through a preset second information receiving interface and obtaining the characteristic attribute information saved in a specific location preset locally by the target device through the second custom command;
[0020] Using the device identification information, node identification information, and characteristic attribute information of the target device as the first initiator connection information and sending it to the upper-layer service communication module.
[0021] Optionally, after obtaining the characteristic attribute information saved at a specific location preset locally on the target device through the second custom command, the following steps are further included:
[0022] Save the device identification information, node identification information, and characteristic attribute information of the target device locally.
[0023] Optionally, after sending the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiator connection information to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiator connection information and combines it with the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device, the following steps are further included:
[0024] Obtain the service data request for the target device generated by the upper-layer service communication module based on the first initiator connection information and the second initiator connection information;
[0025] Determine the service data corresponding to the service data request based on the device identification information, node identification information, and characteristic attribute information of the target device saved locally, and return the service data to the upper-layer service communication module.
[0026] Optionally, sending the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiator connection information to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiator connection information and combines it with the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device, includes:
[0027] Send the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiator connection information to the upper-layer service communication module, so that the upper-layer service communication module uses the first node identification in the first initiator connection information and the second node identification in the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
[0028] In a second aspect, the present application discloses a device connection device for a non-volatile memory, including:
[0029] A port connection information receiving module, configured to receive the first port connection information between the target device and the current initiator device saved locally on the target device sent by the target device;
[0030] A port connection information matching module, configured to determine whether the first port connection information successfully matches the second port connection information of the local device;
[0031] An originator connection information reporting module, configured to, if the first port connection information successfully matches the second port connection information, send the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first originator connection information to an upper-layer service communication module, so that the upper-layer service communication module uses the first originator connection information and combines the second originator connection information sent by the target device to determine the connection relationship between the originator device and the target device.
[0032] In a third aspect, the present application discloses an electronic device, including:
[0033] A memory, configured to store a computer program;
[0034] A processor, configured to execute the computer program to implement the foregoing device connection method for a non-volatile memory.
[0035] In a fourth aspect, the present application discloses a computer storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the steps of the foregoing disclosed device connection method for a non-volatile memory are implemented.
[0036] In the present application, an originator device pre-connected to a target device first receives the first port connection information locally saved by the target device and sent by the target device to the current originator device, and then determines whether the first port connection information successfully matches the second port connection information of the local device. If the first port connection information successfully matches the second port connection information, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent as the first originator connection information to an upper-layer service communication module, so that the upper-layer service communication module uses the first originator connection information and combines the second originator connection information sent by the target device to determine the connection relationship between the originator device and the target device. In this way, the present invention can first perform connection matching based on port connection information, and then report detailed information such as device identification information, node identification information, and characteristic attribute information to the upper-layer service communication module for secondary matching. The unique target device can be determined through two matches, ensuring the accuracy of the target device connection. In addition, the upper-layer service communication module can perform two-way verification on the originator device and the target device by using the two types of originator connection information sent by the originator device and the target device to ensure the two-way connection relationship between the originator device and the target device, ensuring that the originator device and the target device can communicate bidirectionally. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0038] Figure 1 It is a flowchart of a method for connecting devices of a non-volatile memory provided by this application;
[0039] Figure 2 It is a flowchart of a specific method for connecting devices of a non-volatile memory provided by this application;
[0040] Figure 3 It is a schematic structural diagram of a device connection device for a non-volatile memory provided by this application;
[0041] Figure 4 It is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0043] In the prior art, in the traditional device identification method, by setting a device identifier for the target device and then querying the device identifier through a standard protocol command to determine the target device, there may be problems of incorrect device identification, and sometimes after the device is connected, only one-way device identification is completed, resulting in the problem that the device cannot communicate bidirectionally. In this application, based on matching the port connection information, the characteristics of the device can be further identified to use the connection information of the initiating device to perform secondary confirmation on the target device, and the accuracy of device connection is improved by using the two-way connection method of the upper-layer service communication module.
[0044] An embodiment of the present invention discloses a method for connecting devices of a non-volatile memory, which is applied to an initiating device pre-connected to a target device. Refer to Figure 1 as described below, the method includes:
[0045] Step S11: Receive the first port connection information saved locally by the target device between the target device and the current initiating device sent by the target device.
[0046] It should be noted that in this embodiment, both the target device and the initiating device are non-volatile memories (i.e., NVM, Non-volatile memory).
[0047] In this embodiment, before receiving the first port connection information between the target device and the current initiating device locally saved by the target device, it may further include: receiving, through a preset first information receiving interface, characteristic attribute information composed of a random number and a serial number field; and saving the characteristic attribute information to a specific location preset locally.
[0048] It can be understood that in this embodiment, for each non-volatile memory, that is, for each initiating device and target device, characteristic attribute information is preset in advance, and the characteristic attribute information is composed of a random number and a serial number field. The random number is used to distinguish the characteristic attributes of the memory, and the serial number is used to distinguish a specified memory individual. It should be noted that when setting the random number, it is necessary to ensure that the random numbers of storage devices with the same characteristics are the same.
[0049] In this embodiment, the characteristic attribute information is saved to a specific location preset locally in the memory. This specific location can be set and changed according to different scenarios, but this specific location must be located in the important data storage space.
[0050] Step S12: Determine whether the first port connection information successfully matches the second port connection information locally.
[0051] In this embodiment, determining whether the first port connection information successfully matches the second port connection information locally may include: searching for the second port connection information locally; and determining whether the target device connection interface in the first port connection information is consistent with the initiating device connection interface in the second port connection information.
[0052] In this embodiment, the initiating device and the target device have been pre-connected. Both parties to the connection will send their local port connection information to each other. After each device receives the port connection information sent by the other party, it will compare it with the local port connection information and search for the connection information with the same remote port from the local port connection information.
[0053] Step S13: If the first port connection information and the second port connection information are successfully matched, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are used as the first initiator connection information and sent to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiator connection information and combines the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
[0054] In this embodiment, if the two-port connection information is the same, that is, the port pairs in the two connection information that are both the initiator and the target at this time are the same, it can be determined that the two parties are the same connection.
[0055] In this embodiment, the step of using the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiator connection information and sending it to the upper-layer service communication module may include: obtaining the device identification information of the target device through a preset standard protocol command; receiving a first custom command through a preset second information receiving interface, and obtaining the node identification information of the target device through the first custom command; receiving a second custom command through the preset second information receiving interface, and obtaining the characteristic attribute information stored at a specific location preset locally in the target device through the second custom command; using the device identification information, node identification information, and characteristic attribute information of the target device as the first initiator connection information and sending it to the upper-layer service communication module.
[0056] That is to say, in this embodiment, the device identification information, node identification information, and characteristic attribute information of the target device are determined successively. Specifically, the device identification information of the target device can be obtained through a standard protocol command, and the node identification information and characteristic attribute information of the target device are obtained through user-defined commands. In a specific implementation manner, the preset standard protocol command is a standard NVMe protocol command, and both the first custom command and the second custom command are NVMe protocol custom commands.
[0057] It should be noted that in this embodiment, the device identification is used to distinguish the device type, the node identification is used to determine which node device the device is, and the characteristic attribute information is used to determine what characteristic attributes the device has.
[0058] In this embodiment, after obtaining the characteristic attribute information stored at a specific location preset locally in the target device through the second custom command, it may further include: saving the device identification information, node identification information, and characteristic attribute information of the target device locally.
[0059] In this embodiment, after the two devices are connected, both device grids acting as the initiating device will send information requests to the other device acting as the target device to obtain the device identification information, node identification information, and characteristic attribute information of the other device acting as the target device. After obtaining this information, it will be saved locally for subsequent business applications.
[0060] In this embodiment, sending the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command to the upper-layer service communication module as the first initiating device connection information, so that the upper-layer service communication module uses the first initiating device connection information and combines the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device, may include: sending the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command to the upper-layer service communication module as the first initiating device connection information, so that the upper-layer service communication module uses the first node identification in the first initiating device connection information and the second node identification in the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device.
[0061] In this embodiment, for each device, itself is the initiating device, and the other device connected to itself is the target device. After checking the port connection information, the initiating device connection information generated by each will be sent to the upper-layer service communication module. When the upper-layer service communication module receives the initiating device connection information sent by each device, it will determine which two devices are in a connected state based on the node identification information in each initiating device connection information, thereby performing a secondary check on the connection relationship between the two devices, and then ensuring the two-way communication between the two devices.
[0062] In this embodiment, the initiating device that is pre-connected to the target device first receives the first port connection information saved locally on the target device and between the current initiating device sent by the target device, and then determines whether the first port connection information successfully matches the second port connection information locally. If the first port connection information successfully matches the second port connection information, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent as the first initiating device connection information to the upper-layer service communication module, so that the upper-layer service communication module can use the first initiating device connection information and combine the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device. In this way, the present invention can first perform connection matching based on the port connection information, and then report the detailed information such as the device identification information, node identification information, and characteristic attribute information to the upper-layer service communication module for secondary matching. The unique target device can be determined through two matches, ensuring the accuracy of the connection of the target device. In addition, the upper-layer service communication module can use the two types of initiating device connection information sent by the initiating device and the target device to perform two-way verification on the initiating device and the target device, so as to ensure the two-way connection relationship between the initiating device and the target device, and ensure that the initiating device and the target device can communicate bidirectionally.
[0063] Figure 2 It is a flowchart of a device connection method for a specific non-volatile memory provided by an embodiment of the present application. Refer to Figure 2 As shown, the method includes:
[0064] Step S21: Receive the first port connection information saved locally on the target device and between the current initiating device sent by the target device.
[0065] Among them, for a more specific processing process of step S21, reference can be made to the corresponding content disclosed in the foregoing embodiment, and details will not be elaborated here.
[0066] Step S22: Determine whether the first port connection information successfully matches the second port connection information locally.
[0067] Among them, for a more specific processing process of step S21, reference can be made to the corresponding content disclosed in the foregoing embodiment, and details will not be elaborated here.
[0068] Step S23: If the first port connection information and the second port connection information are successfully matched, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent as the first initiator connection information to the upper-layer service communication module, so that the upper-layer service communication module can use the first initiator connection information and combine it with the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
[0069] Step S24: Obtain the service data request for the target device generated by the upper-layer service communication module based on the first initiator connection information and the second initiator connection information.
[0070] In this embodiment, after the upper-layer service communication module determines the connection relationship between the initiator device and the target device according to the first initiator connection information and the second initiator connection information, it can then know what characteristic attributes each of the two devices in the connected state has based on the characteristic attribute information in each initiator connection information. And since both of these two devices have the characteristic attribute information of the other party, flexible applications can be made based on the connection relationship between these two devices and the information stored therein during subsequent service applications. For example, in some specific implementation manners, if the upper-layer service communication module needs to request service data located in a pair of initiator devices and target devices at the same time, since the initiator device and the target device both store some service data of the other party, the upper-layer service communication module does not need to send data requests to both devices at the same time. It only needs to select one of the devices to send a data request to request the service data originally located in the two devices.
[0071] In this step, after the upper-layer service communication module determines the connection state between the initiator device and the target device, it may send a service data request to any device. This service data request may be for this device itself or for the target device connected to this device.
[0072] Step S25: Determine the service data corresponding to the service data request based on the device identification information, node identification information, and characteristic attribute information of the target device saved locally, and return the service data to the upper-layer service communication module.
[0073] In this step, when the initiator device receives the service data request for the target device sent by the upper-layer service communication module, it can determine the service data corresponding to the service data request according to the device identification information, node identification information, and characteristic attribute information of the target device saved locally, and finally return the service data to the upper-layer service communication module for the upper-layer service communication module to perform service applications.
[0074] In this way, the present invention can first perform connection matching based on port connection information, and then report detailed information such as device identification information, node identification information, and characteristic attribute information to the upper-layer service communication module for secondary matching. The two matches can determine the unique target device, ensuring the accuracy of the connection of the target device. In addition, the upper-layer service communication module can use two types of initiating device connection information sent by the initiating device and the target device to perform two-way verification on the initiating device and the target device, so as to ensure the two-way connection relationship between the initiating device and the target device. While ensuring that the initiating device and the target device can communicate bidirectionally, subsequent flexible service applications can also be carried out based on the connection relationship and stored content of the two devices.
[0075] See Figure 3 As shown, an embodiment of the present application discloses a device connection device for a non-volatile memory, which is applied to an initiating device pre-connected to a target device, and specifically may include:
[0076] A port connection information receiving module 11, configured to receive the first port connection information locally saved by the target device and between the current initiating device sent by the target device;
[0077] A port connection information matching module 12, configured to determine whether the first port connection information successfully matches the second port connection information locally;
[0078] An initiating device connection information reporting module 13, configured to, if the first port connection information successfully matches the second port connection information, send the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as the first initiating device connection information to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiating device connection information and combines the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device.
[0079] In this embodiment, the initiating device pre-connected to the target device first receives the first port connection information saved locally by the target device and sent by the target device, and then determines whether the first port connection information successfully matches the second port connection information locally. If the first port connection information successfully matches the second port connection information, the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent as the first initiating device connection information to the upper-layer service communication module, so that the upper-layer service communication module can use the first initiating device connection information and combine the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device. In this way, the present invention can first perform connection matching based on the port connection information, and then report the detailed information such as the device identification information, node identification information, and characteristic attribute information to the upper-layer service communication module for secondary matching. The unique target device can be determined through two matches, ensuring the accuracy of the connection of the target device. In addition, the upper-layer service communication module can perform two-way verification on the initiating device and the target device by using the two types of initiating device connection information sent by the initiating device and the target device to ensure the two-way connection relationship between the initiating device and the target device, ensuring that the initiating device and the target device can communicate bidirectionally.
[0080] In some specific embodiments, the device connection device of the non-volatile memory further includes:
[0081] A characteristic attribute information receiving module, configured to receive the characteristic attribute information composed of a random number and a serial number field through a preset first information receiving interface;
[0082] A characteristic attribute information saving module, configured to save the characteristic attribute information to a specific location preset locally.
[0083] In some specific embodiments, the port connection information matching module 12 includes:
[0084] A port connection information searching unit, configured to search for the second port connection information locally;
[0085] A port connection information matching unit, configured to determine whether the target device connection interface in the first port connection information is consistent with the initiating device connection interface in the second port connection information.
[0086] In some specific embodiments, the initiating device connection information reporting module 13 includes:
[0087] A device identification information obtaining unit, configured to obtain the device identification information of the target device through a preset standard protocol command;
[0088] A node identification information acquisition unit, configured to receive a first custom command through a preset second information receiving interface, and acquire the node identification information of the target device through the first custom command;
[0089] A characteristic attribute information acquisition unit, configured to receive a second custom command through a preset second information receiving interface, and acquire the characteristic attribute information stored at a specific position preset locally by the target device through the second custom command;
[0090] An information reporting unit, configured to send the device identification information, node identification information, and characteristic attribute information of the target device to an upper-layer service communication module as first initiator connection information.
[0091] In some specific embodiments, the initiator connection information reporting module 13 further includes:
[0092] A target device information storage unit, configured to store the device identification information, node identification information, and characteristic attribute information of the target device locally.
[0093] In some specific embodiments, the device connection device of the non-volatile memory further includes:
[0094] A service data request acquisition module, configured to acquire a service data request for the target device generated by the upper-layer service communication module based on the first initiator connection information and the second initiator connection information;
[0095] A service data return module, configured to determine service data corresponding to the service data request based on the device identification information, node identification information, and characteristic attribute information of the target device stored locally, and return the service data to the upper-layer service communication module.
[0096] In some specific embodiments, the initiator connection information reporting module 13 includes:
[0097] An initiator connection information reporting unit, configured to send the device identification information, node identification information, and characteristic attribute information of the target device acquired through a preset command to an upper-layer service communication module as first initiator connection information, so that the upper-layer service communication module uses the first node identification in the first initiator connection information and the second node identification in the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
[0098] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 4 which is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation on the usage scope of the present application.
[0099] Figure 4 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input / output interface 25, a communication interface 26, and a communication bus 27. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the device connection method of the non-volatile memory disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0100] In this embodiment, the power supply 23 is used to provide operating voltages for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of the present application, and specific limitations are not imposed on it here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application requirements, and specific limitations are not made here.
[0101] In addition, as a carrier for resource storage, the memory 22 may be a read-only memory, a random access memory, a disk, or an optical disc, etc., and the resources stored thereon may include an operating system 221, a computer program 222, and virtual machine data 223, etc. The virtual machine data 223 may include various kinds of data. The storage method may be temporary storage or permanent storage.
[0102] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it may be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the device connection method of the non-volatile memory executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program that can be used to complete other specific tasks.
[0103] Further, the present application also discloses a computer-readable storage medium, where the computer-readable storage medium includes a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, or optical disks, or any other form of storage medium known in the technical field. Among them, when the computer program is executed by a processor, it implements the device connection method of the non-volatile memory disclosed above. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0104] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part. Professionals can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0105] The steps of the method or algorithm described in combination with the embodiments disclosed in this article can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the technical field.
[0106] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
[0107] The above has introduced in detail the device connection method, device, equipment, and storage medium of the non-volatile memory provided by the present invention. Specific examples are used in this text to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.
Claims
1. A method for connecting a device of a non-volatile memory, characterized in that, Applied to an initiating device pre-connected to a target device, including: Receiving first port connection information saved locally on the target device and between the current initiating device sent by the target device; Judging whether the first port connection information successfully matches the second port connection information locally; If the first port connection information successfully matches the second port connection information, then taking the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as first initiating device connection information and sending it to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiating device connection information and combines the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device.
2. The method for connecting a device of a non-volatile memory according to claim 1, wherein Before receiving the first port connection information saved locally on the target device and between the current initiating device sent by the target device, it further includes: Receiving characteristic attribute information composed of a random number and a serial number field through a preset first information receiving interface; Saving the characteristic attribute information to a specific location preset locally.
3. The method for connecting a device of a non-volatile memory according to claim 1, wherein The judging whether the first port connection information successfully matches the second port connection information locally includes: Searching for the second port connection information locally; Judging whether the target device connection interface in the first port connection information is consistent with the initiating device connection interface in the second port connection information.
4. The method for connecting a device of a non-volatile memory according to claim 1, characterized in that The taking the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as first initiating device connection information and sending it to the upper-layer service communication module includes: Obtaining the device identification information of the target device through a preset standard protocol command; Receiving a first custom command through a preset second information receiving interface and obtaining the node identification information of the target device through the first custom command; Receiving a second custom command through a preset second information receiving interface and obtaining the characteristic attribute information saved in a specific location preset locally on the target device through the second custom command; Taking the device identification information, node identification information, and characteristic attribute information of the target device as first initiating device connection information and sending it to the upper-layer service communication module.
5. The method for connecting a device of a non-volatile memory according to claim 4, characterized in that, After obtaining the characteristic attribute information saved in a specific location preset locally on the target device through the second custom command, it further includes: Saving the device identification information, node identification information, and characteristic attribute information of the target device locally.
6. The method for connecting a device of a non-volatile memory according to claim 5, wherein After taking the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command as first initiating device connection information and sending it to the upper-layer service communication module, so that the upper-layer service communication module uses the first initiating device connection information and combines the second initiating device connection information sent by the target device to determine the connection relationship between the initiating device and the target device, it further includes: Obtain the service data request for the target device generated by the upper-layer service communication module based on the first initiator connection information and the second initiator connection information; Determine the service data corresponding to the service data request based on the device identification information, node identification information, and characteristic attribute information of the target device saved locally, and return the service data to the upper-layer service communication module.
7. The method for connecting a device of a non-volatile memory according to any one of claims 1 to 6, characterized in that, The device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent to the upper-layer service communication module as the first initiator connection information, so that the upper-layer service communication module uses the first initiator connection information and combines the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device, including: The device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command are sent to the upper-layer service communication module as the first initiator connection information, so that the upper-layer service communication module uses the first node identification in the first initiator connection information and the second node identification in the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
8. A device connection device for a non-volatile memory, characterized in that, Applied to an initiator device pre-connected to a target device, including: A port connection information receiving module, configured to receive the first port connection information saved locally by the target device and between the current initiator device sent by the target device; A port connection information matching module, configured to determine whether the first port connection information successfully matches the second port connection information locally; An initiator connection information reporting module, configured to, if the first port connection information successfully matches the second port connection information, send the device identification information, node identification information, and characteristic attribute information of the target device obtained through a preset command to the upper-layer service communication module as the first initiator connection information, so that the upper-layer service communication module uses the first initiator connection information and combines the second initiator connection information sent by the target device to determine the connection relationship between the initiator device and the target device.
9. An electronic device, characterized in that, Includes a processor and a memory; wherein, when the processor executes the computer program saved in the memory, it implements the device connection method of the non-volatile memory according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, it implements the device connection method of the non-volatile memory according to any one of claims 1 to 7.
Citation Information
Patent Citations
Information interaction method, system and equipment
CN113746574A
Address range transfer from first node to second node
US20150370702A1