A method and apparatus for constructing a file sharing service, a method for using the same, and a server

By generating and packaging images of web applications and combining them with the Docker runtime environment, a lightweight, low-cost, and secure file sharing service is implemented in the internal network, solving the problems of high development and maintenance costs and insufficient security in existing technologies. It is suitable for file sharing needs in confidential environments.

CN116032906BActive Publication Date: 2025-10-17BOE TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211520583.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-10-17
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

Existing technologies have problems with high development and maintenance costs and insufficient security when achieving internal data sharing. Especially in confidential environments, the use of third-party cloud services poses security risks, and existing solutions are not easy to expand.

Method used

By generating a web application and using an image packaging tool to package it with the build tool image and server image into a web file service image, the Docker runtime environment is used to deploy it on the intranet with one click, and a lightweight Nginx or Tomcat server is used to achieve file sharing. Files can be uploaded and downloaded based on the self-developed web application.

Benefits of technology

It realizes a safe, low-cost and easily scalable file sharing service in the internal network, reduces development and maintenance costs, does not require professional technicians and expensive hardware, ensures that internal data is not stored in third-party devices through the Internet, and has high security and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032906B_ABST
    Figure CN116032906B_ABST
Patent Text Reader

Abstract

The application discloses a kind of file sharing service construction method and device, using method and server, and the construction method of an embodiment includes: generating web application, the web application is formed front-end application by code framework to realize the upload of file, and is realized online viewing and downloading by server;The web application, the building tool image corresponding to the web application and the development kit image, and server image are packaged to generate web file service image by mirror packaging tool.The embodiment provided in the application develops web application based on code framework, and the web application and corresponding running environment are packaged into web file service image using mirror packaging tool, so as to be directly deployed in internal network environment on the basis of realizing file sharing service, with the advantages of lightweight and low cost, with practical application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of software development, in particular to a file sharing service construction method, a file sharing service construction device, a use method, a server, a computer device and a storage medium. BACKGROUND

[0002] In the daily office environment, there is a common situation that internal materials need to be shared within the organization, including but not limited to documents, pictures, videos and audio files. In the prior art, the above-mentioned requirements are usually realized by using a distributed file storage system such as MongoDB, MinIO, etc., which requires professional technical personnel to develop and configure complexly, and has the defect of high development and maintenance cost; on the other hand, the use of third-party cloud services requires additional investment to purchase related services, which poses a security risk to confidential internal materials.

[0003] Therefore, how to safely, lightweight, low-cost and scalable realize internal material sharing has become a technical problem to be solved by the technical personnel in the field. SUMMARY

[0004] In order to solve at least one of the above problems, the first aspect of the present application provides a file sharing service construction method, comprising:

[0005] Generating a web application, the web application forms a front-end application through a code framework to realize the uploading of files, and realizes online viewing and downloading through a server;

[0006] Packing the web application, the build tool image corresponding to the web application, the development kit image, and the server image through a mirror packaging tool to generate a web file service image.

[0007] Further, the web application forms a front-end application through a code framework to realize the uploading of files further comprises:

[0008] The web application forms a front-end application through a swagger code framework to realize the uploading of files.

[0009] Further, the online viewing and downloading through the server further comprises: realizing the online viewing and downloading of files through Nginx or Tomcat.

[0010] Further, the packing of the web application, the build tool image corresponding to the web application, the development kit image, and the server image through the mirror packaging tool to generate the web file service image further comprises:

[0011] building the web application by a build instruction to obtain a build package, the build instruction being executed by a build tool loaded from the build tool image;

[0012] merging the build package and the development tool package image into the server image;

[0013] adding configuration information of the web application to the server image;

[0014] packing the server image by the image packing tool to generate a web file service image.

[0015] Further, the packing the server image by the image packing tool to generate a web file service image further comprises:

[0016] customizing the server image by using a Dockerfile to generate the web file service image.

[0017] The second aspect of the present application provides a use method of a web file service image built by the build method provided in the first aspect of the present application, applied to a server, comprising:

[0018] the server loads the web file service image;

[0019] the server starts the web application to form a file service access link;

[0020] the server responds to the operation of the user on the file service access link to perform file uploading by a front-end application formed by a code framework, or file browsing and downloading by the server.

[0021] Further, the performing file uploading by the front-end application formed by the code framework further comprises:

[0022] the server receives at least one file and obtains a file identifier of each file;

[0023] the server respectively judges whether the corresponding file has been stored according to the file identifier of each file, and saves the file if it has not been stored.

[0024] Further, after the server receives at least one file and obtains a file identifier of each file, before the server respectively judges whether the corresponding file has been stored according to the file identifier of each file, and saves the file if it has not been stored, the use method further comprises:

[0025] the server judges whether there is a storage path for storing the at least one file, and creates a new storage path if there is not.

[0026] The third aspect of the present application provides a construction device of a file sharing service, comprising a program generation unit and a mirror generation unit, wherein

[0027] The program generation unit is configured to generate a web application, the web application forms a front-end application through a code framework to realize uploading of files, and realizes online viewing and downloading through a server;

[0028] The mirror generation unit is configured to package the web application, a construction tool mirror corresponding to the web application, a development tool package mirror, and a server mirror through a mirror packaging tool to generate a web file service mirror.

[0029] The fourth aspect of the present application provides a server, comprising a controller, the controller is configured to:

[0030] Load a web file service mirror, the web file service mirror is constructed by applying the construction method provided in the first aspect of the present application;

[0031] Start a web application to form a file service access link;

[0032] In response to user operation on the file service access link, upload files through the front-end application formed by the code framework, or browse and download files through the server.

[0033] The fifth aspect of the present application provides a computer readable storage medium, which stores a computer program,

[0034] The program is executed by a processor to realize the construction method provided in the first aspect of the present application;

[0035] Or

[0036] The program is executed by a processor to realize the use method provided in the second aspect of the present application.

[0037] The sixth aspect of the present application provides a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor,

[0038] The processor executes the program to realize the construction method provided in the first aspect of the present application; or

[0039] The processor executes the program to realize the use method provided in the second aspect of the present application.

[0040] The beneficial effects of the present application are as follows:

[0041] The present application is directed to the current existing problems, develop a kind of file sharing service construction method, construction device, use method and server, the construction method is based on code framework Development web application, using mirror package tool The web application and corresponding running environment are packaged into web file service mirror image.This embodiment can be directly deployed in internal network environment on the basis of realizing file sharing service, specifically, through web file service mirror image It can be directly deployed in internal network environment, without exposing internal document materials to third-party server, with high security and reliability.Further, when using the constructed web file service mirror image, through Docker running environment, it can be realized Intranet one-key deployment to ordinary office computer, without purchasing expensive server hardware, with the advantages of lightweight and low cost, this embodiment is based on self-research web application, can be extended according to demand change at any time, with wide application prospect. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0043] Figure 1 A flow chart of a file sharing service construction method according to an embodiment of the present application is shown.

[0044] Figure 2 A flow chart of generating a web file service mirror image according to an embodiment of the present application is shown.

[0045] Figure 3 A flow chart of a use method according to an embodiment of the present application is shown.

[0046] Figure 4 A file upload front-end interface schematic diagram according to an embodiment of the present application is shown.

[0047] Figure 5 A file browsing and downloading front-end interface schematic diagram according to an embodiment of the present application is shown.

[0048] Figure 6 A structural block diagram of a construction device according to an embodiment of the present application is shown.

[0049] Figure 7 A structural schematic diagram of a computer device according to another embodiment of the present application is shown. DETAILED DESCRIPTION

[0050] For a more clear explanation of the present application, the present application is further explained below in connection with preferred embodiments and the accompanying drawings. Similar components are denoted by the same reference numerals in the drawings. Those skilled in the art should understand that the specific description below is illustrative rather than limiting, and the protection scope of the present application should not be limited thereby.

[0051] The prior art has the problems of complex architecture, high development and maintenance cost, difficulty in exposing internal data to third-party platforms, and difficulty in expansion for file data sharing in a private domain environment, including but not limited to a confidential environment and an internal network environment. If the internal data is implemented for file sharing using a traditional cloud service mode, the internal data needs to be stored in a third-party server through the Internet, which has a security risk, especially for confidential data with a high security level, which needs to be shared in an internal network isolated from the Internet, such as through a third-party cloud service and a file sharing product provided by a commercial company. Due to the security risk, it cannot meet the demand for file data sharing in a private domain environment.

[0052] On the other hand, the usual way to implement document storage in the prior art is to implement a heavy product based on MongDB or MinIO. This scheme requires higher technical personnel in the development, deployment, and maintenance stages. Considering that most enterprises and institutions do not have corresponding technical personnel, it is not convenient to manage internal resources by third-party technical personnel, it is not possible to customize development at any time, and it is not willing to invest a large cost for development and maintenance.

[0053] In view of the above situation, the inventors propose that, compared with the demand for internal file data sharing in a wide private domain environment, the reason why the existing solution based on MongDB or MinIO has shortcomings is that the scheme is too complex, requiring professional technical personnel for development and maintenance, high cost, and difficult to expand.

[0054] According to the above problems and the causes of the problems, as shown in Figure 1 An embodiment of the present application provides a construction method of a file sharing service, including: generating a web application, the web application forms a front-end application through a code framework to realize uploading of files, and realizes online viewing and downloading through a server; and packaging the web application, a construction tool image corresponding to the web application, a development tool package image, and a server image through a mirror packaging tool to generate a web file service image.

[0055] In this embodiment, the web application, server, and related tools are integrated into a web file service image. Any computer that allows Docker can load the web file service image with one click. There is no need for technicians proficient in distributed, heavyweight file service development technology, and even idle office computers can be used to run the web application. Therefore, the construction method disclosed in this embodiment has a simple and lightweight architecture, low development and maintenance costs, and does not require professional technicians and professional server equipment. In addition, the web application can use existing office computers, even low-configuration idle computers, to achieve file data sharing in a private domain environment, without the need to store internal file data on third-party devices via the Internet, and has high security, reliability, and practicality.

[0056] In an optional embodiment, the web application forms a front-end application through a code framework to implement file uploading further includes: the web application forms a front-end application through a swagger code framework to implement file uploading.

[0057] In this embodiment, the swagger code framework is used to generate documentation and front-end interfaces for related interfaces by embedding annotations in the source code, and a front-end program is generated to match the back-end interface. Therefore, the method for constructing a file sharing service disclosed in the present invention has the following advantages:

[0058] First, there is no need to invest in front-end developers and related artists, effectively reducing development costs;

[0059] Second, because the front-end code is automatically generated by the swagger code framework based on the annotations in the interface code, it effectively solves the problem of inconsistent documentation and code that is common in actual engineering practices, effectively avoids program bugs caused by manual operation errors, and effectively improves the stability and efficiency of development;

[0060] Third, it is possible to test pages generated using the swagger code framework without having to wait for the integration of various system modules before starting testing. Unit testing can begin after a certain interface is developed, effectively reducing testing costs and improving testing efficiency.

[0061] In an optional embodiment, the online viewing and downloading through the server further includes: online viewing and downloading of files through Nginx or Tomcat.

[0062] In the embodiment, a stable and lightweight server is selected as a running container of the web application, for example, a web middleware such as Nginx or Tomcat is used, without complex configuration and deployment operations, without a third-party cloud service, and without a dedicated server with high-end configuration, so that the file sharing service can be built in a private domain environment, and the deployment and maintenance costs are effectively reduced.

[0063] In an optional embodiment, the packaging, by the image packaging tool, of the web application, the build tool image and the development kit image corresponding to the web application, and the server image to generate the web file service image further includes: building the web application by a build tool to obtain a build package, the build tool being obtained by loading the build tool image; merging the build package and the development kit image into the server image; adding configuration information of the web application to the server image; and packaging, by the image packaging tool, the server image to generate the web file service image.

[0064] In the embodiment, the build tool is a lightweight maven tool set based on Java technology, which realizes automatic management of project building and dependency management. Figure 2 As shown in the specific example, the method specifically includes:

[0065] First, the web application is built by a build tool to obtain a build package, the build tool being obtained by loading the build tool image.

[0066] In the embodiment, the build tool image is a maven image, and the development kit image is a JDK image; the Java source code of the web application is obtained, the Java source code including annotations of each interface; the web application is built by a build tool to obtain a build package, the build instruction being mvn clean install, and the build package being a jar package.

[0067] Second, the build package and the development kit image are merged into the server image.

[0068] In the embodiment, the build package and the development kit image are merged into the server image, specifically including: obtaining a server image, the server image being an nginx image; and copying the obtained jar package and JDK in the JDK image into the nginx image.

[0069] Again, the configuration information of the web application is added to the server image.

[0070] In this embodiment, the configuration information of the web application is added to the server image, specifically including: the configuration information of the web application is the command for starting the jar package, the environment variables, the configuration information of the nginx and the port number.

[0071] Finally, the server image is packaged by the image packaging tool to generate a web file service image.

[0072] In this embodiment, the server image is packaged by the image packaging tool to generate a web file service image.

[0073] This embodiment encapsulates the web application's build package, execution instructions, operating environment, and configuration information into the web file service image based on the Docker platform. In actual application, it is only necessary to install the Docker environment on the computer that needs to run the web file service described in this embodiment, and then one-click deployment and operation of the web file service can be achieved through a single instruction. Compared with the implementation solutions based on heavyweight products such as MongDB or MinIO in the prior art, there is no need to build a complex distributed server environment, no need to equip specialized professional and technical personnel, and no need to purchase expensive server hardware. It is possible to upload, browse, and download internal data files in a secure, lightweight, low-cost, and scalable manner within a private domain environment.

[0074] In an optional embodiment, packaging the server image by the image packaging tool to generate the web file service image further includes: using Dockerfile to customize the server image to generate the web file service image.

[0075] In this embodiment, the core content of the server image can be clearly and intuitively described through the Dockerfile file, and the server and the web file service can be integrated, so that the server image can be built through only one docker instruction, such as the docker build instruction.

[0076] At this point, the construction of the file sharing service described in this embodiment is completed. The web file service image constructed in this embodiment has the advantages of being lightweight, easy to deploy, and safe at a high cost. The construction method provided in this embodiment develops a web application based on a code framework, and uses an image packaging tool to package the web application and the corresponding operating environment into a web file service image. The web file service image can be directly deployed in an internal network environment without exposing internal documents to a third-party server, and has high security and reliability; based on the Docker operating environment, it can be deployed to ordinary office computers in the intranet with one click, without the need to purchase expensive server hardware, effectively reducing the construction cost of the intranet file sharing service; at the same time, based on self-developed web applications, it can be expanded at any time according to changes in demand, and has broad application prospects.

[0077] Corresponding to the construction method of the file sharing service provided in the above embodiment, an embodiment of the present application also provides a construction device using the above construction method, such as Figure 6 As shown, it includes a program generation unit and an image generation unit, wherein

[0078] The program generation unit is configured to generate a web application, which forms a front-end application through a code framework to realize file uploading, and realizes online viewing and downloading through a server; the image generation unit is configured to package the web application, the build tool image and development toolkit image corresponding to the web application, and the server image through an image packaging tool to generate a web file service image.

[0079] The construction device provided in this embodiment develops a web application based on a code framework based on a program generation unit, and uses the image packaging tool of the image generation unit to package the web application and the corresponding operating environment into a web file service image. The construction device of this embodiment has a simple and lightweight architecture, low development and maintenance costs, and does not require professional technicians and professional server equipment. It can realize file and data sharing in a private domain environment by using existing office computers or even low-configuration idle computers. There is no need to store internal file data in third-party devices through the Internet, and it has high security, reliability and practicality. Since the construction device provided in the embodiment of the present application corresponds to the construction method provided in the above-mentioned embodiments, the previous implementation method is also applicable to the construction device provided in this embodiment, and will not be described in detail in this embodiment.

[0080] The web file service image constructed based on the above embodiment, such as Figure 3As shown, the application also provides a method for using the web file service mirror, applied to a server, including: the server loads the web file service mirror; the server starts a web application to form a file service access link; and the server responds to user operation on the file service access link to perform file uploading through a front-end application formed by a code framework, or file browsing and downloading through the server.

[0081] In the embodiment, when the constructed web file service mirror is used through a Docker running environment, the web file service mirror can be deployed to an ordinary office computer in a one-key manner in an intranet, without the need to purchase expensive server hardware, and has the advantages of light weight and low cost. The embodiment can be extended according to demand changes at any time based on a self-developed web application, and has a wide application prospect.

[0082] In a specific example, the following steps are used for specific description:

[0083] First, the server loads the web file service mirror.

[0084] In the embodiment, a computer is selected as the server, and the computer is installed with a Windows system, a Linux system, or a Mac OS system, and a Docker environment corresponding to the operating system.

[0085] In the embodiment, considering that the hardware configuration of an office computer in an ordinary office environment is generally not high, the file sharing service construction method disclosed by the application selects a light-weight and extensible technical solution for development, encapsulates the web application and related running environment into a web file service mirror based on a Docker environment, and uses the advantages of the Docker environment and Java language cross-platform to enable the web file service mirror to be compatible with mainstream operating systems, including a Windows system, a Linux system, and a Mac OS system, and to have a low requirement on the hardware configuration of the server, and even a card-type computer can smoothly run the web file service mirror constructed by the embodiment.

[0086] Second, the server starts a web application to form a file service access link.

[0087] In the embodiment, the server starts a web application to form a file service access link. Based on shell script technology, the web application can be automatically started after the server is started. Unlike existing distributed document storage services, the web application of the embodiment can be automatically started in one key without complex operation instructions and hierarchical relationships, and has strong ease of use.

[0088] Finally, based on the server response to user operation on the file service access link, the file is uploaded through the front-end application formed by the code framework, or the file is browsed and downloaded through the server.

[0089] In the embodiment, the user can use the web application program of the application through any computer device with a browser, such as a computer, a mobile phone, a tablet, etc., for example, to upload a file, browse a file online, and download a file, which has wide applicability. Specifically, the user inputs the intranet access address of the web application program using a computer device with a browser function, and a file browsing and downloading interface as shown in FIG. 4 is displayed in the browser. After the user clicks the upload button, a file uploading interface as shown in FIG. 5 is displayed in the browser. The file is uploaded according to the method shown in FIG. 6, and the specific implementation is described in the foregoing embodiment, which is not repeated here. Figure 5 Figure 4 Figure 3

[0090] It is worth noting that, considering the convenience of file uploading and the uniqueness of the file, if the user is not convenient to input the specific file name when uploading, a random unique identification code is automatically generated to ensure that the file name is not repeated. When the uploaded file has the same name as the existing file, the user is prompted and the uploading operation is ended, effectively preventing the problem of confusion in finding the file caused by repeated file names.

[0091] To further improve the reliability of file uploading, in an optional embodiment, after the server receives at least one file and obtains the file identification of each file, the server determines whether the corresponding file has been stored according to the file identification of each file. If not, the server creates a new storage path before saving the file.

