CN114465994A - File transmission method, system, computer equipment and storage medium - Google Patents

File transmission method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN114465994A
CN114465994A CN202210172817.1A CN202210172817A CN114465994A CN 114465994 A CN114465994 A CN 114465994A CN 202210172817 A CN202210172817 A CN 202210172817A CN 114465994 A CN114465994 A CN 114465994A
Authority
CN
China
Prior art keywords
file
webshell
service
instruction
uploading
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.)
Granted
Application number
CN202210172817.1A
Other languages
Chinese (zh)
Other versions
CN114465994B (en
Inventor
吕桂新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210172817.1A priority Critical patent/CN114465994B/en
Publication of CN114465994A publication Critical patent/CN114465994A/en
Application granted granted Critical
Publication of CN114465994B publication Critical patent/CN114465994B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network 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 method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service; detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client; the method comprises the steps that a client receives a target Pod for file transmission, which is selected by a user from Pod information fed back by webshell service at the client, and triggers a file transmission instruction; and completing the transmission of the file to be transmitted through the webshell service. By adopting the method, the interaction efficiency between the user and the K8S platform is improved, the file uploading and downloading operation is 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

File transmission method, system, computer equipment and storage medium
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a file transfer method, a file transfer system, a computer device, and a storage medium.
Background
With the rapid development of kubernets (container management tool, where K8S is its abbreviation) technology, K8S-based platforms are becoming increasingly simple and efficient. At present, the existing way for uploading files into a container by the K8S platform is mainly that a user executes related commands in the background to upload files into the container, so as to provide related services and use of the container.
In the process of uploading and downloading files through the background by the K8S platform, a user needs to master a command related to entering the K8s, which has higher professional requirements on the user using the platform; and all users using the K8S platform can cause insecurity of the K8S platform during entering the background for debugging, for example, the user inputs a command by mistake to cause the platform to hang down.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a file transmission method, a file transmission system, a computer device, and a storage medium, which can improve the efficiency and security of uploading and downloading files in a container on the K8S platform.
In one aspect, a file transfer method is provided, and the method includes:
the method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a target Pod for file transmission, which is selected by a user from Pod information fed back by the webshell service at the client, 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 instruction includes a file upload instruction and a file download instruction.
In one embodiment, the file upload instruction includes:
and the file to be transmitted to be uploaded, the uploading destination pod, the uploading destination container and the uploading destination address thereof.
In an embodiment of the present invention, when the file transmission instruction is a file upload instruction, completing 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 an uploading destination pod according to the file uploading instruction.
In one embodiment, the file download instructions include:
downloading a source destination pod, downloading a source destination container, downloading a source destination address, a file to be downloaded and to be transmitted, and downloading a destination address.
In one embodiment, when the file transmission instruction is a file downloading instruction, completing 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 into a webshell service cache from a pop of a downloading source destination through a webshell service;
and transmitting the file to be downloaded in the cache of the webshell service to a download destination address according to the file download instruction.
In one embodiment, the method further comprises:
and after the transmission of the transmission file is finished, feeding back the 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 a user and the K8S platform;
the webshell service is a special pod, and is used for realizing the interaction of files between a client and containers, wherein each pod comprises a plurality of containers, and each container comprises a plurality of files;
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 uploading and downloading files;
the address configuration module is used for configuring the addresses of file uploading and downloading;
the file selection module is used for selecting files needing 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 another aspect, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the following steps:
the method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all pod under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a target Pod for file transmission, which is selected by a user from Pod information fed back by the webshell service at the client, 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 method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a target Pod for file transmission, which is selected by a user from Pod information fed back by the webshell service at the client, 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 file uploading and downloading operation is realized through the client, the operation that the user uploads and downloads the file by executing a related command through a background is avoided, the client does not have professional requirements, the user can use the client, and the uploading and downloading efficiency and the security of the file in the container on the K8S platform are effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a method flow diagram 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 diagram of a file download method of the present invention;
FIG. 4 is a system block diagram of the 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 is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The first embodiment is as follows:
referring to fig. 1 to 3, a file transmission method according to this embodiment is shown, where fig. 1 is a flowchart of a file transmission 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 flowchart of a file download method of the present invention.
The file transmission method comprises the following steps:
a client receives a file transmission starting instruction of a user to start webshell service;
the user issues a file transmission starting instruction to the client, and then the client receives the file transmission starting instruction issued by the user, so that the webshell service can be started conveniently. The K8S platform includes a plurality of pods, the webshell service corresponds to a particular pod, each pod includes a plurality of containers, and therefore when a file is transferred, it is first determined which container is under which pod and which address is under which container to transfer the file. In order to acquire the destination pod of the file to be transmitted, the webshell service is started first, and all the pods under the platform are detected through the webshell service to find the destination pod of the file to be transmitted.
Detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the K8S platform in the prior art realizes file transmission by executing related commands in the background, that is, uploading and downloading of files, and a user needs to master the related commands entering the K8S, which has a high professional requirement on the user using the platform, and the phenomenon that the platform is hung up due to the command input by the user by mistake is easy to occur. The client 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, avoids the realization of the file transmission operation by the user through executing related commands through a 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, the webshell service is started, all the pod information under the webshell service detection platform is fed back to the client, so that the user can conveniently obtain all the pod information, and the user can conveniently select the destination pod for file transmission.
The client receives a target Pod for file transmission, which is selected by a user from Pod information fed back by the webshell service at the client, and triggers a file transmission instruction;
after the webshell service feeds back all the pod information to the client, the user selects the target pod for file transmission from the pod information fed back by the client, then the client receives the target pod for file transmission selected by the user from the pod information fed back by the webshell service, and at the moment, a file transmission instruction is triggered so as to complete 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.
And after the file transmission instruction is triggered, the transmission operation of the file to be transmitted is completed through the webshell service.
In one embodiment, the file transfer instructions include file upload instructions and file download instructions.
The client side realizes the interaction between a user and the K8S platform, and realizes the transmission operation of the file through an interaction process, the transmission of the file comprises the uploading and downloading of the file, and therefore the file transmission instruction comprises a file uploading instruction and a file downloading instruction. The file uploading and downloading operation is realized through the client, the operation that the user uploads and downloads the file by executing related commands through the background is avoided, the professional requirement is not met, the user can use the client, and the convenience is improved.
In one embodiment, the file uploading instruction includes:
and the file to be transmitted to be uploaded, the uploading destination pod, the uploading destination container and the uploading destination address thereof.
The file uploading method includes the steps that firstly, files needing to be uploaded, namely files to be uploaded and transmitted, need to be determined; after the file to be transmitted is determined, determining where the file to be transmitted needs to be transmitted, namely, uploading a destination address; the k8s platform comprises a plurality of pods, each pod comprises a plurality of containers, each container comprises a plurality of folders, and the address of each folder is the destination address to which a file to be transmitted needs to be uploaded, so that when a file to be transmitted needs to be uploaded to the destination address, it is known under which destination container the destination address is located. Therefore, the uploading process is to upload the file to be uploaded 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 uploading instruction, completing 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, namely the file to be uploaded needs to be uploaded to the uploading destination address, the file transmission operation, namely the file uploading operation, is completed through the webshell service. Firstly, the webshell service receives a file to be transmitted uploaded by a client, so that the file to be transmitted is uploaded to an uploading destination address through the webshell service.
Mounting the file to be transmitted to a webshell service cache;
after receiving the file to be transmitted uploaded by the client, the Webshell service mounts the file to be transmitted to the Webshell service cache, so that interaction between the client and the container is achieved, namely the file in the Webshell service cache is transmitted to the uploading destination address under the 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 an uploading destination pod according to the file uploading instruction.
After the file to be transmitted is mounted to the webshell service cache, the uploading destination pod, the uploading destination container and the uploading destination address information are obtained according to the information in the file uploading instruction, then the file to be transmitted in the webshell service cache is uploaded to the uploading destination address under the uploading destination container under the uploading destination pod through the webshell service, and the file uploading operation is completed.
In one embodiment, the file download instruction comprises:
downloading a source destination pod, downloading a source destination container, downloading a source destination address, a file to be downloaded and to be transmitted, and downloading a destination address.
The file downloading method comprises the steps of firstly determining which file to download, namely a file to be downloaded and transmitted, namely determining where the file to be downloaded and transmitted is downloaded, namely the address of the file to be transmitted, namely a downloading source destination address; where to download, the destination address is downloaded. In the platform of K8s, a plurality of pods are included, each pod includes a plurality of containers, each container includes a plurality of folders, and the address of a folder is the source address where the file to be downloaded is located, i.e. the destination address of the downloading source; therefore, when a file to be downloaded and to be transmitted needs to be downloaded to a 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 a download source destination container, and the download source destination container is located under a download source destination pod; therefore, the downloading process is to download the file to be downloaded under the downloading source destination address under the downloading source destination container under the downloading source destination pod to the downloading destination address.
In one embodiment, when the file transmission instruction is a file downloading instruction, completing 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 into a webshell service cache from a pop of a downloading source destination through a webshell service;
when the file transmission instruction is a file downloading instruction, namely the file to be downloaded needs to be downloaded to the downloading destination address, the file transmission operation, namely the file downloading operation, is completed through the webshell service. The method comprises the steps of firstly obtaining a download source and destination pod, a download source and destination container and download source and destination address information from a file download instruction, and then mounting a file to be downloaded and transmitted from the download source and destination pod into a webshell service cache through a webshell service, namely mounting the file to be downloaded and transmitted under a download source and destination address of the download source and destination container under the download source and destination pod into the webshell service cache.
And transmitting the file to be transmitted in the webshell service cache to a download destination address according to the file download instruction.
After the file to be transmitted is mounted to the webshell service cache from the download source destination pod, the address information of the download destination is obtained from the file download instruction, and then the file to be downloaded in the webshell service cache is transmitted to the download destination address, so that the file download operation is completed.
In one embodiment, the method further comprises:
and after the transmission of the transmission file is finished, feeding back the transmission result to the user.
After the file transmission is finished, the transmission result is fed back to the user, so that the user can conveniently judge whether the file is transmitted successfully or not through the transmission result.
Example two:
referring to fig. 2, fig. 2 is a flowchart illustrating a method of uploading files according to the present invention.
The method comprises the steps that a client receives a file transmission starting instruction of a user 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 that the webshell service can be started conveniently. When uploading a file, it is determined to which address under which pod the file is uploaded to. In order to acquire the upload destination pod of the file to be uploaded, the webshell service is started first, and all the pods under the platform are detected through the webshell service so as to find the upload destination pod of the file to be uploaded.
Detecting all the pods under the platform through the 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, the webshell service is started, all the pod information under the webshell service detection platform is fed back to the client, so that the user can conveniently obtain all the pod information, and the user can conveniently select an uploading destination pod for uploading files.
The client receives an uploading destination Pod which is selected by a user from Pod information fed back by the webshell service and used for uploading files, and triggers a file uploading instruction;
after the webshell service feeds back all the pod information to the client, the user selects the uploading destination pod for uploading the file from the pod information fed back by the client, 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, and at the moment, a file uploading instruction is triggered, so that the uploading process of the file to be uploaded is completed through the webshell service.
The webshell service receives a file to be uploaded by the client according to the file uploading instruction;
when the file transmission instruction is a file uploading instruction, namely a file to be uploaded needs to be uploaded to an uploading destination address, the file uploading operation is completed through the webshell service, firstly, the webshell service receives the file to be uploaded from the client, and therefore the file to be uploaded is uploaded to the uploading destination address through the webshell service.
Mounting the file to be uploaded to a webshell service cache;
after receiving the file to be uploaded by the client, the Webshell service mounts the file to be uploaded to the Webshell service cache, so that interaction between the client and the container is achieved, namely the file in the Webshell service cache is uploaded to the uploading destination address under the 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 file to be uploaded is mounted to the webshell service cache, the uploading destination pod, the uploading destination container and the uploading destination address information are obtained according to the information in the file uploading instruction, then the file to be uploaded in the webshell service cache is uploaded to the uploading destination address under the uploading destination container under the uploading destination pod through the webshell service, and the file uploading operation is completed.
And after uploading of the file is completed through the webshell service, feeding an uploading result back to the user.
After a file uploading instruction is triggered, uploading operation of a file to be uploaded is completed through webshell service, after the uploading operation is completed, a client prompts an uploading result to a user, and if the uploading result is successful, the user is prompted that the file is uploaded successfully; and if the uploading result fails, prompting the user to restart the file transmission starting instruction.
Example three:
referring to fig. 3, fig. 3 is a flowchart illustrating a method of downloading a file according to the present invention.
The method comprises the steps that a client receives a file transmission starting instruction of a user 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 that the webshell service can be started conveniently. When downloading a file, determining a download source destination pod of the file to be downloaded, starting the webshell service to detect all the pods under the platform through the webshell service to find the download source destination pod of the file to be downloaded if the download source destination pod is determined.
Detecting all the pods under the platform through the 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, the webshell service is started, all the pod information under the platform is detected through the webshell service, and all the pod information is fed back to the client, so that the user can conveniently obtain all the pod information, and the user can conveniently select a download source destination pod for downloading the file.
The client receives a destination pod for file transmission, which is selected by a user from pod information fed back by the webshell service at the client, and triggers a file downloading instruction;
after the webshell service feeds back all the pod information to the client, the user selects a download source destination pod for downloading the file from the pod information fed back by the client, then the client receives the download source destination pod for downloading the file selected by the user from the pod information fed back by the webshell service, and at the moment, a file download instruction is triggered, so that a download process of the file to be downloaded is completed through the webshell service.
According to the file downloading instruction, the file to be downloaded is mounted into a webshell service cache from a downloading destination source pod through a webshell service;
when the file transmission instruction is a file downloading instruction, namely the file to be downloaded needs to be downloaded to the downloading destination address, the file downloading operation is completed through the webshell service. The method comprises the steps of firstly obtaining a download source and destination pod, a download source and destination container and download source and destination address information from a file download instruction, and then mounting a file to be downloaded from the download source and destination pod into a webshell service cache through a webshell service, namely mounting the file to be downloaded under a download source and destination address of the download source and destination container under the download source and destination pod into the webshell service cache.
Transmitting the file to be downloaded in the cache of the webshell service to a download destination address according to the file download instruction;
after the file to be downloaded is mounted to the webshell service cache from the download source destination pod, the address information of the download destination is obtained from the file download instruction, and then the file to be downloaded in the webshell service cache is downloaded to the download destination address, so that the downloading operation of the file is completed.
And after the file is downloaded through the webshell service, feeding the downloading result back to the user.
After a file downloading instruction is triggered, downloading operation of a file to be downloaded is completed through webshell service, after the downloading operation is completed, a client prompts a downloading result to a user, and if the downloading result is successful, the user is prompted that the file is successfully downloaded; and if the downloading result fails, prompting the user to restart the file transmission starting instruction.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Example four:
referring to fig. 4, fig. 4 is a system configuration diagram of the file transfer system of the present invention.
The file transfer system of the embodiment includes:
the client is used for realizing the interaction of file uploading and downloading between a user and the K8S platform;
the K8S platform in the prior art realizes the uploading and downloading of files by executing related commands in the background, and the interaction of file uploading and downloading between a user and the K8S platform is realized by the client, so that the operation of file uploading and downloading by executing related commands in the background by the user is avoided, the professional requirement is not met, and the client can be used.
The Pods, which contains multiple Pods, is a special pod for enabling the interaction of files between clients and containers, each pod including multiple containers, each container including multiple files.
The 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 on one hand, starting a file transmission flow through the file transmission starting instruction to start the webshell service, detecting all the pods under the evaluation platform through the webshell service so that a user can select a target pod needing to transmit a file conveniently, 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 complete transmission of the file to be transmitted through the webshell service.
The file transmission module is used for uploading and downloading files;
in the process of uploading or downloading the file, the file transmission module realizes the functions of uploading and downloading the file. That is, the file uploading and downloading operations among the container, the webshell service and the client are realized through the file transmission module.
The address configuration module is used for configuring the addresses of file uploading and downloading;
in the process of uploading the file, the destination address of the file uploading is called as an uploading destination address; in the process of downloading the file, the destination address of the file downloading is called as a downloading destination address, and the address configuration module is used for configuring the addresses of file uploading and file downloading, namely the uploading destination address and the downloading destination address.
The file selection module is used for selecting files needing to be uploaded and downloaded;
the method comprises the steps of receiving a file which is selected by a user and needs to be uploaded or downloaded so as to realize uploading or downloading of the file, and selecting the file which needs to be uploaded or 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 conveniently obtain the uploading result information. After the file downloading operation is completed, the client end finally feeds the downloading result back to the user, so that the user can conveniently obtain the downloading result information. And the result feedback module is used for realizing the feedback of the uploading result and the downloading result.
For the specific limitation of the file transfer system, reference may be made to the above limitation of the file transfer method, which is not described herein again. The various modules in the file transfer system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Example five:
the embodiment provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, and is characterized in that the processor implements the steps of the file transmission method when executing the computer program.
The computer device may be a terminal, and its internal structure diagram 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 comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. 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, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configuration shown in fig. 5 is a block diagram of only a portion of the configuration relevant to the present solution and does not constitute a limitation on the computing device to which the present solution applies, and that a particular computing device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, which 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 method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission, which is selected by a user from pod information fed back by the webshell service from the client, 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 following steps:
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 an uploading destination pod according to the file uploading instruction.
In one embodiment, the processor, when executing the computer program, further performs the following steps:
according to the file downloading instruction, the file to be transmitted is mounted into a webshell service cache from a pod of a downloading source through a webshell service;
and transmitting the file to be transmitted in the webshell service cache to a download destination address according to the file download instruction.
In one embodiment, the processor, when executing the computer program, further performs the following steps:
and after the transmission of the transmission file is finished, feeding back the transmission result to the user.
Example six:
the present embodiments provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
the method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission, which is selected by a user from pod information fed back by the webshell service from the client, 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 following steps:
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 an uploading destination pod according to the file uploading instruction.
In one embodiment, the processor, when executing the computer program, further performs the following steps:
according to the file downloading instruction, the file to be transmitted is mounted into a webshell service cache from a pod of a downloading source through a webshell service;
and transmitting the file to be transmitted in the webshell service cache to a download destination address according to the file download instruction.
In one embodiment, the processor, when executing the computer program, further performs the following steps:
and after the transmission of the transmission file is finished, feeding back a transmission result to the user.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile 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), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A method for file transfer, the method comprising:
the method comprises the steps that a client receives a file transmission starting instruction of a user to start webshell service;
detecting all the pods under the platform through the webshell service, and feeding back the detected pod information to the client;
the client receives a destination pod for file transmission, which is selected by a user from pod information fed back by the webshell service from the client, 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 according to claim 1, wherein the file transfer instruction includes a file upload instruction and a file download instruction.
3. The file transfer method according to claim 2, wherein the file upload instruction includes:
and the file to be transmitted to be uploaded, the uploading destination pod, the uploading destination container and the uploading destination address thereof.
4. The file transfer method according to claim 3, characterized in that: when the file transmission instruction is a file uploading instruction, the step of completing transmission of the file to be transmitted through the webshell service comprises the following steps:
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 an uploading destination pod according to the file uploading instruction.
5. The file transfer method according to claim 2, characterized in that: the file downloading instruction comprises:
downloading a source destination pod, downloading a source destination container, downloading a source destination address, a file to be downloaded and to be transmitted, and downloading a destination address.
6. The file transfer method according to claim 5, characterized in that: when the file transmission instruction is a file downloading instruction, the step of completing the transmission of the file to be transmitted through the webshell service comprises the following steps:
according to the file downloading instruction, the file to be transmitted is mounted into a webshell service cache from a pod of a downloading source through a webshell service;
and transmitting the file to be transmitted in the webshell service cache to a download destination address according to the file download 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 finished, feeding back the 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 a user and the K8S platform;
the system comprises a Pods and a webshell service, wherein the Pods comprise a plurality of Pods, the webshell service is a special pod and is used for realizing the interaction of files between a client and containers, each pod comprises a plurality of containers, and each container comprises a plurality of files;
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 uploading and downloading files;
the address configuration module is used for configuring the addresses of file uploading and downloading;
the file selection module is used for selecting files needing 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 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: 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.
CN202210172817.1A 2022-02-24 2022-02-24 File transmission method, system, computer equipment and storage medium Active CN114465994B (en)

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 true CN114465994A (en) 2022-05-10
CN114465994B 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 (4)

