File transmission method and device, server, terminal and storage medium
By establishing a communication connection between the server's Baseboard Management Controller (BMC) and the terminal, and utilizing EMMC partitions for file transfer operations, the problem of file sharing in a network-free environment is solved, achieving efficient bidirectional file transfer and a simplified operation process.
Patent Information
- Application Number
- CN202511141318.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-11-28
AI Technical Summary
In environments where the server has no network access, traditional technologies cannot establish a two-way file sharing channel between the terminal and the server, resulting in low file transfer efficiency and complex operations.
By establishing a communication connection between the server's Baseboard Management Controller (BMC) and the terminal, file transfer operations are performed using the embedded multimedia card (EMMC) partition, and the file directory is displayed in a visual interface to achieve synchronization of file directory update information, ensuring bidirectional file sharing between the terminal and the server.
It enables efficient two-way file sharing between terminals and servers in a network-free environment, reducing the operational threshold for customers or maintenance personnel and improving the compatibility and flexibility of file transfer.
Smart Images

Figure CN121037359A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, in particular to a file transmission method and device, a server, a terminal and a storage medium. BACKGROUND
[0002] One of the core requirements of modern server remote management is to realize efficient file interaction between the terminal and the server. For example, the terminal needs to quickly obtain the log, fault and other information of the server, and at the same time needs to transmit the driver file, system patch and other files to the server.
[0003] In the traditional technology, the server network environment needs to be configured, and the file is transmitted through the network transmission protocol to realize the remote management of the server.
[0004] However, in the traditional technology, in the environment where the server has no network, the bidirectional file sharing channel between the terminal and the server cannot be constructed. SUMMARY
[0005] Therefore, it is necessary to provide a file transmission method and device, a server, a terminal and a storage medium which can construct a bidirectional file sharing channel between the terminal and the server in the environment where the server has no network.
[0006] In a first aspect, the present application provides a file transmission method applied to a server, and the method comprises:
[0007] In the case that the baseboard management controller (BMC) of the server establishes a communication connection with a terminal, and the state of the embedded multimedia card (EMMC) partition of the BMC is normal, a file transmission operation sent by the terminal is acquired, and the file transmission operation is executed; the file transmission operation is acquired based on the file directory of the EMMC partition displayed by the visual interface of the terminal.
[0008] The update information of the file directory in the process of executing the file transmission operation is acquired.
[0009] The update information is sent to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visual interface based on the update information.
[0010] In the file transmission method, when the baseboard management controller (BMC) of the server establishes a communication connection with the terminal, and the state of the embedded multi-media card (EMMC) partition of the BMC is normal, after the terminal obtains the file transmission operation based on the file directory of the EMMC partition displayed on the visual interface, the terminal can send the obtained file transmission operation to the server, the server can execute the file transmission operation, and obtain the update information of the file directory in the process of executing the file transmission operation, and then send the update information of the file directory to the terminal, so as to instruct the terminal to update the file directory displayed on the visual interface based on the update information of the file directory, thereby ensuring that the terminal can obtain the file transmission operation triggered based on the file directory displayed on the visual interface, and further ensuring the response to the triggered file transmission operation. In the environment without network of the server, the bidirectional file sharing between the terminal and the server can also be performed, the operation is simple, the transmission efficiency is high, and the operation threshold of the customer or the operation and maintenance personnel is greatly reduced.
[0011] In one of the embodiments, the executing the file transmission operation comprises:
[0012] If the file transmission operation is a file writing operation, the file carried by the file transmission operation is written into the EMMC partition;
[0013] If the file transmission operation is a file reading operation, the file corresponding to the file transmission operation is read from the EMMC partition;
[0014] If the file transmission operation is a file deletion operation, the file corresponding to the file deletion operation is deleted from the EMMC partition.
[0015] In the embodiment, the operations performed for different types of file transmission operations are also different, and the file transmission operation can be implemented for different types of file transmission operations, so that the file transmission operation has better compatibility and flexibility.
[0016] In one of the embodiments, the obtaining the update information of the file directory in the process of executing the file transmission operation comprises:
[0017] If the file transmission operation is a file writing operation, the writing information corresponding to the file writing operation is determined as the update information;
[0018] If the file transmission operation is a file deletion operation, the deletion information corresponding to the deletion operation is determined as the update information.
[0019] In one of the embodiments, the method further comprises:
[0020] Performing a formatting process on the EMMC partition, and formatting the EMMC partition into a preset file format.
[0021] mounting the formatted EMMC partition to the server through a USB mass storage mode, and mapping address information of the formatted EMMC partition to a preset mounting point path.
[0022] In this embodiment, the EMMC partition of the BMC is formatted into a preset file format through formatting processing, the formatted EMMC partition is mounted to the server through a USB mass storage mode, and address information of the formatted EMMC partition is mapped to a preset mounting point path, so that file sharing between the terminal and the server can be directly realized without networking, and uploaded files can be saved even if the connection or mounting is disconnected, unless deleted through a visual interface or interface, facilitating repeated use of the file by the server.
[0023] In a second aspect, the application provides a file transmission method applied to a terminal, and the method comprises the following steps:
[0024] In a case where a communication connection is established between the terminal and a baseboard management controller (BMC) of a server, a file directory of an EMMC partition of the BMC displayed through a visual interface is acquired for a file transmission operation;
[0025] The file transmission operation is sent to the server, and the file transmission operation is used to instruct the server to execute the file transmission operation.
[0026] Update information of the file directory sent by the server is received, and the file directory is updated based on the update information; the update information is generated in a process in which the server executes the file transmission operation.
[0027] In the above file transmission method, in a case where a communication connection is established between the terminal and a baseboard management controller (BMC) of a server, the terminal can acquire a file transmission operation based on a file directory of an EMMC partition displayed through a visual interface, the terminal can send the acquired file transmission operation to the server, the server can execute the file transmission operation, and the update information of the file directory in the process of executing the file transmission operation can be acquired, and then the update information of the file directory can be sent to the terminal to instruct the terminal to update the file directory displayed in the visual interface based on the update information of the file directory, so that the terminal can acquire the file transmission operation triggered based on the file directory displayed in the visual interface, and the response to the triggered file transmission operation is ensured, and bidirectional file sharing between the terminal and the server can be realized in a network-free environment of the server, the operation is simple, the transmission efficiency is high, and the operation threshold of a customer or an operation and maintenance personnel is greatly reduced.
[0028] In one of the embodiments, the method further comprises:
[0029] in response to a file sharing operation triggered based on the visual interface, sending an acquisition instruction to the server; the acquisition instruction is used to instruct the server to send a file directory of the EMMC partition;
[0030] receiving the file directory sent by the server, and displaying the file directory in the visual interface.
[0031] In this embodiment, the terminal can acquire the file directory of the EMMC partition of the BMC from the server in response to a file sharing operation triggered based on the visual interface, so that the file directory of the EMMC partition can be displayed in the visual interface, and the user can trigger a file transmission operation based on the file directory of the EMMC partition displayed in the visual interface, thereby realizing file sharing between the terminal and the server, and further realizing remote control and management of the server.
[0032] In a third aspect, the present application provides a file transmission device applied to a server, the device comprising:
[0033] an execution module, configured to acquire a file transmission operation sent by a terminal and execute the file transmission operation, in a case where a baseboard management controller (BMC) of the server and the terminal establish a communication connection, and an embedded multimedia card (EMMC) partition of the BMC is in a normal state; the file transmission operation is acquired based on a file directory of the EMMC partition displayed in a visual interface by the terminal;
[0034] an acquisition module, configured to acquire update information of the file directory in a process of executing the file transmission operation;
[0035] a sending module, configured to send the update information to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visual interface based on the update information.
[0036] In a fourth aspect, the present application provides a file transmission device applied to a terminal, the device comprising:
[0037] an acquisition module, configured to acquire a file transmission operation based on a file directory of an EMMC partition of a baseboard management controller (BMC) displayed in a visual interface, in a case where the terminal and the BMC of the server establish a communication connection;
[0038] a first sending module, configured to send the file transmission operation to the server; the file transmission operation is used to instruct the server to execute the file transmission operation;
[0039] receive the update information of the file directory sent by the server, and update the file directory based on the update information; the update information is generated during execution of the file transfer operation by the server.
[0040] In a fifth aspect, the present application provides a server, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0041] In a case where a baseboard management controller (BMC) of the server establishes a communication connection with a terminal and a state of an embedded multimedia card (EMMC) partition of the BMC is normal, a file transfer operation sent by the terminal is acquired, and the file transfer operation is executed; the file transfer operation is acquired based on a file directory of the EMMC partition displayed on a visual interface by the terminal;
[0042] acquire update information of the file directory during execution of the file transfer operation;
[0043] send the update information to the terminal; the update information is used to instruct the terminal to update the file directory displayed on the visual interface based on the update information.
[0044] In a sixth aspect, the present application provides a terminal, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0045] In a case where the terminal establishes a communication connection with a baseboard management controller (BMC) of a server, acquire a file transfer operation based on a file directory of an EMMC partition of the BMC displayed on a visual interface;
[0046] send the file transfer operation to the server; the file transfer operation is used to instruct the server to execute the file transfer operation;
[0047] receive update information of the file directory sent by the server, and update the file directory based on the update information; the update information is generated during execution of the file transfer operation by the server.
[0048] In a seventh aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps described in the embodiments of the first aspect and the second aspect.
[0049] In a fifth aspect, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps described in the embodiments of the first aspect and the second aspect.
[0050] The file transmission method, device, server, terminal and storage medium, in the case that the server's baseboard management controller (BMC) establishes a communication connection with the terminal and the state of the embedded multi-media card (EMMC) partition of the BMC is normal, after the terminal obtains a file transmission operation based on the file directory of the EMMC partition displayed by the visual interface, the terminal can send the obtained file transmission operation to the server, the server can execute the file transmission operation, and obtain the update information of the file directory in the process of executing the file transmission operation, and then send the update information of the file directory to the terminal, instructing the terminal to update the file directory displayed in the visual interface based on the update information of the file directory, thereby ensuring that the terminal can obtain the file transmission operation triggered based on the file directory displayed in the visual interface, and further ensuring the response to the triggered file transmission operation, and enabling the bidirectional file sharing between the terminal and the server in the environment where the server has no network, which is simple in operation and high in transmission efficiency, and greatly reduces the operation threshold of the customer or the operation and maintenance personnel. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other related drawings can be obtained by those skilled in the art without creative labor.
[0052] Figure 1 An application environment diagram of the file transmission method in an embodiment;
[0053] Figure 2 A flowchart of the file transmission method in an embodiment;
[0054] Figure 3 An implementation principle diagram of the file transmission method in an embodiment;
[0055] Figure 4 A flowchart of the file transmission method in another embodiment;
[0056] Figure 5 A flowchart of the file transmission method in an embodiment;
[0057] Figure 6 A flowchart of the file transmission method in another embodiment;
[0058] Figure 7 A structural block diagram of the file transmission device in an embodiment
[0059] Figure 8A structural block diagram of a file transmission device in an embodiment;
[0060] Figure 9 An internal structural diagram of a server in an embodiment;
[0061] Figure 10 An internal structural diagram of a terminal in an embodiment. DETAILED DESCRIPTION
[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0063] The file transmission method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, unmanned aerial vehicles, low-altitude flying vehicles, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0064] In an exemplary embodiment, as shown in Figure 2 , a file transmission method is provided. Taking the server in Figure 1 as an example, the method includes the following steps:
[0065] S201, in a case where a baseboard management controller (BMC) of the server establishes a communication connection with the terminal and a state of an embedded multimedia card (EMMC) partition of the BMC is normal, a file transmission operation sent by the terminal is acquired, and the file transmission operation is executed. The file transmission operation is acquired based on a file directory of the EMMC partition displayed by the terminal on a visual interface.
[0066] The baseboard management controller (BMC) of the server has an independent processor and memory, runs independently of other software and hardware in the server, and can intercommunicate data with sensors inside the server through a hardware interface. Based on this principle, the embodiment of the application realizes localized file sharing through the mediation of the BMC and the Embedded MultiMediaCard (EMMC) partition, builds shared storage between the server and the terminal based on the EMMC partition, and bypasses the restrictions of traditional networks and optical drive simulation.
[0067] Figure 3 A principle block diagram of the embodiment of the application is shown. The embodiment of the application mainly involves the terminal, the BMC of the server, and the interaction between the servers. The terminal and the BMC of the server perform data transmission and file synchronization through Websocket TLS. Websocket TLS is a WebSocket communication mode based on the Transport Layer Security (TLS) encryption, which is referred to as WSS. The function of WSS is to establish a secure and encrypted real-time connection between the terminal and the server, effectively preventing data from being eavesdropped or tampered with during transmission. The BMC and the server mounting module perform data transmission and file synchronization through the Universal Serial Bus (USB), ensuring the security of data transmission.
[0068] Exemplarily, after the server is powered on, the Kernel and related drivers such as USB are loaded, important resource initialization is completed, and the state detection of the EMMC partition is detected. In the case where it is determined that the state of the EMMC partition is normal, the server waits for the file sharing operation with the terminal.
[0069] In the embodiment, the terminal establishes a communication connection with the BMC of the server based on Websocket, provides a file directory visualization interface, supports drag-and-drop upload and double-click download operations, and can display the file directory of the EMMC partition based on the visualization interface. Then, the terminal can obtain a file transmission operation triggered by a user based on the file directory of the EMMC partition displayed by the visualization interface, and send the transmission operation to the BMC of the server. It should be noted that, in addition to supporting the upload or download function through the drag-and-drop or double-click of the visualization interface, the terminal also supports the file sharing operation through the Redfish interface, which can batch transfer files and is convenient for operation and maintenance. In addition, the file transmission operation in the embodiment supports files of any format (such as binary, text, and image), and is compatible with Windows / Linux systems.
[0070] In this embodiment, after the server obtains the file transmission operation sent by the terminal, the file transmission operation can be executed. Exemplarily, the file transmission operation can include a file uploading operation, a file downloading operation, and the like.
[0071] In addition, it should be noted that the connection mode of the server and the BMC is different from the connection mode of the terminal and the BMC, and therefore, the EMMC partition sets the read-write permission for the server and the read-only permission for the BMC when creating or opening a file. In the embodiment of the present application, the server can directly modify the file, meeting the dynamic debugging requirement.
[0072] S202, obtaining update information of a file directory in the process of executing the file transmission operation.
[0073] It can be understood that in the process of executing the file transmission operation, the file can be updated, for example, the file can be deleted or added, and the like, and therefore, the file directory of the EMMC partition will also be updated. Therefore, in this embodiment, the server can also obtain the update information of the file directory in the process of executing the file transmission operation.
[0074] S203, sending the update information to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visual interface based on the update information.
[0075] In this embodiment, the server can send the update information of the file directory of the EMMC partition to the terminal based on the Websocket communication connection between the server and the terminal, and the terminal can update the file directory displayed in the visual interface based on the update information, so that the file directory displayed in the visual interface of the terminal is consistent with the file directory of the EMMC partition.
[0076] In the file transmission method, when the baseboard management controller (BMC) of the server and the terminal establish a communication connection, and the state of the embedded multi-media card (EMMC) partition of the BMC is normal, after the terminal obtains the file transmission operation based on the file directory of the EMMC partition displayed in the visual interface, the terminal can send the obtained file transmission operation to the server, the server can execute the file transmission operation, obtain the update information of the file directory in the process of executing the file transmission operation, and then send the update information of the file directory to the terminal, instructing the terminal to update the file directory displayed in the visual interface based on the update information of the file directory, so as to ensure that the terminal can obtain the file transmission operation triggered based on the file directory displayed in the visual interface, and further ensure the response to the triggered file transmission operation. In the environment without network of the server, the bidirectional file sharing between the terminal and the server can also be performed, the operation is simple and the transmission efficiency is high, and the operation threshold of the customer or the operation and maintenance personnel is greatly reduced.
[0077] The specific process of performing a file transfer operation on the server will be explained in this embodiment. In an exemplary embodiment, the "performing a file transfer operation" in S201 includes any of the following:
[0078] Step A, if the file transfer operation is a file write operation, the file carried by the file transfer operation is written into the EMMC partition.
[0079] In this embodiment, if the file transfer operation is a file write operation, i.e., a file upload operation, the server can parse the file transfer operation after receiving the file transfer operation, obtain the file carried by the file transfer operation, and then write the file carried by the file transfer operation into the EMMC partition.
[0080] Further, as an optional implementation, if the file transfer operation is a file write operation, the write information corresponding to the file write operation can be determined as the update information of the file directory of the EMMC partition, and sent to the terminal to add the directory of the write file to the file directory of the EMMC partition displayed in the visual interface, and update the file directory of the EMMC partition displayed in the visual interface.
[0081] The specific execution process of the file write operation will be explained below with a specific example: the user can drag a file based on the visual interface of the terminal, the terminal captures the triggered drag event and converts it into a predefined upload command, and then sends it to the BMC through Websocket. The BMC file stores the dragged file in the EMMC partition according to the directory structure, updates the file directory of the EMMC partition, triggers USB re-enumeration, the server recognizes the EMMC partition as a USB device, and synchronizes the file changes in real time.
[0082] Step B, if the file transfer operation is a file read operation, the file corresponding to the file transfer operation is read from the EMMC partition.
[0083] In this embodiment, if the file transfer operation is a file read operation, i.e., a file download operation, the server can parse the file transfer operation to obtain the information of the file to be read, and read the file from the EMMC partition based on the information of the file to be read.
[0084] As an example, when the file transfer operation is a file read operation, the process of performing the file transfer operation is as follows: the terminal obtains the triggered file download operation based on the visual interface, carries the file path to be read in the file transfer operation and sends it to the BMC, the BMC responds to the file transfer operation, reads the EMMC partition based on the file path to be read, reads the corresponding file, and transmits it to the terminal in slices, the terminal receives the data stream and generates a downloadable file, and triggers the browser to download.
[0085] Step C, if the file transfer operation is a file deletion operation, deleting the file corresponding to the file deletion operation from the EMMC partition.
[0086] In this embodiment, if the file transfer operation is a file deletion operation, the identification of the file to be deleted can be parsed from the file transfer operation in response to the file transfer operation, and then the file corresponding to the parsed identification in the EMMC partition is deleted.
[0087] Further, in this embodiment, after deleting the file in the EMMC partition, the file directory of the EMMC partition will change, and the file directory of the EMMC partition needs to be adjusted in time. As an optional implementation, the deletion information corresponding to the deletion operation can be determined as update information and sent to the terminal, so that the terminal deletes the corresponding file directory in the file directory of the EMMC partition displayed in the visual interface and updates the file directory of the EMMC partition displayed.
[0088] In this embodiment, the operations performed are also different for different types of file transfer operations. For different types of file transfer operations, file transfer can be implemented, so that the file transfer operation has better compatibility and flexibility.
[0089] In this embodiment, the preparation work before performing the above file transfer method will be explained. In one embodiment, as shown in Figure 4 The above method further includes:
[0090] S301, formatting the EMMC partition to format the EMMC partition into a preset file format.
[0091] Exemplarily, the preset file format can be FAT32 / exFAT file format, or other file formats supported by the formatting system, etc. This embodiment will not be listed one by one here.
[0092] S302, mounting the formatted EMMC partition to the server through the USB mass storage mode, and mapping the address information of the formatted EMMC partition to a preset mounting point path.
[0093] In this embodiment, after formatting the EMMC partition, the formatted EMMC partition can be mounted to the server through the USB mass storage mode, and the address information of the formatted EMMC partition can be mapped to a preset mounting point path, supporting file reading and writing, and realizing bidirectional real-time file sharing between the terminal and the server without network state.
[0094] In this embodiment, the EMMC partition of the BMC is formatted to a preset file format, and the formatted EMMC partition is mounted to the server via USB mass storage mode. The address information of the formatted EMMC partition is mapped to a preset mount point path. File sharing between the terminal and the server can be achieved directly without network connection. Even if the connection is disconnected or the mounting is interrupted, the uploaded file can be saved unless it is deleted through a visual interface or interface, which makes it convenient for the server to reuse the file.
[0095] In one exemplary embodiment, such as Figure 5 As shown, a file transfer method is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:
[0096] S401: When a communication connection is established between the terminal and the baseboard management controller (BMC) of the server, file transfer operations are obtained based on the file directory of the EMMC partition of the BMC displayed in the visual interface.
[0097] S402, send the file transfer operation to the server; the file transfer operation is used to instruct the server to perform the file transfer operation.
[0098] The server's Baseboard Management Controller (BMC) has its own independent processor and memory, and its operation is independent of other hardware and software in the server. It can communicate with the sensors inside the server through a hardware interface. Based on this principle, this application embodiment realizes localized file sharing by relaying between the BMC and the Embedded MultiMediaCard (EMMC) partition. The shared storage between the server and the terminal is built based on the EMMC partition, bypassing the limitations of traditional networks and optical drive emulation.
[0099] like Figure 3 As shown, this embodiment mainly involves the interaction between the terminal, the server's BMC, and the server. Data transmission and file synchronization between the terminal and the server's BMC are achieved via WebSocket TLS. WebSocket TLS is a WebSocket communication method based on Transport Layer Security (TLS) encryption. Its function is to establish a secure and encrypted real-time connection between the terminal and the server, effectively preventing data from being eavesdropped on or tampered with during transmission. Data transmission and file synchronization between the BMC and the server are achieved via Universal Serial Bus (USB), ensuring the security of data transmission.
[0100] For example, after the server powers on, it loads the kernel and related drivers such as USB, completes the initialization of various important resources, and checks the status of the EMMC partition. If the status of the EMMC partition is found to be normal, it waits for file sharing operations with the terminal.
[0101] In this embodiment, the terminal establishes a communication connection with the server's BMC based on WebSocket, providing a visual interface for the file directory. It supports drag-and-drop upload and double-click download operations. The terminal can display the file directory of the EMMC partition through the visual interface. Then, the terminal can obtain user-triggered file transfer operations based on the file directory of the EMMC partition displayed in the visual interface and send the transfer operations to the server's BMC. It should be noted that, in addition to supporting drag-and-drop or double-click upload or download functions through the visual interface, the terminal also supports file sharing operations through the Redfish interface, enabling batch file transfers for convenient operation and maintenance. Furthermore, the file transfer operations in this embodiment support any file format (such as binary, text, and image files) and are compatible with Windows / Linux systems.
[0102] In this embodiment, after receiving a file transfer operation from the terminal, the server can execute the file transfer operation. For example, the file transfer operation may include file upload, file download, etc.
[0103] Additionally, it should be noted that since the connection method between the server and the BMC differs from that between the terminal and the BMC, the EMMC partition sets read-write permissions for the server and read-only permissions for the BMC when creating or opening files. In the embodiments of this application, the server can directly modify files, meeting the requirements for dynamic debugging.
[0104] S403: Receive update information about the file directory sent by the server, and update the file directory based on the update information; the update information is generated during the file transfer operation performed by the server.
[0105] It is understandable that during file transfer operations, files may be updated, such as by deleting or adding files. Therefore, the file directory of the EMMC partition will also be updated accordingly. Thus, in this embodiment, the server can also obtain the file directory update information during the file transfer operation. In this embodiment, the server can send the EMMC partition's file directory update information to the terminal via a WebSocket communication connection. The terminal can then update the file directory displayed in the visual interface based on this update information, ensuring that the file directory displayed in the terminal's visual interface matches the EMMC partition's file directory.
[0106] In the above file transfer method, when a communication connection is established between the terminal and the baseboard management controller (BMC) of the server, the terminal can obtain file transfer operations based on the file directory of the EMMC partition displayed in the visual interface. The terminal can send the obtained file transfer operations to the server, which can execute the file transfer operation and obtain the update information of the file directory during the execution of the file transfer operation. Then, the server can send the update information of the file directory to the terminal, instructing the terminal to update the file directory displayed in the visual interface based on the update information of the file directory. This ensures that the terminal can obtain file transfer operations triggered based on the file directory displayed in the visual interface, thereby ensuring the response to the triggered file transfer operations. Even in an environment where the server has no network, bidirectional file sharing between the terminal and the server can be carried out. The operation is simple and the transmission efficiency is high, which greatly reduces the operation threshold for customers or maintenance personnel.
[0107] When a file transfer operation is performed on the terminal, the file directory of the EMMC partition of the BMC is obtained based on the terminal's visual interface. Therefore, the file target of the EMMC partition needs to be displayed in the terminal's visual interface. In one embodiment, such as... Figure 6 As shown, the above method also includes:
[0108] S501, in response to a file sharing operation triggered by a visual interface, sends a retrieval command to the server; the retrieval command instructs the server to send the file directory of the EMMC partition.
[0109] In this embodiment, when remote server management is required, the user can trigger a file sharing operation based on the menu displayed in the terminal's visual interface. The terminal can respond to the file sharing operation by sending a retrieval command to the server, which instructs the server to send the file directory of the BMC's EMMC partition to the terminal.
[0110] S502 receives the file directory sent by the server and displays the file directory in the visual interface.
[0111] In this embodiment, after the terminal receives the file directory of the EMMC partition sent by the server, it can display the file directory of the EMMC partition in the terminal's visual interface, so that the user can trigger a file transfer operation based on the displayed file directory of the EMMC partition.
[0112] In this embodiment, in response to a file sharing operation triggered by a visual interface, the terminal can obtain the file target of the EMMC partition of the BMC from the server, thereby displaying the file directory of the EMMC partition in the visual interface. This allows the user to trigger a file transfer operation based on the file target of the EMMC partition displayed in the visual interface, thereby realizing file sharing between the terminal and the server, and further enabling remote control and management of the server.
[0113] The file transfer method provided in this application embodiment will be explained and illustrated below using two specific application scenarios:
[0114] Scenario 1, driver updates in a network-free environment, may include the following steps:
[0115] 1) The user triggers the "file sharing" operation through the terminal's visual interface, which displays the file directory of the server's BMC EMMC partition.
[0116] 2) The user drags and drops the local driver file to the visual interface, and the terminal sends the file drag-and-drop operation to the server;
[0117] 3) The server writes the file to the EMMC partition via the BMC;
[0118] 4) Mount the EMMC partition on the server, and the maintenance personnel can directly install the driver files by entering the preset mount point path.
[0119] Scenario 2, log file export and troubleshooting, may include the following steps:
[0120] 1) The server saves log files or fault information to the mounted EMMC partition;
[0121] 2) The terminal's visual interface displays the file directory of the EMMC partition. Users can double-click a file in the file directory to download the log file to their local machine.
[0122] 3) Operations and maintenance personnel analyze the server's business scenarios based on the log information in the log files to locate problems.
[0123] 4) When the operations and maintenance personnel locate the server system vulnerability, they can drag and drop the corresponding patch file to the visual interface of the terminal to upload the patch file. The operations and maintenance personnel can directly find the patch file in the EMMC partition and fix the vulnerability.
[0124] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0125] Based on the same inventive concept, this application also provides a file transfer apparatus for implementing the file transfer method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more file transfer apparatus embodiments provided below can be found in the limitations of the file transfer method described above, and will not be repeated here.
[0126] In one exemplary embodiment, such as Figure 7 As shown, a file transfer device is provided, applied to a server, including: an execution module, an acquisition module, and a sending module, wherein:
[0127] The execution module is used to obtain and execute file transfer operations sent by the terminal when the baseboard management controller (BMC) of the server establishes a communication connection with the terminal and the status of the embedded multimedia card (EMMC) partition of the BMC is normal. The file transfer operation is obtained by the terminal based on the file directory of the EMMC partition displayed in the visual interface.
[0128] The acquisition module is used to obtain the updated information of the file directory during the file transfer operation.
[0129] The sending module is used to send update information to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
[0130] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0131] In one embodiment, the above-mentioned execution module includes: a first execution unit, a second execution unit, and a third execution unit, wherein:
[0132] The first execution unit is used to write the file carried by the file transfer operation to the EMMC partition if the file transfer operation is a file write operation.
[0133] The second execution unit is used to read the file corresponding to the file transfer operation from the EMMC partition if the file transfer operation is a file read operation.
[0134] The third execution unit is used to delete the file corresponding to the file deletion operation from the EMMC partition if the file transfer operation is a file deletion operation.
[0135] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0136] In one embodiment, the above-mentioned acquisition module includes: a first acquisition unit and a second acquisition unit, wherein:
[0137] The first acquisition unit is used to determine the write information corresponding to the file write operation as update information if the file transfer operation is a file write operation.
[0138] The second acquisition unit is used to determine the deletion information corresponding to the deletion operation as the update information if the file transfer operation is a file deletion operation.
[0139] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0140] In one embodiment, the above-described apparatus further includes: a formatting module and a mounting module, wherein:
[0141] The formatting module is used to format EMMC partitions, formatting them into a preset file format.
[0142] The mounting module is used to mount the formatted EMMC partition to the server via USB mass storage mode and map the address information of the formatted EMMC partition to a preset mount point path.
[0143] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0144] In one exemplary embodiment, such as Figure 8 As shown, a file transfer device is provided, applied to a terminal, comprising: an acquisition module, a first sending module, and an update module, wherein:
[0145] The acquisition module is used to acquire file transfer operations based on the file directory of the BMC's EMMC partition displayed in the visual interface when a communication connection is established between the terminal and the server's Baseboard Management Controller (BMC).
[0146] The first sending module is used to send file transfer operations to the server; the file transfer operation is used to instruct the server to perform the file transfer operation.
[0147] The update module is used to receive update information about the file directory sent by the server and update the file directory based on the update information; the update information is generated by the server during the file transfer operation.
[0148] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0149] In one embodiment, the above-described apparatus further includes: a second transmitting module and a display module, wherein:
[0150] The second sending module is used to send a retrieval command to the server in response to a file sharing operation triggered by a visual interface; the retrieval command is used to instruct the server to send the file directory of the EMMC partition.
[0151] The display module is used to receive the file directory sent by the server and display the file directory in a visual interface.
[0152] The file transfer device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0153] Each module in the aforementioned file transfer device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.
[0154] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores remotely managed files. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a file transfer method.
[0155] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a file transfer method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0156] Those skilled in the art will understand that Figure 9 and Figure 10The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0157] In one exemplary embodiment, a server is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0158] When the server's Baseboard Management Controller (BMC) establishes a communication connection with the terminal, and the status of the BMC's embedded multimedia card EMMC partition is normal, the server obtains and executes the file transfer operation sent by the terminal; the file transfer operation is obtained by the terminal based on the file directory of the EMMC partition displayed in the visual interface.
[0159] Obtain update information of the file directory during the file transfer operation;
[0160] The update information is sent to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
[0161] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0162] If the file transfer operation is a file write operation, then the file carried by the file transfer operation will be written to the EMMC partition;
[0163] If the file transfer operation is a file read operation, then read the file corresponding to the file transfer operation from the EMMC partition;
[0164] If the file transfer operation is a file deletion operation, then the file corresponding to the file deletion operation is deleted from the EMMC partition.
[0165] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0166] If the file transfer operation is a file write operation, then the write information corresponding to the file write operation will be determined as the update information;
[0167] If the file transfer operation is a file deletion operation, then the deletion information corresponding to the deletion operation will be determined as the update information.
[0168] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0169] Format the EMMC partition to a preset file format.
[0170] The formatted EMMC partition is mounted to the server via USB mass storage mode, and the address information of the formatted EMMC partition is mapped to the preset mount point path.
[0171] In one exemplary embodiment, a terminal is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0172] When a communication connection is established between the terminal and the baseboard management controller (BMC) of the server, file transfer operations are obtained based on the file directory of the EMMC partition of the BMC displayed in the visual interface.
[0173] Send a file transfer operation to the server; the file transfer operation is used to instruct the server to perform the file transfer operation.
[0174] Receive update information about the file directory sent by the server, and update the file directory based on the update information; the update information is generated during the file transfer operation performed by the server.
[0175] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0176] In response to a file sharing operation triggered by the visual interface, a retrieval command is sent to the server; the retrieval command instructs the server to send the file directory of the EMMC partition.
[0177] Receive the file directory sent by the server and display the file directory in the visual interface.
[0178] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0179] When the server's Baseboard Management Controller (BMC) establishes a communication connection with the terminal, and the status of the BMC's embedded multimedia card EMMC partition is normal, the server obtains and executes the file transfer operation sent by the terminal; the file transfer operation is obtained by the terminal based on the file directory of the EMMC partition displayed in the visual interface.
[0180] Obtain update information of the file directory during the file transfer operation;
[0181] The update information is sent to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
[0182] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0183] If the file transfer operation is a file write operation, then the file carried by the file transfer operation will be written to the EMMC partition;
[0184] If the file transfer operation is a file read operation, then read the file corresponding to the file transfer operation from the EMMC partition;
[0185] If the file transfer operation is a file deletion operation, then the file corresponding to the file deletion operation is deleted from the EMMC partition.
[0186] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0187] If the file transfer operation is a file write operation, then the write information corresponding to the file write operation will be determined as the update information;
[0188] If the file transfer operation is a file deletion operation, then the deletion information corresponding to the deletion operation will be determined as the update information.
[0189] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0190] Format the EMMC partition to a preset file format.
[0191] The formatted EMMC partition is mounted to the server via USB mass storage mode, and the address information of the formatted EMMC partition is mapped to the preset mount point path.
[0192] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0193] When a communication connection is established between the terminal and the baseboard management controller (BMC) of the server, file transfer operations are obtained based on the file directory of the EMMC partition of the BMC displayed in the visual interface.
[0194] Send a file transfer operation to the server; the file transfer operation is used to instruct the server to perform the file transfer operation.
[0195] Receive update information about the file directory sent by the server, and update the file directory based on the update information; the update information is generated during the file transfer operation performed by the server.
[0196] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0197] In response to a file sharing operation triggered by the visual interface, a retrieval command is sent to the server; the retrieval command instructs the server to send the file directory of the EMMC partition.
[0198] Receive the file directory sent by the server and display the file directory in the visual interface.
[0199] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0200] When the server's Baseboard Management Controller (BMC) establishes a communication connection with the terminal, and the status of the BMC's embedded multimedia card EMMC partition is normal, the server obtains and executes the file transfer operation sent by the terminal; the file transfer operation is obtained by the terminal based on the file directory of the EMMC partition displayed in the visual interface.
[0201] Obtain update information of the file directory during the file transfer operation;
[0202] The update information is sent to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
[0203] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0204] If the file transfer operation is a file write operation, then the file carried by the file transfer operation will be written to the EMMC partition;
[0205] If the file transfer operation is a file read operation, then read the file corresponding to the file transfer operation from the EMMC partition;
[0206] If the file transfer operation is a file deletion operation, then the file corresponding to the file deletion operation is deleted from the EMMC partition.
[0207] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0208] If the file transfer operation is a file write operation, then the write information corresponding to the file write operation will be determined as the update information;
[0209] If the file transfer operation is a file deletion operation, then the deletion information corresponding to the deletion operation will be determined as the update information.
[0210] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0211] Format the EMMC partition to a preset file format.
[0212] The formatted EMMC partition is mounted to the server via USB mass storage mode, and the address information of the formatted EMMC partition is mapped to the preset mount point path.
[0213] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0214] When a communication connection is established between the terminal and the baseboard management controller (BMC) of the server, file transfer operations are obtained based on the file directory of the EMMC partition of the BMC displayed in the visual interface.
[0215] Send a file transfer operation to the server; the file transfer operation is used to instruct the server to perform the file transfer operation.
[0216] Receive update information about the file directory sent by the server, and update the file directory based on the update information; the update information is generated during the file transfer operation performed by the server.
[0217] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0218] In response to a file sharing operation triggered by the visual interface, a retrieval command is sent to the server; the retrieval command instructs the server to send the file directory of the EMMC partition.
[0219] Receive the file directory sent by the server and display the file directory in the visual interface.
[0220] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0221] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0222] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A file transfer method, characterized in that, Applied to a server, the method includes: When the Baseboard Management Controller (BMC) of the server establishes a communication connection with the terminal, and the status of the Embedded Multimedia Card (EMMC) partition of the BMC is normal, the server acquires and executes the file transfer operation sent by the terminal; the file transfer operation is acquired by the terminal based on the file directory of the EMMC partition displayed in the visual interface. Obtain the update information of the file directory during the execution of the file transfer operation; The update information is sent to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
2. The method according to claim 1, characterized in that, The execution of the file transfer operation includes: If the file transfer operation is a file write operation, then the file carried by the file transfer operation is written to the EMMC partition; If the file transfer operation is a file read operation, then the file corresponding to the file transfer operation is read from the EMMC partition; If the file transfer operation is a file deletion operation, then the file corresponding to the file deletion operation is deleted from the EMMC partition.
3. The method according to claim 2, characterized in that, The step of obtaining the updated information of the file directory during the execution of the file transfer operation includes: If the file transfer operation is a file write operation, then the write information corresponding to the file write operation is determined as the update information; If the file transfer operation is a file deletion operation, then the deletion information corresponding to the deletion operation is determined as the update information.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The EMMC partition is formatted to a preset file format. The formatted EMMC partition is mounted to the server via USB mass storage mode, and the address information of the formatted EMMC partition is mapped to a preset mount point path.
5. A file transfer method, characterized in that, Applied to a terminal, the method includes: When the terminal establishes a communication connection with the baseboard management controller (BMC) of the server, file transfer operations are obtained based on the file directory of the EMMC partition of the BMC displayed in the visual interface. The file transfer operation is sent to the server; the file transfer operation is used to instruct the server to execute the file transfer operation; The server receives update information about the file directory sent by the server, and updates the file directory based on the update information; the update information is generated by the server during the file transfer operation.
6. The method according to claim 5, characterized in that, The method further includes: In response to a file sharing operation triggered based on the visual interface, a retrieval instruction is sent to the server; the retrieval instruction is used to instruct the server to send the file directory of the EMMC partition; Receive the file directory sent by the server and display the file directory in the visualization interface.
7. A file transfer device, characterized in that, Applied to a server, the device includes: The execution module is used to obtain and execute a file transfer operation sent by the terminal when the baseboard management controller (BMC) of the server establishes a communication connection with the terminal and the status of the embedded multimedia card (EMMC) partition of the BMC is normal; the file transfer operation is obtained by the terminal based on the file directory of the EMMC partition displayed in the visual interface. The acquisition module is used to acquire the update information of the file directory during the execution of the file transfer operation; A sending module is used to send the update information to the terminal; the update information is used to instruct the terminal to update the file directory displayed in the visualization interface based on the update information.
8. A file transfer device, characterized in that, Applied to a terminal, the device includes: The acquisition module is used to acquire file transfer operations based on the file directory of the EMMC partition of the BMC displayed in the visual interface when the terminal and the baseboard management controller (BMC) of the server establish a communication connection. A first sending module is used to send the file transfer operation to the server; the file transfer operation is used to instruct the server to perform the file transfer operation; A receiving module is used to receive update information of the file directory sent by the server, and update the file directory based on the update information; the update information is generated by the server during the file transfer operation.
9. A server comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
10. A terminal comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 5 to 6.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.