[0092] In the embodiment, to further ensure the accuracy of file uploading, when the directory specified by the user does not exist, the path can be automatically created, so that the user can complete the two-step operations of file uploading and directory creation at the same time through one-step operation.

[0093] Corresponding to the web file service image use method provided in the foregoing embodiments, one embodiment of the application further provides a server, comprising a controller configured to: load a web file service image; start a web application program to form a file service access link; and respond to user operation on the file service access link, upload a file through a front-end application formed by the code framework, or browse and download a file through the server.

[0094] ​​​The server of the embodiment can be deployed to a common office computer in the intranet by using the built web file service image through the Docker running environment, without the need to purchase expensive server hardware, and has the advantages of light weight and low cost. The server of the embodiment can be extended according to the demand changes at any time based on the self-developed web application, and has a wide application prospect. Since the server provided by the embodiment corresponds to the web file service image using method provided by the above several embodiments, the server provided by the embodiment also applies to the server provided by the previous embodiments, and will not be described in detail in the embodiment.

[0095] Another embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize: generating a web application, the web application forms a front-end application through a code framework to realize uploading of a file, and realizes online viewing and downloading through a server; and packaging the web application, a build tool image corresponding to the web application, a development kit image, and a server image through an image packaging tool to generate a web file service image.

[0096] Another embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize: a server loads a web file service image; the server starts a web application to form a file service access link; and the server responds to user operation on the file service access link to upload a file through a front-end application formed by a code framework, or to browse and download the file through a server.

[0097] In actual application, the computer readable storage medium can adopt any combination of one or more computer readable media. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples (non-exhaustive list) of the computer readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component.

[0098] A computer readable signal medium can include a propagated data signal with computer executable code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport programming code.

[0099] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0100] Computer program code for carrying out operations for aspects of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0101] As shown in Figure 7 , another embodiment of the present application provides a structural schematic diagram of a computer device. Figure 7 The computer device 12 shown is merely an example and should not be taken as limiting the functionality or applicability of embodiments of the present application.

[0102] As shown in Figure 7 , the computer device 12 is in the form of a general purpose computing device. The components of the computer device 12 can include, but are not limited to, one or more processors or processing units 16, a system memory 28, and a bus 18 that connects the various system components, including the system memory 28 and the processing unit 16.

[0103] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0104] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0105] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, often called a "hard drive"). Although Figure 7 Not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.

[0106] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methods of the embodiments described herein.

[0107] Computer device 12 can also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with computer device 12; and / or any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface(s) 22. Still yet, computer device 12 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network such as the Internet, via network adapter 20. As depicted, network adapter 20 communicates with the other components of computer device 12 via bus 18. It should be appreciated that although not shown, other hardware and / or software modules could be used in conjunction with computer device 12. Such as, for example, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. Figure 7 Figure 7 It should be appreciated that the software modules described herein can generally be comprised of computer-executable instructions, which can be written in any of a number of programming languages, including but not limited to C, C++, Java, Visual Basic, and / or other languages. Such instructions can be stored in various places including, for example, system memory (RAM) 26, on various permanent, removable, and / or removable media, stored / programmed in ROM 30, floppy disks, CD-ROMs, DVD-ROMs, magnetic tapes, and / or other forms of computer-readable media.

[0108] Processor unit 16 executes various functions applications and data processing by running programs stored in system memory 28, such as implementing a method for constructing a file sharing service provided by embodiments of the present application, or implementing a method for constructing a file sharing service provided by embodiments of the present application.

[0109] The present application aims at the current existing problems, and formulates a method for constructing a file sharing service, a construction device, a use method and a server. The construction method develops a web application program based on a code framework, and packs the web application program and a corresponding running environment into a web file service image using a mirror packaging tool. The embodiment can be directly deployed in an internal network environment on the basis of implementing a file sharing service. Specifically, the web file service image can be directly deployed in an internal network environment, without exposing internal document materials to a third-party server, and has high security and reliability. Further, when using the constructed web file service image, the Docker running environment can be used to realize one-key deployment to a common office computer in the intranet, without the need to purchase expensive server hardware, and has the advantages of light weight and low cost. The embodiment based on a self-developed web application program can be extended at any time according to demand changes, and has a wide application prospect.