* Cited by examiner, † Cited by third party
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
US20200250074A1 (en) * 2019-02-04 2020-08-06 Oracle International Corporation Test Orchestration Platform
CN112463398A (en) * 2019-09-09 2021-03-09 杭州海康机器人技术有限公司 File transmission method and device, terminal equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
US20200250074A1 (en) * 2019-02-04 2020-08-06 Oracle International Corporation Test Orchestration Platform
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
CN114465994B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN108256114B (en) Document online preview method and device, computer equipment and storage medium
CN107689976B (en) File transmission method and device
CN108829485A (en) Update method, device, storage medium and the computer equipment of application interface layout
CN107861760A (en) BIOS collocation method, terminal and server
CN111666129B (en) Container mirror image processing method, electronic device, storage medium and system
CN110689232A (en) Workflow configuration optimization processing method and device and computer equipment
CN108268346B (en) Data backup method, device, equipment and storage medium
CN108418797B (en) Webpage access method and device, computer equipment and storage medium
CN105554137A (en) Backup system and method
CN113094076A (en) Version iteration method, device, equipment and medium based on version control
CN104994183A (en) Short network address determining method and device
CN114567584B (en) Routing information processing method, device, computer equipment and storage medium
CN114281263A (en) Storage resource processing method, system and equipment of container cluster management system
CN108132832B (en) Application program starting method and device
CN111787105B (en) File transmission method, device, computer equipment and storage medium
CN114465994A (en) File transmission method, system, computer equipment and storage medium
CN109902257B (en) Resource access method, device, computer equipment and storage medium
US20230351050A1 (en) Method and apparatus for custom development of payment application, computer device, and storage medium
CN104570967A (en) Android system based remote control method and system
CN111506388A (en) Container performance detection method, container management platform and computer storage medium
CN113419814B (en) Virtual machine creating method, device, equipment and storage medium in cloud platform
CN112685613B (en) Resource package query method and device and information processing system
CN110769016A (en) File uploading method and computer storage medium
JP6834838B2 (en) Computer boot method and computer
CN113672243A (en) Linux system installation method, device, system, computer equipment and 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