System and method for transmitting binary file to cloud server
Through the signal converter and main control device, the binary files are converted into character sequences that can be transmitted through the keyboard interface, which solves the problem of cloud terminals lacking file transfer means, realizes direct file upload of cloud servers, and improves system debugging efficiency.
Patent Information
- Application Number
- CN202411926822.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-18
AI Technical Summary
The cloud terminal has removed the USB disk function used to transfer files, and lacks file transfer methods, resulting in the extended system debugging time and unable to meet the requirements of work progress.
It provides a system and method for transmitting binary files to a cloud server. Through the combination of a signal converter, a cloud terminal and a master control device, the content of the binary file is converted into an escape character sequence in other binary representations using preset conversion rules, and transmitted to the cloud server through key signals of the keyboard interface.
It realizes that when the USB disk function is removed from the cloud terminal, it can still upload binary files directly to the cloud server, improving the efficiency and work progress of system debugging.
Smart Images

Figure CN119848136A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud services, and more particularly to a system and method for transmitting binary files to a cloud server. Background Art
[0002] As an advanced network technology, server virtualization is gradually becoming a key driving force for power automation computer systems. By abstracting physical server resources into logical resources, flexible allocation and efficient utilization of computing resources are achieved, greatly improving the flexibility and response speed of power automation computer systems.
[0003] Thanks to virtualization technology, power companies have built enterprise cloud services, and business systems are all running on cloud servers. Virtualization technology enables cloud services to manage and allocate resources more efficiently, reducing operating costs, while enhancing the security and isolation of cloud services. It also supports centralized data management and backup and recovery operations, improving data security and reliability. Virtualization technology can be used to ensure that services comply with industry regulations and standards.
[0004] Cloud terminals are used in conjunction with server virtualization technology. Cloud terminals, also known as cloud desktops or desktop virtualization terminals, are a new type of terminal equipment based on cloud computing technology. They connect to remote servers through specific communication protocols (such as VDI, RDS, SPICE and other cloud desktop technology communication protocols), and use the server's powerful computing and storage capabilities to provide terminal users with operating system, application and data storage services.
[0005] However, the use of cloud terminals brings some problems to system debugging. For example, after the power automation system is deployed using cloud terminals in conjunction with cloud servers, the cloud servers can be centrally managed and are generally located in the main computer room of the power company. The interactive terminals of the business system are deployed in the office environment using cloud terminals and connected through the network. The two locations are not necessarily located in the same building group and may even be very far apart. At the same time, in order to make maintenance and management easier, most of the cloud terminals used only provide basic hardware interfaces, namely keyboards, mice, monitors, and network interfaces, and are connected to cloud servers through specific communication protocols. The user's input commands through the keyboard and mouse are transmitted to the cloud server for processing, and the processing results are displayed on the cloud terminal in the form of a graphical interface.
[0006] Since most cloud terminals used in power automation systems have removed the USB disk function for transferring files, there is a lack of means for file transfer. Especially when deploying new application systems and performing system function maintenance and debugging, when a large number of files need to be updated, if the files can only be uploaded to the server by carrying them to the main computer room, the system debugging time will be extended and the work progress requirements cannot be met. Summary of the invention
[0007] The purpose of the present application is to provide a system and method for transmitting binary files to a cloud server, aiming to solve the problem that the cloud terminal has removed the USB disk function for transmitting files and lacks file transmission means.
[0008] In a first aspect, the present application provides a system for transmitting binary files to a cloud server, including a signal converter and a cloud terminal and a main control device respectively connected to the signal converter; wherein: A main control device, which is used to run the main control software and generate a control signal, wherein the control signal includes a control command, configuration information for a signal converter, and key information to be transmitted, wherein the key information to be transmitted is obtained by converting the content of a binary file selected by a user to be sent, that is, the original binary data, into an escape character sequence represented by another base through a preset conversion rule, and the control signal converter sends the escape character sequence to the cloud terminal; The signal converter includes an MCU and a first interface chip connected to the MCU, and the MCU is a chip integrating a wireless transmission function or a Bluetooth transmission function; or the signal converter includes an MCU and a first interface chip and a second interface chip respectively connected to the MCU, the signal converter is connected to the cloud terminal via the first interface chip, the signal converter is connected to the main control device via the interface integrated in the MCU or the second interface chip, and the MCU is used to convert the key information to be transmitted generated by the main control device into a key signal of the keyboard interface and transmit it to the cloud terminal; The cloud terminal is used to identify the signal converter as a keyboard device, receive the key signal of the keyboard interface transmitted by the signal converter, and transmit it to the cloud server.
[0009] In a second aspect, the present application provides a method for transmitting a binary file to a cloud server, comprising the following steps: S101. According to different operating systems running on the cloud terminal, the main control device sends a corresponding shortcut key sequence through the main control software via the signal converter to open the cloud terminal window; if the operating system running on the cloud terminal is a Linux system, execute S102 to S104; if the operating system running on the cloud terminal is a Windows system, execute S105 to S108; S102, the main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented in hexadecimal: H1 H2H3 ...H n , n is a natural number greater than or equal to 1, that is, each H n The escape character sequence corresponding to the original binary data byte; S103, the main control device creates a hexadecimal file on the cloud terminal side through the main control software via a signal converter; S104, the main control device sends the escape character sequence represented in hexadecimal to the hexadecimal file on the cloud terminal side in segments through the main control software via the signal converter until all the characters are sent; then execute S109; S105. The main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented by 3 decimal digits: D1D2D3…D n , n is a natural number greater than or equal to 1, that is, each D n The escape character sequence corresponding to the original binary data byte; S106, the main control device creates a decimal file on the cloud terminal side through the main control software via the signal converter; S107, the main control device transmits the entire decimal escape character sequence to the cloud terminal through the main control software via the signal converter according to the sequence of adding the Alt key pressing and the Alt key releasing before and after each 3-digit decimal escape character sequence; S108, the main control device sends a file end instruction to the cloud terminal through the main control software via the signal converter, and then executes S109; S109, the main control device sends a command to close the cloud terminal window to the cloud terminal through the main control software via the signal converter to complete the file transfer; the cloud terminal sends the received file to the cloud server.
[0010] In the present application, since the system for transmitting binary files to a cloud server includes a signal converter, a cloud terminal and a main control device, the main control device generates a control signal, and the key information to be transmitted of the control signal is to convert the content of the binary file selected by the user to be sent, that is, the original binary data, into an escape character sequence represented by other bases through a preset conversion rule, and the control signal converter sends the escape character sequence to the cloud terminal; the MCU of the signal converter is used to convert the key information to be transmitted generated by the main control device into a key signal of the keyboard interface and transmit it to the cloud terminal; the cloud terminal is used to identify the signal converter as a keyboard device, receive the key signal of the keyboard interface transmitted by the signal converter, and transmit it to the cloud server. Therefore, the USB disk function for transmitting files is removed from the cloud terminal, and binary files can still be directly uploaded to the cloud server locally. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a schematic diagram of a system for transmitting binary files to a cloud server provided by an embodiment of the present application.
[0012] Figure 2 This is a flowchart of a method for transmitting binary files to a cloud server provided in one embodiment of the present application. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0014] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0015] See also Figure 1 , a system for transmitting binary files to a cloud server provided by an embodiment of the present application includes a signal converter 11 and a cloud terminal 12 and a main control device 13 respectively connected to the signal converter 11; wherein, The main control device 13 is used to run the main control software and generate a control signal, wherein the control signal includes a control command, configuration information for the signal converter, and key information to be transmitted, wherein the key information to be transmitted is the content of the binary file selected by the user to be sent, that is, the original binary data, converted into an escape character sequence represented by other bases through a preset conversion rule, and the control signal converter sends the escape character sequence to the cloud terminal; The signal converter 11 includes an MCU and a first interface chip connected to the MCU, and the MCU is a chip integrating a wireless transmission function or a Bluetooth transmission function; or, the signal converter 11 includes an MCU and a first interface chip and a second interface chip respectively connected to the MCU, the signal converter is connected to the cloud terminal via the first interface chip, the signal converter is connected to the main control device via the interface integrated in the MCU or the second interface chip, and the MCU is used to convert the key information to be transmitted generated by the main control device into a key signal of the keyboard interface and transmit it to the cloud terminal; The cloud terminal 12 is used to identify the signal converter as a keyboard device, receive the key signal of the keyboard interface transmitted by the signal converter, and transmit it to the cloud server.
[0016] In one embodiment of the present application, the keyboard interface of the cloud terminal is a USB interface or a PS / 2 interface, the first interface chip of the signal converter is an interface chip that supports PS / 2 keyboards and USB keyboards, the signal converter has a USB male head or a PS / 2 male head, the signal converter is inserted into the USB interface of the cloud terminal through the USB male head, or the signal converter is inserted into the PS / 2 interface of the cloud terminal through the PS / 2 male head. The second interface chip of the signal converter can be a wireless or wired interface chip, and the main control device is connected to the signal converter wirelessly or wired.
[0017] The main control device can be a computer, a mobile terminal, etc. The control signal can be a serial port signal.
[0018] The main control software can support operating systems such as Windows / Linux / MacOS / Android, and provide users with an intuitive and simple operating interface in a graphical manner. The mobile terminal can connect to the signal converter via a Bluetooth interface, and the computer can connect to the signal converter via Bluetooth, wireless or USB wired, and provide a serial device interface to the application through a driver. The main control software sends a control signal to the signal converter through the serial port device of the hardware platform to complete the binary file transmission.
[0019] See also Figure 2 , a method for transmitting a binary file to a cloud server provided in an embodiment of the present application comprises the following steps: S101. According to the different operating systems running on the cloud terminal, the main control device sends the corresponding shortcut key sequence through the main control software via the signal converter to open the cloud terminal window; if the operating system running on the cloud terminal is the Linux system, execute S102 to S104; if the operating system running on the cloud terminal is the Windows system, execute S105 to S108.
[0020] For example, the Linux system uses the following shortcut key sequence "Ctrl+Alt+T" to open the cloud terminal window; the Windows system uses the following shortcut key sequence "Win logo key + R, cmd.exe, Enter key" to open the cloud terminal window; if you need to improve adaptability, you can also design this sequence into a software configurable item.
[0021] For ease of description, the descriptions of key sending in the steps are simplified. For example, the key signal actually sent by Ctrl+Alt+T should be: Ctrl↓ Alt↓ T↓ [delay] T↑ Alt↑ Ctrl↑, ↓ indicates the key pressed signal, and ↑ indicates the key released signal.
[0022] S102, the main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented in hexadecimal: H1 H2H3 ...H n , n is a natural number greater than or equal to 1, that is, each H n The escape character sequence corresponding to the original binary data byte; Hexadecimal is a format that can be recognized by the Linux system echo command. For example, the three binary bytes: 01h, 02h, A3h are converted into 9 hexadecimal characters: 'x' '0' '1' 'x' '0' '2' 'x' 'a' '3'.
[0023] S103, the main control device creates a hexadecimal file on the cloud terminal side through the main control software via a signal converter; Specifically, use the following shortcut key sequence "echo -n -e ''> "F BIN ” <cr>",in <cr>Indicates the Enter key, echo is the command to generate files in the Linux system, F BIN is the hexadecimal file name.
[0024] S104, the main control device sends the escape character sequence represented in hexadecimal to the hexadecimal file on the cloud terminal side in segments through the main control software via the signal converter cyclically until all the characters are sent; then execute S109.
[0025] Specifically, use the following shortcut key sequence "echo -n -e 'H p+1 H p+2 H p+3 …H p+x '>> "F BIN ” <cr>”, where H p+1 This is the first escape character sequence sent this time, H p The last escape character sequence sent.
[0026] Specifically, the escape character sequence represented in hexadecimal is divided into multiple segments according to appropriate lengths, for example, each 64-byte escape character sequence is regarded as one segment.
[0027] S105. The main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented by 3 decimal digits: D1D2D3…D n , n is a natural number greater than or equal to 1, that is, each D n The escape character sequence corresponding to the original binary data byte; Decimal is the format that the Windows copy con command can recognize. For example, the three binary bytes: 01h, 02h, A3h are converted into a decimal sequence of 9 characters: '0' '0' '1' '0' '0' '2' '1' '6' '3'.
[0028] S106, the main control device creates a decimal file on the cloud terminal side through the main control software via the signal converter; Specifically, use the following shortcut key sequence "copy con "F IN ” <cr>",in <cr>Indicates the Enter key, copy con is the Windows system command to generate files, F IN is the decimal file name.
[0029] S107, the main control device transmits the entire decimal escape character sequence to the cloud terminal through the main control software via the signal converter according to the sequence of adding Alt pressing and Alt releasing before and after each 3-digit decimal escape character sequence: Alt+D n .
[0030] For example, to send the binary byte 01h, you need to send the following sequence of key signals: Alt↓0↓0↑0↓0↑1↓1↑Alt↑ S108, the main control device sends a file end instruction: Ctrl+Z, i.e., the copy con command of the Windows system to close the file, to the cloud terminal via the main control software via the signal converter, and then executes S109.
[0031] S109, the main control device sends a command "exit" to close the cloud terminal window to the cloud terminal through the main control software via the signal converter. <cr>", the file transfer is completed; the cloud terminal sends the received file to the cloud server.
[0032] In an embodiment of the present application, before S101, the method may further include: If the interface between the cloud terminal and the signal converter is USB, the keyboard manufacturer, device type description and code of the signal converter are set through the main control software of the main control device for recognition by the cloud terminal.
[0033] In the present application, since the system for transmitting binary files to a cloud server includes a signal converter, a cloud terminal and a main control device, the main control device generates a control signal, and the key information to be transmitted of the control signal is to convert the content of the binary file selected by the user to be sent, that is, the original binary data, into an escape character sequence represented by other bases through a preset conversion rule, and the control signal converter sends the escape character sequence to the cloud terminal; the MCU of the signal converter is used to convert the key information to be transmitted generated by the main control device into a key signal of the keyboard interface and transmit it to the cloud terminal; the cloud terminal is used to identify the signal converter as a keyboard device, receive the key signal of the keyboard interface transmitted by the signal converter, and transmit it to the cloud server. Therefore, the USB disk function for transmitting files is removed from the cloud terminal, and binary files can still be directly uploaded to the cloud server locally.
[0034] It should be understood that each step in each embodiment of the present application is not necessarily performed in sequence according to the order indicated by the step number. Unless there is clear explanation in this article, the execution of these steps does not have strict order restriction, and these steps can be performed in other orders. Moreover, at least a part of the steps in each embodiment can include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0035] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0036] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 specification.
[0037] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.< / cr> < / cr> < / cr> < / cr> < / cr> < / cr>
Claims
1. A system for transmitting binary files to a cloud server, characterized in that: It includes a signal converter and a cloud terminal and a main control device respectively connected to the signal converter; wherein, A main control device, which is used to run the main control software and generate a control signal, wherein the control signal includes a control command, configuration information for a signal converter, and key information to be transmitted, wherein the key information to be transmitted is obtained by converting the content of a binary file selected by a user to be sent, that is, the original binary data, into an escape character sequence represented by another base through a preset conversion rule, and the control signal converter sends the escape character sequence to the cloud terminal; The signal converter includes an MCU and a first interface chip connected to the MCU, and the MCU is a chip integrating a wireless transmission function or a Bluetooth transmission function; or the signal converter includes an MCU and a first interface chip and a second interface chip respectively connected to the MCU, the signal converter is connected to the cloud terminal via the first interface chip, the signal converter is connected to the main control device via the interface integrated in the MCU or the second interface chip, and the MCU is used to convert the key information to be transmitted generated by the main control device into a key signal of the keyboard interface and transmit it to the cloud terminal; The cloud terminal is used to identify the signal converter as a keyboard device, receive the key signal of the keyboard interface transmitted by the signal converter, and transmit it to the cloud server.
2. The system according to claim 1, characterized in that The keyboard interface of the cloud terminal is a USB interface or a PS / 2 interface; The first interface chip of the signal converter is an interface chip supporting a PS / 2 keyboard and a USB keyboard, the signal converter has a USB male connector or a PS / 2 male connector, the signal converter is inserted into the USB interface of the cloud terminal through the USB male connector, or the signal converter is inserted into the PS / 2 interface of the cloud terminal through the PS / 2 male connector; The second interface chip of the signal converter is a wireless or wired interface chip, and the main control device is connected to the signal converter in a wireless or wired manner.
3. The system according to claim 1, characterized in that The control signal adopts a serial port signal.
4. The system according to claim 1, characterized in that The main control software supports Windows operating system, Linux operating system, MacOS operating system and Android operating system.
5. A method for transmitting a binary file to a cloud server, characterized in that: The following steps are involved: S101, according to different operating systems running on the cloud terminal, the main control device sends a corresponding shortcut key sequence through the main control software via a signal converter to open the cloud terminal window; If the operating system running on the cloud terminal is a Linux system, then execute S102 to S104; if the operating system running on the cloud terminal is a Windows system, then execute S105 to S108; S102, the main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented in hexadecimal: H1 H2H3 ...H n , n is a natural number greater than or equal to 1, that is, each H n The escape character sequence corresponding to the original binary data byte; S103, the main control device creates a hexadecimal file on the cloud terminal side through the main control software via a signal converter; S104, the main control device sends the escape character sequence represented in hexadecimal to the hexadecimal file on the cloud terminal side in segments through the main control software via the signal converter until all the characters are sent; then execute S109; S105. The main control device reads the binary file selected by the user to be sent through the main control software, and converts the content of the binary file, that is, the original binary data, into a set of escape character sequences represented by 3 decimal digits: D1D2D3…D n , n is a natural number greater than or equal to 1, that is, each D n The escape character sequence corresponding to the original binary data byte; S106, the main control device creates a decimal file on the cloud terminal side through the main control software via the signal converter; S107, the main control device transmits the entire decimal escape character sequence to the cloud terminal through the main control software via the signal converter according to the sequence of adding the Alt key pressing and the Alt key releasing before and after each 3-digit decimal escape character sequence; S108, the main control device sends a file end instruction to the cloud terminal through the main control software via the signal converter, and then executes S109; S109, the main control device sends a command to close the cloud terminal window to the cloud terminal through the main control software via the signal converter to complete the file transfer; the cloud terminal sends the received file to the cloud server.
6. The method according to claim 5, characterized in that The Linux system uses the following shortcut key sequence "Ctrl+Alt+T" to open the cloud terminal window; the Windows system uses the following shortcut key sequence "Win logo key + R, cmd.exe, Enter key" to open the cloud terminal window.
7. The method according to claim 5, characterized in that S103 is specifically: Use the following shortcut key sequence "echo -n -e ''> "F BIN ” <cr>",in <cr>Indicates the Enter key, echo is the command to generate files in the Linux system, F BIN is the hexadecimal file name.< / cr> < / cr> 8. The method according to claim 5, characterized in that S104 is specifically: Use the following shortcut key sequence "echo -n -e 'H p+1 H p+2 H p+3 …H p+x '>> "F BIN ” <cr>”, where H p+1 This is the first escape character sequence sent this time, H p The last escape character sequence sent.< / cr> 9. The method according to claim 5, characterized in that S106 is specifically: Use the following shortcut key sequence "copy con "F IN ” <cr>",in <cr>Indicates the Enter key, copy con is the Windows system command to generate files, F IN is the decimal file name.< / cr> < / cr> 10. The method according to any one of claims 5 to 9, characterized in that: Before S101, the method further includes: If the interface between the cloud terminal and the signal converter is USB, the keyboard manufacturer, device type description and code of the signal converter are set through the main control software of the main control device for recognition by the cloud terminal.