CN114465994B - File transmission method, system, computer equipment and storage medium - Google Patents
File transmission method, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114465994B CN114465994B CN202210172817.1A CN202210172817A CN114465994B CN 114465994 B CN114465994 B CN 114465994B CN 202210172817 A CN202210172817 A CN 202210172817A CN 114465994 B CN114465994 B CN 114465994B
- Authority
- CN
- China
- Prior art keywords
- file
- webshell
- service
- uploading
- pod
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 121
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000003993 interaction Effects 0.000 claims abstract description 15
- 238000012546 transfer Methods 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 19
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 6
- 230000001960 triggered effect Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to a file transmission method, a file transmission system, computer equipment and a storage medium, wherein the method comprises the following steps: the client receives a file transmission starting instruction of a user so as to start webshell service; detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client; the client receives a destination Pod for file transmission selected by a user from Pod information fed back by the webshell service by the client, and triggers a file transmission instruction; and completing the transmission of the file to be transmitted through webshell service. By adopting the method, the interaction efficiency between the user and the K8S platform is improved, the uploading and downloading operations of the file are realized through the client, and the uploading and downloading efficiency and the security of the file in the container on the K8S platform are effectively improved.
Description
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a file transmission method, a system, a computer device, and a storage medium.
Background
With the rapid development of Kubernetes (container management tool, where K8S is its abbreviation) technology, the K8S-based platform is becoming increasingly simple and efficient. Currently, the existing method for uploading files into a container by a K8S platform mainly comprises the steps that a user performs related commands through a background to upload the files into the container so as to provide related services and the container for use.
In the process of uploading and downloading files through the background, a user needs to master a command related to entering K8S, so that the user using the K8S platform has higher professional requirements; moreover, in the process of entering the background for debugging, all users using the K8S platform can cause unsafe phenomenon of the K8S platform, such as phenomenon that the platform hangs up due to error input of commands by the users.
Disclosure of Invention
Accordingly, in order to solve the above-mentioned problems, it is necessary to provide a file transfer method, system, computer device and storage medium capable of improving the efficiency and security of uploading and downloading files in a container on a K8S platform.
In one aspect, a method for transmitting a file is provided, the method comprising:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination Pod for file transmission selected by a user from Pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
In one embodiment of the present invention, the file transfer instructions include file upload instructions and file download instructions.
In one embodiment, the file upload instruction includes:
the file to be transmitted to be uploaded and the uploading destination pod, the uploading destination container and the uploading destination address thereof.
In one embodiment of the present invention, when the file transfer instruction is a file upload instruction, completing the transfer of the file to be transferred through the webshell service includes:
the webshell service receives a file to be transmitted uploaded by a client according to the file uploading instruction;
mounting the file to be transmitted to a webshell service cache;
and transmitting the file to be transmitted in the webshell service cache to an uploading destination address under the uploading destination pod according to the file uploading instruction.
In one embodiment, the file download instruction includes:
a download source destination pod, a download source destination container, a download source destination address, a file to be transferred to be downloaded, and a download destination address.
In one embodiment, when the file transmission instruction is a file downloading instruction, completing the transmission of the file to be transmitted through the webshell service includes:
according to the file downloading instruction, the file to be downloaded is mounted in a webshell service cache from a downloading source destination pod through webshell service;
and transmitting the file to be downloaded in the cache of the webshell service to a downloading destination address according to the file downloading instruction.
In one embodiment, the method further comprises:
and after the transmission of the transmission file is completed, feeding back a transmission result to the user.
In another aspect, a file transfer system is provided, the system comprising:
the client is used for realizing the interaction of file uploading and downloading between the user and the K8S platform;
pods, comprising a plurality of Pods, webshell services being a special pod for enabling interactions of files between clients and containers, each pod comprising a plurality of containers, each container comprising a plurality of files therein;
wherein, the client comprises:
the instruction operation module is used for starting a file transmission starting instruction and triggering a file transmission instruction;
the file transmission module is used for realizing uploading and downloading of the file;
the address configuration module is used for configuring addresses of uploading and downloading of the files;
the file selection module is used for selecting files to be uploaded and downloaded;
and the result feedback module is used for feeding back the uploading result and the downloading result of the file.
In yet another aspect, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the following steps when executing the computer program:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination Pod for file transmission selected by a user from Pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
In yet another aspect, there is provided a computer-readable storage medium storing a program which, when executed by a processor, causes the processor to perform the steps of:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination Pod for file transmission selected by a user from Pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
Compared with the prior art, the technical scheme of the invention has the following advantages:
according to the file transmission method, the file transmission system, the computer equipment and the storage medium, the interaction efficiency between the user and the K8S platform is improved, the uploading and downloading operations of the file are realized through the client, the operation that the user performs related commands to upload and download the file through the background is avoided, the file transmission method, the file transmission system and the computer equipment and the storage medium have no professional requirements, the user can use the client, and the uploading and downloading efficiency and the downloading security of the file in the container on the K8S platform are effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a method flow chart of a file transfer method of the present invention;
FIG. 2 is a method flow diagram of a file upload method of the present invention;
FIG. 3 is a method flow chart of the file download method of the present invention;
FIG. 4 is a system block diagram of a file transfer system of the present invention;
fig. 5 is a device configuration diagram of the computer device of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Embodiment one:
referring to fig. 1 to 3, fig. 1 is a flowchart of a file transfer method according to the present invention; FIG. 2 is a method flow diagram of a file upload method of the present invention; fig. 3 is a method flow chart of the file downloading method of the present invention.
The file transmission method comprises the following steps:
the client receives a file transmission starting instruction of a user so as to start webshell service;
the user can issue a file transmission starting instruction to the client, and then the client receives the file transmission starting instruction issued by the user so as to start the webshell service. The K8S platform includes a plurality of pods, each of which corresponds to a particular pod, and each pod includes a plurality of containers, so that when a file is transferred, it is first determined to which container under which pod and which address under which container the file is transferred. In order to obtain the destination pod of the file to be transferred, webshell service is started first, and all pods under the platform are detected through the webshell service to find the destination pod of the file to be transferred.
Detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
in the prior art, the K8S platform realizes file transmission by executing related commands in the background, namely uploading and downloading of the files, and a user needs to master related commands entering the K8S, so that the K8S platform has higher professional requirements for the user using the platform, and the phenomenon that the platform is hung up due to the fact that the user inputs the commands by mistake is easy to occur. The client side of the invention realizes the interaction between the user and the K8S platform, realizes the uploading and downloading operation of the file through the client side, avoids the file transmission operation realized by the user executing the related command through the background, has no professional requirement, and can be used by the user. After the client receives a starting instruction of file transmission of a user, webshell service is started, all the pod information is fed back to the client through a webshell service detection platform, so that the user can acquire all the pod information, and the user can conveniently select a target pod for file transmission.
The client receives a destination Pod for file transmission selected by a user from Pod information fed back by the client from webshell service, and triggers a file transmission instruction;
after the webshell service feeds back all the pod information to the client, the user selects a destination pod for file transmission from the pod information fed back by the client, and then the client receives the destination pod for file transmission selected by the user from the pod information fed back by the webshell service at the client, and at the moment, a file transmission instruction is triggered so as to finish the transmission of the file to be transmitted through the webshell service.
And completing the transmission of the file to be transmitted through the webshell service.
After the file transmission instruction is triggered, the file to be transmitted is transmitted through webshell service.
In one embodiment, the file transfer instruction includes a file upload instruction and a file download instruction.
The client side realizes interaction between the user and the K8S platform, and realizes file transmission operation through an interaction process, wherein file transmission comprises file uploading and downloading, so that a file transmission instruction comprises a file uploading instruction and a file downloading instruction. The file uploading and downloading operations are realized through the client, the operation that the user realizes the file uploading and downloading by executing related commands through the background is avoided, the client is used by the user without professional requirements, and the convenience is improved.
In one embodiment, the file upload instruction includes:
the file to be transmitted to be uploaded and the uploading destination pod, the uploading destination container and the uploading destination address thereof.
Firstly, determining a file to be uploaded, namely a file to be transmitted to be uploaded; after the file to be transmitted is determined, determining the position where the file to be transmitted needs to be transmitted, namely uploading the destination address; the k8s platform comprises a plurality of pods, each pod comprises a plurality of containers, each container comprises a plurality of folders, the addresses of the folders are destination addresses to which the files to be transmitted need to be uploaded, so that in order to upload the files to be transmitted to the destination addresses, the destination addresses need to be known to be located under which destination container under which destination pod the file to be transmitted is uploaded, in the uploading process, the destination addresses to be uploaded to the files to be transmitted are called uploading destination addresses, the uploading destination addresses are located under the uploading destination containers, and the uploading destination containers are located under the uploading destination pods. The uploading process is to upload the file to be transmitted to the uploading destination address under the uploading destination container under the uploading destination pod.
In one embodiment, when the file transmission instruction is a file upload instruction, completing the transmission of the file to be transmitted through the webshell service includes:
the webshell service receives a file to be transmitted uploaded by a client according to the file uploading instruction;
when the file transmission instruction is a file uploading instruction, that is, the file to be transmitted to be uploaded needs to be uploaded to the uploading destination address, the file transmission operation, that is, the file uploading operation, is completed through webshell service. Firstly, the webshell service receives a file to be transmitted uploaded by a client so as to upload the file to be transmitted to the uploading destination address through the webshell service.
Mounting the file to be transmitted to a webshell service cache;
after the Webshell service receives the file to be transmitted uploaded by the client, the file to be transmitted is mounted to a Webshell service cache so as to realize interaction between the client and the container, namely, the file in the Webshell service cache is transmitted to an uploading destination address under an uploading destination pod through the Webshell service.
And transmitting the file to be transmitted in the webshell service cache to an uploading destination address under the uploading destination pod according to the file uploading instruction.
After the file to be transmitted is mounted to the webshell service cache, according to the information in the file uploading instruction, uploading destination pod, uploading destination address information are obtained, and then the file to be transmitted in the webshell service cache is uploaded to the uploading destination address under the uploading destination pod through the webshell service, so that the uploading operation of the file is completed.
In one embodiment, the file downloading instruction includes:
a download source destination pod, a download source destination container, a download source destination address, a file to be transferred to be downloaded, and a download destination address.
The downloading of the file firstly needs to determine which file to download, namely the file to be transmitted to be downloaded, and also needs to determine where to download the file to be transmitted to be downloaded, namely the address of the file to be transmitted, namely the destination address of the downloading source; where the download is going, i.e. the destination address. In the K8s platform, each pod comprises a plurality of containers, each container comprises a plurality of folders, and the addresses of the folders are the source addresses of files to be transmitted to be downloaded, namely the destination addresses of the downloading sources; therefore, in order to download the file to be transmitted to the download destination address, the download source destination address of the file to be transmitted needs to be known, the download source destination address is located under the download source destination container, and the download source destination container is located under the download source destination pod; therefore, the downloading process is to download the file to be downloaded under the destination address of the downloading source under the destination pod of the downloading source to the destination address of the downloading destination.
In one embodiment, when the file transmission instruction is a file downloading instruction, completing the transmission of the file to be transmitted through the webshell service includes:
according to the file downloading instruction, the file to be downloaded is mounted in a webshell service cache from a downloading source destination pod through webshell service;
when the file transmission instruction is a file downloading instruction, that is, the file to be transmitted to be downloaded needs to be downloaded to the downloading destination address, the file transmission operation, that is, the file downloading operation, is completed through webshell service. Firstly, acquiring a downloading source destination pod, a downloading source destination container and downloading source destination address information from a file downloading instruction, and then mounting a file to be transmitted to be downloaded from the downloading source destination pod into a webshell service cache through webshell service, namely mounting the file to be transmitted to be downloaded under the downloading source destination address under the downloading source destination container under the downloading source destination pod into the webshell service cache.
And transmitting the file to be transmitted in the webshell service cache to a downloading destination address according to the file downloading instruction.
And after the file to be transmitted is mounted to the webshell service cache from the downloading source destination pod, acquiring downloading destination address information from a file downloading instruction, and then transmitting the file to be downloaded in the webshell service cache to the downloading destination address to finish the downloading operation of the file.
In one embodiment, the method further comprises:
and after the transmission of the transmission file is completed, feeding back a transmission result to the user.
After the file transmission is completed, the transmission result is fed back to the user, so that the user can judge whether the file is successfully transmitted or not through the transmission result.
Embodiment two:
referring to fig. 2, fig. 2 is a flowchart of a file uploading method according to the present invention.
The client receives a file transmission starting instruction of a user so as to start webshell service;
the user can issue a file transmission starting instruction to the client, and then the client receives the file transmission starting instruction issued by the user so as to start the webshell service. When uploading a file, it is first determined to which address under which container under which pod the file is uploaded. In order to acquire the uploading destination pod of the file to be uploaded, webshell service is started first, and all pods under the platform are detected through the webshell service so as to find the uploading destination pod of the file to be uploaded.
Detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
after the client receives a starting instruction of file transmission of a user, webshell service is started, all the pod information is fed back to the client through a webshell service detection platform, so that the user can acquire all the pod information, and the user can conveniently select uploading destination pod for file uploading.
The client receives an uploading destination Pod for uploading the file, which is selected by a user from Pod information fed back by the webshell service by the client, and triggers a file uploading instruction;
after the webshell service feeds back all the pod information to the client, the user selects an uploading destination pod for uploading the file from the pod information fed back by the client, and then the client receives the uploading destination pod for uploading the file selected by the user from the pod information fed back by the webshell service at the client, and at the moment, a file uploading instruction is triggered so as to finish the uploading process of the file to be uploaded through the webshell service.
The webshell service receives a file to be uploaded by a client according to the file uploading instruction;
when the file transmission instruction is a file uploading instruction, that is, the file to be uploaded needs to be uploaded to the uploading destination address, the file uploading operation is completed through the webshell service, and the webshell service is firstly used for receiving the file to be uploaded by the client so as to conveniently upload the file to be uploaded to the uploading destination address through the webshell service.
Mounting the file to be uploaded to a webshell service cache;
after the Webshell service receives the file to be uploaded by the client, the file to be uploaded is mounted to a Webshell service cache so as to realize interaction between the client and the container, namely, uploading the file in the Webshell service cache to an uploading destination address under an uploading destination pod through the Webshell service.
Transmitting the file to be uploaded in the webshell service cache to an uploading destination address under an uploading destination pod according to the file uploading instruction;
after the uploading file is mounted to the webshell service cache, according to the information in the file uploading instruction, uploading destination pod, uploading destination address information are obtained, and then the uploading operation of the file is completed by uploading the file to be uploaded in the webshell service cache to the uploading destination address under the uploading destination pod through the webshell service.
And after the file is uploaded through the webshell service, feeding back an uploading result to a user.
After triggering a file uploading instruction, completing uploading operation of a file to be uploaded through webshell service, prompting an uploading result to a user by a client after the uploading operation is completed, and prompting that the file is successfully uploaded if the uploading result is successful; if the uploading result fails, prompting the user to restart the file transmission starting instruction.
Embodiment III:
referring to fig. 3, fig. 3 is a flowchart of a file downloading method according to the present invention.
The client receives a file transmission starting instruction of a user so as to start webshell service;
the user can issue a file transmission starting instruction to the client, and then the client receives the file transmission starting instruction issued by the user so as to start the webshell service. When downloading files, determining the destination pod of the downloading source of the files to be downloaded, and starting webshell service to detect all pods under the platform through the webshell service to find the destination pod of the downloading source of the files to be downloaded.
Detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
after the client receives a starting instruction of file transmission of a user, webshell service is started, all the pod information is fed back to the client through a webshell service detection platform, so that the user can acquire all the pod information, and the user can conveniently select a downloading source destination pod for file downloading.
The client receives a destination pod for file transmission selected by a user from pod information fed back by the client from webshell service, and triggers a file downloading instruction;
after the webshell service feeds back all the pod information to the client, the user selects a downloading source destination pod for downloading the file from the pod information fed back by the client, and then the client receives the downloading source destination pod for downloading the file selected by the user from the pod information fed back by the webshell service at the client, and at the moment, a file downloading instruction is triggered so as to finish the downloading flow of the file to be downloaded through the webshell service.
According to the file downloading instruction, the file to be downloaded is downloaded from a downloading destination source pod to a webshell service cache through webshell service;
when the file transmission instruction is a file downloading instruction, that is, the file to be downloaded needs to be downloaded to the downloading destination address, the downloading operation of the file is completed through webshell service. Firstly, acquiring a downloading source destination pod, a downloading source destination container and downloading source destination address information from a file downloading instruction, and then mounting a file to be downloaded from the downloading source destination pod into a webshell service cache through webshell service, namely mounting the file to be downloaded under the downloading source destination address under the downloading source destination container under the downloading source destination pod into the webshell service cache.
Transmitting a file to be downloaded in a cache of webshell service to a downloading destination address according to the file downloading instruction;
and after the file to be downloaded is mounted from the target pod of the downloading source to the webshell service cache, acquiring downloading target address information from the file downloading instruction, and then downloading the file to be downloaded in the webshell service cache to the downloading target address to finish the downloading operation of the file.
And after the downloading of the file is completed through the webshell service, feeding back a downloading result to the user.
After triggering a file downloading instruction, completing downloading operation of a file to be downloaded through webshell service, prompting a downloading result to a user by a client after the downloading operation is completed, and prompting that the file is successfully downloaded if the downloading result is successful; if the downloading result fails, prompting the user to restart the file transmission starting instruction.
It should be understood that, although the steps in the flowcharts of fig. 1 to 3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Embodiment four:
referring to fig. 4, fig. 4 is a system configuration diagram of a file transfer system according to the present invention.
The file transfer system of the present embodiment includes:
the client is used for realizing the interaction of file uploading and downloading between the user and the K8S platform;
the K8S platform in the prior art realizes the uploading and downloading of the file through the background executing the related command, the interaction between the user and the K8S platform is realized through the client, the operation that the user realizes the uploading and downloading of the file through the background executing the related command is avoided, the requirement of the specialization is avoided, and the client can be used.
Pods, which contain multiple Pods, webshell services are a special type of pod for enabling interactions of files between clients and containers, each pod comprising multiple containers, each container comprising multiple files.
Interaction of the file between the client and the container is realized through the webshell, and a file transmission bridge is established between the client and the container; a plurality of files are stored in the container to realize different functions of the K8S platform.
Wherein, the client comprises:
the instruction operation module is used for starting a file transmission starting instruction and triggering a file transmission instruction;
the instruction operation module is used for receiving a file transmission starting instruction, starting a file transmission flow through the file transmission starting instruction to start webshell service, detecting all the pod under the evaluation platform through the webshell service, so that a user can select a target pod needing to transmit a file, and mounting the file to a webshell service cache through the target pod; on the other hand, the instruction operation module is used for triggering a file transmission instruction so as to finish the transmission of the file to be transmitted through webshell service.
The file transmission module is used for realizing uploading and downloading of the file;
in the process of uploading or downloading the file, the file transmission module realizes the functions of uploading and downloading the file. That is, file upload and download operations between the container, webshell service, and client are implemented through the file transfer module.
The address configuration module is used for configuring addresses of uploading and downloading of the files;
in the process of uploading the file, the destination address of uploading the file is called as an uploading destination address; in the process of downloading the file, the destination address of the file is called as the address of the downloading destination, and the address configuration module is used for configuring the addresses of the file uploading and the file downloading, namely the uploading destination address and the downloading destination address.
The file selection module is used for selecting files to be uploaded and downloaded;
and receiving the file which is selected by the user and needs to be uploaded or downloaded so as to realize the uploading or downloading of the file, and selecting the file which needs to be uploaded and downloaded through a file selection module.
And the result feedback module is used for feeding back the uploading result and the downloading result of the file.
After the file uploading operation is completed, the final container feeds the uploading result back to the client so that the user can acquire the uploading result information. After the file downloading operation is completed, the final client feeds the downloading result back to the user so that the user can acquire the downloading result information. And the result feedback module is used for realizing feedback of the uploading result and the downloading result.
For specific limitations of the file transfer system, reference may be made to the above limitations of the file transfer method, and no further description is given here. The various modules in the file transfer system described above may be implemented in whole or in part in software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fifth embodiment:
the embodiment provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the file transfer method when executing the computer program.
The computer device may be a terminal, and its internal structure may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a file transfer method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is merely a block diagram of a portion of the structure associated with the present application and does not constitute a limitation of the computer device to which the present application is applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided that includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission selected by a user from pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
In one embodiment, the processor when executing the computer program further performs the steps of:
the webshell service receives a file to be transmitted uploaded by a client according to the file uploading instruction;
mounting the file to be transmitted to a webshell service cache;
and transmitting the file to be transmitted in the webshell service cache to an uploading destination address under the uploading destination pod according to the file uploading instruction.
In one embodiment, the processor when executing the computer program further performs the steps of:
according to the file downloading instruction, the file to be transmitted is mounted from the downloading source destination pod to a webshell service cache through webshell service;
and transmitting the file to be transmitted in the webshell service cache to a downloading destination address according to the file downloading instruction.
In one embodiment, the processor when executing the computer program further performs the steps of:
and after the transmission of the transmission file is completed, feeding back a transmission result to the user.
Example six:
the present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission selected by a user from pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
In one embodiment, the processor when executing the computer program further performs the steps of:
the webshell service receives a file to be transmitted uploaded by a client according to the file uploading instruction;
mounting the file to be transmitted to a webshell service cache;
and transmitting the file to be transmitted in the webshell service cache to an uploading destination address under the uploading destination pod according to the file uploading instruction.
In one embodiment, the processor when executing the computer program further performs the steps of:
according to the file downloading instruction, the file to be transmitted is mounted from the downloading source destination pod to a webshell service cache through webshell service;
and transmitting the file to be transmitted in the webshell service cache to a downloading destination address according to the file downloading instruction.
In one embodiment, the processor when executing the computer program further performs the steps of:
and after the transmission of the transmission file is completed, feeding back a transmission result to the user.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.
Claims (10)
1. A method of file transfer, the method comprising:
the client receives a file transmission starting instruction of a user so as to start webshell service;
detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission selected by a user from pod information fed back by the client from webshell service, and triggers a file transmission instruction;
and completing the transmission of the file to be transmitted through the webshell service.
2. The file transfer method of claim 1, wherein the file transfer instructions include file upload instructions and file download instructions.
3. The file transfer method according to claim 2, wherein the file upload instruction includes:
the file to be transmitted to be uploaded and the uploading destination pod, the uploading destination container and the uploading destination address thereof.
4. A file transfer method according to claim 3, wherein: when the file transmission instruction is a file uploading instruction, completing the transmission of the file to be transmitted through the webshell service includes:
the webshell service receives a file to be transmitted uploaded by a client according to the file uploading instruction;
mounting the file to be transmitted to a webshell service cache;
and transmitting the file to be transmitted in the webshell service cache to an uploading destination address under the uploading destination pod according to the file uploading instruction.
5. The file transfer method according to claim 2, wherein: the file downloading instruction comprises the following steps:
a download source destination pod, a download source destination container, a download source destination address, a file to be transferred to be downloaded, and a download destination address.
6. The file transfer method according to claim 5, wherein: when the file transmission instruction is a file downloading instruction, completing the transmission of the file to be transmitted through the webshell service includes:
according to the file downloading instruction, the file to be transmitted is mounted from the downloading source destination pod to a webshell service cache through webshell service;
and transmitting the file to be transmitted in the webshell service cache to a downloading destination address according to the file downloading instruction.
7. The file transfer method according to claim 1, characterized in that the method further comprises:
and after the transmission of the transmission file is completed, feeding back a transmission result to the user.
8. A file transfer system, the system comprising:
the client is used for realizing the interaction of file uploading and downloading between the user and the K8S platform; receiving a file transmission starting instruction of a user to start webshell service, receiving a destination pod for file transmission selected by the user from pod information fed back by the webshell service at a client, and triggering the file transmission instruction;
pods, comprising a plurality of Pods, webshell services being a special pod for enabling interactions of files between clients and containers, each pod comprising a plurality of containers, each container comprising a plurality of files therein; detecting all the pod under the platform through webshell service, and feeding back the detected pod information to the client; and completing the transmission of the file to be transmitted through the webshell service;
wherein, the client comprises:
the instruction operation module is used for starting a file transmission starting instruction and triggering a file transmission instruction;
the file transmission module is used for realizing uploading and downloading of the file;
the address configuration module is used for configuring addresses of uploading and downloading of the files;
the file selection module is used for selecting files to be uploaded and downloaded;
and the result feedback module is used for feeding back the uploading result and the downloading result of the file.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1-7 when the computer program is executed by the processor.
10. A computer-readable storage medium, characterized by: the computer readable storage medium stores a program which, when executed by a processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210172817.1A CN114465994B (en) | 2022-02-24 | 2022-02-24 | File transmission method, system, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210172817.1A CN114465994B (en) | 2022-02-24 | 2022-02-24 | File transmission method, system, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114465994A CN114465994A (en) | 2022-05-10 |
CN114465994B true CN114465994B (en) | 2023-08-08 |
Family
ID=81416238
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210172817.1A Active CN114465994B (en) | 2022-02-24 | 2022-02-24 | File transmission method, system, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114465994B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20170118353A (en) * | 2016-04-15 | 2017-10-25 | (주)유엠브이기술 | Computing device and system for file distribution using the same |
CN111221625A (en) * | 2019-12-31 | 2020-06-02 | 北京健康之家科技有限公司 | File detection method, device and equipment |
CN112463398A (en) * | 2019-09-09 | 2021-03-09 | 杭州海康机器人技术有限公司 | File transmission method and device, terminal equipment and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11307967B2 (en) * | 2019-02-04 | 2022-04-19 | Oracle International Corporation | Test orchestration platform |
-
2022
- 2022-02-24 CN CN202210172817.1A patent/CN114465994B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20170118353A (en) * | 2016-04-15 | 2017-10-25 | (주)유엠브이기술 | Computing device and system for file distribution using the same |
CN112463398A (en) * | 2019-09-09 | 2021-03-09 | 杭州海康机器人技术有限公司 | File transmission method and device, terminal equipment and storage medium |
CN111221625A (en) * | 2019-12-31 | 2020-06-02 | 北京健康之家科技有限公司 | File detection method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114465994A (en) | 2022-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108573371B (en) | Data approval method, device, computer equipment and storage medium | |
CN109814854B (en) | Project framework generation method, device, computer equipment and storage medium | |
CN110046334A (en) | Data lead-in method, device, computer equipment and storage medium | |
US10542422B2 (en) | Data backup method, storage medium and electronic device | |
CN109726134B (en) | Interface test method and system | |
CN111666129B (en) | Container mirror image processing method, electronic device, storage medium and system | |
CN108959384B (en) | Webpage data acquisition method and device, computer equipment and storage medium | |
CN112350861B (en) | Log acquisition method, device, computer equipment and storage medium | |
CN108418797B (en) | Webpage access method and device, computer equipment and storage medium | |
CN114567584B (en) | Routing information processing method, device, computer equipment and storage medium | |
CN110109712A (en) | Service Component loading method, device, computer equipment and storage medium | |
CN112423281B (en) | Wireless module upgrading method, device, computer equipment and storage medium | |
CN111026988A (en) | Page loading method, device and system and computer equipment | |
CN111126604A (en) | Model training method, device, server and storage medium | |
CN114281263A (en) | Storage resource processing method, system and equipment of container cluster management system | |
CN109902257B (en) | Resource access method, device, computer equipment and storage medium | |
CN112422328B (en) | Log acquisition method, device, computer equipment and storage medium | |
CN114465994B (en) | File transmission method, system, computer equipment and storage medium | |
CN113377669A (en) | Automatic testing method and device, computer equipment and storage medium | |
CN110442636B (en) | Data reading and writing method and device and data reading and writing equipment | |
CN112463170A (en) | Method, device and equipment for making mirror image on cloud platform and storage medium | |
CN111177624B (en) | Website front-end and back-end communication method, device, computer equipment and storage medium | |
CN112685613B (en) | Resource package query method and device and information processing system | |
CN114528213A (en) | Automatic baffle plate testing method, device, equipment and storage medium | |
CN113407163A (en) | Module association assignment method and device, computer equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |