Equipment linking method and device, equipment, medium and product
By receiving port allocation instructions and determining port configuration files, the link problem caused by the change of port key value after device restart is solved, the stable relationship between the business system and the driver device is achieved, and the user experience and system performance are improved.
Patent Information
- Application Number
- CN202411940505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, the key value of the port will change after the device is restarted, resulting in the previous configuration file being invalid, and some or all the application links cannot be used normally, affecting the performance of the business system.
By receiving port allocation instructions, determining the port configuration file, and using pre-set port allocation rules, we associate the port to be allocated and the target driver device to be allocated to ensure that the service system accesses the target driver device through stable ports.
It realizes a stable relationship between the business system and the driver device, avoids link disorder and information transmission abnormalities caused by device restart, and improves user experience and the performance of the business system.
Smart Images

Figure CN119862137A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device management, and in particular to a device linking method, apparatus, equipment, medium and product. Background Art
[0002] Enterprises may use driver devices from different manufacturers or multiple driver devices from the same manufacturer. Different manufacturers or different devices may have certain distinctions, such as driver device unique codes (identity documents, IDs), manufacturer IDs, product IDs, serial numbers, etc. If the same batch of products from the same manufacturer are used, it will be impossible to distinguish the driver products through identification information. At present, the driver devices are generally distinguished by key values dynamically assigned by program software, that is, a key value is assigned to each driver device, and the driver devices are distinguished by the key value. Then, the configuration files of ports and applications are constructed according to the key value to ensure that the business system of the enterprise can access the application using the corresponding port. However, the key value of the port is random. Each time the device is restarted, the key value will be reassigned to the port. After the key value changes, the previous configuration file will become invalid, and some or all application links will not be able to be used normally. The information transmission line will be interrupted, affecting the performance of the business system.
[0003] Therefore, how to design a stable port allocation method to effectively bind ports to devices or soft links and avoid device link disorder and information transmission abnormality is a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a device linking method, apparatus, equipment, medium and product, which can ensure that the association mode between a business system and a driving device will not be affected by operations such as restart, ensure the stability and feasibility of the linking mode, and improve the user experience.
[0005] According to one aspect of the present invention, a device linking method is provided, the method comprising:
[0006] receiving a port allocation instruction, and determining a port configuration file based on the port allocation instruction, wherein the port allocation instruction includes a port allocation instruction issued by a user and / or a restart instruction of a service system;
[0007] Using the port configuration file and the pre-set port allocation rules, determine the target drive device corresponding to the port to be allocated;
[0008] The port to be allocated and the target drive device are associated so that the business system can access the target drive device through the port to be allocated.
[0009] According to another aspect of the present invention, a device linking apparatus is provided, and the device linking apparatus is used to implement the device linking method in any embodiment of the present invention, and the apparatus includes:
[0010] An acquisition module, configured to receive a port allocation instruction and determine a port configuration file based on the port allocation instruction, wherein the port allocation instruction includes a port allocation instruction issued by a user and / or a restart instruction of a business system;
[0011] A determination module is used to determine a target drive device corresponding to the port to be assigned by using a port configuration file and a pre-set port assignment rule;
[0012] The execution module is used to associate the port to be allocated with the target drive device so that the business system can access the target drive device through the port to be allocated.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising:
[0014] at least one processor; and a memory communicatively coupled to the at least one processor;
[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the device linking method in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions. The computer instructions are used to enable a processor to implement the device linking method in any embodiment of the present invention when executed.
[0017] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the device linking method according to any embodiment of the present invention is implemented.
[0018] The device linking method of the present invention comprises: receiving a port allocation instruction, and determining a port configuration file based on the port allocation instruction, wherein the port allocation instruction comprises a port allocation instruction issued by a user and / or a restart instruction of a business system; using the port configuration file and a pre-set port allocation rule to determine a target drive device corresponding to the port to be allocated; associating the port to be allocated and the target drive device so that the business system can access the target drive device through the port to be allocated. The present invention determines the drive device corresponding to the port to be allocated based on the port configuration file of the port to be allocated, the port configuration file is constructed based on the physical port number, the physical port number of the port is unique, the association mode between the business system and the drive device will not be affected by operations such as restart, thereby ensuring the stability and feasibility of the linking mode and improving the user experience.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0021] Figure 1 It is a flow chart of a device linking method provided by the present invention;
[0022] Figure 2 It is a schematic diagram of a linking method provided by the present invention;
[0023] Figure 3 is a schematic diagram of another linking method provided by the present invention;
[0024] Figure 4 It is a flowchart of another device linking method provided by the present invention;
[0025] Figure 5 It is a structural schematic diagram of a device linking device provided by the present invention;
[0026] Figure 6 It is a structural schematic diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", "initial", "intermediate", "candidate", "alternative", "target", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] Figure 1 This is a flow chart of a device linking method provided by the present invention. This embodiment can be applied to port allocation, determining the linking mode of the hub and the port of the service system, etc. The method can be executed by the device linking device provided by the present invention. The device can be implemented in the form of hardware and / or software. In a specific embodiment, the device can be integrated into an electronic device. The following embodiments will be described by taking the device integrated into an electronic device as an example. Figure 1 , the method specifically comprises the following steps:
[0030] S101: Receive a port allocation instruction, and determine a port configuration file based on the port allocation instruction.
[0031] The port allocation instruction can be understood as an indication of associating the ports of the service system and the driver device, that is, allocating ports to each driver device. The port configuration file can be understood as a file including indication information related to the port allocation work, which is used to assist the port allocation work of the driver device. The port configuration file includes but is not limited to free port information and driver device information.
[0032] The port allocation work can be triggered by the user or automatically. The user generally triggers the port allocation work through instructions. Secondly, the port needs to be reallocated after the system is restarted or updated, so the automatic triggering is generally after the system is restarted and / or the system is updated. The port allocation instruction of the present invention includes the port allocation instruction issued by the user and / or the restart instruction of the business system.
[0033] Specifically, the drive device of the present invention can be linked to the business system through a Universal Serial Bus hub (also known as a USB interface expander or USB hub). Allocation refers to linking each port of the USB hub to a corresponding drive device. Generally, the USB hub includes four ports, and the business system includes at least one USB hub. Each port of the USB hub can be linked to a different drive device, thereby improving the richness and diversity of the business system. The drive device can be understood as a component, device or algorithm that implements a specific function, and the present invention does not limit this.
[0034] In one embodiment, S101 may specifically include: receiving a port allocation instruction and parsing type information of the port allocation instruction; when the type information indicates that the port allocation instruction is a port allocation instruction issued by a user, determining a port configuration file based on configuration information sent by the user, and the configuration information is sent by the user based on an interactive interface; when the type information indicates that the port allocation instruction is a restart instruction for a business system, obtaining a historical port configuration file, and determining a port configuration file based on the historical port configuration file, and the historical port configuration file is stored in a programmable read-only memory of the business system.
[0035] The type information can be used to distinguish the triggering mode of the port allocation instruction. Under different triggering modes, the port configuration file is determined in different ways. The purpose of this setting is to start the determination process of the port configuration file in a targeted manner. The configuration information can be understood as the configuration instructions issued by the user based on the interactive interface, including but not limited to configuration instructions, configuration parameters and configuration documents. Determining the port configuration file according to the configuration information sent by the user can be understood as determining the port configuration file according to the instruction information below the user. The historical port configuration file can be understood as part or all of the configuration files of the business system before the current moment. The present invention will store the port configuration file completed each time in the programmable read-only memory (i.e., electrically erasable programmable read-only memory, Electrically Erasable Programmable Read-Only Memory, EEPROM) of the USB hub. After the business system is restarted, the port configuration file can be determined by reading the information in the EEPROM corresponding to the USB hub. The purpose of this setting is to ensure the port configuration performance while improving the port configuration efficiency.
[0036] On the one hand, a port configuration file is determined according to configuration information sent by a user, including: determining a port to be allocated and a physical port identifier of the port to be allocated; the port to be allocated is an idle port in a business system, and the number of idle ports is at least one; determining device information of a driving device, the device information including a manufacturer identifier, a device identifier and a product identifier; using the configuration information, processing the device information of the driving device and the physical port identifier of the port to be allocated to obtain a port configuration file.
[0037] Among them, the physical port identifier can be understood as the physical port number of the port to be assigned. The physical port number is the unique information of the port and can accurately distinguish each port. The port to be assigned can be understood as an idle port on the USB hub that is not occupied or has not been assigned. The configuration information can be understood as the configuration instructions issued by the user through the interactive interface, which is used to establish an association between the port and the driver device. The established association can be understood as a port configuration file.
[0038] For example, assuming that the ports to be allocated are port 1, port 2, and port 3, the physical port number of port 1 is 1-11.2, the physical port number of port 2 is 1-11.3, and the physical port number of port 3 is 1-11.4, the device information of the drive device is a servo system (servo), a processor (arm), and a sensor (sensor), and the configuration information indicates that servo corresponds to port 1, arm corresponds to port 2, and sensor corresponds to port 3. Then the association relationship of the port configuration file is servo associated with physical port number 1-11.2, arm associated with physical port number 1-11.2, and sensor associated with physical port number 1-11.3. The ports and devices associated by the physical port number are unique and will not be disturbed after restart.
[0039] On the other hand, determining the port configuration file based on the historical port configuration file includes: matching the historical port configuration file based on the port name of the port to be assigned to obtain a candidate port and a configuration file of the candidate port; and determining the port configuration file based on the configuration file of the candidate port.
[0040] The historical port configuration file includes configuration files of USB0, USB1, USB2 and USB3 ports on the hub, but the ports to be allocated may be some ports on the hub, not all ports. The candidate ports can be understood as the ports in the historical port configuration file that are the same as the ports to be allocated. The present invention sets a screening method for the historical port configuration files, screens the historical port configuration files, and determines the screened configuration files as the port configuration files. The advantage of such a setting is that the port configuration files are determined according to the allocation requirements, avoiding the generation of unnecessary configuration information and wasting port allocation resources.
[0041] For example, assuming that the port to be allocated is usb0, the usb0 port in the historical port configuration file is determined as a candidate port, and the configuration file of the usb0 port is the port configuration file. Similarly, if the ports to be allocated are usb0 and usb2, the usb0 port and the usb2 port in the historical port configuration file are determined as candidate ports, and the configuration files of the usb0 port and the usb2 port are the port configuration files.
[0042] S102: Determine the target drive device corresponding to the port to be allocated by using the port configuration file and the pre-set port allocation rule.
[0043] The pre-set port allocation rule can be understood as parsing the port configuration file and determining the device corresponding to the port to be allocated in the port configuration file in combination with the type of the port configuration file.
[0044] Specifically, different types of port configuration files have different indication information. For example, the port configuration file determined according to the port allocation instruction issued by the user has not yet performed the port allocation work. The port allocation work should be performed first, and then the driver device corresponding to each port should be determined according to the allocation result. The port configuration file determined according to the restart instruction of the business system contains the last port allocation result, and the driver device corresponding to each port can be directly determined according to the allocation result. The advantage of this setting is to ensure the accuracy of port configuration while improving port configuration efficiency.
[0045] The target driver device and the port to be assigned are one-to-one corresponding. For example, assuming that the physical port number of port 1 is 1-11.2, the physical port number of port 2 is 1-11.3, and the physical port number of port 3 is 1-11.4, and the association relationship of the port configuration files is servo associated with physical port number 1-11.2, arm associated with physical port number 1-11.2, and sensor associated with physical port number 1-11.3, then the target driver device of port 1 is servo, the target driver device of port 2 is arm, and the target driver device of port 3 is sensor.
[0046] In one embodiment, S102 may specifically include: when the port allocation instruction is a restart instruction for the business system, determining the target driver device corresponding to the port to be allocated based on the character string in the port configuration file; when the port allocation instruction is a port allocation instruction issued by the user, allocating a driver device to the port to be allocated based on the port allocation rules and the port configuration file, and determining the target driver device of the port to be allocated based on the allocation result.
[0047] Among them, the character string can be used to indicate that the physical port number of the port corresponds to the soft link device interface (i.e., the driver device). The driver device bound to the port can be directly determined based on the character string. The port allocation rule can be understood as a configuration method set in advance, for example, associating the ports and driver devices corresponding to each other in the configuration file, pairing the ports and driver devices corresponding to each other in the configuration file, etc. The allocation in this step is only to establish an association relationship between the driver device and the port so that the business system can access the corresponding driver device through the port, and the present invention is not limited to this.
[0048] S103: Associating the port to be allocated with the target drive device, so that the service system accesses the target drive device through the port to be allocated.
[0049] Associating the port to be allocated with the target drive device can be understood as soft linking or binding the port to be allocated with the target drive device, and the link and binding are one-to-one corresponding.
[0050] In one embodiment, S103 may specifically include: determining the access path between the business system and the target drive device based on the physical port identifier of the port to be assigned and the hub name of the target drive device; the access path is used to instruct the business system to access the target drive device. The advantage of such a setting is that the unique access route of each drive device is determined, which can improve access efficiency and facilitate the location of access failures.
[0051] Figure 2 is a schematic diagram of a linking method provided by the present invention. Figure 3 is a schematic diagram of another linking method provided by the present invention, Figure 2 It is the restart link process under the key value allocation method. Figure 3 It is the restart link process under the allocation mode provided by the present invention, Figure 2 and Figure 3 The blue horizontal line in the middle represents the restart line. Taking the drive device 1 as an example, the beneficial effects of the method of the present invention are described. The port correspondence mode before the restart is above the restart line, and the port correspondence mode that may appear after the restart is below the restart line. Figure 2 It can be seen from the figure that the port allocation after the restart is irregular, and the driver device 1 may be linked to usb1, usb2 or usb3, which results in a software link error. The method provided by the present invention is to correspond by physical port number, and the physical port number of the port is unique. The driver device will be accurately associated with its corresponding port without any link problem. Figure 3 It can be seen that drive device 1 will only be linked to usb0, and there will be no possibility of other links. The linking method of each drive device is unique and accurate.
[0052] The technical solution of the above embodiment is based on the port configuration file of the port to be assigned to determine the driver device corresponding to the port to be assigned. The port configuration file is constructed based on the physical port number. The physical port number of the port is unique. The association mode between the business system and the driver device will not be affected by operations such as restart, which ensures the stability and feasibility of the link mode and improves the user experience. It solves the problem of distinguishing each driver device by the key value dynamically assigned by the program software. The key value of the port is random. Each time the device is restarted, the key value will be reallocated to the port. After the key value changes, the previous configuration file will become invalid, and some or all of the application links will not be able to be used normally. The information transmission line will be interrupted, affecting the performance of the business system.
[0053] Figure 4 is a flow chart of another device linking method provided by the present invention. Based on the above embodiments, this embodiment provides a preferred linking method. Specifically, Figure 4 As shown, the method specifically includes:
[0054] S201: Receive a port allocation instruction, and parse type information of the port allocation instruction.
[0055] S202: When the type information indicates that the port allocation instruction is a port allocation instruction issued by the user, determine a port configuration file according to the configuration information sent by the user.
[0056] The configuration information is sent by the user based on the interactive interface.
[0057] S203: When the type information indicates that the port allocation instruction is a restart instruction of the service system, obtain a historical port configuration file, and determine a port configuration file based on the historical port configuration file.
[0058] The historical port configuration files are stored in the programmable read-only memory of the service system.
[0059] S204: Allocate a driver device to the port to be allocated based on the port allocation rule and the port configuration file, and determine a target driver device for the port to be allocated based on the allocation result.
[0060] S205: Determine a target driver device corresponding to the port to be assigned based on the character string in the port configuration file.
[0061] S206: Determine access paths of the service system and the target drive device based on the physical port identifier of the port to be allocated and the hub name of the target drive device.
[0062] The technical solution of the above embodiment is based on the port configuration file of the port to be assigned to determine the driver device corresponding to the port to be assigned. The port configuration file is constructed based on the physical port number. The physical port number of the port is unique. The association mode between the business system and the driver device will not be affected by operations such as restart, which ensures the stability and feasibility of the link mode and improves the user experience. Different methods for determining port configuration files and methods for determining target driver devices are also set for different types of port allocation instructions, so as to determine the port configuration file and the target driver device in a targeted manner, and improve the port configuration efficiency while ensuring the accuracy of port configuration. The key value dynamically assigned by the program software is used to distinguish each driver device. The key value of the port is random. Each time the device is restarted, the key value will be reallocated to the port. After the key value changes, the previous configuration file will become invalid, and the links of some or all applications will not be able to be used normally. The information transmission line will be interrupted, affecting the performance of the business system.
[0063] Figure 5 Schematic diagram of the structure of a device linking device provided by the present invention. Figure 5 As shown, the device includes: an acquisition module 301, a determination module 302 and an execution module 303.
[0064] The acquisition module 301 is used to receive a port allocation instruction and determine a port configuration file based on the port allocation instruction, wherein the port allocation instruction includes a port allocation instruction issued by a user and / or a restart instruction of a service system.
[0065] The determination module 302 is used to determine the target drive device corresponding to the port to be allocated by using the port configuration file and the pre-set port allocation rule.
[0066] The execution module 303 is used to associate the port to be allocated with the target drive device so that the business system can access the target drive device through the port to be allocated.
[0067] Optionally, the acquisition module 301 is specifically used to receive a port allocation instruction and parse type information of the port allocation instruction; when the type information indicates that the port allocation instruction is a port allocation instruction issued by a user, the port configuration file is determined according to the configuration information sent by the user, and the configuration information is sent by the user based on an interactive interface; when the type information indicates that the port allocation instruction is a restart instruction for the business system, a historical port configuration file is obtained, and the port configuration file is determined based on the historical port configuration file, and the historical port configuration file is stored in a programmable read-only memory of the business system.
[0068] Optionally, the acquisition module 301 is specifically used to determine the port to be allocated and the physical port identifier of the port to be allocated; the port to be allocated is an idle port in the business system, and the number of idle ports is at least one; determine the device information of the driving device, the device information includes the manufacturer identifier, the device identifier and the product identifier; use the configuration information to process the device information of the driving device and the physical port identifier of the port to be allocated to obtain a port configuration file.
[0069] Optionally, the acquisition module 301 is specifically configured to match the historical port configuration files based on the port name of the port to be assigned to obtain the candidate port and the configuration files of the candidate port; and determine the port configuration file based on the configuration files of the candidate port.
[0070] Optionally, the determination module 302 is specifically used to determine the target driver device corresponding to the port to be assigned based on the character string in the port configuration file when the port allocation instruction is a restart instruction of the business system; when the port allocation instruction is a port allocation instruction issued by the user, based on the port allocation rules and the port configuration file, assign a driver device to the port to be assigned, and determine the target driver device of the port to be assigned based on the allocation result.
[0071] Optionally, the execution module 303 is specifically used to determine the access path between the business system and the target driver device based on the physical port identifier of the port to be allocated and the hub name of the target driver device; wherein the access path is used to instruct the business system to access the target driver device.
[0072] The device linking apparatus provided in the above-mentioned embodiments can execute the device linking method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0073] Figure 6 : is a schematic diagram of the structure of an electronic device provided by the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0074] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (also called random access memory, RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0075] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0076] The processor 11 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a device link method.
[0077] In some embodiments, the device link method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the device link method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the device link method in any other appropriate manner (e.g., by means of firmware).
[0078] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0079] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0080] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0081] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0082] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server) or a computing system that includes middleware components (e.g., an application server) or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein) or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0083] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0084] In one embodiment, the present invention further includes a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the device linking method of any embodiment of the present invention is implemented.
[0085] The computer program product may be implemented in a computer program code for performing the operation of the present invention written in one or more programming languages or a combination thereof, including object-oriented programming languages and conventional procedural programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0086] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0087] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A device linking method, characterized in that: include: Receiving a port allocation instruction, and determining a port configuration file based on the port allocation instruction, wherein the port allocation instruction includes a port allocation instruction issued by a user and / or a restart instruction of a service system; Determine the target drive device corresponding to the port to be allocated by using the port configuration file and the pre-set port allocation rule; The port to be allocated is associated with the target drive device so that the service system accesses the target drive device through the port to be allocated.
2. The method according to claim 1, characterized in that: The receiving a port allocation instruction and determining a port configuration file based on the port allocation instruction includes: receiving the port allocation instruction, and parsing type information of the port allocation instruction; When the type information indicates that the port allocation instruction is a port allocation indication issued by the user, determining the port configuration file according to configuration information sent by the user, wherein the configuration information is sent by the user based on an interactive interface; When the type information indicates that the port allocation instruction is a restart instruction of the service system, a historical port configuration file is obtained, and the port configuration file is determined based on the historical port configuration file, wherein the historical port configuration file is stored in a programmable read-only memory of the service system.
3. The method according to claim 2, characterized in that Determining the port configuration file according to the configuration information sent by the user includes: Determine the port to be allocated and the physical port identifier of the port to be allocated; wherein the port to be allocated is an idle port in the service system, and the number of the idle port is at least one; Determine device information of the driving device, wherein the device information includes a manufacturer identification, a device identification, and a product identification; The device information of the driving device and the physical port identifier of the port to be allocated are processed by using the configuration information to obtain the port configuration file.
4. The method according to claim 2, characterized in that: The determining the port configuration file based on the historical port configuration file comprises: Matching the historical port configuration file based on the port name of the port to be assigned to obtain a candidate port and a configuration file of the candidate port; The port profile is determined based on the profiles of the candidate ports.
5. The method according to claim 1, characterized in that The method of using the port configuration file and a pre-set port allocation rule to determine a target drive device corresponding to the port to be allocated includes: When the port allocation instruction is a restart instruction of the business system, determining a target driver device corresponding to the port to be allocated based on a character string in the port configuration file; When the port allocation instruction is a port allocation indication issued by the user, a driver device is allocated to the port to be allocated based on the port allocation rule and the port configuration file, and a target driver device of the port to be allocated is determined based on the allocation result.
6. The method according to claim 1, characterized in that The associating the port to be allocated with the target drive device comprises: Determining access paths of the service system and the target drive device based on the physical port identifier of the port to be allocated and the hub name of the target drive device; The access path is used to instruct the business system to access the target drive device.
7. A device linking device, characterized in that: Used to implement the device linking method described in any one of claims 1 to 6, the device linking device comprises: An acquisition module, configured to receive a port allocation instruction and determine a port configuration file based on the port allocation instruction, wherein the port allocation instruction includes a port allocation instruction issued by a user and / or a restart instruction of a business system; A determination module, used to determine a target drive device corresponding to the port to be assigned by using the port configuration file and a pre-set port assignment rule; The execution module is used to associate the port to be allocated with the target drive device so that the service system accesses the target drive device through the port to be allocated.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device linking method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device linking method described in any one of claims 1 to 6 when executed.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the device linking method according to any one of claims 1 to 6.