[0110] ​Obviously, the above embodiments of the present application are merely exemplary for clearly illustrating the present application, and are not intended to limit the implementation modes of the present application. Based on the above description, other different forms of changes or variations can be made by those skilled in the art, and here, all the implementation modes cannot be exhausted, and any obvious changes or variations derived from the technical solutions of the present application are still within the protection scope of the present application.

Claims

1. A method for constructing a file sharing service, characterized in that: include: Generate a web application that uses a code framework to form a front-end application to enable file uploading, and online viewing and downloading through a server; The web application, the construction tool image and the development toolkit image corresponding to the web application, and the server image are packaged by an image packaging tool to generate a web file service image, further comprising: Executing a build instruction on the web application to obtain a build package using a build tool, wherein the build tool is obtained by loading the build tool image; Merging the build package and the development toolkit image into the server image; Adding configuration information of the web application to the server image; The server image is packaged by the image packaging tool to generate a web file service image.

2. The construction method according to claim 1, characterized in that The web application forms a front-end application through a code framework to realize file uploading, further comprising: The web application forms a front-end application through the swagger code framework to realize file uploading.

3. The construction method according to claim 1, characterized in that The online viewing and downloading via the server further includes: Use Nginx or Tomcat to view and download files online.

4. The construction method according to claim 3, characterized in that The step of packaging the server image by the image packaging tool to generate a web file service image further includes: The server image is customized using Dockerfile to generate the web file service image.

5. A method for using a web file service image constructed by the construction method according to any one of claims 1 to 4, applied to a server, characterized in that: include: The server loads the web file service image; The server starts a web application to form a file service access link; The server responds to the user's operation on the file service access link, and uploads the file through the front-end application formed by the code framework, or browses and downloads the file through the server.

6. The method of use according to claim 5, characterized in that: The file uploading by the front-end application formed by the code framework further includes: The server receives at least one file and obtains a file identifier of each file; The server determines whether the corresponding file has been stored according to each file identifier, and saves the file if not.

7. The method of use according to claim 6, characterized in that: After the server receives at least one file and obtains the file identifier of each file, the server determines whether the corresponding file has been stored according to each file identifier, and before saving the file if not stored, the method further includes: The server determines whether a storage path for storing the at least one file exists, and creates a new storage path if not.

8. A device for constructing a file sharing service, characterized in that: It includes a program generation unit and an image generation unit, wherein The program generation unit is configured to generate a web application, which forms a front-end application through a code framework to enable file uploading, and online viewing and downloading through a server; The image generation unit is configured to package the web application, the build tool image and the development toolkit image corresponding to the web application, and the server image through an image packaging tool to generate a web file service image, further comprising: executing a build instruction through a build tool to build the web application to obtain a build package, the build tool obtained by loading the build tool image; merging the build package and the development toolkit image into the server image; adding configuration information of the web application to the server image; and packaging the server image through the image packaging tool to generate a web file service image.

9. A server, characterized in that: The invention comprises a controller, wherein the controller is configured to: Loading a web file service image, wherein the web file service image is constructed by applying the construction method according to any one of claims 1 to 4; Start the web application to form a file service access link; In response to the user's operation on the file service access link, the front-end application formed by the code framework is used to upload the file, or the file is browsed and downloaded through the server.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the construction method according to any one of claims 1 to 4 is implemented; or When the program is executed by a processor, the method of use according to any one of claims 5 to 7 is implemented.

11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the construction method according to any one of claims 1 to 4 is implemented; or When the processor executes the program, the method of use according to any one of claims 5 to 7 is implemented.

Citation Information

Patent Citations

  • Edge server mirror image customization and deployment system and method

    CN112214227A