CN111651416B - Sketch project file uploading preview method, system, equipment and medium - Google Patents

Sketch project file uploading preview method, system, equipment and medium Download PDF

Info

Publication number
CN111651416B
CN111651416B CN202010499263.7A CN202010499263A CN111651416B CN 111651416 B CN111651416 B CN 111651416B CN 202010499263 A CN202010499263 A CN 202010499263A CN 111651416 B CN111651416 B CN 111651416B
Authority
CN
China
Prior art keywords
file
sketch
project file
project
identification number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010499263.7A
Other languages
Chinese (zh)
Other versions
CN111651416A (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.)
Ctrip Travel Information Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Technology Shanghai 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 Ctrip Travel Information Technology Shanghai Co Ltd filed Critical Ctrip Travel Information Technology Shanghai Co Ltd
Priority to CN202010499263.7A priority Critical patent/CN111651416B/en
Publication of CN111651416A publication Critical patent/CN111651416A/en
Application granted granted Critical
Publication of CN111651416B publication Critical patent/CN111651416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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]

Abstract

The invention discloses a method, a system, equipment and a medium for uploading and previewing a Sketch project file, wherein the method comprises the following steps: uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in a storage system; the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number; generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file; an online preview address is accessed in the browser to preview the sktch project file. According to the invention, the Sketch project file is uploaded through one Sketch plug-in the Sketch software, and the Web application can preview the Sketch file through the unique online preview address associated with the project file identification number and the version identification number after the file is uploaded, so that the design workflow is greatly simplified, and the work efficiency is improved.

Description

Sketch project file uploading preview method, system, equipment and medium
Technical Field
The invention relates to the field of file processing, in particular to a method, a system, equipment and a medium for uploading and previewing a Sketch project file.
Background
The Sketch is vector drawing software designed for an interface, is simple and easy to learn and rich in functions, is commonly used in graphic design companies, internet companies and the like, but the Sketch software is only suitable for a macOS (apple computer system) platform at present, and a design draft file can only be opened by using the Sketch software on the macOS platform, so that difficulty is brought to people who do not purchase apple computers or do not purchase the Sketch software to view the manuscript, and the Sketch software is particularly inconvenient in companies which need collaborative design of multiple colleagues.
As more and more of the sktch files are designed by each design team, the storage of these large files is more scattered, which is unfavorable for unified management. The uploading mode of the Sketch files is based on the mode of the traditional FTP (File Transfer Protocol ) and is uploaded to a storage platform, and cannot be directly completed in the Sketch software, the file uploading mode can directly cover the files with the same names, version information cannot be stored, and the files of the storage platform cannot be directly previewed.
Disclosure of Invention
The invention aims to overcome the defects that a colleague of a non-macOS platform which needs collaborative design cannot open a Sketch design and a storage platform file cannot be directly previewed in the prior art, and provides an uploading previewing method, a system, electronic equipment and a storage medium of a Sketch project file.
The invention solves the technical problems by the following technical scheme:
the invention provides an uploading preview method of a Sketch project file, which comprises the following steps:
uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in a storage system;
the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number of the Sketch project file;
generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and accessing the online preview address in a browser to preview the Sketch project file.
Preferably, before the Sketch project file is uploaded and stored in the storage system, the Sketch project file is exported, marked, sliced, packed and compressed;
the Sketch project file comprises at least one of a Sketch file, a labeling manuscript JSON (JavaScript Object Notation, JS object numbered musical notation) file, a slice JSON file and a picture file generated by the Sketch file;
when the online preview address is accessed in a browser, at least one of the Sketch file, the annotation manuscript JSON file, the slice JSON file and a picture file generated by the Sketch file is obtained, and a preview page of the Sketch project file is loaded and generated;
after the online preview address of the Sketch project file is generated, a browser is automatically opened, and the online preview address is jumped to, so that the Sketch project file is previewed.
Preferably, the storage system comprises a system database and a Ceph (open source storage software) distributed storage system;
when a Sketch project file is uploaded and stored in a storage system, the Ceph distributed storage system stores the Sketch file according to a naming mode of a Sketch. Uuid=A, the Ceph distributed storage system stores the annotation manuscript JSON file according to a naming mode of an A.pages. JSON, the Ceph distributed storage system stores the slice JSON file according to a naming mode of an A.slots. JSON, and the Ceph distributed storage system stores the picture file according to a naming mode of an A.P.png; wherein A represents the version identification number, P represents a picture document identification, and the picture document identification is obtained by analyzing the annotation manuscript JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the system database returns the file identification number of the Sketch project file.
Preferably, before uploading the Sketch project file and storing in the storage system, verifying the user authority of the client requesting uploading;
and/or verifying the user authority of the client requesting the preview before accessing the online address in the browser.
The invention also provides an uploading preview system of the Sketch project file, which comprises a file uploading module, an identification number generating module, an address generating module and a preview module;
the file uploading module is used for uploading the Sketch project file to the storage system at the Sketch plug-in client;
the identification number generation module is used for generating a version identification number of the Sketch project file in the Sketch plug-in, and the identification number generation module is also used for returning a file identification number of the Sketch project file from the storage system;
the address generation module is used for generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and the preview module is used for accessing the online preview address in a browser and previewing the Sketch project file.
Preferably, the system for uploading and previewing the Sketch project file further comprises a preprocessing module;
the preprocessing module is used for conducting export labeling, slicing, packaging and compression on the Sketch project file before uploading the Sketch project file and storing the Sketch project file into the storage system;
the Sketch project file comprises at least one of a Sketch file, a markup script JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online address is accessed in the browser, the preview module further acquires at least one of a Sketch file, the annotation manuscript JSON file, the slice JSON file and a picture file generated by the Sketch file, and loads and generates a preview page of the Sketch project file; after generating the online preview address of the sktch project file, the preview module is further configured to automatically open a browser, skip to the online preview address, and preview the sktch project file.
Preferably, the storage system comprises a system database and a Ceph distributed storage system;
the uploading preview system of the Sketch project file further comprises a storage module; when a Sketch project file is uploaded and stored in the Ceph storage system, the storage module stores the Sketch file according to the naming mode of a sunset=A, the storage module stores the annotation manuscript JSON file according to the naming mode of an A.pages.json, the storage module stores the slice JSON file according to the naming mode of an A.slots.json, and the storage module stores the picture file according to the naming mode of an A.P.png; wherein A represents the version identification number, P represents a picture document identification, and the picture document identification is obtained by analyzing the annotation manuscript JSON file and the slice JSON file;
when the storage system returns the file identification number of the Sketch project file, the identification number generation module returns the file identification number of the Sketch project file from the system database.
Preferably, the uploading preview system of the Sketch project file further comprises a permission verification module; before the Sketch project file is uploaded and stored in the storage system, the authority verification module verifies the user authority of the client side requesting uploading;
and/or, before accessing the online address in the browser, the permission verification module verifies the user permission of the client requesting the preview.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the uploading preview method of the Sketch project file when executing the computer program.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the aforementioned method for uploading previewing of a Sketch project file.
On the basis of conforming to the common knowledge in the field, the above preferred conditions can be arbitrarily combined to obtain the preferred examples of the invention.
The invention has the positive progress effects that: the invention uploads the Sketch project file through one Sketch plug-in the Sketch software, and the Web (global wide area network) application after uploading the file can preview the Sketch file through a unique online preview address associated with the project file identification number and the version identification number. Furthermore, only authorized users can access the online preview address, so that confidentiality of project files is guaranteed, convenience is provided for viewing design manuscript files by different team members, design workflow is greatly simplified, and working efficiency is improved. And the history modification version of the Sketch file can be checked when the Sketch file is previewed, so that the design work is faster and more convenient.
Drawings
Fig. 1 is a flowchart of a method for previewing an upload of a Sketch project file according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for previewing an upload of a Sketch project file according to embodiment 2 of the present invention.
Fig. 3 is a historical version interface diagram of a method for previewing an upload of a sktch project file according to embodiment 2 of the present invention.
Fig. 4 is a schematic block diagram of an upload preview system of a Sketch project file according to embodiment 3 of the present invention.
Fig. 5 is a schematic block diagram of an upload preview system of a Sketch project file according to embodiment 4 of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device for implementing a method for previewing an upload of a sktch project file according to embodiment 5 of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides an uploading preview method of a Sketch project file. As shown in fig. 1, the method comprises the steps of:
s11, uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in a storage system.
When a designer finishes designing a Sketch project file, the Sketch plug-in client side acquires current file data through interaction between the Sketch plug-in and the Sketch software, selects a page to be uploaded in uploading settings, and can call an API (Application Programming Interface, application program interface) interface service to upload the selected Sketch project file after setting other options.
S12, the Sketch plugin generates a version identification number of the Sketch project file, and the storage system returns the file identification number of the Sketch project file.
After the uploading is successful, the Sketch plug-in generates a version identification number of the Sketch project file, the storage system returns the file identification number of the Sketch project file, and the generated file identification number and the version identification number are written into a system database.
S13, generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file.
The Sketch plug-in generates an online preview address of the Sketch project file according to the returned file identification number and version identification number of the Sketch project file. If the file identification number of a certain Sketch project file is 5e96fadfa91e5b00692a1a8e and the version identification number is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, then the online preview address of the Sketch project file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb237.
S14, accessing an online preview address in the browser to preview the Sketch project file.
The Sktech plug-in the browser can preview the Sktech project file by routing an online preview address of the Sktech project file of the directly open Web application through a URL (Uniform Resource Locator ).
By creating an API interface service, the embodiment uploads a Sketch project file in a Sketch software by one-click of a Sketch plug-in, and the Web application can preview the Sketch file through a unique online preview address associated with the file identification number and version identification number of the project file after file upload. The embodiment establishes a new process of delivering and developing the Sketch design manuscript and a visualized on-line preview platform of the Sketch file, effectively solves the management problem of decentralized large Sketch files, enables a designer to upload on a plug-in terminal by one key, greatly improves the efficiency of exporting and delivering manuscripts, directly previews and marks the manuscripts on line, and further reduces the time cost and communication cost of development links.
Example 2
This example is a further optimization based on example 1. As shown in fig. 2, the method for uploading and previewing the Sketch project file of the present embodiment includes the following steps:
and S21, performing export labeling, slicing, packaging and compression on the Sketch project file.
When a designer finishes designing a Sketch project file, firstly, a Sketch plug-in is used for exporting, labeling, slicing, packaging and compressing the Sketch project file, and the Sketch project file is integrated into at least one of a Sketch file, a labeling draft JSON file, a slicing JSON file and a picture file generated by the Sketch file, so that the Sketch project file can be re-integrated in a subsequent browsing and viewing process.
S22, verifying the user authority of the client side requesting uploading.
After integrating the Sketch project files, the API interface service verifies the user rights of the client through token to ensure that only authenticated users can upload the files to the storage system, guaranteeing the confidentiality of the project.
S23, uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in the Ceph distributed storage system.
Similar to step S11 of embodiment 1, this embodiment uploads a picture including a Sktech file, a markup script JSON file, a slice JSON file, and a creation of the Sktech file to the Ceph distributed storage system through interaction of the Sktech plug-in with the Sktech software in the Sktech plug-in client after integrating the Sktech project file. The distributed storage system Ceph has an open API form, can be well and directly docked with the Sketch, and is well suited for being deployed inside an enterprise.
S24, the Sketch plugin generates a version identification number of the Sketch project file, and the system database returns the file identification number of the Sketch project file.
The storage system in this embodiment includes a system database and a Ceph distributed storage system, where the system database is used for storing data of information such as a file identifier, a version identifier, a project name, a file name, and the like, and the Ceph distributed storage system is used for physical storage of a large file. When the Sketch project file is uploaded and stored in the storage system, the Ceph distributed storage system receives data, stores the received file according to the rule name, stores information such as the file name, the file identification number and the like in the system database, and then returns the file identification number F of the Sketch project file. After the file is uploaded, the Sketch plug-in generates a version identification number A, and writes the version identification number A into a system database. Wherein the file identification number F is used to identify the stored information of the Sketch project file and the version identification number a is used to identify the different versions of the Sketch project file.
The Ceph distributed storage system stores the Sketch file according to the naming mode of the Sketch. Uuid=A, the annotation manuscript JSON file according to the naming mode of the A.pages. JSON, the slice JSON file according to the naming mode of the A.slots. JSON and the picture file according to the naming mode of the A.P.png; wherein P represents a picture document identifier obtained by parsing the markup document JSON file and slicing the JSON file.
S25, generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file.
This step is the same as step S13 of embodiment 1 and will not be described here again. After the online preview address of the Sketch item file is generated, there are two preview modes, namely an automatic preview mode of step S26 and a daily preview mode of step S27, and step S27 includes step S2701 and step S2702.
S26, automatically opening a browser, and jumping to an online preview address to preview the Sketch project file.
After generating the online preview address of the sktch project file, a default browser is automatically opened and the online preview address of the Web application is directly opened via URL routing, and the sktch preview page is loaded to preview the sktch project file.
S2701, verify the user rights of the client requesting the preview.
When the user needs to check the Sketch project file in daily work, the Web application acquires the file identification number of the Sketch project file through an HTTP request, sends a preview request to an API server through an HTTP protocol, and the API interface service verifies the user authority of the client requesting the preview through a token, so that only authenticated users can preview, and confidentiality of the project file is guaranteed.
S2702, the online preview address is accessed in the browser to preview the Sketch project file.
The API server side queries a system database, obtains a version identification number stored in a file, calls a Ceph system interface, obtains a large file related to the project, comprises at least one of a Sketch file, a labeling draft JSON file, a slicing JSON file and a picture generated by the Sketch file, and returns the pictures to the Web client side; the Web front end application directly opens an online preview address of the Sketch project file through a URL route in a browser by using the annotation manuscript data, the picture and the slice information acquired by the API server, loads and generates a preview page of the Sketch project file, and a user can preview the Sketch project file. Meanwhile, as shown in fig. 3, a historical version of the Sketch project file can be displayed, so that the file of the previous version can be conveniently checked.
In the embodiment, by creating an API interface service, a Sketch project file is uploaded in the Sketch software through one Sketch plug-in one key, and a Web application can preview the Sketch file through a unique online preview address associated with a file identification number and a version identification number of the project file after the file is uploaded; the online preview address can be accessed by only authorized users, so that confidentiality of project files is guaranteed, convenience is provided for viewing design manuscript files by different team members, design workflow is greatly simplified, and working efficiency is improved. And the history modification version of the Sketch file can be checked when the Sketch file is previewed, so that the design work is faster and more convenient.
Example 3
The embodiment provides an uploading preview system of a Sketch project file, which comprises a file uploading module 1, an identification number generating module 2, an address generating module 3 and a preview module 4 as shown in fig. 4.
When a designer finishes designing a Sketch project file, the Sketch plug-in client side acquires current file data through interaction between Sketch plug-in and Sketch software, selects a page to be uploaded in uploading setting, and can call an API interface service to upload the file after setting other options, wherein the file uploading module 1 is used for uploading the selected Sketch project file and storing the file in a storage system.
The identification number generation module 2 is used for generating a version identification number of the Sketch project file in the Sketch plug-in, the identification number generation module 2 is also used for returning the file identification number of the Sketch project file from the storage system, and the generated file identification number and the version identification number are written into a system database.
The address generation module 3 of the skyn plug-in is configured to generate an online preview address of the skyn project file according to the returned file identification number and version identification number of the skyn project file. If the file identification number of a certain Sketch project file is 5e96fadfa91e5b00692a1a8e and the version identification number is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, then the online preview address of the Sketch project file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb237.
The preview module 4 of the Web application is configured to access an online preview address in a browser, and preview the sktch project file.
By creating an API interface service, the embodiment uploads a Sketch project file in a Sketch software by one-click of a Sketch plug-in, and the Web application can preview the Sketch file through a unique online preview address associated with the file identification number and version identification number of the project file after file upload. The embodiment establishes a new process of delivering and developing the Sketch design manuscript and a visualized on-line preview platform of the Sketch file, effectively solves the management problem of decentralized large Sketch files, enables a designer to upload on a plug-in terminal by one key, greatly improves the efficiency of exporting and delivering manuscripts, directly previews and marks the manuscripts on line, and further reduces the time cost and communication cost of development links.
Example 4
This example is a further optimization based on example 3. As shown in fig. 5, the system for uploading and previewing a sktch project file according to the present embodiment further includes a preprocessing module 5, a rights verification module 6, and a storage module 7.
Before the file uploading module 1 uploads the skynch project file and stores the skynch project file in the storage system, the preprocessing module 5 of the skynch plug-in is configured to export, label, slice, package and compress the skynch project file, and integrate the skynch project file into a picture file including at least one of the skynch file, the labeling script JSON file, the slicing JSON file and the skynch file, so that the skynch project file can be re-integrated in a subsequent browsing and viewing process.
After integrating the Sketch project files, and before the file uploading module 1 uploads the files, the authority verification module 6 of the API interface service verifies the user authority of the client through the token so as to ensure that only authenticated users can upload the files to the storage system and ensure the confidentiality of the projects.
Similar to the file upload module 1 of embodiment 3, in this embodiment, after integrating the Sktech project file, the file upload module 1 uploads a picture including the Sktech file, the markup script JSON file, the slice JSON file, and the creation of the Sktech file and stores the picture in the Ceph distributed storage system through interaction with the Sktech software by the Sktech plug-in the Sktech plug-in client. The distributed storage system Ceph has an open API form, can be well and directly docked with the Sketch, and is well suited for being deployed inside an enterprise.
The storage system in this embodiment includes a system database and a Ceph distributed storage system, where the system database is used for storing data of information such as a file identifier, a version identifier, a project name, a file name, and the like, and the Ceph distributed storage system is used for physical storage of a large file. When a Sketch project file is uploaded and stored in a Ceph distributed storage system, the Ceph distributed storage system receives data and stores the received file according to a rule name, specifically, a storage module 7 of the Ceph distributed storage system stores the Sketch file according to a naming mode of Sketch. Uuid=a, stores a markup draft JSON file according to a naming mode of a.pages. JSON, stores a slice JSON file according to a naming mode of a.slots. JSON, and stores a picture file according to a naming mode of a.p.png; wherein A represents the version identification number of the Sketch project file, and P represents the picture document identification obtained by parsing the annotation manuscript JSON file and slicing the JSON file.
After the Ceph distributed storage system stores the uploaded file according to the rule, the information such as the project name, the file identification number and the like is stored in the system database, and then the identification number generating module 2 returns the file identification number F of the Sketch project file from the system database. After the Sketch plug-in finishes the file uploading, the identification number generating module 2 generates a version identification number A and writes the version identification number A into a system database. Wherein the file identification number F is used to identify the stored information of the Sketch project file and the version identification number a is used to identify the different versions of the Sketch project file.
The address generation module 3 of the skyn plug-in is configured to generate an online preview address of the skyn project file according to the generated file identification number and version identification number of the skyn project file. If the file identification number of a certain Sketch project file is 5e96fadfa91e5b00692a1a8e and the version identification number is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, then the online preview address of the Sketch project file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb237.
After generating the online preview address of the Sketch project file, there are two preview modes, automatic preview and daily preview. The automatic preview mode is that after the uploading of the file is completed, the browser is automatically opened, the Sketch project file is previewed in the browser, and whether the uploaded file meets the requirements can be checked and checked. At this time, the preview module 4 of the Web application automatically opens a default browser and directly opens the online preview address of the Web application through URL routing, and obtains at least one of a sktech file, a markup document JSON file, a slice JSON file, and a picture file generated by the sktech file, loads a preview page for generating the sktech project file, and previews the sktech project file.
The daily preview mode is to check the Sketch project file in the browser after the user authority verification when the daily work needs to check the Sketch project file. At this time, the preview module 4 of the Web application obtains the file identification number of the Sketch project file through the HTTP request, sends the preview request to the API server through the HTTP protocol, and the authority verification module 6 of the API interface service verifies the user authority of the client requesting the preview through token, so as to ensure that only authenticated users can preview the project file, and ensure confidentiality of the project file. Then, the API server queries a system database, takes a version identification number A stored in the file, calls a Ceph system interface, acquires a large file related to the project, comprises at least one of a Sketch file, a labeling manuscript JSON file, a slicing JSON file and a picture generated by the Sketch file, and returns the pictures to the Web client; the Web front end application directly opens an online preview address of the Sketch project file through URL routing in a browser by using the annotation manuscript data, the pictures and the slice information acquired by the API server, loads and generates a preview page of the Sketch project file, and a user can preview the Sketch project file. Meanwhile, as shown in fig. 3, a historical version of the Sketch project file can be displayed, so that the file of the previous version can be conveniently checked.
In the embodiment, by creating an API interface service, a Sketch project file is uploaded in the Sketch software through one Sketch plug-in one key, and a Web application can preview the Sketch file through a unique online preview address associated with a file identification number and a version identification number of the project file after the file is uploaded; the online preview address can be accessed by only authorized users, so that confidentiality of project files is guaranteed, convenience is provided for viewing design manuscript files by different team members, design workflow is greatly simplified, and working efficiency is improved. And the history modification version of the Sketch file can be checked when the Sketch file is previewed, so that the design work is faster and more convenient.
Example 5
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention. The electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, which when executed implements the method for uploading previewing the Sktech project file of embodiment 1 or 2. The electronic device 50 shown in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 6, the electronic device 50 may be embodied in the form of a general purpose computing device, which may be a server device, for example. Components of electronic device 50 may include, but are not limited to: the at least one processor 51, the at least one memory 52, a bus 53 connecting the different system components, including the memory 52 and the processor 51.
The bus 53 includes a data bus, an address bus, and a control bus.
Memory 52 may include volatile memory such as Random Access Memory (RAM) 521 and/or cache memory 522, and may further include Read Only Memory (ROM) 523.
Memory 52 may also include a program/utility 525 having a set (at least one) of program modules 524, such program modules 524 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The processor 51 executes various functional applications and data processing such as the Sktech project file upload preview method of embodiment 1 or 2 of the present invention by running a computer program stored in the memory 52.
The electronic device 50 may also communicate with one or more external devices 54 (e.g., keyboard, pointing device, etc.). Such communication may occur through an input/output (I/O) interface 55. Also, model-generated device 30 may also communicate with one or more networks, such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet, through network adapter 56. As shown in fig. 6, the network adapter 56 communicates with other modules of the model-generating device 50 via the bus 53. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in connection with the model-generating device 50, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, data backup storage systems, and the like.
It should be noted that although several units/modules or sub-units/modules of an electronic device are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more units/modules described above may be embodied in one unit/module in accordance with embodiments of the present invention. Conversely, the features and functions of one unit/module described above may be further divided into ones that are embodied by a plurality of units/modules.
Example 6
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the Sktech project file upload preview method of embodiment 1 or 2.
More specifically, among others, readable storage media may be employed including, but not limited to: portable disk, hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible embodiment, the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps of the method for uploading previewing of Sktech project files implementing embodiment 1 or 2, when said program product is run on the terminal device.
Wherein the program code for carrying out the invention may be written in any combination of one or more programming languages, which program code may execute entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on the remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (6)

1. The method for uploading and previewing the Sketch project file is characterized by comprising the following steps of:
uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in a storage system;
the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number of the Sketch project file;
generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
accessing the online preview address in a browser to preview the Sketch project file;
before the Sketch project file is uploaded and stored in a storage system, the Sketch project file is exported, marked, sliced, packed and compressed;
the Sketch project file comprises at least one of a Sketch file, a markup script JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online preview address is accessed in a browser, at least one of the Sketch file, the annotation manuscript JSON file, the slice JSON file and a picture file generated by the Sketch file is obtained, and a preview page of the Sketch project file is loaded and generated;
after the online preview address of the Sketch project file is generated, automatically opening a browser, jumping to the online preview address, and previewing the Sketch project file;
the storage system comprises a system database and a Ceph distributed storage system;
when a Sketch project file is uploaded and stored in a storage system, the Ceph distributed storage system stores the Sketch file according to a naming mode of a Sketch. Uuid=A, the Ceph distributed storage system stores the annotation manuscript JSON file according to a naming mode of an A.pages. JSON, the Ceph distributed storage system stores the slice JSON file according to a naming mode of an A.slots. JSON, and the Ceph distributed storage system stores the picture file according to a naming mode of an A.P.png; wherein A represents the version identification number, P represents a picture document identification, and the picture document identification is obtained by analyzing the annotation manuscript JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the system database returns the file identification number of the Sketch project file.
2. The method for previewing the upload of the Sketch item file according to claim 1, wherein a user authority of the client requesting the upload is verified before uploading and storing the Sketch item file in the storage system;
and/or verifying the user authority of the client requesting the preview before accessing the online preview address in the browser.
3. The system for uploading and previewing the Sketch project file is characterized by comprising a file uploading module, an identification number generating module, an address generating module and a previewing module;
the file uploading module is used for uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in the storage system;
the identification number generation module is used for generating a version identification number of the Sketch project file in the Sketch plug-in, and the identification number generation module is also used for returning a file identification number of the Sketch project file from the storage system;
the address generation module is used for generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
the preview module is used for accessing the online preview address in a browser and previewing the Sketch project file;
the uploading preview system of the Sketch project file further comprises a preprocessing module;
the preprocessing module is used for conducting export labeling, slicing, packaging and compression on the Sketch project file before uploading the Sketch project file and storing the Sketch project file into the storage system;
the Sketch project file comprises at least one of a Sketch file, a markup script JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online preview address is accessed in the browser, the preview module further acquires at least one of a Sketch file, a annotation manuscript JSON file, a slice JSON file and a picture file generated by the Sketch file, and loads and generates a preview page of the Sketch project file; after generating the online preview address of the sktch project file, the preview module is further configured to automatically open a browser, skip to the online preview address, and preview the sktch project file;
the storage system comprises a system database and a Ceph distributed storage system;
the uploading preview system of the Sketch project file further comprises a storage module; when a Sketch project file is uploaded and stored in the Ceph distributed storage system, the storage module stores the Sketch file according to a naming mode of a sunset=A, the storage module stores the annotation file JSON file according to a naming mode of an A.pages.json, the storage module stores the slice JSON file according to a naming mode of an A.slots.json, and the storage module stores the picture file according to a naming mode of an A.P.png; wherein A represents the version identification number, P represents a picture document identification, and the picture document identification is obtained by analyzing the annotation manuscript JSON file and the slice JSON file;
when the storage system returns the file identification number of the Sketch project file, the identification number generation module returns the file identification number of the Sketch project file from the system database.
4. The upload preview system of a sktch project file of claim 3, further comprising a rights verification module; before the Sketch project file is uploaded and stored in the storage system, the authority verification module verifies the user authority of the client side requesting uploading;
and/or, before accessing the online preview address in the browser, the authority verification module verifies the user authority of the client requesting the preview.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of uploading previewing a Sketch project file according to any one of claims 1-2 when the computer program is executed.
6. A computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements the steps of the method for previewing an upload of a Sketch project file according to any one of claims 1-2.
CN202010499263.7A 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium Active CN111651416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010499263.7A CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010499263.7A CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN111651416A CN111651416A (en) 2020-09-11
CN111651416B true CN111651416B (en) 2023-06-13

Family

ID=72351192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010499263.7A Active CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN111651416B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106373036A (en) * 2016-09-21 2017-02-01 广东中建普联科技股份有限公司 Construction project data automatic recognition and analysis method and system
CN107465938A (en) * 2016-06-06 2017-12-12 北京优朋普乐科技有限公司 The method, apparatus and media server system of a kind of media preview
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8099392B2 (en) * 2007-06-08 2012-01-17 Apple Inc. Electronic backup of applications
US20120169759A1 (en) * 2011-01-04 2012-07-05 Samsung Electronics Co., Ltd. Method and apparatus for creating a live artistic sketch of an image
CN108574686B (en) * 2017-05-17 2021-08-06 北京金山云网络技术有限公司 Method and device for previewing file online
CN107896244B (en) * 2017-11-07 2020-09-29 中国银联股份有限公司 Version file distribution method, client and server
US11295060B2 (en) * 2017-12-12 2022-04-05 Google Llc Managing comments on binary files preview view in a cloud-based environment
CN109819033A (en) * 2019-01-25 2019-05-28 杭州迪普科技股份有限公司 A kind of resource file loading method and system
CN110955540B (en) * 2019-11-28 2024-03-22 上海携程商务有限公司 Plug-in interaction method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107465938A (en) * 2016-06-06 2017-12-12 北京优朋普乐科技有限公司 The method, apparatus and media server system of a kind of media preview
CN106373036A (en) * 2016-09-21 2017-02-01 广东中建普联科技股份有限公司 Construction project data automatic recognition and analysis method and system
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
EAST文档自动化的研究与实现;杨黎;王枫;;计算机应用与软件(01);第53-56页 *
Possibilities and Limitations of Online Document Tools for Design Collaboration: The Case of Google Docs;Young-Wook Jung 等;ACM;第1096–1108页 *
基于GIS与SketchUp的三维校园建模分析与实现;李娜;何贞铭;陈诗佳;马海兵;;测绘与空间地理信息(11);第87-89页 *

Also Published As

Publication number Publication date
CN111651416A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
US10348718B2 (en) Sharing credentials and other secret data in collaborative environment in a secure manner
JP6482602B2 (en) Predictive storage service
US7783624B2 (en) E-commerce system using searchable tags
US20090043815A1 (en) System and method for processing downloaded data
US11665152B2 (en) Method and system for discovering and logging new microservices for a platform for unified governance of a plurality of intensive computing solutions
US10572546B2 (en) Information processing apparatus, document display method, document display system, and medium
CN102930035A (en) Driving content items from multiple different content sources
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
WO2009129009A1 (en) Inserting a multimedia file through a web-based desktop productivity application
CN104361007B (en) The processing method of browser and its collection
Gheorghe et al. Modern techniques of web scraping for data scientists
WO2023092580A1 (en) Page display method and apparatus, storage medium, and electronic device
JP4788768B2 (en) How to get long data with GET method
WO2011075612A1 (en) Methods and apparatuses for abstract representation of financial documents
US8302162B1 (en) Backup and archival of hosted online content
CN114816499A (en) Electronic resource sharing method and device and storage medium
US10467436B2 (en) Sharing regulated content stored on non-regulated storage platforms
US8676849B2 (en) Storing lossless transforms of data
CN111651416B (en) Sketch project file uploading preview method, system, equipment and medium
CN106796591B (en) Method and apparatus for unifying information and tools from multiple information sources
Yang et al. Catch: cloud data acquisition through comprehensive and hybrid approaches
Junior et al. Cost optimization on public cloud provider for big geospatial data
CN111597059A (en) Interface calling request processing method and device and electronic equipment
JP2018502384A (en) How to delay ID binding to an account
US20130104034A1 (en) System and method of providing off-network access to network content

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