WO2025082187A1 - 文件共享方法、装置、系统、电子设备及存储介质 - Google Patents
文件共享方法、装置、系统、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2025082187A1 WO2025082187A1 PCT/CN2024/122204 CN2024122204W WO2025082187A1 WO 2025082187 A1 WO2025082187 A1 WO 2025082187A1 CN 2024122204 W CN2024122204 W CN 2024122204W WO 2025082187 A1 WO2025082187 A1 WO 2025082187A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- bmc
- slave
- bmcs
- master
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/148—File search processing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/172—Caching, prefetching or hoarding of files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/17—Details of further file system functions
- G06F16/176—Support for shared access to files; File sharing support
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the field of server technology, and in particular to a file sharing method, device, system, electronic device and storage medium.
- a server system generally contains multiple server nodes.
- File resource scheduling between server nodes is to manage and schedule the transmission and access of file resources (such as upgrade files, configuration files, etc.) between different server nodes.
- File resource scheduling between server nodes involves deciding which server node to store file resources, how to transfer files from one node to another, and ensuring that the access and use of file resources meet performance and reliability requirements.
- the scheduling of file resources between server nodes requires logging into the server node to implement the scheduling of file resources between different server nodes.
- the present application provides a file sharing method, device, system, electronic device and storage medium.
- the present application provides a file sharing method, which is applied to a master baseboard management controller BMC, where the master BMC and multiple slave BMCs are BMCs of different server nodes in a server system, and the method includes:
- the file to be obtained is obtained from the target slave BMC, and the file to be obtained is transmitted to the slave BMC that sends the file access request.
- obtaining a file to be obtained from a target slave BMC includes:
- a file extraction message is sent to the target slave BMC, so that the target slave BMC transmits the file to be obtained to the master BMC based on the file transmission path.
- a file to be obtained is transmitted to a subordinate BMC that sends a file access request, including:
- the compressed file is transferred to the slave BMC that sent the file access request.
- the method further includes:
- the file to be obtained is stored in the cache space of the master BMC.
- a file sharing method after storing the file to be obtained in the cache space of the master BMC, it also includes:
- the to-be-acquired files are acquired from the cache space, and the to-be-acquired files are transmitted to the subordinate BMCs that sent the file access requests.
- a file sharing method provided by the present application also includes:
- the method after receiving file access requests from multiple slave BMCs, the method further includes:
- the file access requests of the multiple slave BMCs are added to the request queue, so that the master BMC performs the file acquisition operation based on the request queue.
- the load ranking of the multiple slave BMCs is determined, and based on the load ranking, the execution priority of the file access requests of the multiple slave BMCs is determined.
- a file sharing method provided by the present application also includes:
- the file change request is sent to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- the present application further provides a file sharing method, which is applied to a slave BMC, wherein the master BMC and the plurality of slave BMCs are BMCs of different server nodes in a server system, and the method comprises:
- the master BMC determines, based on a file system mapping table in the master BMC, a file to be obtained corresponding to the file access request and a target slave BMC storing the file to be obtained among multiple slave BMCs, determines, based on a connection relationship table in the master BMC, a file transmission path for obtaining the file to be obtained from the target slave BMC, obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave BMC that sent the file access request, wherein the file system mapping table includes file storage addresses of multiple slave BMCs and file information stored in the file storage addresses, and the connection relationship table is determined based on a connection relationship between server nodes in the server system; and
- a file sharing method provided by the present application also includes:
- a file change request is sent to a master BMC, so that the master BMC determines, based on a file system mapping table in the master BMC, a file to be changed corresponding to the file change request and a slave BMC storing the file to be changed among a plurality of slave BMCs, and sends the file change request to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- a file sharing method provided by the present application also includes:
- receiving a file to be obtained sent by a master BMC includes:
- the encrypted file to be obtained is decrypted to obtain the file to be obtained.
- the present application further provides a file sharing device, which is applied to a master baseboard management controller BMC, wherein the master BMC and a plurality of slave BMCs are BMCs of different server nodes in a server system, and the device comprises:
- a request receiving module used for receiving file access requests from multiple slave BMCs
- a file query module is used to determine the to-be-acquired file corresponding to the file access request and the target slave BMC storing the to-be-acquired file among multiple slave BMCs based on the file system mapping table in the master BMC, wherein the file system mapping table includes the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses;
- a file path determination module for determining a file transfer path for obtaining a to-be-obtained file from a target slave BMC based on a connection relationship table in a master BMC, wherein the connection relationship table is determined based on a connection relationship between server nodes in a server system;
- the file acquisition module is used to acquire the file to be acquired from the target slave BMC based on the file transmission path, and transmit the file to be acquired to the slave BMC that sends the file access request.
- the present application further provides a file sharing device, which is applied to a slave baseboard management controller BMC, wherein the master BMC and multiple slave BMCs are BMCs of different server nodes in a server system, and the device includes:
- a request sending module is used to send a file access request to a master BMC, so that after receiving the file access request, the master BMC determines the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in multiple slave BMCs based on the file system mapping table in the master BMC, determines the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave BMC that sends the file access request, the file system mapping table contains the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses, and the connection relationship table is determined based on the connection relationship between the server nodes in the server system; and a file receiving module is used to receive the file to be obtained sent by the master BMC.
- the present application further provides a file sharing system, including a master baseboard management controller BMC and multiple slave BMCs, the master BMC and the multiple slave BMCs are BMCs of different server nodes in a server system;
- the master BMC receives file access requests from multiple slave BMCs;
- the master BMC determines the to-be-acquired file corresponding to the file access request and the target slave BMC storing the to-be-acquired file among the multiple slave BMCs based on the file system mapping table in the master BMC, wherein the file system mapping table includes the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses;
- the master BMC determines a file transfer path for obtaining the to-be-obtained file from the target slave BMC based on a connection relationship table in the master BMC, wherein the connection relationship table is determined based on a connection relationship between each server node in the server system;
- the master BMC obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave BMC that sends the file access request;
- the slave BMC that sends the file access request receives the file to be obtained sent by the master BMC.
- the present application further provides an electronic device, including:
- a memory associated with one or more processors the memory is used to store computer-readable instructions, and the computer-readable instructions implement any of the above-mentioned file sharing methods when read and executed by one or more processors.
- the present application also provides a non-transitory computer-readable storage medium, which stores computer-readable instructions.
- the computer-readable instructions are executed by one or more processors, any of the above-mentioned file sharing methods is implemented.
- FIG1 is a schematic diagram of a flow chart of a file sharing method according to an embodiment of the present application.
- FIG2 is a schematic diagram of the master BMC file execution file sharing process provided by the present application.
- FIG3 is a schematic diagram of a file sharing process of a slave BMC provided by the present application.
- FIG4 is a second flowchart of the file sharing method provided in an embodiment of the present application.
- FIG5 is a schematic diagram of a process of applying a file sharing method provided by an embodiment of the present application.
- FIG6 is a schematic diagram of the system architecture provided by the present application.
- FIG7 is a schematic diagram of the core functions of the file proxy program provided by the present application.
- FIG8 is a schematic diagram of a structure of a file sharing device according to an embodiment of the present application.
- FIG9 is a second structural diagram of the file sharing device provided in an embodiment of the present application.
- FIG. 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
- FIG1 is one of the flow charts of the file sharing method provided in an embodiment of the present application.
- the file sharing method provided in an embodiment of the present application is applied to a master baseboard management controller (Baseboard Management Controller, BMC), the master BMC and multiple slave BMCs are BMCs of different server nodes in a server system, and the method includes the following steps:
- BMC Baseboard Management Controller
- Step 110 receiving file access requests from multiple slave BMCs
- Step 120 based on the file system mapping table in the master BMC, determine the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in the multiple slave BMCs, the file system mapping table including the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses;
- Step 130 determining a file transfer path for obtaining the to-be-obtained file from the target slave BMC based on a connection relationship table in the master BMC, wherein the connection relationship table is determined based on a connection relationship between each server node in the server system;
- Step 140 acquiring the file to be acquired from the target slave BMC based on the file transmission path, and transmitting the file to be acquired to the slave BMC that sends the file access request.
- the server system in the embodiment of the present application is composed of multiple server nodes.
- Each server node includes a BMC.
- BMC is a hardware component integrated on the server motherboard, which is used to monitor, manage and control the system hardware and related functions.
- BMC is usually composed of a dedicated microprocessor, memory and interface circuit, independent of the main processor.
- BMC implements remote management, hardware monitoring, hardware upgrades, remote control, logging and basic input/output system (BIOS) management of server hardware through remote management tools, which helps to simplify and optimize the system management and maintenance process.
- BIOS basic input/output system
- the BMCs corresponding to multiple server nodes in the server system are divided into a master BMC and multiple slave BMCs.
- BMC is responsible for coordinating and managing the file access operations of all subordinate BMCs.
- a controller can be set in the master BMC, based on which file resources can be dynamically allocated and scheduled according to the system status and requirements to ensure efficient and stable access.
- the master BMC can be selected based on the BMC corresponding to the server node with high functional core in the server system.
- the slave BMC is the BMC that is managed and scheduled by the master BMC.
- the slave node performs the file scheduling work assigned by the master BMC.
- the following takes the master BMC executing the file sharing method provided by the present application as an example to describe the technical solution of the present application in detail.
- step 110 the master BMC receives file access requests from a plurality of slave BMCs.
- a file access request is a request sent by a slave BMC to obtain a file.
- a slave BMC needs to obtain a file, it sends a file access request to the master BMC. After receiving the file access request sent by the slave BMC, the master BMC executes the corresponding request response.
- BMC In server systems, BMC is usually used to monitor and manage server hardware, such as CPU (Central Processing Unit), memory, hard disk, etc. BMC is also responsible for monitoring the power status of the server, controlling the remote power on and off of the server, etc. As the scale of servers expands, the functions of BMC are becoming more and more diverse. BMC not only monitors the hardware status, but also provides some additional services, such as remote control, hardware upgrades, and virtualization. Among these services, file access is one of the most basic services.
- CPU Central Processing Unit
- the BMC in the server system in the related method is usually a separate chip, and the communication between BMCs is generally achieved through a serial communication protocol (Inter-Integrated Circuit, I2C) bus or a full-duplex, synchronous serial communication interface (Serial Peripheral Interface, SPI) bus.
- This communication method has some limitations, such as slow communication speed and limited transmission distance.
- I2C Inter-Integrated Circuit
- SPI Serial Peripheral Interface
- a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol stack can be set on each BMC, and a communication connection between BMCs can be established through the network protocol, thereby realizing the message and data transmission between the master BMC and multiple slave BMCs.
- TCP/IP Transmission Control Protocol/Internet Protocol
- connection relationship between the master BMC and the multiple slave BMCs can be a star connection relationship in which the multiple slave BMCs are respectively connected to the master BMC. Based on this connection relationship, when data is shared, since each slave BMC is directly connected to the master BMC, direct communication between the multiple slave BMCs and the master BMC can be achieved, which can improve the efficiency of data sharing.
- step 120 based on the file system mapping table set in the master BMC, the to-be-acquired file corresponding to the file access request and the target slave BMC storing the to-be-acquired file among the plurality of slave BMCs are determined.
- the file system mapping table is pre-built and contains the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses. After the master BMC receives the file access request, it searches the file system mapping table to determine the file to be obtained in the file access request and the target slave BMC containing the file to be obtained.
- each slave BMC includes a storage space.
- File resources can be stored in the storage space of each slave BMC.
- the file resources stored in the storage space of each slave BMC are recorded in the file system mapping table. Based on the file system mapping table, the file resources in each slave BMC can be scheduled based on the master BMC, thereby realizing file exchange between multiple slave BMCs.
- a file transmission path for obtaining the to-be-obtained file from the target slave BMC is determined based on a connection relationship table in the master BMC, wherein the connection relationship table is determined based on the connection relationship between the server nodes in the server system.
- the server nodes in the server system are interconnected and have a connection relationship. Based on the connection relationship, a connection relationship table of each server node can be determined. Among them, the connection relationship can be a connection relationship of serial connection of each server node, or a star connection relationship of each slave BMC connected to the master BMC.
- the master BMC and the target slave BMC may include Contains multiple lines, separated by multiple slave BMCs. Based on the connection relationship table, the optimal path between the master BMC and the target slave BMC can be determined, and the file to be obtained is obtained from the target slave BMC based on the optimal path, which can improve the efficiency of file acquisition.
- the acquisition path for acquiring the to-be-acquired file from the target slave BMC can be determined, thereby realizing the extraction of the to-be-acquired file.
- step 140 based on the file transmission path, the master BMC obtains the file to be obtained from the target slave BMC, and transmits the file to be obtained to the slave BMC that sends the file access request.
- the BMC of the server node controls the corresponding hard disk firmware to perform the upgrade operation.
- the firmware upgrade file can be transmitted between the BMCs of each server node through the master BMC in the server system, so as to realize the sharing of the firmware upgrade file in the BMC of each server node, thereby realizing the efficient transmission of the firmware upgrade file and improving the efficiency of the firmware upgrade.
- file resource sharing between BMCs of server nodes in a server system can be achieved by running a file system agent in the BMC of each server node to process file access requests and responses, thereby achieving file sharing in the BMCs of the server nodes.
- the file sharing method sets a file system mapping table containing file storage addresses of multiple slave BMCs and file information stored in the file storage addresses in the master BMC, so that after the master BMC receives a file access request, it can query the file system mapping table and obtain the to-be-acquired file and its storage location corresponding to the file access request. Based on the storage location, the to-be-acquired file is obtained and transmitted to the corresponding slave BMC, so that files can be transmitted to each other within the BMC of each server node, so that files between the BMCs of each server node can be shared, thereby improving the file transmission efficiency of each server node in the server system.
- obtaining the file to be obtained from the target slave BMC includes: generating a file extraction message for the file to be obtained based on the file information of the file to be obtained and the file transfer path; sending the file extraction message to the target slave BMC so that the target slave BMC transfers the file to be obtained to the master BMC based on the file transfer path.
- a file extraction message of the file to be obtained is generated and sent to the target slave BMC, wherein the file extraction message includes the file information of the file to be obtained and the file transmission path.
- the target slave BMC After receiving the file extraction message, the target slave BMC obtains the to-be-acquired file from the storage space based on the file transmission path, and transmits the obtained to-be-acquired file to the master BMC.
- the master BMC executes the file sharing process as shown in the master BMC file execution file sharing process provided by the present application in Figure 2.
- the master BMC determines whether the file access request is to access a file in the storage space in the master BMC.
- the file processing module in the master BMC is called to execute.
- the file access request is added to the request queue, and the file system mapping table is queried to determine the target slave BMC that stores the file to be processed corresponding to the file access request.
- the target slave BMC sends a file extraction message so that the target slave BMC sends the file to be obtained to the master BMC.
- the file sharing process performed by the slave BMC can be shown as a schematic diagram of the file sharing process of the slave BMC provided in this application in FIG3.
- the slave BMC After receiving the file access request, the slave BMC first checks whether the access file exists, and in response to determining that the access file exists, continues to detect whether the file is enabled for access protection, and in response to determining that the file is not enabled for access protection, obtains the file to be obtained from the storage space, and returns the file to be obtained to the master BMC, and in response to determining that the file is enabled for access protection, returns the result error information to the master BMC.
- the file sharing method provided in the embodiment of the present application realizes the acquisition of the file to be acquired by generating a file extraction message for the file to be acquired and sending the file extraction message to the target subordinate BMC.
- transmitting the file to be obtained to the subordinate BMC that sends the file access request includes: encrypting the file to be obtained to obtain the encrypted file to be obtained, and compressing the encrypted file to be obtained to obtain a compressed file; transmitting the compressed file to the subordinate BMC that sends the file access request.
- the master BMC After the master BMC receives the file to be obtained, it encrypts and compresses the file to be obtained to obtain a compressed file. The compressed file is then transmitted to the slave BMC that sends the file access request. After receiving the compressed file, the slave BMC that sends the file access request decompresses and decrypts it to obtain the file to be obtained. Based on compressed transmission, the transmission speed of the file to be obtained can be increased, thereby improving the transmission efficiency.
- the encryption process can be based on the data encryption algorithm, and can select symmetric encryption algorithm (Advanced Encryption Standard, AES) and symmetric encryption algorithm (Data Encryption Standard, DES) for encryption, or asymmetric encryption algorithm (Rivest-Shamir-Adleman, RSA) and asymmetric encryption algorithm (Elliptic Curve Cryptography, ESS) for encryption to improve the security and efficiency of file transfer.
- AES Advanced Encryption Standard
- DES Data Encryption Standard
- RSA Raster-Shamir-Adleman
- ESS Elliptic Curve Cryptography
- the file sharing method provided in the embodiment of the present application improves the security and efficiency of file transmission by encrypting and compressing the files to be transmitted during transmission.
- the method further includes: storing the to-be-obtained file in the cache space of the master BMC.
- a cache space is set in the master BMC, and the set cache space can be used to store the file data that has been recently accessed. After the master BMC obtains the file to be obtained, the file to be obtained is stored in the cache space of the master BMC.
- the file sharing method provided in the embodiment of the present application stores the to-be-acquired file in the cache space of the master BMC after the master BMC acquires the to-be-acquired file, thereby facilitating subsequent acquisition of the to-be-acquired file by other BMCs.
- after storing the file to be obtained in the cache space of the master BMC it also includes: in response to determining that the file access requests received from multiple slave BMCs are to obtain the file to be obtained, obtaining the file to be obtained from the cache space, and transmitting the file to be obtained to the slave BMC that sent the file access request.
- the file to be obtained is stored in the cache space of the master BMC.
- multiple slave BMCs need to obtain the file to be obtained later, they can directly obtain it from the cache space.
- the master BMC receives file access requests from multiple slave BMCs. In response to determining that the file access request is to obtain a file to be obtained, the master BMC obtains the file to be obtained from the cache space and transmits it to the slave BMC that sent the file access request.
- the files stored in the cache space can be updated as needed, and the recently accessed file data can also be stored, which can reduce the same file request operations to increase the speed of file access.
- the file sharing method provided in the embodiment of the present application stores the to-be-acquired file in the cache space of the master BMC.
- multiple slave BMCs subsequently need to acquire the to-be-acquired file, they can directly acquire the file from the cache space, thereby reducing request operations for the same file and improving file access efficiency.
- the method further includes: determining a required file to be acquired by the master BMC; determining a slave BMC corresponding to the required file stored in multiple slave BMCs based on a file system mapping table; and acquiring the required file from the slave BMC corresponding to the required file stored in the slave BMC.
- the master control BMC also needs to obtain file resources.
- the master control BMC needs to obtain files, the required files to be obtained by the master control BMC are determined.
- the master BMC determines the slave BMC for the storage requirement file based on the query file system mapping table, and Obtain the requirement file directly from the subordinate BMC.
- the file sharing method provided in the embodiment of the present application directly queries the file system mapping table when the master BMC needs to obtain the required file, and directly obtains the required file from the slave BMC storing the required file, thereby realizing the acquisition process of the required file of the master BMC.
- the method further includes: determining the execution priority of the file access requests of the multiple slave BMCs; and adding the file access requests of the multiple slave BMCs to a request queue based on the execution priority, so that the master BMC executes a file acquisition operation based on the request queue.
- Multiple slave BMCs may send multiple file access requests to the master BMC. After receiving the multiple file access requests simultaneously, the master BMC processes each file access request based on the execution priority of each file access request.
- the request queue stores the requests in order to ensure the order and fairness of the requests.
- the master BMC After building the request queue, the master BMC processes each file access request based on the priority order of the file access requests in the request queue.
- the file sharing method built a request queue in the master BMC based on the execution priority of the file access requests of multiple slave BMCs, and processes each file access request based on the priority order of the file access requests in the request queue, thereby ensuring the orderliness and fairness of each file access request.
- determining the execution priority of file access requests of multiple slave BMCs includes: receiving real-time load information of multiple slave BMCs; determining the load ranking of the multiple slave BMCs based on the real-time load information of the multiple slave BMCs, and determining the execution priority of file access requests of the multiple slave BMCs based on the load ranking.
- determining the execution priorities of the file access requests of the plurality of slave BMCs it may be determined based on the real-time load information of the plurality of slave BMCs.
- the master BMC receives real-time load information of multiple slave BMCs, and sorts the loads of multiple slave BMCs according to the load sizes in the real-time load information of the multiple slave BMCs. For example, by sorting according to the load size, the priority of the BMC with a large load is delayed, and the file access request of the BMC with a small load is processed first, which can improve the request processing speed.
- the file sharing method provided in the embodiment of the present application receives real-time load information of multiple slave BMCs through the master BMC.
- the master BMC sorts the loads of the multiple slave BMCs according to the load sizes in the real-time load information of the multiple slave BMCs, thereby improving the file access request efficiency of the multiple slave BMCs.
- the method further includes: receiving a file change request; determining, based on a file system mapping table in a master BMC, a file to be changed corresponding to the file change request and a slave BMC storing the file to be changed among multiple slave BMCs; and sending the file change request to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- the master BMC when a file in a slave BMC needs to be modified, the master BMC receives a file modification request, wherein the file modification request may be sent by a slave BMC in the server system, or may be sent by a server node in the server system to the master BMC.
- the master BMC After receiving the file change request, the master BMC queries the file system mapping table in the master BMC to determine the file to be changed corresponding to the file change request and the slave BMCs storing the file to be changed among the multiple slave BMCs.
- the master BMC sends a file change request to the slave BMC storing the file to be changed. After receiving the file change request, the slave BMC storing the file to be changed changes the file to be changed stored in its storage space.
- the file sharing method provided in the embodiment of the present application sends a file change request to a slave BMC storing the file to be changed through the master BMC. After receiving the file change request, the slave BMC storing the file to be changed changes the file to be changed stored in its storage space. The process of changing the storage files in the BMC of each server node is realized.
- FIG4 is a second flow chart of the file sharing method provided in an embodiment of the present application.
- the file sharing method provided in an embodiment of the present application is applied to a slave BMC, where the master BMC and the plurality of slave BMCs are BMCs of different server nodes in the server system.
- the method comprises the following steps:
- Step 410 Send the file access request to the master BMC, so that after receiving the file access request, the master BMC determines the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in the multiple slave BMCs based on the file system mapping table in the master BMC, determines the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave BMC that sends the file access request, the file system mapping table includes the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses, and the connection relationship table is determined based on the connection relationship between the server nodes in the server system;
- Step 420 Receive the file to be acquired sent by the master BMC.
- the server system in the embodiment of the present application is composed of multiple server nodes.
- Each server node includes a BMC.
- BMC is a hardware component integrated on the server motherboard, which is used to monitor, manage and control the system hardware and related functions.
- BMC is usually composed of a dedicated microprocessor, memory and interface circuit, independent of the main processor.
- BMC implements remote management, hardware monitoring, hardware upgrade, remote control, logging and BIOS management of server hardware through remote management tools, which helps to simplify and optimize the system management and maintenance process.
- the BMCs corresponding to multiple server nodes in the server system are divided into a master BMC and multiple slave BMCs.
- the master BMC is responsible for coordinating and managing the file access operations of all slave BMCs.
- a controller can be set in the master BMC, based on which file resources can be dynamically allocated and scheduled according to the status and needs of the system to ensure the efficiency and stability of access.
- the master BMC can be selected based on the BMC corresponding to the server node with high functional core in the server system.
- the slave BMC is the opposite of the master BMC and is managed and scheduled by the master BMC.
- the slave node performs the file scheduling work assigned by the master BMC.
- the following takes the slave BMC executing the file sharing method provided by the present application as an example to describe the technical solution of the present application in detail.
- a file access request is a request sent by a slave BMC to obtain a file.
- a slave BMC needs to obtain a file, it sends a file access request to the master BMC. After receiving the file access request sent by the slave BMC, the master BMC executes the corresponding request response.
- BMC In server systems, BMC is usually used to monitor and manage server hardware, such as CPU, memory, hard disk, etc. BMC is also responsible for monitoring the power status of the server, controlling the remote power on and off of the server, and other functions. As the scale of servers expands, the functions of BMC are becoming more and more diverse. BMC not only monitors the hardware status, but also provides some additional services, such as remote control, hardware upgrades, and virtualization. Among these services, file access is one of the most basic services.
- the BMC in the server system in the related method is usually a separate chip, and the communication between them is generally achieved through a serial communication protocol bus or a full-duplex, synchronous serial communication interface bus.
- This communication method has some limitations, such as slow communication speed and limited transmission distance.
- multiple BMCs need to be used, which requires the sharing of file systems between BMCs.
- a communication connection between multiple BMCs can be established.
- a TCP/IP protocol stack can be set on each BMC, and a communication connection between BMCs can be established through a network protocol, thereby realizing message and data transmission between the master BMC and multiple slave BMCs.
- the master BMC After receiving the file access request sent by the slave BMC, the master BMC determines the to-be-acquired file corresponding to the file access request and the target slave BMC storing the to-be-acquired file among the multiple slave BMCs by querying the file system mapping table set in the master BMC.
- the file system mapping table is pre-built and contains the file storage addresses and file The file information stored in the storage address. After receiving the file access request, the master BMC searches the file system mapping table to determine the file to be obtained in the file access request and the target slave BMC containing the file to be obtained.
- multiple slave BMCs contain storage spaces. Therefore, file resources can be stored in the storage spaces of multiple slave BMCs.
- the file system mapping table records the file resources stored in the storage spaces of multiple slave BMCs. Based on the file system mapping table, the master BMC can be used to schedule file resources in multiple slave BMCs, thereby realizing file exchange between multiple slave BMCs.
- connection relationship table of each server node can be determined.
- the connection relationship can be a connection relationship of serial connection of each server node, or a star connection relationship in which multiple slave BMCs are respectively connected to the master BMC, etc.
- the master BMC determines the target slave BMC corresponding to the file to be obtained, there may be multiple lines between the master BMC and the target slave BMC, with multiple slave BMCs in between. Based on the connection relationship table, the optimal path between the master BMC and the target slave BMC can be determined, and the file to be obtained can be obtained from the target slave BMC based on the optimal path, which can improve the efficiency of file acquisition.
- the acquisition path for acquiring the to-be-acquired file from the target slave BMC can be determined, thereby realizing the extraction of the to-be-acquired file.
- step 420 after the master BMC obtains the file to be obtained, it transmits the file to be obtained to the slave BMC that sent the file access request, and the slave BMC receives the file to be obtained sent by the master BMC.
- file access requests of multiple slave BMCs are received, and after obtaining the file to be obtained from multiple slave BMCs, the file access requests are sent to the slave BMC that needs to access the file to be obtained, thereby realizing file sharing among multiple BMCs in the server system, allowing files to be transferred between the BMCs of each server node, and improving the file transmission efficiency of each server node in the server system.
- the file sharing method sets a file system mapping table containing file storage addresses of multiple slave BMCs and file information stored in the file storage addresses in the master BMC, so that after the master BMC receives a file access request, it can query the file system mapping table and obtain the to-be-acquired file and its storage location corresponding to the file access request. Based on the storage location, the to-be-acquired file is obtained and transmitted to the corresponding slave BMC, so that files can be transmitted to each other within the BMC of each server node, so that files between the BMCs of each server node can be shared, thereby improving the file transmission efficiency of each server node in the server system.
- the method further includes: sending a file change request to a master BMC, so that the master BMC determines the file to be changed corresponding to the file change request and the slave BMC storing the file to be changed among the multiple slave BMCs based on the file system mapping table in the master BMC, and sending the file change request to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- the slave BMC when a file in a slave BMC needs to be modified, the slave BMC sends a file modification request to the master BMC.
- the master BMC After receiving the file change request, the master BMC queries the file system mapping table in the master BMC to determine the file to be changed corresponding to the file change request and the slave BMCs storing the file to be changed among the multiple slave BMCs.
- the master BMC sends a file change request to the slave BMC storing the file to be changed. After receiving the file change request, the slave BMC storing the file to be changed changes the file to be changed stored in its storage space.
- the file sharing method provided in the embodiment of the present application sends a file change request to the master BMC. After the slave BMC storing the file to be changed receives the file change request, it changes the file to be changed stored in its storage space, thereby realizing the process of changing the stored files in the BMC of each server node.
- the method further includes: receiving a file extraction message from a master control BMC, and based on the file extraction message, obtaining a to-be-acquired file corresponding to the file extraction message from a storage space; and sending the to-be-acquired file to the master control BMC.
- a file extraction message of the file to be obtained is generated and sent to the subordinate BMC, wherein the file extraction message includes the file information of the file to be obtained.
- the slave BMC After receiving the file extraction message, the slave BMC obtains the to-be-acquired file from the storage space, and sends the obtained to-be-acquired file to the master BMC.
- the file sharing method provided in the embodiment of the present application realizes the acquisition of the file to be acquired by generating a file extraction message for the file to be acquired and sending the file extraction message to the target subordinate BMC.
- receiving a file to be acquired sent by a master BMC includes: receiving a compressed file sent by the master BMC, where the compressed file is obtained by encrypting the file to be acquired by the master BMC to obtain the encrypted file to be acquired, and compressing the encrypted file to be acquired; decompressing the compressed file to obtain the encrypted file to be acquired; and decrypting the encrypted file to be acquired to obtain the file to be acquired.
- the master BMC After the master BMC receives the file to be obtained, it encrypts and compresses the file to be obtained to obtain a compressed file, and transmits the compressed file to the slave BMC that sends the file access request.
- the subordinate BMC that sends the file access request decompresses and decrypts the file to be obtained.
- the transmission speed of the files to be obtained can be increased, thereby improving the transmission efficiency.
- the encryption process can be based on the data encryption algorithm, and the symmetric encryption algorithm AES and the symmetric encryption algorithm DES can be selected for encryption, or the asymmetric encryption algorithm RSA and the asymmetric encryption algorithm ESS encryption can be selected for encryption to improve the security and efficiency of file transmission.
- the file sharing method provided in the embodiment of the present application improves the security and efficiency of file transmission by encrypting and compressing the files to be transmitted during transmission.
- FIG5 a flowchart of a file sharing method provided by an embodiment of the present application, as an example to illustrate the technical solution provided by the embodiment of the present application:
- Step 510 Build a system architecture of multiple BMCs.
- the architecture diagram may be shown in FIG6 as a system architecture diagram provided by the present application.
- the architecture includes multiple slave BMCs (slave BMC1, slave BMC2, slave BMC3, slave BMCn) and a master BMC.
- Step 520 Establish communication connections between multiple BMCs.
- a TCP/IP protocol stack is installed on each BMC, and communication connections between multiple BMCs are established through network protocols.
- Step 530 run the file system agent on multiple BMCs. It is used to process file access requests and responses for files.
- the file system agent adopts the addition of data encryption and compression functions.
- the data encryption algorithm can select the symmetric encryption algorithm AES and DES, or the asymmetric encryption algorithm RSA and ESS to improve the security and efficiency of the system.
- the access and management of the file system are optimized by using multi-threading or multi-process to improve the concurrency and responsiveness of the system.
- the functions of the file agent can be shown in the core function diagram of the file agent provided in the present application in Figure 7.
- the file agent includes the functions of request queue, request processing, request distribution, data encryption, data compression, and access to cache space.
- Step 540 a master BMC is set from the BMCs of each server node in the slave server system.
- the master BMC is responsible for coordinating and managing the file system access operations of all slave BMCs.
- the master BMC can dynamically allocate and schedule file system resources according to the system status and requirements to ensure the efficiency and stability of access.
- the master BMC is selected based on the BMC with high functional core.
- Step 550 Set a file system mapping table on the master BMC.
- the file system mapping table refers to a data structure used to record the physical storage location and related attributes of files and directories in the file system. It is used to store file system information and file paths on each BMC and is a transfer station for file interaction.
- Step 560 Set a cache space on the master BMC, where the cache space is used to store the most recently accessed file data. It is mainly used for other BMCs to access the same file of the same BMC, reducing the same file request operations to improve the file access speed.
- Step 570 file sharing between BMCs.
- a BMC When a BMC needs to access a file on another BMC, it first sends a file access request to the master BMC, and adds the file access request to the request queue (each BMC in the system can submit a file system access request to the request queue, and the request queue stores the requests in order to ensure the order and fairness of the requests).
- the request queue is used to store file access requests from multiple BMCs.
- the request processing module of the master BMC reads the content of the request queue and determines the BMC where the requested file is located according to the file mapping table.
- the request distribution module is responsible for obtaining requests from the request queue and distributing the requests to the appropriate BMC for processing according to a certain scheduling algorithm, and the request distribution module can make judgments and decisions based on factors such as the type of request, priority, and load of the BMC), the file access request is forwarded to the file system agent of a specific BMC according to certain rules; when the master BMC needs to access files of other subordinate BMCs, a separate request processing module is used to process the request.
- Step 580 After receiving the file access request, the file system agent of the BMC enables the request processing module (each BMC has a request processing module, which is responsible for receiving and processing the file system access request distributed to it) to process the file access request.
- the BMC performs corresponding file system operations such as reading, writing, deleting, etc. according to the type of request, and is also responsible for returning the processing results to the request initiator or other related BMCs.
- Step 590 implement file changes between BMCs.
- a BMC needs to create or delete a file, it first sends a notification to the master BMC, and the master BMC promptly updates the access status of the file system.
- a BMC needs to modify a file, it first sends a request to the master BMC, and the master BMC forwards the request to the corresponding file system agent for processing; after receiving the request, the file system agent forwards the file operation request to the master BMC for verification, and performs the file operation after the verification is passed.
- the BMCs can share the file system.
- the master BMC can coordinate the file system read and write requests of multiple slave BMCs, avoiding conflicts and delays, thereby improving system reliability.
- FIG8 is a schematic diagram of a file sharing device according to an embodiment of the present application.
- the file sharing device includes: a request receiving module 810 , a file query module 820 , a file path determining module 830 and a file obtaining module 840 .
- the request receiving module 810 is used to receive file access requests from multiple slave BMCs;
- the file query module 820 is used to determine the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in multiple slave BMCs based on the file system mapping table in the master BMC, and the file system mapping table contains the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses;
- the file path determination module 830 is used to determine the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, and the connection relationship table is determined based on the connection relationship between each server node in the server system;
- the file acquisition module 840 is used to obtain the file to be obtained from the target slave BMC based on the file transmission path, and transmit the file to be obtained to the slave BMC that sends the file access request.
- the file sharing device sets a file system mapping table including the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses in the master BMC, so that after the master BMC receives a file access request, it can query the file system mapping table and obtain the to-be-acquired file and its storage location corresponding to the file access request.
- the files to be obtained are obtained and transmitted to the corresponding slave BMC, so that the BMCs of each server node can transfer files to each other, so that the files between the BMCs of each server node can be shared, thereby improving the file transmission efficiency of each server node in the server system.
- the file acquisition module 840 is used to generate a file extraction message for the file to be acquired based on the file information and file transmission path of the file to be acquired; and send the file extraction message to the target slave BMC so that the target slave BMC transmits the file to be acquired to the master BMC based on the file transmission path.
- the file acquisition module 840 is further used to encrypt the file to be acquired to obtain the encrypted file to be acquired, and compress the encrypted file to be acquired to obtain a compressed file; and transmit the compressed file to the subordinate BMC that sends the file access request.
- the file acquisition module 840 is further configured to store the file to be acquired in the cache space of the master BMC.
- the file acquisition module 840 is further configured to, in response to determining that the received file access requests from multiple subordinate BMCs are for acquiring files to be acquired, acquire the files to be acquired from the cache space and transmit the files to be acquired to the subordinate BMC that sent the file access request.
- the file acquisition module 840 is further used to: determine the required file to be acquired by the master BMC; determine the slave BMC corresponding to the storage required file among multiple slave BMCs based on the file system mapping table; and acquire the required file from the slave BMC corresponding to the storage required file.
- the request receiving module 810 is used to determine the execution priority of the file access requests of multiple slave BMCs; based on the execution priority, the file access requests of multiple slave BMCs are added to the request queue so that the master BMC performs the file acquisition operation based on the request queue.
- the request receiving module 810 is further used to receive real-time load information of multiple slave BMCs; determine the load ranking of multiple slave BMCs based on the real-time load information of multiple slave BMCs, and determine the execution priority of file access requests of multiple slave BMCs based on the load ranking.
- the file acquisition module 840 is further used to: receive a file change request; determine, based on the file system mapping table in the master BMC, the file to be changed corresponding to the file change request and the slave BMC storing the file to be changed among the plurality of slave BMCs;
- the file change request is sent to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- Fig. 9 is a second schematic diagram of the structure of the file sharing device provided in the embodiment of the present application.
- the file sharing device provided in the embodiment of the present application includes: a request sending module 910 and a file receiving module 920 .
- the request sending module 910 is used to send a file access request to the master BMC, so that after receiving the file access request, the master BMC determines the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in multiple slave BMCs based on the file system mapping table in the master BMC, determines the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave BMC that sends the file access request, the file system mapping table contains the file storage addresses of multiple slave BMCs and the file information stored in the file storage addresses, and the connection relationship table is determined based on the connection relationship between the server nodes in the server system; the file receiving module 920 is used to receive the file to be obtained sent by the master BMC.
- the file sharing device sets a file system mapping table including file storage addresses of multiple slave BMCs and file information stored in the file storage addresses in the master BMC, so that after the master BMC receives a file access request, it can query the file system mapping table and obtain the to-be-acquired file and its storage location corresponding to the file access request. Based on the storage location, the to-be-acquired file is obtained and transmitted to the corresponding slave BMC, so that files can be transmitted to each other within the BMC of each server node, so that files between the BMCs of each server node can be shared, thereby improving the file transmission efficiency of each server node in the server system.
- the file receiving module 920 is used to: send a file change request to the master BMC, so that the master BMC determines the file to be changed corresponding to the file change request and the slave BMC storing the file to be changed among multiple slave BMCs based on the file system mapping table in the master BMC, and sends the file change request to the slave BMC storing the file to be changed, so that the slave BMC storing the file to be changed changes the file to be changed.
- the file receiving module 920 is also used to: receive a compressed file sent by the master BMC, where the compressed file is obtained by the master BMC encrypting the file to be obtained to obtain the encrypted file to be obtained, and compressing the encrypted file to be obtained; decompressing the compressed file to obtain the encrypted file to be obtained; and decrypting the encrypted file to be obtained to obtain the file to be obtained.
- the present application also provides a file sharing system, which includes a master BMC and multiple slave BMCs, wherein the master BMC and the multiple slave BMCs are BMCs of different server nodes in a server system; the master BMC receives file access requests from multiple slave BMCs; the master BMC determines, based on a file system mapping table in the master BMC, a file to be obtained corresponding to the file access request and a target slave BMC storing the file to be obtained in multiple slave BMCs, wherein the file system mapping table includes file storage addresses of multiple slave BMCs and file information stored in the file storage addresses; the master BMC determines, based on a connection relationship table in the master BMC, a file transmission path for obtaining the file to be obtained from the target slave BMC, wherein the connection relationship table is determined based on the connection relationship between the server nodes in the server system; the master BMC obtains the file to be obtained from the target slave BMC based on the file transmission path, and transmits the file to be obtained to the slave B
- the file sharing system sets a file system mapping table containing file storage addresses of multiple slave BMCs and file information stored in the file storage addresses in the master BMC, so that after the master BMC receives a file access request, it can query the file system mapping table and obtain the to-be-acquired file and its storage location corresponding to the file access request. Based on the storage location, the to-be-acquired file is obtained and transmitted to the corresponding slave BMC, so that files can be transmitted to each other within the BMC of each server node, so that files between the BMCs of each server node can be shared, thereby improving the file transmission efficiency of each server node in the server system.
- the electronic device may include: one or more processors (processor) 1010, a communication interface (Communication Interface) 1020, a memory (memory) 1030 and a communication bus (bus) 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040.
- the processor 1010 may call the computer-readable instructions in the memory 1030 to execute the file sharing method, for example, including:
- Receive file access requests from multiple slave BMCs determine the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in the multiple slave BMCs based on the file system mapping table in the master BMC, the file system mapping table including the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses; determine the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, the connection relationship table is determined based on the connection relationship between the server nodes in the server system; obtain the file to be obtained from the target slave BMC based on the file transmission path, and transmit the file to be obtained to the slave BMC that sends the file access request.
- the computer-readable instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product.
- the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application.
- the aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
- the present application further provides a computer program product, which includes computer-readable instructions stored on a non-transitory computer-readable storage medium.
- the computer-readable instructions are executed by a computer, the computer can execute the file sharing method provided by the above-mentioned method embodiments, for example, including:
- Receive file access requests from multiple slave BMCs determine the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in the multiple slave BMCs based on the file system mapping table in the master BMC, the file system mapping table including the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses; determine the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, the connection relationship table is determined based on the connection relationship between the server nodes in the server system; obtain the file to be obtained from the target slave BMC based on the file transmission path, and transmit the file to be obtained to the slave BMC that sends the file access request.
- the present application further provides a non-transitory computer-readable storage medium having computer-readable instructions stored thereon, and when the computer-readable instructions are executed by a processor, the file sharing method provided by the above-mentioned method embodiments is implemented, for example, including:
- Receive file access requests from multiple slave BMCs determine the file to be obtained corresponding to the file access request and the target slave BMC storing the file to be obtained in the multiple slave BMCs based on the file system mapping table in the master BMC, the file system mapping table including the file storage addresses of the multiple slave BMCs and the file information stored in the file storage addresses; determine the file transmission path for obtaining the file to be obtained from the target slave BMC based on the connection relationship table in the master BMC, the connection relationship table is determined based on the connection relationship between the server nodes in the server system; obtain the file to be obtained from the target slave BMC based on the file transmission path, and transmit the file to be obtained to the slave BMC that sends the file access request.
- the device embodiments described above are illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
- each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware.
- the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM/RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Library & Information Science (AREA)
- Computer Hardware Design (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
一种文件共享方法、装置、系统、电子设备及存储介质。所述方法包括:包括主控BMC、多个从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,主控BMC接收多个从属BMC的文件访问请求,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及存储待获取文件的目标从属BMC;基于文件传输路径,从目标从属BMC中获取待获取文件,并传输至发送所述文件访问请求的从属BMC。通过在主控BMC中设置文件系统映射表,使得主控BMC接收文件访问请求后,查询文件系统映射表获取待获取文件,使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
Description
相关申请的交叉引用
本申请要求于2023年10月18日提交中国专利局,申请号为202311346113.2,申请名称为“文件共享方法、装置、系统、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及服务器技术领域,尤其涉及一种文件共享方法、装置、系统、电子设备及存储介质。
服务器系统中一般包含多个服务器节点。服务器节点之间的文件资源调度是管理和调度文件资源(例如升级文件、配置文件等)在不同服务器节点之间的传输和访问。服务器节点之间的文件资源调度涉及到决定哪个服务器节点上存储文件资源、如何将文件从一个节点传输到另一个节点,并确保对文件资源的访问和使用满足性能和可靠性要求。
现有的服务器系统中服务器节点之间文件资源的调度,需要登录服务器节点,实现不同服务器节点之间的文件资源调度。
发明内容
本申请提供一种文件共享方法、装置、系统、电子设备及存储介质。
第一方面,本申请提供一种文件共享方法,应用于主控基板管理控制器BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,方法包括:
接收多个从属BMC的文件访问请求;
基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;
基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;以及
基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
根据本申请提供的一种文件共享方法,基于文件传输路径,从目标从属BMC中获取待获取文件,包括:
基于待获取文件的文件信息以及文件传输路径,生成待获取文件的文件提取消息;以及
向目标从属BMC发送文件提取消息,以使目标从属BMC基于文件传输路径,将待获取文件传输至主控BMC。
根据本申请提供的一种文件共享方法,将待获取文件传输至发送文件访问请求的从属BMC,包括:
对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩,得到压缩文件;以及
将压缩文件传输至发送文件访问请求的从属BMC。
根据本申请提供的一种文件共享方法,从目标从属BMC中获取待获取文件之后,还包括:
将待获取文件存储至主控BMC的缓存空间。
根据本申请提供的一种文件共享方法,将待获取文件存储至主控BMC的缓存空间之后,还包括:
响应于确定接收的多个从属BMC的文件访问请求为获取待获取文件,从缓存空间中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
根据本申请提供的一种文件共享方法,还包括:
确定主控BMC待获取的需求文件;
基于文件系统映射表,确定多个从属BMC中存储需求文件对应的从属BMC;以及
从存储需求文件对应的从属BMC中获取需求文件。
根据本申请提供的一种文件共享方法,接收多个从属BMC的文件访问请求之后,还包括:
确定多个从属BMC的文件访问请求的执行优先级;以及
基于执行优先级,将多个从属BMC的文件访问请求加入请求队列,以使主控BMC基于请求队列执行文件获取操作。
根据本申请提供的一种文件共享方法,确定多个从属BMC的文件访问请求的执行优先级,包括:
接收多个从属BMC的实时负载信息;以及
基于多个从属BMC的实时负载信息,确定多个从属BMC的负载排序,并基于负载排序,确定多个从属BMC的文件访问请求的执行优先级。
根据本申请提供的一种文件共享方法,还包括:
接收文件更改请求;
基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC;以及
将文件更改请求发送至存储待更改文件的从属BMC,以使存储待更改文件的从属BMC更改待更改文件。
第二方面,本申请还提供一种文件共享方法,应用于从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,方法包括:
将文件访问请求发送至主控BMC,以使主控BMC接收文件访问请求后,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,并基于文件传输路径,从目标从属BMC中获取待获取文件,将待获取文件传输至发送文件访问请求的从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;以及
接收主控BMC发送的待获取文件。
根据本申请提供的一种文件共享方法,还包括:
向主控BMC发送文件更改请求,以使主控BMC基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC,并将文件更改请求发送至存储待更改文件的从属BMC,并使得存储待更改文件的从属BMC更改待更改文件。
根据本申请提供的一种文件共享方法,还包括:
接收主控BMC的文件提取消息,基于文件提取消息,从存储空间中获取文件提取消息对应的待获
取文件;以及
将待获取文件发送至主控BMC。
根据本申请提供的一种文件共享方法,接收主控BMC发送的待获取文件,包括:
接收主控BMC发送的压缩文件,压缩文件是主控BMC对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩得到的;
对压缩文件进行解压缩,得到加密后的待获取文件;以及
对加密后的待获取文件进行解密,得到待获取文件。
第三方面,本申请还提供一种文件共享装置,应用于主控基板管理控制器BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,装置包括:
请求接收模块,用于接收多个从属BMC的文件访问请求;
文件查询模块,用于基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;
文件路径确定模块,用于基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;以及
文件获取模块,用于基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
第四方面,本申请还提供一种文件共享装置,应用于从属基板管理控制器BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,装置包括:
请求发送模块,用于将文件访问请求发送至主控BMC,以使主控BMC接收文件访问请求后,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,并基于文件传输路径,从目标从属BMC中获取待获取文件,将待获取文件传输至发送文件访问请求的从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;以及文件接收模块,用于接收主控BMC发送的待获取文件。
第五方面,本申请还提供一种文件共享系统,包括主控基板管理控制器BMC以及多个从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC;
主控BMC接收多个从属BMC的文件访问请求;
主控BMC基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;
主控BMC基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;
主控BMC基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC;以及
发送文件访问请求的从属BMC接收主控BMC发送的待获取文件。
第六方面,本申请还提供一种电子设备,包括:
一个或多个处理器;以及
与一个或多个处理器关联的存储器,存储器用于存储计算机可读指令,计算机可读指令在被一个或多个处理器读取执行时实现上述任一种的文件共享方法。
第七方面,本申请还提供一种非暂态计算机可读存储介质,非暂态性计算机可读存储介质存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现如如上述任一种文件共享方法。
为了更清楚地说明本申请或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的文件共享方法的流程示意图之一;
图2为本申请提供的主控BMC文件执行文件共享流程示意图;
图3为本申请提供的从属BMC的文件共享流程示意图;
图4为本申请实施例提供的文件共享方法的流程示意图之二;
图5为应用本申请实施例提供的文件共享方法的流程示意图;
图6为本申请提供的系统架构示意图;
图7为本申请提供的文件代理程序核心功能示意图;
图8为本申请实施例提供的文件共享装置的结构示意图之一;
图9为本申请实施例提供的文件共享装置的结构示意图之二;
图10为本申请实施例提供的电子设备的结构示意图。
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提出一种文件共享方法,图1为本申请实施例提供的文件共享方法的流程示意图之一,参照图1,本申请实施例提供的文件共享方法应用于主控基板管理控制器(Baseboard Management Controller,BMC),主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,该方法包括以下步骤:
步骤110,接收多个从属BMC的文件访问请求;
步骤120,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;
步骤130,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;
步骤140,基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
本申请实施例中的服务器系统中由多个服务器节点构成。各服务器节点均包含BMC。其中,BMC是一种集成在服务器主板上的硬件组件,用于监控、管理和控制系统硬件和相关功能。BMC通常由一个专用的微处理器、存储器和接口电路组成,独立于主处理器。BMC通过远程管理工具实现对服务器硬件的远程管理、硬件监控、硬件升级、远程控制、日志记录和基本输入/输出系统(Basic Input/Output System,BIOS)管理等功能,有助于简化和优化系统管理和维护过程。
将服务器系统中的多个服务器节点对应的BMC分为主控BMC与多个从属BMC。其中,主控
BMC用于负责协调和管理所有从属BMC的文件访问操作。主控BMC中可以设置控制器,基于控制器可以根据系统的状态和需求,动态地分配和调度文件资源,确保访问的高效性和稳定性。主控BMC的在选择上可以考虑服务器系统中功能核心度高的服务器节点对应的BMC。
从属BMC与主控BMC相对,是由主控BMC进行管理和调度的BMC。从属节点执行主控BMC指派的文件调度工作。
下面以主控BMC执行本申请提供的文件共享方法为例,详细说明本申请的技术方案。
在步骤110中,主控BMC接收多个从属BMC的文件访问请求。
文件访问请求是从属BMC发送的用于获取文件的请求。从属BMC中需要获取文件时,向主控BMC发送文件访问请求。主控BMC接收从属BMC发送的文件访问请求后,执行对应的请求响应。
服务器系统中,BMC通常用于监控和管理服务器硬件,例如CPU(Central Processing Unit,中央处理器)、内存、硬盘等。BMC还负责监控服务器的电源状态,控制服务器的远程开关机等。随着服务器规模的扩大,BMC的功能越来越多样化,BMC不仅监控硬件状态,还提供一些额外的服务,例如远程控制、硬件升级以及虚拟化等。在这些服务中,文件访问是最基本的服务之一。
相关方法中的服务器系统中的BMC通常是单独的芯片,BMC之间的通信一般是通过串行通信协议(Inter-Integrated Circuit,I2C)总线或者全双工、同步的串行通信接口(Serial Peripheral Interface,SPI)总线实现的。这种通信方式有一些限制,例如通信速度较慢、传输距离有限等。在一些大型数据中心中,为了提高系统的可靠性和灵活性,需要使用多个BMC,这就需要实现BMC之间的文件系统共享。
由于相关方法中基于I2C总线或者SPI总线的通信限制,为了提升通信速度以及传输距离,在主控BMC与多个从属BMC之间进行交互之前,可以构建多个BMC之间的通信连接。可以在每个BMC上都设置一个传输控制协议/网际协议(Transmission Control Protocol/Internet Protocol,TCP/IP)协议栈,通过网络协议建立BMC之间的通信连接,从而实现主控BMC以及多个从属BMC之间的消息以及数据传输。
在一些实施例中,构建的主控BMC与多个从属BMC之间的连接关系可以是多个从属BMC分别与主控BMC连接的星型连接关系。基于此连接关系,在进行数据共享时,由于每个从属BMC均与主控BMC直接连接,因此可以实现多个从属BMC分别与主控BMC的直接通信,可以提升数据共享的效率。
在步骤120中,基于主控BMC中设置的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC。
文件系统映射表是预先构建的,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息。在主控BMC接收文件访问请求后,在文件系统映射表中进行查询,确定文件访问请求中需要获取的待获取文件,以及包含待获取文件的目标从属BMC。
可以理解的是,各从属BMC中包含存储空间。可以在各从属BMC的存储空间中存储文件资源。文件系统映射表中记录各从属BMC的存储空间中存储的文件资源。可以基于文件系统映射表,实现基于主控BMC调度各从属BMC中的文件资源,从而实现多个从属BMC之间的文件交换。
在步骤130中,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的。
可以理解的是,服务器系统中各服务器节点相互连接,存在连接关系。基于连接关系,可以确定各服务器节点的连接关系表。其中,连接关系可以是各服务器节点串行连接的连接关系,也可以是各从属BMC分别连接主控BMC的星型连接关系等。
主控BMC在确定待获取文件对应的目标从属BMC后,主控BMC与目标从属BMC之间可能包
含多条线路,间隔多个从属BMC。基于连接关系表,可以确定主控BMC与目标从属BMC之间的最优路径,基于最优路径从目标从属BMC获取待获取文件,可以提升文件获取效率。
与此同时,基于文件传输路径,可以确定从目标从属BMC中获取待获取文件的获取路径,实现了待获取文件的提取。
在步骤140中,基于文件传输路径,主控BMC从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
可以理解的是,基于主控BMC,接收多个从属BMC的文件访问请求,并在多个从属BMC中获取待获取文件,发送至需要对该待获取文件进行访问的从属BMC,实现了服务器系统中多个BMC之间的文件共享,使得各服务器节点的BMC内部之间相互传输文件,提升了服务器系统中各服务器节点的文件传输效率。
例如,在服务器系统中各服务器节点的硬盘固件需要升级时,由服务器节点的BMC控制对应的硬盘固件执行升级操作。基于各服务器BMC之间文件共享的方式,在某一个BMC中接收固件升级文件后,可以通过服务器系统中的主控BMC,在各服务器节点的BMC内部之间相互传输固件升级文件,实现各服务器节点的BMC中的固件升级文件的共享,从而实现了固件升级文件的高效传输,提升了固件升级效率。
在一些实施例中,实现服务器系统中各服务器节点的BMC之间文件资源共享,可以基于在每个服务器节点的BMC中运行一个文件系统代理程序,用于处理文件访问请求和响应,实现在各服务器节点之间的BMC的文件共享。
本申请实施例提供的文件共享方法,通过在主控BMC中设置包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息的文件系统映射表,使得主控BMC接收文件访问请求后,可以对文件系统映射表进行查询并获取文件访问请求对应的待获取文件及其存储位置。基于存储位置,获取待获取文件并传输至对应的从属BMC,使得各服务器节点的BMC内部之间可以相互传输文件,从而使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
在一些实施例中,基于文件传输路径,从目标从属BMC中获取待获取文件,包括:基于待获取文件的文件信息以及文件传输路径,生成待获取文件的文件提取消息;向目标从属BMC发送文件提取消息,以使目标从属BMC基于文件传输路径,将待获取文件传输至主控BMC。
在从目标从属BMC中获取待获取文件时,生成待获取文件的文件提取消息,并向目标从属BMC发送文件提取消息。其中,文件提取消息中包含待获取文件的文件信息以及文件传输路径。
目标从属BMC接收文件提取消息后,基于文件传输路径,从存储空间中获取待获取文件,并将获取的待获取文件传输至主控BMC。
在一些实施例中,主控BMC执行文件共享流程可以如图2中本申请提供的主控BMC文件执行文件共享流程所示。在主控BMC接收文件访问请求后,判断该文件访问请求的是否为访问主控BMC中的存储空间中的文件。响应于确定访问的是主控BMC中的存储空间中的文件,调用主控BMC中的文件处理模块执行。响应于确定访问的是从属BMC中的文件,将该文件访问请求加入请求队列,并查询文件系统映射表,确定存储文件访问请求对应的待处理文件的目标从属BMC。目标从属BMC发送文件提取消息,以使目标从属BMC将待获取文件发送至主控BMC。
从属BMC执行的文件共享流程可以如图3本申请提供的从属BMC的文件共享流程示意图所示。从属BMC接收文件访问请求后,先检查访问文件是否存在,响应于确定访问文件存在,在继续检测文件是否开启访问保护,响应于确定文件未开启访问保护,从存储空间中获取待获取文件,并返回待获取文件至主控BMC,响应于确定文件开启访问保护,返回结果错误信息至主控BMC。
本申请实施例提供的文件共享方法,通过生成待获取文件的文件提取消息,将文件提取消息发送至目标从属BMC,实现了对待获取文件的获取。
在一些实施例中,将待获取文件传输至发送文件访问请求的从属BMC,包括:对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩,得到压缩文件;将压缩文件传输至发送文件访问请求的从属BMC。
在主控BMC接收待获取文件之后,对待获取文件进行加密与压缩,得到压缩文件。并将压缩文件传输至发送文件访问请求的从属BMC。发送文件访问请求的从属BMC接收压缩文件后,进行解压缩以及解密,得到待获取文件。基于压缩传输,可以提升待获取文件的传输速度,实现传输效率的提升。
在一些实施例中,加密过程可以基于数据加密算法可选择对称加密算法(Advanced Encryption Standard,AES)和对称加密算法(Data Encryption Standard,DES)进行加密,或者非对称加密算法(Rivest-Shamir-Adleman,RSA)和非对称加密算法(Elliptic Curve Cryptography,ESS)加密,以提高文件传输的安全性和效率。
本申请实施例提供的文件共享方法,通过在传输待获取文件,对待传输文件进行加密以及压缩,提高了文件传输的安全性和效率。
在一些实施例中,从目标从属BMC中获取待获取文件之后,还包括:将待获取文件存储至主控BMC的缓存空间。
在主控BMC中设置一个缓存空间,设置的缓存空间可以用于存储最近访问的文件数据。在主控BMC获取待获取文件之后,将待获取文件存储至主控BMC的缓存空间。
可以理解的是,在服务器系统中各服务器节点的固件升级的过程中,在一个BMC获取升级的固件文件后,将升级固件存储至缓存空间,后续其他BMC升级固件时,可以直接从主控BMC的缓存空间中获取升级固件,减少相同的文件请求操作,提升了文件获取效率。
本申请实施例提供的文件共享方法,通过在主控BMC获取待获取文件之后,将待获取文件存储至主控BMC的缓存空间,方便了后续其他BMC获取待获取文件。
在一些实施例中,将待获取文件存储至主控BMC的缓存空间之后,还包括:响应于确定接收的多个从属BMC的文件访问请求为获取待获取文件,从缓存空间中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
将待获取文件存储至主控BMC的缓存空间,在后续多个从属BMC有需要获取待获取文件的情况下,可以直接从缓存空间中获取。
主控BMC接收多个从属BMC的文件访问请求,响应于确定文件访问请求为获取待获取文件,主控BMC从缓存空间中获取待获取文件并传输至发送文件放文件请求的从属BMC。
可以理解的是,缓存空间中存储的文件可以根据需要进行更新,也可以存储最近访问的文件数据,可以减少相同的文件请求操作,以便提高文件访问的速度。
本申请实施例提供的文件共享方法,通过将待获取文件存储至主控BMC的缓存空间,在后续多个从属BMC有需要获取待获取文件的情况下,可以直接从缓存空间中获取,减少了相同文件的请求操作,提升了文件访问效率。
在一些实施例中,还包括:确定主控BMC待获取的需求文件;基于文件系统映射表,确定多个从属BMC中存储需求文件对应的从属BMC;从存储需求文件对应的从属BMC中获取需求文件。
主控BMC作为服务器系统中的BMC之一,也需要获取文件资源。在确定主控BMC需要获取文件的情况下,确定主控BMC待获取的需求文件。
主控BMC基于查询文件系统映射表的形式,确定存储需求文件的从属BMC,并从存储需求文件
的从属BMC中直接获取需求文件。
本申请实施例提供的文件共享方法,通过在主控BMC需要获取需求文件的情况下,直接查询文件系统映射表,从存储需求文件的从属BMC中直接获取需求文件,实现了主控BMC的需求文件的获取过程。
在一些实施例中,接收多个从属BMC的文件访问请求之后,还包括:确定多个从属BMC的文件访问请求的执行优先级;基于执行优先级,将多个从属BMC的文件访问请求加入请求队列,以使主控BMC基于请求队列执行文件获取操作。
多个从属BMC可以向主控BMC发送多个文件访问请求,主控BMC同时接收多个文件访问请求后,基于各文件访问请求的执行优先级处理各文件访问请求。
确定多个从属BMC的文件访问请求的执行优先级,基于执行优先级中的顺序,将各文件访问请求加入请求队列。请求队列按照先后顺序存储请求,确保请求的顺序性和公平性。
在构建请求队列后,主控BMC基于请求队列中的文件访问请求的优先级顺序,处理各文件访问请求。
本申请实施例提供的文件共享方法,通过在主控BMC中,基于多个从属BMC的文件访问请求的执行优先级,构建请求队列,并基于请求队列中的文件访问请求的优先级顺序,处理各文件访问请求,确保了各文件访问请求的顺序性和公平性。
在一些实施例中,确定多个从属BMC的文件访问请求的执行优先级,包括:接收多个从属BMC的实时负载信息;基于多个从属BMC的实时负载信息,确定多个从属BMC的负载排序,并基于负载排序,确定多个从属BMC的文件访问请求的执行优先级。
在确定多个从属BMC的文件访问请求的执行优先级时,可以基于多个从属BCM的实时负载信息确定。
主控BMC接收多个从属BMC的实时负载信息,主控BMC根据多个从属BMC的实时负载信息中负载的大小,对多个从属BMC的负载进行排序。例如,按照负载的大小排序,将负载大的BMC的优先级滞后,优先处理负载小的BMC的文件访问请求,可以提升请求处理速度。
本申请实施例提供的文件共享方法,通过主控BMC接收多个从属BMC的实时负载信息,主控BMC根据多个从属BMC的实时负载信息中负载的大小,对多个从属BMC的负载进行排序,提升了多个从属BMC的文件访问请求效率。
在一些实施例中,还包括:接收文件更改请求;基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC;将文件更改请求发送至存储待更改文件的从属BMC,以使存储待更改文件的从属BMC更改待更改文件。
对于多个从属BMC的存储空间中存储的文件资源,有需要更改、更新或者删除的情况。在此情况下,基于主控BMC,可以实现对从属BMC中的文件进行更改。
在一些实施例中,在需要对从属BMC中的文件进行更改时,主控BMC接收文件更改请求。其中,文件更改请求可以是服务器系统中某个从属BMC发送的,也可以是服务器系统中某个服务器节点发送至主控BMC的。
主控BMC接收文件更改请求后,查询主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件,以及多个从属BMC中存储待更改文件的从属BMC。
主控BMC将文件更改请求发送至存储待更改文件的从属BMC,存储待更改文件的从属BMC接收文件更改请求后,更改其存储空间中存储的待更改文件。
本申请实施例提供的文件共享方法,通过主控BMC将文件更改请求发送至存储待更改文件的从属BMC,存储待更改文件的从属BMC接收文件更改请求后,更改其存储空间中存储的待更改文件,
实现了对各服务器节点的BMC中的存储文件的更改过程。
图4为本申请实施例提供的文件共享方法的流程示意图之二,参照图4,本申请实施例提供的文件共享方法应用于从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,该方法包括以下步骤:
步骤410、将文件访问请求发送至主控BMC,以使主控BMC接收文件访问请求后,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,并基于文件传输路径,从目标从属BMC中获取待获取文件,将待获取文件传输至发送文件访问请求的从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;
步骤420、接收主控BMC发送的待获取文件。
本申请实施例中的服务器系统中由多个服务器节点构成。各服务器节点均包含BMC。其中,BMC是一种集成在服务器主板上的硬件组件,用于监控、管理和控制系统硬件和相关功能。BMC通常由一个专用的微处理器、存储器和接口电路组成,独立于主处理器。BMC通过远程管理工具实现对服务器硬件的远程管理、硬件监控、硬件升级、远程控制、日志记录和BIOS管理等功能,有助于简化和优化系统管理和维护过程。
将服务器系统中的多个服务器节点对应的BMC分为主控BMC与多个从属BMC。其中,主控BMC用于负责协调和管理所有从属BMC的文件访问操作。主控BMC中可以设置控制器,基于控制器可以根据系统的状态和需求,动态地分配和调度文件资源,确保访问的高效性和稳定性。主控BMC的在选择上可以考虑服务器系统中功能核心度高的服务器节点对应的BMC。
从属BMC与主控BMC相对,是由主控节BMC进行管理和调度的BMC。从属节点执行主控BMC指派的文件调度工作。
下面以从属BMC执行本申请提供的文件共享方法为例,详细说明本申请的技术方案。
在步骤410中,从属BMC将文件访问请求发送至主控BMC。
文件访问请求是从属BMC发送的用于获取文件的请求。从属BMC中需要获取文件时,向主控BMC发送文件访问请求。主控BMC接收从属BMC发送的文件访问请求后,执行对应的请求响应。
服务器系统中,BMC通常用于监控和管理服务器硬件,例如CPU、内存、硬盘等。BMC还负责监控服务器的电源状态,控制服务器的远程开关机等功能。随着服务器规模的扩大,BMC的功能越来越多样化,BMC不仅要监控硬件状态,还要提供一些额外的服务,例如远程控制、硬件升级以及虚拟化等。在这些服务中,文件访问是最基本的服务之一。
相关方法中的服务器系统中的BMC通常是单独的芯片,它们之间的通信一般是通过串行通信协议总线或者全双工、同步的串行通信接口总线实现的。这种通信方式有一些限制,例如通信速度较慢、传输距离有限等。在一些大型数据中心中,为了提高系统的可靠性和灵活性,需要使用多个BMC,这就需要实现BMC之间的文件系统共享。
由于相关方法中基于I2C总线或者SPI总线的通信限制,为了提升通信速度以及传输距离,在主控BMC与多个从属BMC之间进行交互之前,可以构建多个BMC之间的通信连接。可以在每个BMC上都设置一个TCP/IP协议栈,通过网络协议建立BMC之间的通信连接,从而实现主控BMC以及多个从属BMC之间的消息以及数据传输。
主控BMC接收从属BMC发送的文件访问请求后,基于查询主控BMC中设置的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC。
文件系统映射表是预先构建的,文件系统映射表中包含多个从属BMC的文件存储地址以及文件
存储地址中存储的文件信息。在主控BMC接收文件访问请求后,在文件系统映射表中进行查询,确定文件访问请求中需要获取的待获取文件,以及包含待获取文件的目标从属BMC。
可以理解的是,多个从属BMC中包含存储空间。所以可以在多个从属BMC的存储空间中存储文件资源。文件系统映射表中记录多个从属BMC的存储空间中存储的文件资源。可以基于文件系统映射表,实现基于主控BMC调度多个从属BMC中的文件资源,从而实现多个从属BMC之间的文件交换。
可以理解的是,服务器系统中各服务器节点相互连接,存在连接关系。基于连接关系,可以确定各服务器节点的连接关系表。其中,连接关系可以是各服务器节点串行连接的连接关系,也可以是多个从属BMC分别连接主控BMC的星型连接关系等。
主控BMC在确定待获取文件对应的目标从属BMC后,主控BMC与目标从属BMC之间可能包含多条线路,间隔多个从属BMC。基于连接关系表,可以确定主控BMC与目标从属BMC之间的最优路径,基于最优路径从目标从属BMC获取待获取文件,可以提升文件获取效率。
与此同时,基于文件传输路径,可以确定从目标从属BMC中获取待获取文件的获取路径,实现了待获取文件的提取。
在步骤420中,主控BMC获取待获取文件后,将待获取文件传输至发送文件访问请求的从属BMC,从属BMC接收主控BMC发送的待获取文件。
基于主控BMC,接收多个从属BMC的文件访问请求,并在多个从属BMC中获取待获取文件之后,发送至需要对该待获取文件进行访问的从属BMC,实现了服务器系统中多个BMC之间的文件共享,使得各服务器节点的BMC内部之间相互传输文件,提升了服务器系统中各服务器节点的文件传输效率。
本申请实施例提供的文件共享方法,通过在主控BMC中设置包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息的文件系统映射表,使得主控BMC接收文件访问请求后,可以对文件系统映射表进行查询并获取文件访问请求对应的待获取文件及其存储位置。基于存储位置,获取待获取文件并传输至对应的从属BMC,使得各服务器节点的BMC内部之间可以相互传输文件,从而使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
在一些实施例中,还包括:向主控BMC发送文件更改请求,以使主控BMC基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC,并将文件更改请求发送至存储待更改文件的从属BMC,并使得存储待更改文件的从属BMC更改待更改文件。
对于多个从属BMC的存储空间中存储的文件资源,有需要更改、更新或者删除的情况。在此情况下,基于主控BMC,可以实现对从属BMC中的文件进行更改。
在一些实施例中,在需要对从属BMC中的文件进行更改时,从属BMC向主控BMC发送文件更改请求。
主控BMC接收文件更改请求后,查询主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件,以及多个从属BMC中存储待更改文件的从属BMC。
主控BMC将文件更改请求发送至存储待更改文件的从属BMC,存储待更改文件的从属BMC接收文件更改请求后,更改其存储空间中存储的待更改文件。
本申请实施例提供的文件共享方法,通过向主控BMC发送文件更改请求,存储待更改文件的从属BMC接收文件更改请求后,更改其存储空间中存储的待更改文件,实现了对各服务器节点的BMC中的存储文件的更改过程。
在一些实施例中,还包括:接收主控BMC的文件提取消息,基于文件提取消息,从存储空间中获取文件提取消息对应的待获取文件;将待获取文件发送至主控BMC。
在从目标从属BMC中获取待获取文件时,生成待获取文件的文件提取消息,并向从属BMC发送文件提取消息。其中,文件提取消息中包含待获取文件的文件信息。
从属BMC接收文件提取消息后,从存储空间中获取待获取文件,并将获取的待获取文件发送至主控BMC。
本申请实施例提供的文件共享方法,通过生成待获取文件的文件提取消息,将文件提取消息发送至目标从属BMC,实现了对待获取文件的获取。
在一些实施例中,接收主控BMC发送的待获取文件,包括:接收主控BMC发送的压缩文件,压缩文件是主控BMC对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩得到的;对压缩文件进行解压缩,得到加密后的待获取文件;对加密后的待获取文件进行解密,得到待获取文件。
在主控BMC接收待获取文件之后,对待获取文件进行加密与压缩,得到压缩文件。并将压缩文件传输至发送文件访问请求的从属BMC。
发送文件访问请求的从属BMC接收压缩文件后,进行解压缩以及解密,得到待获取文件。
基于压缩传输,可以提升待获取文件的传输速度,实现传输效率的提升。
在一些实施例中,加密过程可以基于数据加密算法可选择对称加密算法AES和对称加密算法DES进行加密,或者非对称加密算法RSA和非对称加密算法ESS加密,以提高文件传输的安全性和效率。
本申请实施例提供的文件共享方法,通过在传输待获取文件,对待传输文件进行加密以及压缩,提高了文件传输的安全性和效率。
下面以一应用本申请实施例提供的文件共享方法的流程示意图图5为例,说明本申请实施例提供的技术方案:
步骤510,搭建多个BMC的系统架构。架构示意图可以如图6本申请提供的系统架构示意图所示。该架构包括多个从属BMC(从属BMC1、从属BMC2、从属BMC3、从属BMCn)和一个主控BMC。
步骤520,建立多个BMC之间的通信连接。在每个BMC上都安装一个TCP/IP协议栈,通过网络协议建立多个BMC之间的通信连接。
步骤530,在多个BMC上运行文件系统代理程序。用于处理针对文件的文件访问请求和响应。文件系统代理程序中采用添加数据加密和压缩等功能,数据加密算法可选择对称加密算法AES和DES,或者非对称加密算法RSA和ESS,以提高系统的安全性和效率,通过使用多线程或多进程来优化文件系统的访问和管理,以提高系统的并发性和响应性。其中,文件代理程序的功能可以如图7本申请提供的文件代理程序核心功能示意图所示,文件代理程序包括请求队列、请求处理、请求分发、数据加密、数据压缩以及访问缓存空间的功能。
步骤540,从服务器系统中各服务器节点的BMC中设置一个主控BMC。主控BMC负责协调和管理所有从属BMC的文件系统访问操作。主控BMC可以根据系统的状态和需求,动态地分配和调度文件系统资源,确保访问的高效性和稳定性。主控BMC的在选择上考虑功能核心度高的BMC。
步骤550,在主控BMC上设置一个文件系统映射表。文件系统映射表是指文件系统中用于记录文件和目录的物理存储位置和相关属性的数据结构。用于存储各个BMC上的文件系统信息和文件路径,是文件交互的中转站。
步骤560,在主控BMC上设置一个缓存空间,缓存空间用于存储最近访问的文件数据。缓存空间
主要针对其他BMC访问同一个BMC的同一文件,减少相同的文件请求操作,以便提高文件访问的速度。
步骤570,各BMC之间的文件共享。当一个BMC需要访问另一个BMC上的文件时,先向主控BMC发送文件访问请求,将该文件访问请求加入请求队列(系统中的每个BMC都可以向请求队列中提交文件系统访问请求,请求队列按照先后顺序存储请求,确保请求的顺序性和公平性),请求队列用于存储多个BMC的文件访问请求。主控BMC的请求处理模块读取请求队列的内容,并根据文件映射表确定请求文件所在的BMC。基于主控BMC中的请求分发模块(请求分发模块负责从请求队列中获取请求,并根据一定的调度算法将请求分发给合适的BMC进行处理,请求分发模块可以根据请求的类型、优先级和BMC的负载情况等因素进行判断和决策)将文件访问请求按照一定的规则转发给特定BMC的文件系统代理程序;当主控BMC需要访问其他从属BMC的文件时,采用单独请求处理模块进行请求处理。
步骤580,BMC的文件系统代理程序接收到文件访问请求后,启用请求处理模块(每个BMC都有一个请求处理模块,负责接收和处理分发给它的文件系统访问请求)处理文件访问请求。BMC根据请求的类型进行相应的文件系统操作,如读取、写入、删除等,同时还负责将处理结果返回给请求发起者或其他相关BMC。先检查访问文件是否存在,响应于确定访问文件存在,在继续检测文件是否开启访问保护,响应于确定文件未开启访问保护,读取文件数据并发送给请求方,响应于确定文件开启访问保护,返回错误信息。
步骤590,实现各BMC之间的文件更改。当一个BMC需要创建或删除文件时,首先向主控BMC发送通知,主控BMC及时更新文件系统的访问状态。当一个BMC需要修改文件时,首先向主控BMC发送请求,主控BMC将请求转发给相应的文件系统代理程序进行处理;文件系统代理程序接收到请求后,将文件操作请求转发给主控BMC进行验证,验证通过后再进行文件操作。
多个BMC之间实现文件的共享和访问,适用于各种嵌入式系统。具有以下优点:
高效性:使用了基于网络协议的通信方式,无需额外的硬件设备和驱动程序,具有较高的通信速度和传输距离,多个BMC可以同时进行文件系统读写操作,从而提高了系统的性能。
可靠性:通过建立通信连接,使得BMC之间可以共享文件系统,主控BMC可以协调多个从属BMC的文件系统读写请求,避免了冲突和延迟,从而提高了系统的可靠性。
灵活性:通过在主控BMC上设置文件系统映射关系,可以方便地管理和维护所有BMC上的文件系统,提高了系统的灵活性。
图8为本申请实施例提供的文件共享装置的结构示意图之一。参照图8,本申请实施例提供的文件共享装置包括:请求接收模块810、文件查询模块820、文件路径确定模块830和文件获取模块840。
其中,请求接收模块810用于接收多个从属BMC的文件访问请求;文件查询模块820用于基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;文件路径确定模块830用于基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;文件获取模块840用于基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
本申请实施例提供的文件共享装置,通过在主控BMC中设置包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息的文件系统映射表,使得主控BMC接收文件访问请求后,可以对文件系统映射表进行查询并获取文件访问请求对应的待获取文件及其存储位置。基于存储位置,获
取待获取文件并传输至对应的从属BMC,使得各服务器节点的BMC内部之间可以相互传输文件,从而使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
在一些实施例中,文件获取模块840用于基于待获取文件的文件信息以及文件传输路径,生成待获取文件的文件提取消息;向目标从属BMC发送文件提取消息,以使目标从属BMC基于文件传输路径,将待获取文件传输至主控BMC。
在一些实施例中,文件获取模块840还用于对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩,得到压缩文件;将压缩文件传输至发送文件访问请求的从属BMC。
在一些实施例中,文件获取模块840还用于将待获取文件存储至主控BMC的缓存空间。
在一些实施例中,文件获取模块840还用于响应于确定接收的多个从属BMC的文件访问请求为获取待获取文件,从缓存空间中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
在一些实施例中,文件获取模块840还用于:确定主控BMC待获取的需求文件;基于文件系统映射表,确定多个从属BMC中存储需求文件对应的从属BMC;从存储需求文件对应的从属BMC中获取需求文件。
在一些实施例中,请求接收模块810用于确定多个从属BMC的文件访问请求的执行优先级;基于执行优先级,将多个从属BMC的文件访问请求加入请求队列,以使主控BMC基于请求队列执行文件获取操作。
在一些实施例中,请求接收模块810还用于接收多个从属BMC的实时负载信息;基于多个从属BMC的实时负载信息,确定多个从属BMC的负载排序,并基于负载排序,确定多个从属BMC的文件访问请求的执行优先级。
在一些实施例中,文件获取模块840还用于:接收文件更改请求;基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC;
将文件更改请求发送至存储待更改文件的从属BMC,以使存储待更改文件的从属BMC更改待更改文件。
图9为本申请实施例提供的文件共享装置的结构示意图之二。参照图9,本申请实施例提供的文件共享装置包括:请求发送模块910和文件接收模块920。
请求发送模块910用于将文件访问请求发送至主控BMC,以使主控BMC接收文件访问请求后,基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,并基于文件传输路径,从目标从属BMC中获取待获取文件,将待获取文件传输至发送文件访问请求的从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;文件接收模块920用于接收主控BMC发送的待获取文件。
本申请实施例提供的文件共享装置,通过在主控BMC中设置包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息的文件系统映射表,使得主控BMC接收文件访问请求后,可以对文件系统映射表进行查询并获取文件访问请求对应的待获取文件及其存储位置。基于存储位置,获取待获取文件并传输至对应的从属BMC,使得各服务器节点的BMC内部之间可以相互传输文件,从而使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
在一些实施例中,文件接收模块920用于:向主控BMC发送文件更改请求,以使主控BMC基于主控BMC中的文件系统映射表,确定文件更改请求对应的待更改文件以及多个从属BMC中存储待更改文件的从属BMC,并将文件更改请求发送至存储待更改文件的从属BMC,并使得存储待更改文件的从属BMC更改待更改文件。
在一些实施例中,文件接收模块920还用于:接收主控BMC的文件提取消息,基于文件提取消息,从存储空间中获取文件提取消息对应的待获取文件;将待获取文件发送至主控BMC。
在一些实施例中,文件接收模块920还用于:接收主控BMC发送的压缩文件,压缩文件是主控BMC对待获取文件进行加密,得到加密后的待获取文件,并对加密后的待获取文件进行压缩得到的;对压缩文件进行解压缩,得到加密后的待获取文件;对加密后的待获取文件进行解密,得到待获取文件。
本申请还提供一种文件共享系统,文件共享系统中包含主控BMC以及多个从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC;主控BMC接收多个从属BMC的文件访问请求;主控BMC基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;主控BMC基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;主控BMC基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC;发送文件访问请求的从属BMC接收主控BMC发送的待获取文件。
其中,文件共享系统通过在主控BMC中设置包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息的文件系统映射表,使得主控BMC接收文件访问请求后,可以对文件系统映射表进行查询并获取文件访问请求对应的待获取文件及其存储位置。基于存储位置,获取待获取文件并传输至对应的从属BMC,使得各服务器节点的BMC内部之间可以相互传输文件,从而使得各服务器节点的BMC之间的文件可以共享,提升了服务器系统中各服务器节点的文件传输效率。
本申请还提供一种电子设备,如图10所示,该电子设备可以包括:一个或多个处理器(processor)1010、通信接口(Communication Interface)1020、存储器(memory)1030和通信总线(bus)1040,其中,处理器1010,通信接口1020,存储器1030通过通信总线1040完成相互间的通信。处理器1010可以调用存储器1030中的计算机可读指令,以执行文件共享方法,例如包括:
接收多个从属BMC的文件访问请求;基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
此外,上述的存储器1030中的计算机可读指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
另一方面,本申请还提供一种计算机程序产品,计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机可读指令,当计算机可读指令被计算机执行时,计算机能够执行上述各方法实施例所提供的文件共享方法,例如包括:
接收多个从属BMC的文件访问请求;基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
又一方面,本申请还提供一种非暂态计算机可读存储介质,其上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述各方法实施例提供的文件共享方法,例如包括:
接收多个从属BMC的文件访问请求;基于主控BMC中的文件系统映射表,确定文件访问请求对应的待获取文件以及多个从属BMC中存储待获取文件的目标从属BMC,文件系统映射表中包含多个从属BMC的文件存储地址以及文件存储地址中存储的文件信息;基于主控BMC中的连接关系表,确定从目标从属BMC获取待获取文件的文件传输路径,连接关系表是基于服务器系统中各服务器节点的连接关系确定的;基于文件传输路径,从目标从属BMC中获取待获取文件,并将待获取文件传输至发送文件访问请求的从属BMC。
以上所描述的装置实施例是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种文件共享方法,其特征在于,应用于主控基板管理控制器BMC,其中,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,所述方法包括:接收多个从属BMC的文件访问请求;基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及所述多个从属BMC中存储所述待获取文件的目标从属BMC,所述文件系统映射表中包含所述多个从属BMC的文件存储地址以及所述文件存储地址中存储的文件信息;基于所述主控BMC中的连接关系表,确定从所述目标从属BMC获取所述待获取文件的文件传输路径,所述连接关系表是基于所述服务器系统中各服务器节点的连接关系确定的;以及基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,并将所述待获取文件传输至发送所述文件访问请求的从属BMC。
- 根据权利要求1所述的文件共享方法,其特征在于,所述基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,包括:基于所述待获取文件的文件信息以及所述文件传输路径,生成所述待获取文件的文件提取消息;以及向所述目标从属BMC发送所述文件提取消息,以使所述目标从属BMC基于所述文件传输路径,将所述待获取文件传输至所述主控BMC。
- 根据权利要求1所述的文件共享方法,其特征在于,所述将所述待获取文件传输至发送所述文件访问请求的从属BMC,包括:对所述待获取文件进行加密,得到加密后的待获取文件,并对所述加密后的待获取文件进行压缩,得到压缩文件;以及将所述压缩文件传输至发送所述文件访问请求的从属BMC。
- 根据权利要求1所述的文件共享方法,其特征在于,所述从所述目标从属BMC中获取所述待获取文件之后,还包括:将所述待获取文件存储至所述主控BMC的缓存空间。
- 根据权利要求4所述的文件共享方法,其特征在于,所述将所述待获取文件存储至所述主控BMC的缓存空间之后,还包括:响应于确定接收的所述多个从属BMC的文件访问请求为获取所述待获取文件,从所述缓存空间中获取所述待获取文件,并将所述待获取文件传输至发送所述文件访问请求的从属BMC。
- 根据权利要求1所述的文件共享方法,其特征在于,还包括:确定所述主控BMC待获取的需求文件;基于所述文件系统映射表,确定所述多个从属BMC中存储所述需求文件对应的从属BMC;以及从存储所述需求文件对应的从属BMC中获取所述需求文件。
- 根据权利要求1所述的文件共享方法,其特征在于,所述接收多个从属BMC的文件访问请求之后,还包括:确定所述多个从属BMC的文件访问请求的执行优先级;以及基于所述执行优先级,将所述多个从属BMC的文件访问请求加入请求队列,以使所述主控BMC基于所述请求队列执行文件获取操作。
- 根据权利要求7所述的文件共享方法,其特征在于,所述确定所述多个从属BMC的文件访问 请求的执行优先级,包括:接收所述多个从属BMC的实时负载信息;以及基于所述多个从属BMC的实时负载信息,确定所述多个从属BMC的负载排序,并基于所述负载排序,确定所述多个从属BMC的文件访问请求的执行优先级。
- 根据权利要求1所述的文件共享方法,其特征在于,还包括:接收文件更改请求;基于所述主控BMC中的文件系统映射表,确定所述文件更改请求对应的待更改文件以及所述多个从属BMC中存储所述待更改文件的从属BMC;以及将所述文件更改请求发送至所述存储所述待更改文件的从属BMC,以使所述存储所述待更改文件的从属BMC更改所述待更改文件。
- 根据权利要求1所述的文件共享方法,其特征在于,所述主控BMC和所述多个从属BMC之间的连接关系为星型连接关系。
- 根据权利要求1所述的文件共享方法,其特征在于,所述接收多个从属BMC的文件访问请求步骤之后,所述基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及所述多个从属BMC中存储所述待获取文件的目标从属BMC步骤之前,还包括:确定所述文件访问请求的是否为访问所述主控BMC中的存储空间中的文件;响应于确定所述文件访问请求访问所述主控BMC中的所述存储空间中的所述文件,调用所述主控BMC中的文件处理模块进行处理;或响应于确定所述文件访问请求访问从属BMC中的文件,将所述文件访问请求加入请求队列,并转入所述基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及所述多个从属BMC中存储所述待获取文件的目标从属BMC步骤。
- 一种文件共享方法,其特征在于,应用于从属基板管理控制器BMC,其中,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,所述方法包括:将文件访问请求发送至主控BMC,以使所述主控BMC接收所述文件访问请求后,基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及多个从属BMC中存储所述待获取文件的目标从属BMC,基于所述主控BMC中的连接关系表,确定从所述目标从属BMC获取所述待获取文件的文件传输路径,并基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,将所述待获取文件传输至发送所述文件访问请求的从属BMC,所述文件系统映射表中包含所述多个从属BMC的文件存储地址以及所述文件存储地址中存储的文件信息,所述连接关系表是基于所述服务器系统中多个服务器节点的连接关系确定的;以及接收所述主控BMC发送的所述待获取文件。
- 根据权利要求12所述的文件共享方法,其特征在于,还包括:向主控BMC发送文件更改请求,以使所述主控BMC基于所述主控BMC中的文件系统映射表,确定所述文件更改请求对应的待更改文件以及所述多个从属BMC中存储所述待更改文件的从属BMC,并将所述文件更改请求发送至所述存储所述待更改文件的从属BMC,并使得所述存储所述待更改文件的从属BMC更改所述待更改文件。
- 根据权利要求12所述的文件共享方法,其特征在于,还包括:接收所述主控BMC的文件提取消息,基于所述文件提取消息,从存储空间中获取所述文件提取消息对应的待获取文件;以及将所述待获取文件发送至所述主控BMC。
- 根据权利要求12所述的文件共享方法,其特征在于,所述接收所述主控BMC发送的所述待 获取文件,包括:接收所述主控BMC发送的压缩文件,所述压缩文件是所述主控BMC对所述待获取文件进行加密,得到加密后的待获取文件,并对所述加密后的待获取文件进行压缩得到的;对所述压缩文件进行解压缩,得到所述加密后的待获取文件;以及对所述加密后的待获取文件进行解密,得到所述待获取文件。
- 一种文件共享装置,其特征在于,应用于主控基板管理控制器BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,所述装置包括:请求接收模块,用于接收多个从属BMC的文件访问请求;文件查询模块,用于基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及所述多个从属BMC中存储所述待获取文件的目标从属BMC,所述文件系统映射表中包含所述多个从属BMC的文件存储地址以及所述文件存储地址中存储的文件信息;文件路径确定模块,用于基于所述主控BMC中的连接关系表,确定从所述目标从属BMC获取所述待获取文件的文件传输路径,所述连接关系表是基于所述服务器系统中多个服务器节点的连接关系确定的;以及文件获取模块,用于基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,并将所述待获取文件传输至发送所述文件访问请求的从属BMC。
- 一种文件共享装置,其特征在于,应用于从属基板管理控制器BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC,所述装置包括:请求发送模块,用于将文件访问请求发送至主控BMC,以使所述主控BMC接收所述文件访问请求后,基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及多个从属BMC中存储所述待获取文件的目标从属BMC,基于所述主控BMC中的连接关系表,确定从所述目标从属BMC获取所述待获取文件的文件传输路径,并基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,将所述待获取文件传输至发送所述文件访问请求的从属BMC,所述文件系统映射表中包含所述多个从属BMC的文件存储地址以及所述文件存储地址中存储的文件信息,所述连接关系表是基于所述服务器系统中各服务器节点的连接关系确定的;以及文件接收模块,用于接收所述主控BMC发送的所述待获取文件。
- 一种文件共享系统,其特征在于,包括主控基板管理控制器BMC以及多个从属BMC,主控BMC以及多个从属BMC为服务器系统中不同服务器节点的BMC;所述主控BMC接收多个从属BMC的文件访问请求;所述主控BMC基于所述主控BMC中的文件系统映射表,确定所述文件访问请求对应的待获取文件以及所述多个从属BMC中存储所述待获取文件的目标从属BMC,所述文件系统映射表中包含所述多个从属BMC的文件存储地址以及所述文件存储地址中存储的文件信息;所述主控BMC基于所述主控BMC中的连接关系表,确定从所述目标从属BMC获取所述待获取文件的文件传输路径,所述连接关系表是基于所述服务器系统中各服务器节点的连接关系确定的;所述主控BMC基于所述文件传输路径,从所述目标从属BMC中获取所述待获取文件,并将所述待获取文件传输至发送所述文件访问请求的从属BMC;以及所述发送所述文件访问请求的从属BMC接收所述主控BMC发送的所述待获取文件。
- 一种电子设备,其特征在于,包括:一个或多个处理器;以及与所述一个或多个处理器关联的存储器,所述存储器用于存储计算机可读指令,所述计算机可读指令在被所述一个或多个处理器读取执行时实现如权利要求1至11任一项所述的文件共享方法,或者 实现如权利要求12至15任一项所述的文件共享方法。
- 一种非暂态计算机可读存储介质,其特征在于,所述非暂态性计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时实现如权利要求1至11任一项所述的文件共享方法,或者实现如权利要求12至15任一项所述的文件共享方法。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US19/115,850 US12452331B1 (en) | 2023-10-18 | 2024-09-29 | File-sharing method, apparatus and system, electronic device, and storage medium |
| EP24875671.0A EP4592861A1 (en) | 2023-10-18 | 2024-09-29 | File sharing method, apparatus and system, electronic device, and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311346113.2 | 2023-10-18 | ||
| CN202311346113.2A CN117076409B (zh) | 2023-10-18 | 2023-10-18 | 文件共享方法、装置、系统、电子设备及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025082187A1 true WO2025082187A1 (zh) | 2025-04-24 |
Family
ID=88706558
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/122204 Pending WO2025082187A1 (zh) | 2023-10-18 | 2024-09-29 | 文件共享方法、装置、系统、电子设备及存储介质 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12452331B1 (zh) |
| EP (1) | EP4592861A1 (zh) |
| CN (1) | CN117076409B (zh) |
| WO (1) | WO2025082187A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117076409B (zh) | 2023-10-18 | 2024-02-02 | 苏州元脑智能科技有限公司 | 文件共享方法、装置、系统、电子设备及存储介质 |
| CN119415485A (zh) * | 2025-01-07 | 2025-02-11 | 闪极科技(深圳)有限公司 | 多智能体系统的数据共享方法、多智能体系统和电子设备 |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101026460A (zh) * | 2006-02-21 | 2007-08-29 | 上海慎源数码科技有限公司 | 一种利用点对点技术的文件发布方法及系统 |
| US20160099886A1 (en) * | 2014-10-07 | 2016-04-07 | Dell Products, L.P. | Master baseboard management controller election and replacement sub-system enabling decentralized resource management control |
| CN106385426A (zh) * | 2015-07-30 | 2017-02-08 | 中兴通讯股份有限公司 | 节点内容的命中方法及装置 |
| CN114116631A (zh) * | 2021-10-27 | 2022-03-01 | 北京旷视科技有限公司 | 一种文件管理方法、程序产品、主控节点及存储介质 |
| CN114584454A (zh) * | 2022-02-21 | 2022-06-03 | 苏州浪潮智能科技有限公司 | 一种服务器信息的处理方法、装置、电子设备及存储介质 |
| CN115604250A (zh) * | 2022-09-28 | 2023-01-13 | 海宁奕斯伟集成电路设计有限公司(Cn) | 文件共享方法、装置、电子设备及计算机可读存储介质 |
| CN116827601A (zh) * | 2023-05-29 | 2023-09-29 | 苏州浪潮智能科技有限公司 | 数据传输方法、装置、电子设备及存储介质 |
| CN117076409A (zh) * | 2023-10-18 | 2023-11-17 | 苏州元脑智能科技有限公司 | 文件共享方法、装置、系统、电子设备及存储介质 |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6973455B1 (en) | 1999-03-03 | 2005-12-06 | Emc Corporation | File server system providing direct data sharing between clients with a server acting as an arbiter and coordinator |
| CN102722458B (zh) * | 2012-05-29 | 2015-01-07 | 中国科学院计算技术研究所 | 一种用于多根共享系统的i/o重映射方法和装置 |
| US8930519B2 (en) | 2013-01-08 | 2015-01-06 | American Megatrends, Inc. | Emulated communication between master management instance and assisting management instances on baseboard management controller |
| WO2014143040A1 (en) * | 2013-03-15 | 2014-09-18 | American Megatrends, Inc | System and method of web-based virtual media redirection |
| US10394571B2 (en) * | 2016-12-06 | 2019-08-27 | Lenovo Enterprise Solutions (Singapore) Pte. Ltd. | Passing data from a host-based utility to a service processor |
| CN108206847B (zh) * | 2016-12-19 | 2020-09-04 | 腾讯科技(深圳)有限公司 | Cdn管理系统、方法及装置 |
| CN108319524A (zh) * | 2018-02-02 | 2018-07-24 | 郑州云海信息技术有限公司 | 一种基板管理控制器通过kvm挂载文件夹的方法及装置 |
| CN108965382B (zh) * | 2018-05-31 | 2021-06-29 | 郑州云海信息技术有限公司 | 一种基于bmc的文件传输方法、装置、设备及介质 |
| CN109032979A (zh) * | 2018-06-04 | 2018-12-18 | 郑州云海信息技术有限公司 | 一种bmc间的文件传输方法、装置、设备及存储介质 |
| US12339833B2 (en) * | 2020-07-21 | 2025-06-24 | Gigaforce, Inc. | Blockchain enabled service provider system |
| US11956334B2 (en) * | 2021-03-15 | 2024-04-09 | Hewlett Packard Enterprise Development Lp | Visualizing cluster node statuses |
-
2023
- 2023-10-18 CN CN202311346113.2A patent/CN117076409B/zh active Active
-
2024
- 2024-09-29 US US19/115,850 patent/US12452331B1/en active Active
- 2024-09-29 WO PCT/CN2024/122204 patent/WO2025082187A1/zh active Pending
- 2024-09-29 EP EP24875671.0A patent/EP4592861A1/en active Pending
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101026460A (zh) * | 2006-02-21 | 2007-08-29 | 上海慎源数码科技有限公司 | 一种利用点对点技术的文件发布方法及系统 |
| US20160099886A1 (en) * | 2014-10-07 | 2016-04-07 | Dell Products, L.P. | Master baseboard management controller election and replacement sub-system enabling decentralized resource management control |
| CN106385426A (zh) * | 2015-07-30 | 2017-02-08 | 中兴通讯股份有限公司 | 节点内容的命中方法及装置 |
| CN114116631A (zh) * | 2021-10-27 | 2022-03-01 | 北京旷视科技有限公司 | 一种文件管理方法、程序产品、主控节点及存储介质 |
| CN114584454A (zh) * | 2022-02-21 | 2022-06-03 | 苏州浪潮智能科技有限公司 | 一种服务器信息的处理方法、装置、电子设备及存储介质 |
| CN115604250A (zh) * | 2022-09-28 | 2023-01-13 | 海宁奕斯伟集成电路设计有限公司(Cn) | 文件共享方法、装置、电子设备及计算机可读存储介质 |
| CN116827601A (zh) * | 2023-05-29 | 2023-09-29 | 苏州浪潮智能科技有限公司 | 数据传输方法、装置、电子设备及存储介质 |
| CN117076409A (zh) * | 2023-10-18 | 2023-11-17 | 苏州元脑智能科技有限公司 | 文件共享方法、装置、系统、电子设备及存储介质 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP4592861A4 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117076409A (zh) | 2023-11-17 |
| US12452331B1 (en) | 2025-10-21 |
| EP4592861A4 (en) | 2025-07-30 |
| EP4592861A1 (en) | 2025-07-30 |
| CN117076409B (zh) | 2024-02-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107690622B (zh) | 实现硬件加速处理的方法、设备和系统 | |
| US12452331B1 (en) | File-sharing method, apparatus and system, electronic device, and storage medium | |
| US7383555B2 (en) | Apparatus and method for sharing a network I/O adapter between logical partitions | |
| KR102523419B1 (ko) | 저장 장치에서 가속 커널들의 상태 모니터링 방법 및 이를 사용하는 저장 장치 | |
| JP2009251708A (ja) | I/oノード制御方式及び方法 | |
| US20260111390A1 (en) | Data transmission apparatus, data processing device, system, and method, and medium | |
| CN110119304A (zh) | 一种中断处理方法、装置及服务器 | |
| CN114662136A (zh) | 一种基于pcie通道的多算法ip核的高速加解密系统及方法 | |
| WO2021164163A1 (zh) | 一种请求处理方法、装置、设备及存储介质 | |
| EP3051426B1 (en) | Method, device, and system for accessing memory | |
| JP2004272668A (ja) | 分散ファイルシステム | |
| CN118916312B (zh) | 一种数据传输方法、装置、系统、计算机设备及存储介质 | |
| WO2022267909A1 (zh) | 一种数据读写方法以及相关装置 | |
| CN116136790A (zh) | 任务处理方法和装置 | |
| WO2025200554A1 (zh) | 存储设备的访问方法、装置、存储介质和电子设备 | |
| CN117041147B (zh) | 智能网卡设备、主机设备和方法及系统 | |
| US20050235005A1 (en) | Computer system configuring file system on virtual storage device, virtual storage management apparatus, method and signal-bearing medium thereof | |
| CN119248462A (zh) | 基于云服务的虚拟实例部署方法及系统 | |
| TWI900570B (zh) | 時間同步儲存輸送的方法、計算元件以及儲存元件 | |
| JP7690992B2 (ja) | Fpgaシステム | |
| US11849005B2 (en) | Method and apparatus for accelerating network transmission in memory-disaggregated environment | |
| CN115686836B (zh) | 一种安装有加速器的卸载卡 | |
| TW202020684A (zh) | 實現泛儲存空間的方法、收發引擎與系統 | |
| WO2025202798A1 (zh) | 虚拟机管理 | |
| CN118568044A (zh) | 一种加速设备及数据处理方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 2024875671 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2024875671 Country of ref document: EP Effective date: 20250423 |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24875671 Country of ref document: EP Kind code of ref document: A1 |
|
| WWP | Wipo information: published in national office |
Ref document number: 2024875671 Country of ref document: EP |