Data replication method and system, program product and storage medium
By capturing and saving text data from remote devices in real time on the local client, and receiving and responding to copy requests, the problem of inconvenient text data copying in the BMC system is solved, enabling fast and accurate text data copying.
Patent Information
- Application Number
- CN202511423418.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-23
AI Technical Summary
In the KVM remote desktop function of the BMC system, it is not convenient to copy the text data output by the command line, especially when a large amount of text data is scrolling rapidly, it is difficult to accurately capture and copy the required text lines.
By establishing a connection between the local client and the remote device, text data is captured and saved to a first file in real time. After receiving a copy request from the virtual client, the target text data is obtained from the first file and sent to the local client for display.
It enables fast and accurate copying of text data from remote devices, improving the efficiency of copying operations and user experience, and solving the problem of inconvenient text data copying.
Smart Images

Figure CN121387587A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and specifically, relate to a data replication method and system, a program product and a storage medium. BACKGROUND
[0002] In enterprise-level servers and switches and other devices, a baseboard management controller (BMC) system is widely used for remote management and maintenance of the device. The BMC system usually provides a keyboard, video and mouse (KVM) remote desktop function, allowing administrators to access the command line interface of the server through the network and perform various management operations. However, when a user remotely accesses the command line operating system through the KVM, the user cannot directly copy the text content from the image displayed by the KVM. Although text recognition technology can be used to extract text from the KVM image, this method is not only technically complex, but also inefficient, especially in the case of fast scrolling of a large amount of text data, it is difficult to accurately capture and copy the required text line.
[0003] In summary, in the related art, when using the KVM remote desktop function in the BMC system, there is a problem that the text data of the command line output cannot be conveniently copied. SUMMARY
[0004] Embodiments of the present application provide a data replication method and system, a program product and a storage medium to at least solve the technical problem that text data cannot be copied in the related art.
[0005] According to an aspect of embodiments of the present application, a data replication method is provided, comprising: receiving a replication request sent by a virtual client, wherein the replication request is used to request to copy target text data included in text data displayed in the current virtual client to a local client, the text data is data generated by a remote device, and the remote device is a device performing remote management operation through the virtual client in the local client; in response to the replication request, obtaining the target text data from a first file, wherein the first file is a file generated based on the text data in advance and stored in the local client; and sending the target text data to the local client to display the target text data in the local client.
[0006] In an example embodiment, before receiving the copy request sent by the virtual client, the method further comprises: establishing a connection between the local client and a first interface, wherein the first interface is a communication interface through which the remote device transmits the text data; obtaining the text data through the first interface, and storing the text data into an initial file in the local client to obtain the first file.
[0007] In an example embodiment, in response to the copy request, obtaining the target text data from the first file comprises: in a case where the target text data is part of the text data, parsing the copy request to determine a positional relationship between the target text data and the text data; and obtaining the target text data from the first text based on the positional relationship.
[0008] In an example embodiment, parsing the copy request to determine the positional relationship between the target text data and the text data comprises: parsing the copy request to obtain position indication information, wherein the position indication information is used to indicate a display position of the target text data in the virtual client; determining the positional relationship between the target text data and the text data based on the position indication information and a display position of the text data in the virtual client; and obtaining the target text data from the first text based on the positional relationship comprises: determining a target position of the target text data in the text data based on the positional relationship, and obtaining the target text data from the first text according to the target position.
[0009] In an example embodiment, sending the target text data to the local client to display the target text data in the local client comprises: sending the target text data to the local client through a first connection, wherein the first connection is a connection established after receiving a connection establishment request sent by the local client, and the first connection is used to transmit data between the local client and the virtual client.
[0010] In an example embodiment, after sending the target text data to the local client to display the target text data in the local client, the method further comprises: exiting the remote management operation, and deleting the first file.
[0011] According to another aspect of the embodiments of the present application, a substrate management controller (BMC) is also provided, comprising: a receiving module configured to receive a copy request sent by a virtual client, wherein the copy request is used to request copying target text data included in text data currently displayed in the virtual client to a local client where the BMC is located, the text data is data generated by a remote device, and the remote device is a device performing a remote management operation through the virtual client in the local client; an obtaining module configured to obtain the target text data from a first file in response to the copy request, wherein the first file is a file generated in advance based on the text data and stored in the local client; and a sending module configured to send the target text data to the local client to display the target text data in the local client.
[0012] According to another aspect of the embodiments of the present application, a data copy system is also provided, comprising a local client, a virtual client and a remote client, wherein the local client comprises a BMC.
[0013] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program. The computer program is configured to be executed by a processor to perform the steps in any of the method embodiments.
[0014] According to another aspect of the embodiments of the present application, a computer program product or a computer program is provided, and the computer program product or the computer program comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the steps in any of the method embodiments.
[0015] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the method embodiments.
[0016] According to the embodiments of the present application, since the data generated by the remote device is captured in real time and saved in the first file in the local client, when a user controls the remote device through the virtual client and requests to copy certain text data therein, the target text data requested to be copied by the user can be obtained from the first file, and the target text data is sent to the local client to display the target text data in the local client, thereby solving the problem that the text data cannot be copied in the related art, and achieving the effect of copying the text data. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a schematic diagram of an application scenario of a data replication method according to an embodiment of the application;
[0018] Figure 2 is a schematic diagram of an application scenario of a data replication method according to an embodiment of the application;
[0019] Figure 3 is a schematic diagram of an application scenario of a data replication method according to an embodiment of the application;
[0020] Figure 4 is a schematic diagram of an application scenario of a data replication method according to an embodiment of the application;
[0021] Figure 5 is a structural block diagram of an optional BMC according to an embodiment of the application. DETAILED DESCRIPTION
[0022] In order to enable persons skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily mean a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] According to an aspect of an embodiment of the present application, a data replication method is provided. Optionally, in the present embodiment, the above-mentioned data replication method can be applied to, but is not limited to, a data replication method for a data center as shown in Figure 1The hardware environment shown includes a terminal device 102 and a server 104. The server 104 can be connected with the terminal device 102 through a network, and can be used to provide services (for example, application services, etc.) for the terminal device 102 or a client installed on the terminal device 102, and a database can be set on the server 104 or independently of the server 104, to provide data storage services for the server 104.
[0025] The network can include, but is not limited to, at least one of the following: a wired network, a wireless network. The wired network can include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, a local area network. The wireless network can include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI), Bluetooth. The terminal device 102 can be, but is not limited to, a personal computer (PC), a mobile phone, a tablet computer, etc. The server 104 can be, but is not limited to, a cloud server, a server cluster, or other server types.
[0026] The data replication method of the embodiment of the application can be executed by the server 104, or by the terminal device 102, or by the server 104 and the terminal device 102 together. The terminal device 102 executing the data replication method of the embodiment of the application can also be executed by a client installed thereon.
[0027] Taking the terminal device 102 executing the data replication method in the embodiment as an example, Figure 2 is a flowchart of an optional data replication method according to the embodiment of the application, as Figure 2 shown, the flow of the method can include the following steps:
[0028] Step S202, receiving a replication request sent by a virtual client, wherein the replication request is used to request to replicate target text data included in text data currently displayed in the virtual client to a local client, the text data is data generated by a remote device, and the remote device is a device performing remote management operations through the virtual client in the local client.
[0029] Optionally, the virtual client is an application program or a service running on the local client (such as a personal computer or a mobile device), which is used to simulate the user interface of a remote device (such as a server), so that the user can interact with the remote device locally, for example, a KVM client, through which the user can remotely control the server and see the command line interface of the server.
[0030] Optionally, the copy request is an instruction initiated by the user in the virtual client, and the purpose is to copy target text data included in the text data displayed in the virtual client to the local client.
[0031] Optionally, the remote device is a device connected with the local client through a network, which needs to be remotely accessed and managed by the user, including but not limited to a server, a switch or other network hardware.
[0032] Optionally, the text data includes but is not limited to Basic Input / Output System (BIOS) self-check information, operating system startup logs, and text input and output of a command line interface of the remote device.
[0033] Optionally, the local client refers to a device directly operated by the user, including but not limited to a personal computer, a notebook, a tablet or a smart phone, etc.
[0034] In step S204, the target text data is obtained from a first file in response to the copy request, wherein the first file is a file generated in advance based on the text data and stored in the local client.
[0035] In step S206, the target text data is sent to the local client to display the target text data on the local client.
[0036] Optionally, sending the target text data to the local client to display the target text data on the local client includes sending the target text data to a web front end in the local client to display the copyable target text data on a web page (such as a browser) in the local client.
[0037] According to the embodiments provided in the present application, since the data generated by the remote device is captured in real time and saved in the first file of the local client, when the user controls the remote device through the virtual client and requests to copy some text data therein, the target text data requested to be copied by the user can be obtained from the first file, and the target text data is sent to the local client to display the target text data on the local client, thereby solving the problem that the text data cannot be copied in the related art, and achieving the effect of copying the text data.
[0038] In an example embodiment, before receiving the copy request sent by the virtual client, the method further comprises: establishing a connection between the local client and a first interface, wherein the first interface is a communication interface through which the remote device transmits the text data; obtaining the text data through the first interface and storing the text data into an initial file in the local client to obtain the first file.
[0039] Optionally, in a server management scenario, the first interface is a serial port of the remote device. For example, after the host Central Processing Unit (CPU) of the remote device redirects the serial port to the BMC system through a Low Pin Count (LPC) bus, the BMC system has the ability to interact with the remote device, and the Universal Asynchronous Receiver / Transmitter (UART) of the BMC system saves the redirected serial port data (i.e., the text data) line by line into a text file of the local client, such as <session_id>_log.txt.
[0040] Through this embodiment, the connection between the local client and the first interface is established, ensuring that the text data of the remote device can be transmitted to the local client in real time when displayed to the virtual client, so that when the user initiates a copy request on the virtual client, the target text data can be quickly and accurately extracted from the first file without the need to obtain data from the remote device again or convert the text through image recognition technology, thereby improving the response speed of the copy operation.
[0041] In an example embodiment, in response to the copy request, the target text data is obtained from the first file, comprising: in a case where the target text data is part of the text data, analyzing the copy request to determine the positional relationship between the target text data and the text data; and based on the positional relationship, obtaining the target text data from the first text.
[0042] Optionally, in response to the copy request, the target text data is obtained from the first file, comprising: in a case where the copy request is used to indicate that the target text data is all of the text data, analyzing the copy request to determine the positional relationship between the target text data and the text data; and based on the positional relationship, obtaining the target text data from the first text.
[0043] Optionally, the position relationship is used to indicate the specific position of the target text data in the complete text data, such as the start line and the end line. For example, the user selects the text data from the 5th line from the bottom to the last line of the screen in the KVM interface for copying, and the position information of the target text data, i.e., the relative position of the text data from the 5th line from the bottom to the last line of the screen in the first file, is included in the copying request.
[0044] Optionally, the target text data is obtained based on the position relationship, which means that the target text data that the user wants to copy is extracted from the first file according to the position information provided in the user copying request. For example, a KVM interface fixedly displays the command line output of X rows of servers, and the command line output of the X rows of servers is saved in the first file <session_id>_log.txt. When the BMC system captures that the user clicks to copy the data in the nth line in the virtual client, the BMC parses <session_id>_log.txt, calculates from the end, and extracts the data in the X-nth line from <session_id>_log.txt.
[0045] Through the embodiment, it is ensured that the user can copy the text segment of interest rather than the entire file, for example, if the user only focuses on the recent system error log, the user can quickly locate the line where the log is located and copy only the line, without sending all the log information to the user. Not only is the remote copying operation implemented, but also the personalized remote copying operation is implemented.
[0046] In an example embodiment, the copying request is parsed, and the position relationship between the target text data and the text data is determined, including: parsing the copying request to obtain position indication information, wherein the position indication information is used to indicate the display position of the target text data in the virtual client; determining the position relationship between the target text data and the text data based on the position indication information and the display position of the text data in the virtual client; and obtaining the target text data from the first text based on the position relationship, including: determining the target position of the target text data in the text data based on the position relationship, and obtaining the target text data from the first text according to the target position.
[0047] Optionally, the position indication information includes but is not limited to the line number, offset, and position coordinates of the target text data on the display interface of the virtual client. For example, when the user selects a specific text line on the KVM interface for copying by using a mouse, the BMC system receives the start and end coordinates or line number of the mouse selection area, and these information constitutes the position indication information.
[0048] Optionally, the position relationship is used to indicate the relative position of the target text data to be copied and other parts of the text data on the display interface of the virtual client.
[0049] Optionally, the target position is used to indicate the storage position of the target text data to be copied in the first text, including but not limited to line number, character position.
[0050] Optionally, when the text data is stored in the first text, the storage position of the text data in the first text is the same as the display position of the text data in the virtual client, or has a certain position correspondence, so that by analyzing the copy request, the target position of the target text data in the first text can be determined based on the position relationship of the target text data in the display interface, thereby obtaining the target text data. For example, the display position of the target text data in the virtual client is the 3rd line, the display position of the text data in the virtual client is the 0-5th line, and the position relationship is that the target text data is in the 4th line of the text data. The target position is the 4th line of the target text data in the first text.
[0051] In an example embodiment, the target text data is sent to the local client to display the target text data on the local client, including: sending the target text data to the local client through a first connection, wherein the first connection is a connection established after receiving a connection establishment request sent by the local client, and the first connection is used for transmitting data between the BMC system and the web end in the local client.
[0052] Optionally, the first connection is a connection between the BMC system and the web end in the local client, which is used for transmitting data between the BMC system and the web end in the local client. For example, when a user accesses the KVM interface of a server for the first time, the web end sends a connection establishment request to the BMC system to request to establish a websocket session (first connection). In response to the connection establishment request, the BMC system and the web end establish a websocket session through the websocket protocol.
[0053] Through this embodiment, when the user selects and copies the target text data on the virtual client interface, the data is transmitted to the local client through the first connection in real time, and the target text data that can be copied is displayed in real time, thereby optimizing the user's remote management experience.
[0054] In an example embodiment, after the target text data is sent to the local client to display the target text data on the local client, the method further comprises: exiting the remote management operation and deleting the first file.
[0055] The data replication method in the embodiment of the present application is explained and described below in combination with optional examples. Figure 3 is a schematic diagram of an optional data replication method according to the embodiment of the present application, as shown in Figure 3 The host CPU of the remote device redirects the serial port to the BMC system of the local client through LPC, and the UART in the BMC system can save the serial port data in real time into a local text file by line. Therefore, when the user of the local client remotely accesses the host system of the remote device through the KVM client and the KVM module in the BMC system, the serial port data is saved into the first file in the BMC system by line through the UART while being output through the video graphics array (VGA) screen. When the user requests the text data displayed in the KVM interface in the KVM client, the BMC system can read the saved host serial port data from the first file, extract the target text data that the user wants to copy, and transmit the target text data to the web front end of the local client through the websocket connection. The web front end writes the target text data into the browser clipboard, thereby completing the replication of the text data on the KVM interface and greatly improving the ease of use of the BMC KVM.
[0056] Figure 4 is a flowchart of another optional data replication method according to the embodiment of the present application, as shown in Figure 4 The flowchart of the data replication method can include the following steps:
[0057] In step S402, the user opens a KVM session with the remote device through the KVM client.
[0058] In step S404, the host CPU of the remote device redirects the serial port to the BMC system of the local client.
[0059] In step S406, the web front end creates a websocket session with the BMC system to listen to the target text data requested by the user to be copied.
[0060] In step S408, the BMC system saves the redirected serial port data into the first file <session_id>_log.txt in the BMC system by line through the UART.
[0061] In step S410, the KVM client interface is integrated with an all-select copy button and a line-select copy button. When the user needs to copy the serial port data in the current KVM interface, the all-select copy button or the line-select copy button is clicked in the KVM client.
[0062] Step S412, the BMC system captures the user clicking the full selection copy button event, the BMC system parses <session_id>_log.txt, extracts the latest fixed number of serial port data from <session_id>_log.txt (the number of rows is determined by the current KVM image pixel size); when the BMC system captures the user clicking the copy nth row data, the BMC system parses <session_id>_log.txt, for example, a KVM picture fixedly displays X rows of data, then the BMC system extracts the X-nth row of serial port data from <session_id>_log.txt starting from the end.
[0063] Step S414, the extracted serial port data is sent to the web front end through the websocket session.
[0064] Step S416, after the web front end receives the serial port data transmission, the received serial port data is written into the browser clipboard by using the navigator control to execute navigator.clipboard.writeText.
[0065] Step S418, the copy process is completed.
[0066] Step S420, exit the KVM session and delete the <session_id>_log.txt of the KVM session.
[0067] Step S422, end.
[0068] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0069] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platforms, and of course, can also be realized by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a Read-Only Memory (ROM) / Random Access Memory (RAM), a magnetic disk, an optical disk), and includes a plurality of instructions for causing an end device (which can be a mobile phone, a computer, a server, or a network device) to execute the method described in the embodiments of the present application.
[0070] According to another aspect of the embodiments of the present application, a baseboard management controller (BMC) is also provided, which can be used to implement the data replication method provided in the above-mentioned embodiments, which has been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is contemplated.
[0071] Figure 5 is a structural block diagram of an optional BMC according to the embodiments of the present application, as shown in Figure 5 The BMC includes:
[0072] The receiving module 502 is configured to receive a replication request sent by a virtual client, wherein the replication request is used to request to replicate target text data included in text data currently displayed in the virtual client to a local client where the BMC is located, the text data is data generated by a remote device, and the remote device is a device performing remote management operation through the virtual client in the local client;
[0073] The obtaining module 504 is configured to obtain the target text data from a first file in response to the replication request, wherein the first file is a file generated based on the text data in advance and stored in the local client;
[0074] The sending module 506 is configured to send the target text data to the local client to display the target text data in the local client.
[0075] It should be noted that the receiving module 502 in this embodiment can be configured to perform step S202 described above, the obtaining module 504 in this embodiment can be configured to perform step S204 described above, and the sending module 506 in this embodiment can be configured to perform step S206 described above.
[0076] In one example embodiment, the BMC described above further includes: a first establishing module configured to establish a connection between the local client and a first interface before receiving the copy request sent by the virtual client, wherein the first interface is a communication interface through which the remote device transmits the text data; and a first obtaining module configured to obtain the text data through the first interface and store the text data into an initial file in the local client to obtain the first file.
[0077] In one example embodiment, the obtaining module 504 includes: a first analyzing sub-module configured to, in a case where the target text data is part of the text data, analyze the copy request to determine a positional relationship between the target text data and the text data; and a first obtaining sub-module configured to obtain the target text data from the first text based on the positional relationship.
[0078] In one example embodiment, the first analyzing sub-module includes: a first analyzing unit configured to analyze the copy request to obtain position indication information, wherein the position indication information is used to indicate a display position of the target text data in the virtual client; and a first determining unit configured to determine the positional relationship between the target text data and the text data based on the position indication information and a display position of the text data in the virtual client; and the first obtaining sub-module includes: a first obtaining unit configured to determine a target position of the target text data in the text data based on the positional relationship and obtain the target text data from the first text according to the target position.
[0079] In one example embodiment, the sending module 506 includes: a first sending sub-module configured to send the target text data to the local client through a first connection, wherein the first connection is a connection established after receiving a connection establishing request sent by the local client, and the first connection is used to transmit data between the local client and the BMC.
[0080] In one example embodiment, the BMC described above further includes: a first exiting module configured to send the target text data to the local client, so as to exit the remote management operation after the local client displays the target text data and delete the first file.
[0081] It should be noted that the above modules can be implemented by software or hardware, and the hardware can be implemented by the following manners, but is not limited to: all the modules are located in the same processor; or the modules are located in different processors in any combination.
[0082] According to another aspect of the embodiments of the present application, a data replication system is provided, comprising a local client, the virtual client and a remote client, wherein the local client comprises a BMC.
[0083] According to still another aspect of the embodiments of the present application, a computer readable storage medium is provided, which comprises a stored program, wherein the program performs the steps of any of the method embodiments when executed.
[0084] In an example embodiment, the computer readable storage medium can include, but is not limited to: a U disk, a ROM, a RAM, a mobile hard disk, a magnetic or optical disk, and various computer program storage media.
[0085] According to still another aspect of the embodiments of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to perform the steps of any of the method embodiments by the computer program. In an example embodiment, the electronic device can further comprise a transmission device connected to the processor, and an input and output device connected to the processor.
[0086] The specific examples in the embodiments can refer to the examples described in the above embodiments and example embodiments, which will not be repeated here.
[0087] According to still another aspect of the embodiments of the present application, a computer program product is provided, which comprises computer programs / instructions containing program codes for performing the methods shown in the flowcharts.
[0088] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and can be realized by program codes executable by computing devices, so that they can be stored in storage devices and executed by computing devices, and in some cases, the steps shown or described can be executed in different orders, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0089] The above only is the preferred embodiment of the present application, and is not used to limit the present application, for those skilled in the art, the present application can have various changes and variations. Any modification, equivalent replacement, improvement, etc. within the principles of the present application, should be included in the protection scope of the present application.
Claims
1. A method of replicating data, characterized by, The method comprises: receiving a copy request sent by a virtual client, wherein the copy request is used to request copying target text data included in text data currently displayed in the virtual client to a local client, the text data is data generated by a remote device, and the remote device is a device performing a remote management operation through the virtual client in the local client; obtaining the target text data from a first file in response to the copy request, wherein the first file is a file generated in advance based on the text data and stored in the local client; sending the target text data to the local client to display the target text data in the local client.
2. The method of claim 1, wherein, Before receiving the copy request sent by the virtual client, the method further comprises: establishing a connection between the local client and a first interface, wherein the first interface is a communication interface through which the remote device transmits the text data; obtaining the text data through the first interface and storing the text data into an initial file in the local client to obtain the first file.
3. The method of claim 1, wherein, Obtaining the target text data from the first file in response to the copy request comprises: in a case where the target text data is part of the text data, analyzing the copy request to determine a positional relationship between the target text data and the text data; and obtaining the target text data from the first text based on the positional relationship.
4. The method of claim 3, wherein: analyzing the copy request to determine the positional relationship between the target text data and the text data comprises: analyzing the copy request to obtain position indication information, wherein the position indication information is used to indicate a display position of the target text data in the virtual client; and determining the positional relationship between the target text data and the text data based on the position indication information and a display position of the text data in the virtual client; obtaining the target text data from the first text based on the positional relationship comprises: determining a target position of the target text data in the text data based on the positional relationship, and obtaining the target text data from the first text according to the target position.
5. The method of claim 1, wherein, sending the target text data to the local client to display the target text data in the local client comprises: sending the target text data to the local client through a first connection, wherein the first connection is a connection established after receiving a connection establishment request sent by the local client, and the first connection is used to transmit data between the local client.
6. The method of claim 1, wherein, After sending the target text data to the local client to display the target text data in the local client, the method further comprises: quitting the remote management operation and deleting the first file.
7. A baseboard management controller (BMC) comprising: The method comprises: receive a copy request sent by a virtual client, wherein the copy request is used to request copying target text data included in text data currently displayed in the virtual client to a local client where the BMC is located, the text data is data generated by a remote device, and the remote device is a device performing a remote management operation through the virtual client in the local client; obtain the target text data from a first file in response to the copy request, wherein the first file is a file generated based on the text data in advance and stored in the local client; send the target text data to the local client to display the target text data in the local client.
8. A data replication system, characterized by, The computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 6.
9. A computer program product comprising a computer program, characterized in that, The computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, The computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 6.
